feat: add h/l keys to resize the inspector split from anywhere - #414
Merged
Conversation
h shrinks and l grows the timeline pane without focusing the divider, the keyboard twin of its ArrowLeft/Right — the way j/k step the selection from anywhere. Both route through a new stepSplit entry point in split.ts that reuses the divider's step math and the single applySplit writer and keeps aria-valuenow in sync, so the focused divider and the keys can't disagree. Past the shrink floor, h snaps into reading mode (leaving the stored ratio intact) and l restores the split from reading — the affordance the collapsed divider can't offer. The keys stay inert while a text field is focused or the detail pane is closed. Surface them in the help sheet (both mirrors) and as Shrink/Grow timeline pane palette actions.
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.
Adds
h/lkeyboard shortcuts to shrink/grow the inspector's split from anywhere — the from-anywhere twin of the divider's focused ArrowLeft/Right, the wayj/kstep the selection. Closes #413.Behavior (the three design calls, owner-confirmed)
hshrinks the timeline pane; past the 25% floor it snaps into reading mode (the divider ArrowLeft twin), leaving the stored ratio intact so a restore returns to the last good ratio.lgrows it; from reading mode it instead restores the split — the affordance the collapsed divider can't offer, since it's unreachable while reading.stepPct).How
stepSplit(dir)insplit.tsreuses the divider'scurrentPct/stepPct/setPctand the singleapplySplitwriter, keepingaria-valuenowin sync so the focused divider and the keys can't disagree. Gated on an open detail pane (a closed pane is a no-op, not an invisible pref write).keyboard.tswiresh/lin the main switch after theisTypingTargetyield;preventDefaultfires only whenstepSplitconsumes the key.assets/index.htmland thetest/support/dom.tsmirror) and asShrink timeline pane/Grow timeline panecommand-palette actions.Verification
split.test.ts,keyboard.test.ts,palette.test.ts.tsc --noEmit+ 630/630 vitest, includes bundle-parity) andjust checkgreen.shore inspect(synthetic events can't reproduce native default-action behavior):lgrew 50→60%,hpast the floor snapped to reading with the stored ratio held at 26%,lrestored to 26%, typinghlinto the search box did not resize, and the URL hash never changed (nothing spurious activated).Reviewed via a Codex Shoreline loop: assessment
acceptedonagent:codex-413, no open input requests.