Skip to content

fix(desk): workspace switcher mirror waits on the wrong part name - #606

Open
tobao17 wants to merge 1 commit into
testfrom
fix/desk-wsmenu-mirror
Open

tobao17 wants to merge 1 commit into
testfrom
fix/desk-wsmenu-mirror

Conversation

@tobao17

@tobao17 tobao17 commented Sep 17, 2026

Copy link
Copy Markdown
Contributor

Bug

Right after creating a workspace (or with any Wm modal open, e.g. Invite), opening the workspace switcher draws the panel under the folder window. The modal dissolves the window manager's isolation, so the focused window's layer (z 50001) escapes to the document root where the top bar (z 10003) loses.

Cause

68294c4 replaced the :has() lift with a data-desk-wsmenu mirror installed by desk/index.js _installWsMenuMirror, waiting on ensurePart("ws-wrapper"). It also added sys_pn: "ws-wrapper" to the switcher's Skeletons.Menu literal, which already declared sys_pn: "wsmenu" a few lines lower. An object literal keeps the last duplicate key, so the part only ever existed as wsmenu, the promise never resolved, the observer was never installed and the lift rule in desk/skin never matched.

A second problem hid behind the first: the observer is bound to one element, and the switcher is re-rendered after desk init.

Fix

  • Wait on the real part name, wsmenu.
  • Re-install the mirror from onPartReady("wsmenu") so it follows every render.
  • Drop the dead duplicate sys_pn and leave a comment so it does not come back.

Verified

On the liam stage endpoint with the fix: opening the switcher stamps data-desk-wsmenu="1"; with the Invite modal open the top bar computes z 100001 and elementFromPoint at the panel's centre hits the menu row.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.
Credits must be used to enable repository wide code reviews.

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.

1 participant