Repository navigation
agent-office: replace native <select> pickers in Settings with app menus - #771
Merged
yetone merged 1 commit intoNov 5, 2026
Merged
Conversation
…h app menus Replace the three remaining native <select> elements in the Settings menu (#optLang, #optScene, #optQuality) with Magpie-style listbox app menus: - Turn #optLang, #optScene, and #optQuality into button triggers (aria-haspopup="listbox") carrying the shared inline SVG chevron (.chev) that rotates 180deg while open, removing the light/dark data-URI background-image select workarounds. - Pair each trigger with a fixed-positioned role="listbox" menu (#optLangList, #optSceneList, #optQualityList) clamped within the viewport (opening below by default and flipping above when bottom space is tight) so #settings's overflow:auto container never clips options. - Support keyboard navigation (ArrowUp/Down, Home, End, Enter, Space, Tab, and Escape closing the open picker first without closing #settings), capture-phase outside pointerdown, #settings scroll, and window resize dismissal, plus live label updates across all nine languages. - Update test/browser.mjs and agent-office.test.mjs, and re-stamp asset fingerprints in page/index.html. Closes #5
yetone
added a commit
that referenced
this pull request
Nov 5, 2026
Bumps agent-office to 0.3.3 so #771 (frederick-wang: Language, Scene and Quality are in-page listbox menus, not native <select>s, #744) reaches users; dist and npm stop at 0.3.2. Notes it in the changelog, and moves cli.test.mjs's pinned ping version with it. Run on mote at this tree (Bun 1.4.2, HOME=mktemp -d): packages/ agent-office bun test 183 pass; repo bun test 6184 pass, 20 skip, 0 fail; bun scripts/check.mjs exit 0; stamp-page.mjs --check 0. Broken by hand: before the cli.test.mjs edit, the bump alone turned "the authenticated standalone page..." red (0.3.2 vs 0.3.3). Not tried: the page in a real magpie window. #773 has the two small follow-ups from the review.
Contributor
|
Thanks @frederick-wang! Merged and released as agent-office 0.3.3 (served from the dist branch). I tested it on mote in Chromium and WebKit, in light and dark themes, at two window sizes, with both mouse and keyboard, and saved picks come back after a reload. Two small follow-ups are in #773: a screen reader doesn't hear the current value, and in a narrow window, scrolling past the end of a list closes it. |
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
Fixes #744.
Replaces the three native
<select>elements inpackages/agent-office's Settings menu (#optLang,#optScene,#optQuality) with in-page Magpie-style listbox app menus (role="listbox"):flowchart LR subgraph Before["Before (#740)"] S1["select#optLang.lang-select"] & S2["select#optScene.lang-select"] & S3["select#optQuality.lang-select"] --> Native["OS-native <select> popup\n(violates Magpie GUI rule)"] end subgraph After["After (#744)"] B1["button#optLang.lang-select\n(inline SVG .chev)"] --> L1["div#optLangList\n(role=listbox, fixed)"] B2["button#optScene.lang-select\n(inline SVG .chev)"] --> L2["div#optSceneList\n(role=listbox, fixed)"] B3["button#optQuality.lang-select\n(inline SVG .chev)"] --> L3["div#optQualityList\n(role=listbox, fixed)"] end#optLang,#optScene,#optQuality): Replaced<select>with<button type="button" class="lang-select" aria-haspopup="listbox" aria-expanded="false">containing.picker-valand the same inline<svg class="chev" viewBox="0 0 10 6">used by#settingsBtn(rotating 180° when open), eliminating the light/dark data-URI background SVG select workarounds.role="listbox"popovers (#optLangList,#optSceneList,#optQualityList): Positioned withposition: fixed(minWidthmatching the trigger, opening below or flipping above when bottom space is tighter than top space, clamped within8pxof viewport edges) so#settings'soverflow: autocontainer never clips options.ArrowDown,ArrowUp,Home,End,Enter,Space,Tab, andEscape(closing the open picker first and returning focus to its trigger without closing#settings), capture-phase outsidepointerdown,#settingsscroll, and windowresizedismissal, plus live label updates across all nine languages.test/browser.mjsandagent-office.test.mjs, and re-stampedpage/index.htmlasset fingerprints withscripts/stamp-page.mjs.Evidence
HOME=<scratch> bun test packages/agent-office:183 pass, 0 failacross 15 files.bun packages/agent-office/scripts/stamp-page.mjs --check:0(all?v=sha256 stamps verified).bun scripts/check.mjs agent-office:✓ registry.json.1200x820and compact600x620, light and dark): zero<select>elements,aria-expanded/ 180°.chevrotation, viewport clamping, keyboard navigation,Escapeclosing picker before#settings, outside click dismissal, and 9-language live label updates.Merge Danger
Door: Two-way (self-contained UI/DOM update inside
packages/agent-office/page/*and its tests).Blast Radius: Low (scoped to the three Settings pickers
#optLang,#optScene,#optQualityinpackages/agent-office).