Skip to content

feat(web): add a compact two-line sidebar mode - #2

Open
mneuhaus wants to merge 2 commits into
marc/mainfrom
marc/compact-sidebar
Open

mneuhaus wants to merge 2 commits into
marc/mainfrom
marc/compact-sidebar

Conversation

@mneuhaus

@mneuhaus mneuhaus commented Sep 30, 2026 •

Copy link
Copy Markdown
Owner

Sidebar thread cards take three lines (project, title, branch/meta) and 82px each, so only about nine threads fit on a laptop-height screen.

What changed

Settings → Appearance → Compact sidebar (off by default) switches cards to two lines:

  • Line 1: favicon, title, pin, then status or time; the snooze/settle actions still swap in on hover.
  • Line 2: project name · branch, then the terminal, PR, diff, remote-machine and provider indicators.

Nothing is dropped; the project label just moves down beside the branch. Cards shrink from 82px to 54px (content box 3.125rem + the existing 0.25rem padding), so about 50% more threads fit. Draft rows follow the same density. Slim settled/snoozed rows are unchanged.

Compact mode also tightens the corners of every row surface in the thread list (cards, slim rows, drafts, search results, drop placeholders, "Show more") from 8px (rounded-md) to 4px (rounded-[.25rem], already used elsewhere in the repo).

  • New client setting sidebarThreadDensity: "comfortable" | "compact". It deliberately does not reuse the keys of the compact mode upstream removed in revert(web): remove the compact sidebar pingdotgg/t3code#11685 (compactSidebarEnabled, sidebarCompactThreadRows). Those are still dropped on decode.
  • The card JSX was split into shared pieces (status slot, branch label, meta icons) used by both layouts. The comfortable layout renders the same DOM and classes as before.
  • The drag projection takes compactCards, so a settled thread dropped into an empty Active section opens a 54px gap instead of 82px.
  • Wired into settings search, "Restore defaults" and its changed-labels list.

Not applicable: the legacy sidebar (own rows) and mobile (no sidebar).

Validation

  • vp test run for settings.test.ts, Sidebar.drag.test.ts, Sidebar.logic.test.ts, Sidebar.motion.test.ts, settingsSearch.test.ts, DesktopClientSettings.test.ts: 453/453. The new drag test fails without the change.
  • tsc --noEmit clean in contracts, web and desktop. Lint shows 26 warnings on Sidebar.tsx before and after, 0 errors. Formatting clean.
  • Adversarial review in three parts: refactor parity, compact layout and settings plumbing. The one real finding was the project label not shrinking, which let a crowded meta line clip the provider icon. It is fixed.
  • Real client (web dev server on a snapshot of real data, 1280×900, dark):
    • Cards measure 54px instead of 82px; 14 fully visible cards instead of 9.
    • No card content overflows.
    • Hover actions swap in on line 1, and the settings switch persists.
  • Screenshots stay out of this public PR, because they show real thread and client names.

Model: Claude Opus 5.5 in Claude Code (via T3 Code).

Rebased onto the new orchestrator (2026-10-02)

Rebased onto upstream main 8bc40b4, which includes pingdotgg#2829.

  • Sidebar.tsx: the restructured card is kept. Upstream's three card changes are ported to both layouts: latestRunDiff, no monitoring status icon, and SidebarProviderStack for the provider icons. The new Working section renders cards, so it gets the compact layout, the compact drag height and the 4px corners too.
  • SettingsPanels.tsx: both new settings stay in the reset dependencies.
  • 442/442 focused tests pass. Contracts, web and desktop typecheck clean. An independent review against upstream's final card JSX found nothing.

🤖 Generated with Claude Code

@github-actions github-actions Bot added vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. size:L labels Sep 30, 2026
@github-actions

github-actions Bot commented Oct 2, 2026 •

Copy link
Copy Markdown

Thread transfer impact

⚠️ The latest CI run did not produce a thread transfer result for 39b6068.

This comment will update automatically after the next completed run.

Thread cards in the sidebar take three lines (project, title, branch and
meta), so only a handful fit on screen. Settings → Appearance → Compact
sidebar folds the project label into the meta line: the title moves up
next to the favicon and status, and cards shrink from 82px to 54px
without dropping any information. Draft rows follow the same density.

The drag projection learns the compact card height for rows it cannot
measure, so dropping a settled thread into an empty Active section
opens the right gap.
Compact density also rounds every row surface in the thread list (cards,
slim rows, drafts, search results, drop placeholders, Show more) at 4px
instead of the 8px rounded-md. Comfortable density is unchanged.
@mneuhaus
mneuhaus force-pushed the marc/compact-sidebar branch from ab8a6ef to 39b6068 Compare October 2, 2026 21:28

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:L vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant