You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Browser profiles: share a custom profile's cookies across all environments
#16180
Browser profiles look global, but their cookies are per environment.
With more than one environment connected, I create a profile and sign in to sites under it (or import cookies from Chrome). Then I open a preview tab under that same profile from a thread in another environment, and I'm signed out of everything. The profile name, the list in Settings → Integrations → Browser profiles, and the settings scope showing "All environments" all suggest one shared identity, but each environment gets its own empty cookie jar behind the same name.
Importing makes it worse. The import wizard always writes into the primary environment's partition, so there's no way in the UI to get imported cookies into the other environments. The workaround is to sign in again in every environment, for every profile.
Evidence from main (3e6b450)
The profile list is client-local settings, so every environment sees the same profiles (browserProfile.ts).
The Electron partition is derived from [environmentId, profileId], or just environmentId for Default (resolvePartitionScope).
The original preview browser (52c77c1) used one shared partition, with the design note: "The shared persist:t3code-preview partition keeps cookies in sync."
6c6740e ("Refine collaborative browser preview") changed it to getBrowserPartition(environmentId). I couldn't find a stated reason for scoping cookies by environment.
Import into a custom profile then works for every environment, and clear/remove only has one partition to touch.
Cookies live on the desktop machine either way. Partitions are local to the Electron app and are never sent to a remote environment, so sharing a profile across environments doesn't move any data off the device.
Questions for maintainers
Was the environment scoping in 6c6740e intentional? If so, what should it protect against?
Existing custom-profile cookies are split across environments. Should the shared partition start empty (users sign in again once), or adopt the primary environment's partition? I lean toward starting empty for simplicity.
If this direction and scope look right, I'm happy to send a PR.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Problem
Browser profiles look global, but their cookies are per environment.
With more than one environment connected, I create a profile and sign in to sites under it (or import cookies from Chrome). Then I open a preview tab under that same profile from a thread in another environment, and I'm signed out of everything. The profile name, the list in Settings → Integrations → Browser profiles, and the settings scope showing "All environments" all suggest one shared identity, but each environment gets its own empty cookie jar behind the same name.
Importing makes it worse. The import wizard always writes into the primary environment's partition, so there's no way in the UI to get imported cookies into the other environments. The workaround is to sign in again in every environment, for every profile.
Evidence from main (
3e6b450)browserProfile.ts).[environmentId, profileId], or justenvironmentIdfor Default (resolvePartitionScope).primaryEnvironment.environmentIdonly (IntegrationsSettings.tsx).History
52c77c1) used one shared partition, with the design note: "The sharedpersist:t3code-previewpartition keeps cookies in sync."6c6740e("Refine collaborative browser preview") changed it togetBrowserPartition(environmentId). I couldn't find a stated reason for scoping cookies by environment.Proposal
Make custom profiles one identity across environments: derive their partition from the profile id alone.
Cookies live on the desktop machine either way. Partitions are local to the Electron app and are never sent to a remote environment, so sharing a profile across environments doesn't move any data off the device.
Questions for maintainers
6c6740eintentional? If so, what should it protect against?If this direction and scope look right, I'm happy to send a PR.
All reactions