| … | … | @@ -177,12 +188,27 @@ export function PreviewMoreMenu({ | |
| 198 | + | {profileName ? <MenuGroupLabel>Profile: {profileName}</MenuGroupLabel> : null} | |
| 199 | + | <MenuItem | |
| 200 | + | onClick={() => | |
| 201 | + | void bridge.clearCookies(environmentId, profileId).catch(() => undefined) | |
🟠 High preview/PreviewMoreMenu.tsx:201
The clear actions target the built-in Default partition when profileId is omitted, even though the menu displays the user's configured default profile. Because PreviewMoreMenu passes the raw optional ID to clearCookies and clearCache, profile-less legacy tabs can clear the wrong profile's data. Resolve the missing ID to DEFAULT_BROWSER_PROFILE_ID before invoking either action.
Also found in 1 other location(s)
apps/web/src/components/preview/PreviewView.tsx:150
activeProfiletreats a missingsnapshot.profileIdas the user's currently configured default profile. However, desktop partition resolution treatsundefinedas the built-in Default profile, andPreviewMoreMenustill receives the originalundefinedID. After upgrading with an existing profile-less tab and selecting a custom default profile, the menu labels the clear actions with that custom profile's name while the actions actually clear the built-in Default profile's cookies/cache. Resolve an absent snapshot ID asDEFAULT_BROWSER_PROFILE_IDso the displayed target matches the cleared partition.
No longer relevant as of 61d5a1136cade87d21fb98f42d5e93d91b3fdad5
| … | … | @@ -45,32 +45,51 @@ type PreviewConfigBridge = Pick<DesktopPreviewBridge, "getPreviewConfig">; | |
| 72 | + | environmentId: environmentId as EnvironmentId, | |
| 73 | + | ...(profileId === "" ? {} : { profileId }), | |
| 74 | + | }; | |
| 75 | + | }; | |
🟡 Medium browser/previewWebviewConfigState.ts:66
A valid profile ID containing \u0000, such as foo\u0000bar, is truncated to foo, so getPreviewConfig loads and returns the partition for the wrong profile. parseConfigKey splits the key on the delimiter even though the ID schemas allow that character; encode the environment/profile pair unambiguously, such as a JSON tuple, instead of splitting on a raw delimiter.
No longer relevant as of 0009cb1daf2c6fea1dbe1643f7ea9fcf298640f1