fix(app): restore keyboard project switching in open sidebar#18682
Merged
Hona merged 3 commits intoanomalyco:devfrom Mar 23, 2026
Merged
fix(app): restore keyboard project switching in open sidebar#18682Hona merged 3 commits intoanomalyco:devfrom
Hona merged 3 commits intoanomalyco:devfrom
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR improves keyboard accessibility in the app’s sidebar by allowing collapsed sidebar project avatars to activate on Enter, aligning keyboard and click behavior and adding an E2E regression test to prevent future breakage.
Changes:
- Refactors sidebar project activation into a shared
open()handler and wires it to bothonClickandonKeyDown(Enter). - Prevents default/propagation on
Enterto ensure consistent activation from keyboard focus. - Adds an E2E test covering project switching via
Enterin the collapsed sidebar.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| packages/app/src/pages/layout/sidebar-project.tsx | Adds Enter key handling and reuses a unified open() action for both click and keyboard activation. |
| packages/app/e2e/sidebar/sidebar-popover-actions.spec.ts | Adds an E2E regression test that focuses a collapsed-sidebar project avatar and switches projects via Enter. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Andres77872
pushed a commit
to Andres77872/opencode
that referenced
this pull request
Mar 26, 2026
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
HoverCard.Triggerwrappers out of the tab order soTablands on the real interactive child andEnteractivates it normallyEnterpath in the open sidebar project listRoot Cause
HoverCard.Triggeris implemented viaLinkRootaelement, it getstabIndex=0@opencode-ai/ui/hover-cardwrapper rendered the trigger as adiv, so the wrapper itself became focusable and intercepted keyboard tab order before the nested project buttonVerification
bun typecheckinpackages/appbun typecheckinpackages/uibun test:e2e -- -g \"open sidebar project switch activates on first tabbed enter\"inpackages/app(blocked locally because the backend at127.0.0.1:4096was unavailable)