Skip to content

gh-16314: Hide Set Profile option in private windows - #16319

Merged
mr-cheffy merged 2 commits into
zen-browser:devfrom
Hrushikesh-ramilla:gh-16314
Nov 2, 2026
Merged

mr-cheffy merged 2 commits into
zen-browser:devfrom
Hrushikesh-ramilla:gh-16314

Conversation

@Hrushikesh-ramilla

Copy link
Copy Markdown
Contributor

Fixes #16314

Problem

Firefox contextual identity containers are not supported in private browsing windows. However, when right-clicking the workspace indicator ("Incognito") in the sidebar or opening the tab context menu in a private window, the "Set Profile" submenu was still visible because shouldShowContainers only checked privacy.userContext.ui.enabled and public identity count, omitting a check for private browsing windows.

Fix

  • Updated shouldShowContainers in ZenSpaceManager.mjs to return false in private browsing windows (!this.isPrivateWindow).
  • Ensured the adjacent separator in ZenVerticalTabsManager.mjs is hidden alongside zen-toolbar-context-set-profile when containers are hidden.
  • Added regression test assertions in browser_private_mode.js confirming shouldShowContainers is false and context_zenWorkspacesOpenInContainerTab is hidden in private windows.

Signed-off-by: hrushikeshramilla <ramillahrushikesh@gmail.com>
menu.hidden = !gZenWorkspaces.shouldShowContainers;
const show = gZenWorkspaces.shouldShowContainers;
menu.hidden = !show;
if (separator) {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need for the if-statement

contextMenu.addEventListener("popupshowing", event => {
if (event.target === contextMenu) {
menu.hidden = !gZenWorkspaces.shouldShowContainers;
const show = gZenWorkspaces.shouldShowContainers;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
const show = gZenWorkspaces.shouldShowContainers;
const hidden = !gZenWorkspaces.shouldShowContainers;

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated as suggested, thanks!

Signed-off-by: hrushikeshramilla <ramillahrushikesh@gmail.com>

@mr-cheffy mr-cheffy left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@mr-cheffy
mr-cheffy merged commit 58412b7 into zen-browser:dev Nov 2, 2026
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Set Profile is available in Private Window

2 participants