Repository navigation
fix: prevent full width switch from stealing menu focus - #1741
Merged
Merged
Conversation
Keep the nested switch outside the tab order so pointer openings focus the menu surface and keyboard navigation remains on its rows. Cover pointer and keyboard openings plus row and switch activation. Model: gpt-6.1-sol
Model: gpt-6.1-sol
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.
Related issue
Same-repository UI bug fix reported by the user.
Problem / pressure
Clicking the session header's
⋯button highlighted Full width while the pointer was still on the trigger. Its nested switch was the first tabbable descendant, so the menu's initial focus selected the switch and highlighted the containing row.Summary
Keep the trailing switch outside the tab order so the menu row owns keyboard navigation. Pointer opening focuses the menu surface without preselecting an action; keyboard opening, hover, row activation, and direct switch clicks remain available. The preference changes only on activation, and the menu stays open when it is toggled.
Visual explanation
The screenshot uses the existing synthetic Storybook fixture. It omits optional Share and owner-transfer callbacks; the production entries and their visibility conditions are unchanged.
Before / after
Test plan
NODE_ENV=test pnpm --filter @lody/components exec vitest run tests/session-header-menu.test.tsx tests/conversation-wide-mode.test.tsx— 15 tests.pnpm format.pnpm check— workspace type checking, typed and Effect lint, all configured workspace tests, i18n validation, and boundary guards.pnpm run docs checkreports six pre-existing missing Kimi/Pi submodule links in the bilingual subagent-events note; no new broken links or protected-topic changes.Context handoff
This is a focused fix on a same-repository branch. The owning session README and bilingual bug-fix note document the focus boundary and verification. Optional menu actions, their callbacks, and capability checks are unchanged.