Skip to content

feat: add h/l keys to resize the inspector split from anywhere - #414

Merged
kevinswiber merged 1 commit into
mainfrom
feat/issue-413-split-resize-keys
Jul 7, 2026
Merged

feat: add h/l keys to resize the inspector split from anywhere#414
kevinswiber merged 1 commit into
mainfrom
feat/issue-413-split-resize-keys

Conversation

@kevinswiber

Copy link
Copy Markdown
Member

Adds h/l keyboard shortcuts to shrink/grow the inspector's split from anywhere — the from-anywhere twin of the divider's focused ArrowLeft/Right, the way j/k step the selection. Closes #413.

Behavior (the three design calls, owner-confirmed)

  • h shrinks 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.
  • l grows it; from reading mode it instead restores the split — the affordance the collapsed divider can't offer, since it's unreachable while reading.
  • Step size is the divider's own ~24px-equivalent (reuses stepPct).

How

  • New exported stepSplit(dir) in split.ts reuses the divider's currentPct/stepPct/setPct and the single applySplit writer, keeping aria-valuenow in 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.ts wires h/l in the main switch after the isTypingTarget yield; preventDefault fires only when stepSplit consumes the key.
  • Surfaced in the help sheet (both assets/index.html and the test/support/dom.ts mirror) and as Shrink timeline pane / Grow timeline pane command-palette actions.

Verification

  • Strict TDD (red → green): new cases in split.test.ts, keyboard.test.ts, palette.test.ts.
  • Front-end gate (Biome + tsc --noEmit + 630/630 vitest, includes bundle-parity) and just check green.
  • Live real-key verification in Chrome against a running shore inspect (synthetic events can't reproduce native default-action behavior): l grew 50→60%, h past the floor snapped to reading with the stored ratio held at 26%, l restored to 26%, typing hl into the search box did not resize, and the URL hash never changed (nothing spurious activated).

Reviewed via a Codex Shoreline loop: assessment accepted on agent:codex-413, no open input requests.

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.
@kevinswiber
kevinswiber merged commit 5d9ccba into main Jul 7, 2026
9 checks passed
@kevinswiber
kevinswiber deleted the feat/issue-413-split-resize-keys branch July 7, 2026 05:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Consider h/l keys to shrink or grow the split

1 participant