Repository navigation
LOCAL: stop a shrunk sidebar leaving a black strip beside the terminal - #66
Merged
Merged
Conversation
The sidebar-width titlebar header sat in a content-sized column, so its max-content width (traffic-light pad, app name, toggle, history buttons) held the column open when the sidebar was dragged narrower. The freed strip showed the transparent app background and the terminal never got the width back. Contain the header's inline size so only the sidebar sizes the column, and let the control group shrink so the app name clips before the toggle and history buttons do. The fork's long "Forca <version> (SwapLabs/<rev>)" label made this a 216px gap at the 220px minimum; upstream's "Orca" label leaves ~2px. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…omed out 4ee7b3b stopped the titlebar header from widening the left column, but on macOS the traffic-light pad is 80px / --ui-zoom-factor, so at UI zoom -2.5 and below the pad, toggle and history buttons outgrew the 220px sidebar minimum and the toggle slid under Go back (11px at -2.5, 22px at -3), where a click no longer reached it. Measure the width the header needs with the app name squeezed to its padding, and raise the sidebar's effective minimum to it. The stored width is untouched, so zooming back in restores it. At zoom 0 the need (194px) is under 220, and Linux/Windows chrome has no pad, so neither changes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
This was referenced Oct 28, 2026
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.
ELI5
Dragging the left sidebar narrower left a black strip between the sidebar and the terminal, and the terminal didn't grow into the space. Now the terminal fills it. When the UI is zoomed far out, the sidebar also stops shrinking before its buttons would overlap.
What Changed
Before: on macOS (and paired-web) chrome, the titlebar header above the sidebar set the left column's width by its full content width. The header holds the traffic-light pad, the fork's long
Forca 1.4.214 (SwapLabs/<rev>)app name, the sidebar toggle and the history buttons, which add up to about 436px. Dragging the sidebar below that left the column at 436px: the leftover strip showed the transparent app background (black), and the terminal kept its old width.4ee7b3b:
.titlebar-left:not(.titlebar-left-floating)now hascontain: inline-size, so only the sidebar sizes the column.min-w-0on the control group lets the app name clip before any button.3d193c9: at UI zoom −2.5 and below, the traffic-light pad (
80px / zoom) no longer fit beside the buttons in a 220px sidebar, so the toggle overlapped Go back and ignored clicks. The titlebar's existing ResizeObserver now also measures the header's non-shrinkable width: every control, plus the zoom-scaled pad, minus the app name's text. The sidebar usesmax(220, that width)as both its drag minimum and its rendered floor. The stored width is not rewritten, so zooming back in restores it.Why
Containment is the smallest change that stops header content from sizing the column. The alternatives each fall short:
Deriving the minimum from the measured controls keeps every button usable at any zoom without letting the header widen the column again.
Linked Issue
N/A: the operator reported it directly. Fork-only (
LOCAL:) for now. Upstream has a latent version of the same bug: with the shorterOrcalabel the gap is 2px at zoom 1 and 14px at zoom −3. Upstreaming is a separate decision.Visual Proof
Measured in the hidden e2e app (Electron on Linux with a macOS user agent), in dark and light themes. The terminal's column count at sidebar widths 480 → 360 → 280 → 220 (a drag to 150 stops at the 220 minimum):
Before 3d193c9, at UI zoom −2.5 and −3 with the sidebar at its minimum, the toggle overlapped Go back by 11px and 22px. After it:
Before/after screenshots exist for every width, zoom and chrome (on minidev-alex1) but are not attached here, because no image-upload tool is available on the VM. I can add them on request.
Testing
An e2e repro spec, not committed because it needs a user-agent spoof, covered:
An independent adversarial verification run confirmed 4ee7b3b and found the zoom-out overlap that 3d193c9 fixes. 3d193c9 was then measured across the same matrix.
pnpm check:changed --maxWorkers=2 --base=refs/remotes/swaplabs/swaplabs/mainpassed (20/20) on both commits.Not tested on a physical Mac; the macOS chrome was exercised through the user-agent spoof.
I manually tested these changes locally (hidden Electron renderer on Linux, Mac chrome via user-agent spoof)
Automated tests added/updated, or explained why not below: the geometry depends on macOS chrome, which the e2e suite only renders under a user-agent spoof, so no committed test was added.
AI Disclosure
Prepared by Claude Code (Claude Opus 5.5) at the operator's request.
Review
Local
/code-review mediumbefore the first push raised 8 candidate findings. None blocks: the measured runs above show no overlap or gap at any tested width, zoom or chrome. Deferred, with reasons:220 + 80/z − 80). That over-reserves by about 25px and would raise the minimum at moderate zoom-outs, such as −1.5, where it isn't needed.Agent skill upstream boundary
Notes
Checklist
N/Awith reason: measured numbers above; image files available on requestpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred):check:changed(format, lint, typecheck, affected tests) passed; the full build is left to CI🤖 Generated with Claude Code
Need help on this PR? Tag
@codesmith-botwith what you need.