Skip to content

Add a sidebar text-size selector to the terminal toolbar#2288

Open
tomfluff wants to merge 1 commit into
garrytan:mainfrom
tomfluff:feat/sidebar-font-size
Open

Add a sidebar text-size selector to the terminal toolbar#2288
tomfluff wants to merge 1 commit into
garrytan:mainfrom
tomfluff:feat/sidebar-font-size

Conversation

@tomfluff

Copy link
Copy Markdown

What

Adds an xs / sm / md / lg / xl text-size picker to the Side Panel terminal toolbar (a small A + dropdown, next to Restart), so users can size the terminal text to their eyes.

Details

  • sm = 13px is the unchanged default — the others step around it (xs 11, md 15, lg 17, xl 20). Nothing changes visually until a size is picked.
  • Persisted in chrome.storage.local, restored on load, applied to the live xterm.
  • Reflow is correct on a live change. xterm re-measures the character cell on the next render frame, so the change waits two animation frames before fitAddon.fit() and then sends the new cols/rows to the PTY. Fitting in the same tick reads the old cell and clips the grid until a close/reopen — this avoids that (same fit + resize path the first-fit and ResizeObserver already use).

Files

  • extension/sidepanel.html — toolbar <select>
  • extension/sidepanel.css — selector styling (matches the toolbar buttons, dark option list)
  • extension/sidepanel-terminal.js — wiring, persistence, reflow

Independent of #2287 (the Windows CJK-font fix); no overlap.

🤖 Generated with Claude Code

The Side Panel terminal renders at a fixed 13px. This adds an
xs/sm/md/lg/xl picker in the toolbar (A + dropdown, beside Restart) so
users can size the text to their eyes.

- sm = 13px is the unchanged default; the others step around it
  (xs 11, md 15, lg 17, xl 20). Nothing changes until you pick a size.
- Persisted in chrome.storage.local, restored on load, applied to the
  live xterm.
- Resize reflows correctly: xterm re-measures the character cell on the
  next render frame, so the change waits two animation frames before
  fitAddon.fit() and then sends the new cols/rows to the PTY. Fitting in
  the same tick reads the old cell and clips the grid until a
  close/reopen — this avoids that.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GKj8Nr8T4GvryTcWBJRMyC
@trunk-io

trunk-io Bot commented Jul 17, 2026

Copy link
Copy Markdown

Merging to main in this repository is managed by Trunk.

  • To merge this pull request, check the box to the left or comment /trunk merge below.

After your PR is submitted to the merge queue, this comment will be automatically updated with its status. If the PR fails, failure details will also be posted here

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