Repository navigation
Slide the sidebar and Chat for their keyboard shortcuts - #539
Merged
Merged
Conversation
Collaborator
Author
|
Review: Looks good Checked on a local fake-GitHub server (PR build, 1440×900, 1100, 900, 390×844) by sampling pane widths every animation frame. What works
Non-blocking notes
CI: all jobs green. |
The sidebar and split Chat tracks settled at once whenever the last input was a key, so Cmd-\ and Cmd-. snapped while a click slid. Their presence now settles only on a layout change (sidebar) or reduced motion, matching pointer timing. Menus, dialogs, document views, compact panes and count feedback keep settling immediately for keyboard input. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The workspace Chat panel and Projects sidebar class expressions are unchanged; only their presence hooks' settle arguments changed. Their classes still come from the finite presence states. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Widening from compact to split no longer slides Chat in. Opening the inline sidebar from Show sidebar moves focus to Hide sidebar instead of dropping it to the page. DESIGN.md now names the inline sidebar, so the drawer is clearly excluded. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Class expressions in workspace.tsx and navigation-shell.tsx are unchanged; the edits add a layout-change settle flag and a focus hand-off only. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MaggieAppleton
force-pushed
the
design-keyboard-toggle-motion
branch
from
October 13, 2026 11:17
59485b3 to
5040318
Compare
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.
Opening or closing the Projects sidebar (⌘) or Chat (⌘.) with a shortcut snapped, while a click slid. They now slide the same way for both, with the same duration and easing.
Why it snapped
motionImmediately()(apps/web/src/motion-input.ts, added in ee4bb35 Wire purposeful motion into app surfaces) settles every presence transition at once when the last input was a key. That rule fits menus and view swaps. But the sidebar and Chat tracks resize the workspace, and a snap hides where the space went.Change
navigation-shell.tsx: the sidebar presence settles at once only when the layout mode changes. It no longer settles just because a key was pressed.workspace.tsx: split Chat's presence never takes the keyboard gate. It still settles at once when the layout mode changes, so widening from compact to split doesn't slide Chat in. Compact and phone keep their current behaviour.useTransitionPresencestill settles at once underprefers-reduced-motion, and CSStransition: nonestill applies.preventScroll. Chat's track clips withoverflow: clip, so focus can't scroll it. Closing either pane returns focus to the opener only when focus was inside the pane.Still instant for keyboard input (on purpose): menus, popovers, dialogs, Document/Decisions/Build view swaps, compact/phone pane swaps, the scroll back to top on a phone tab, and count/icon/alert feedback (
data-motion-input="pointer"CSS).Docs:
apps/web/DESIGN.mdgains a Do rule.docs/architecture.mdnotes that the two tracks don't count as content swaps.Frame strips (keyboard shortcut, 1280×720, frames about 20–40ms apart)
Before: every frame already shows the final state. After: the pane moves across the frames.
Tests
e2e/keyboard-shortcuts.e2e.ts:transitionrunon the width of.motion-sidebaror.workspace-chat-panel, once per toggle. On the old code this test fails (0 runs).bun run e2e e2e/keyboard-shortcuts.e2e.ts e2e/paper-layout.e2e.ts: 19 passed.bun run ciandbun run typesare green.bun run ciwas run without the git-ignored localdesign-jigfiles.workspace.tsxandnavigation-shell.tsx. The class expressions didn't change; only the presence settle argument did.🤖 Generated with Claude Code
Landing validation
The motion layer is rebased onto the merged loading shell and phone header. Its four prepared patches are unchanged, including the reviewed hashes for the combined workspace. CI, types, production build, 20 focused units, 38 workspace browsers, and eight child-phone cases passed locally. Prior GitHub CI was green; administrator bypass avoids another full cycle for this source-preserving refresh.