feat: Add collapsible sidebars - #111
Merged
Merged
Conversation
… bar
Both sidebars and the right column now sit 40px below the top of the
window so the workspace tab bar spans the full width — title, repo
chip, tabs, and buttons are continuous from one window edge to the
other. The "Harness" title is pinned past the macOS traffic lights
and stays put when the sidebar is collapsed or expanded.
New components:
- CollapsedSidebar — 48px vertical strip with Add repo / Add worktree
/ Cleanup, then Command Center / New project / Activity / My week
/ Keyboard shortcuts / Report issue / Settings.
- CollapsedRightPanel — 48px vertical strip with Expand, Open-in-editor,
and Reveal-in-Finder (latter hidden on remote backends).
Sidebar header restructure:
- Collapse button moved to the left of WORKTREES; Add repo / Cleanup /
Merge-split / Refresh sit on the right with consistent button sizing.
- Merge-repos toggle always rendered, disabled when only one repo.
- Per-repo "Add worktree" entry at the top of each repo group,
threading the repo root through so the new worktree targets that repo.
- Per-repo worktree count aligned with PR-group counts; swaps to the X
remove button on hover (same px slot, not stacked horizontally).
- Top Command Center entry removed (still in bottom toolbar + Cmd+Shift+K).
Right column:
- Header label "TOOL PANES" in place of the prior drag-region header.
- Visibility-menu + collapse buttons resized to match the sidebar's
WORKTREES-header buttons (size 12 icons, p-0.5, hover:bg-surface).
Single-screen mode:
- New F12 hotkey ('toggleSingleScreen' action) + View menu entry that
hides both sidebars entirely for distraction-free terminal work.
Plumbing:
- TerminalPanel: topBarLeadingPx (fixed traffic-light clearance),
topBarLeadingExtendPx + topBarTrailingExtendPx (negative margins so
the tab bar visually extends to the window edges), showAppTitle.
- WorkspaceView: threads these to the top-left / top-right leaves only,
via findTopLeftLeaf / findTopRightLeaf.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
A friendlier glyph than the plain message-square chat bubble. Same icon swap applies to both the expanded Sidebar bottom toolbar and the CollapsedSidebar vertical strip. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Matches the divider already present under the Expand button and gives the section a visible footer — also reserves space for follow-up buttons (attention badges, simulate-attention) to be slotted in below the worktree-management actions. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
CollapsedRightPanel grows from "expand + open-in-editor + reveal" into
a per-worktree PR action strip. From top to bottom:
- Expand sidebar
- (divider)
- Open PR — opens prStatus.url in the browser; disabled when no PR
- Merge PR on GitHub — direct GitHub-API merge using the user's
chosen strategy (per-repo override or global setting). Mirrors the
two-click confirm pattern from PRStatusPanel: first click arms a
5s timer + flips icon to text-warning; second click within the
window calls backend.mergePR. Spins via Loader2 while in flight,
Check + text-success briefly on success, text-danger tooltip on
error. Disabled with a contextual reason when no PR / no token /
PR merged or closed or draft / has conflicts.
- Failed-checks badge (CircleX, text-danger) — only when ≥1 check
failed; click expands the column to surface the PR Status panel.
- (divider)
- Review — opens the review overlay
- Pencil + count: changed files (working + branch)
- GitCommitHorizontal + count: commits. Text turns text-warning when
any commit is unpushed (matches BranchCommitsPanel's color), with
"(unpushed)" suffix on the tooltip.
- (divider)
- Open worktree in editor
- Reveal in Finder (local backend only)
- FolderSearch2 — opens the fuzzy file picker (same as Cmd+P)
- (flex spacer)
- Refresh — re-fetches changed files, commits, and PR info in one
click; icon spins while the watched queries are loading.
Counts come from useWatchedQuery on 'changedFiles' and 'branchCommits',
sharing cache keys with ChangedFilesPanel and BranchCommitsPanel so
toggling between collapsed and expanded doesn't refetch.
CollapsedSidebar gains four worktree-group count badges below the
Cleanup divider — Activity (active), ShieldAlert (needs attention,
text-warning), HatGlasses (reviewing), GitPullRequest (open PRs).
Counts derive from groupWorktrees on the live store data so they
always match the expanded sidebar's groups. Each is hidden when zero
and clicks to expand the sidebar.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
When the sidebars were offset 40px from the top (so the workspace tab bar could span the full window width), the ResizeHandle on each side got wrapped in a <div className="mt-10 shrink-0"> to carry the margin. The wrapper became the flex item that gets stretched to row height by the parent flex, but the ResizeHandle's inner div has no explicit height, so it collapsed to 0px — invisible and unclickable. Adding `flex` to each wrapper makes the ResizeHandle a flex child of the wrapper and lets it stretch to the wrapper's height the same way it did before the offset. No changes to the resize logic itself. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
"Squash+Merge" and "Rebase+Merge" repeat the word "merge" that's already implied by the surrounding "Merging…" / merge-button context. Trimming to "Squash" / "Rebase" matches GitHub's own dropdown wording and frees up button width in the PR Status panel. "Merge" stays as-is since it's both the strategy name and the action. Affects the PR Status panel's merge button (PRStatusPanel) and the collapsed right-strip merge button's tooltip (CollapsedRightPanel), both of which share the METHOD_LABEL map. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Shorter, matches the WORKTREES header's single-word style. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Sits next to "New project" in both the expanded and collapsed sidebars — adding a repo is a rarer, app-level action like New project, not a per-WORKTREES-header control. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Adds a NotebookPen button at the bottom of the collapsed right-panel toolbar, separated from the editor/file utilities by a divider. Clicking it expands the right column and unhides the Scratchpad panel for the active repo (which defaults to hidden). Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Aligns with upstream's icon convention (CLAUDE.md): use the rem-based icon-* aliases instead of lucide's pixel-baked size prop so icons scale with the uiScale setting. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
big-guy
force-pushed
the
tab-behavior-plus-sidebars
branch
from
May 27, 2026 16:02
0138100 to
a4ce7ad
Compare
Collaborator
frenchie4111
self-requested a review
May 27, 2026 20:23
frenchie4111
approved these changes
May 27, 2026
Per @frenchie4111 review feedback on PR ness-dev#111: the WORKTREES / TOOLS header rows used px-3 (12px) horizontally but only py-1.5 (6px) vertically, and the collapsed sidebar/right-panel strips used py-1 (4px) vertically against ~11px of horizontal centering slack. Equalizes both to py-3 (12px) so the first row sits the same distance from the sidebar's top edge as the buttons sit from the left edge. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
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.


Summary
Reworks both sidebars into collapsible vertical toolbar strips and lets the workspace tab bar span the full window width. Most of the new surface lives in the collapsed state — when a sidebar is closed, its 48px strip stays useful instead of just being a stub.
Sidebars
Collapsed left strip
Status-aware group-count badges below the worktree-actions divider — Activity, ShieldAlert (needs attention, text-warning), HatGlasses (reviewing), GitPullRequest (open PRs) — hidden when zero. Clicking re-expands the sidebar.
Collapsed right strip
Full PR action stack on a worktree without expanding the panel:
Misc
Test plan
Main screen

Collapsed

Single screen
