fix(chrome): portal model picker out of composer stacking - #22
Merged
Conversation
Composer stacks a relative z-10 box; pin ModelPicker's Popover to LAYER.popover on document.body so the menu is not clipped — same contract as hardbeat920#31.
Assert the fork keeps upstream hardbeat920#31's stacking fix via Popover rather than a local createPortal/menuStyle path.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Port of upstream hardbeat920/monocode#31 onto this fork’s current chrome.
Upstream hardbeat920#31 moved the model picker menu through
createPortalontodocument.bodyat z-index 80 so Composer’sdata-composer-box(relative z-10stacking context) could not clip it. This fork already routes the menu through the sharedPopover(which portals todocument.bodyatLAYER.popover= 80). This PR pins that contract explicitly:ModelPickerpasseslayer={LAYER.popover}and documents the stacking reasoncreatePortal/menuStylepath)No redesign; other composer pickers left alone (same scope note as upstream).
How the portal works
Popoverrenders withcreatePortal(..., document.body)andzIndex: LAYER.popover(80). Outside-click treats both the portalled frame and the trigger anchor as inside. Positioning stays viewport-fixed viaplacePopover.Files
src/chrome/ModelPicker.tsx(+5)src/chrome/ModelPicker.test.ts(+28)Verification
npm run check:web— vitest 1209 passed (118 files),tsc --noEmitcleannpm run build— Vite production build succeededinvoketo mount. No native Windows/Tauri/DWM or live session QA claimed.check+ Windows NSISRefs
bc-53146d94