Skip to content

feat: resize the ui sidebar with C-a Left/Right#26

Merged
kylecarbs merged 1 commit into
mainfrom
feat/ui-sidebar-resize
Jun 11, 2026
Merged

feat: resize the ui sidebar with C-a Left/Right#26
kylecarbs merged 1 commit into
mainfrom
feat/ui-sidebar-resize

Conversation

@kylecarbs

Copy link
Copy Markdown
Member

What

C-a Left/C-a Right starts a sidebar resize in boo ui, mirroring the C-a Up/C-a Down browse:

  • Bare Left/Right keep adjusting the width one column per press while the resize is active.
  • Enter completes the resize and keeps the width.
  • Esc cancels and restores the width from before the first arrow.
  • The bottom row shows left/right resize enter done esc cancel while active, and the armed-prefix bar gained lt/rt resize.

The viewport and the focused session's pty resize live with every adjustment. A completed resize is remembered and reapplied (clamped to [8, cols - 12], like Layout.init's narrow-terminal floor) when the terminal itself resizes.

How

  • The input parser now intercepts plain ESC [ C / ESC [ D exactly like up/down arrows; InputEvent.Arrow carries a four-way dir enum instead of an up bool. Modified arrows (ESC [ 1;5 C) still pass through untouched.
  • Bare side arrows forward to the focused application whenever no resize is active, preserving existing behavior (the UI never mirrors DECCKM outward, so apps always receive plain CSI arrows).
  • Resize and browse are mutually exclusive: starting one ends the other; prefix commands and mouse actions commit an active resize.

Validation

  • Unit tests: side arrows parse (bare and prefixed), clamp bounds.
  • Integration test drives the full flow through real ptys: grow, bare-arrow adjust, Esc restore, shrink, Enter commit, and bare arrows forwarding again afterwards, asserting the session pty size through peek --json at every step.
  • The keybind-bar test widened from 120 to 132 columns for the longer bar.
  • zig build test-all (Debug and ReleaseSafe): 120/120 pass.

This PR was generated with Coder Agents on behalf of @kylecarbs.

C-a Left/Right starts a sidebar resize in boo ui, mirroring the C-a
Up/Down browse: bare side arrows keep adjusting the width one column
at a time, Enter keeps it, and Esc restores the width from before.
The viewport and the focused session's pty resize live with every
adjustment, and a completed resize is reapplied (clamped between a
usable minimum and a cap that keeps the viewport a sliver) when the
terminal itself resizes.

Bare side arrows still forward to the focused application when no
resize is active; the input parser now intercepts ESC [ C and
ESC [ D the same way it does up/down arrows.
@kylecarbs kylecarbs merged commit 65f6ca8 into main Jun 11, 2026
4 checks passed
@kylecarbs kylecarbs mentioned this pull request Jun 11, 2026
@kylecarbs kylecarbs deleted the feat/ui-sidebar-resize branch June 11, 2026 20:44
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.

1 participant