Skip to content

feat(web): add optional compact thread rows - #11746

Open
mezg0 wants to merge 1 commit into
pingdotgg:mainfrom
mezg0:feat/sidebar-row-density
Open

feat(web): add optional compact thread rows#11746
mezg0 wants to merge 1 commit into
pingdotgg:mainfrom
mezg0:feat/sidebar-row-density

Conversation

@mezg0

@mezg0 mezg0 commented Sep 14, 2026

Copy link
Copy Markdown

Active and pinned thread cards reserve three lines for metadata, limiting how many threads fit in the sidebar. This adds an optional two-line layout in Settings → Appearance → Interface, with standard cards remaining the default.

Compact rows retain project identity, title, status, provider icons, terminal indicators, and PR badges. Branch, model, and working duration are available on hover. The client-local preference supports settings search and restoring defaults; drag geometry accounts for both card heights.

Screenshots

Standard · default Compact · opt-in
Standard sidebar cards with status labels and branch metadata Compact two-line sidebar cards retaining status icons, provider icons, and PR badges
82px per row, including padding 64px per row, including padding
Appearance setting Appearance settings showing the Compact thread rows preference

Screenshots use seeded demo threads and illustrative PRs. Working state and mixed provider assignments use browser-response fixtures; the captures show UI presentation rather than live agent execution or GitHub synchronization.

Verification

  • 209 focused tests passed across drag projection, contracts, scoped settings, and desktop persistence.
  • Web, contracts, and desktop typechecks passed.
  • Targeted lint: 0 errors, 35 warnings in existing Sidebar and Settings code.
  • Real-app dragging checked in both layouts: empty Pins, return to Active, and compact drag cancellation.
  • Appearance toggle and persisted layout checked through navigation and reload.

Related work

Summary by CodeRabbit

  • New Features
    • Added a Compact thread rows setting under Appearance.
    • Compact mode reduces sidebar row height and simplifies displayed details for threads and drafts.
    • Compact rows are supported during sidebar drag-and-drop, including across sections and display scales.
    • Added search support for the new appearance setting.

@github-actions github-actions Bot added size:L 100-499 changed lines (additions + deletions). vouch:unvouched PR author is not yet trusted in the VOUCHED list. labels Sep 14, 2026
@mezg0
mezg0 marked this pull request as ready for review September 14, 2026 15:06
@coderabbitai

coderabbitai Bot commented Sep 14, 2026

Copy link
Copy Markdown

Review Change StackReview Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Advanced

Run ID: 1bbe06ca-0891-49de-8f19-e547c8db9578

📥 Commits

Reviewing files that changed from the base of the PR and between 9375c77 and 5fbf208.

📒 Files selected for processing (8)
  • apps/desktop/src/settings/DesktopClientSettings.test.ts
  • apps/web/src/components/Sidebar.drag.test.ts
  • apps/web/src/components/Sidebar.drag.ts
  • apps/web/src/components/Sidebar.tsx
  • apps/web/src/components/settings/SettingsPanels.tsx
  • apps/web/src/components/settings/settingsSearch.ts
  • packages/contracts/src/settings.test.ts
  • packages/contracts/src/settings.ts

Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review.


📝 Walkthrough

Walkthrough

This change adds a compactSidebarThreadRows client setting. Sidebar thread and draft rows use compact layouts when enabled. Drag positioning uses compact card heights, and tests cover scaled drag scenarios.

Changes

Compact sidebar rows

Layer / File(s) Summary
Settings contract and controls
packages/contracts/src/settings.ts, packages/contracts/src/settings.test.ts, apps/web/src/components/settings/SettingsPanels.tsx, apps/web/src/components/settings/settingsSearch.ts, apps/desktop/src/settings/DesktopClientSettings.test.ts
Adds the compactSidebarThreadRows setting with a default of false, patch support, appearance control, restore handling, search metadata, and test coverage.
Compact sidebar rendering
apps/web/src/components/Sidebar.tsx
Applies compact dimensions and centered layouts to thread and draft rows. Compact rows hide visual status details and inline working duration while preserving screen-reader labels. Tooltips now show working duration for active threads.
Compact drag positioning
apps/web/src/components/Sidebar.drag.ts, apps/web/src/components/Sidebar.drag.test.ts, apps/web/src/components/Sidebar.tsx
Uses a 64px base height for compact rows during drag calculations. Tests cover scaled empty sections and movement from Active to Settled.

Priority: ➖ Normal

Estimated code review effort: 3 (Moderate) | ~25 minutes

Change: Feature

Sequence Diagram(s)

sequenceDiagram
  participant User
  participant AppearanceSettingsPanel
  participant Sidebar
  participant createSidebarSortingStrategy
  User->>AppearanceSettingsPanel: Toggle compact-thread-rows
  AppearanceSettingsPanel->>Sidebar: Set compactSidebarThreadRows
  Sidebar->>Sidebar: Render compact thread and draft rows
  Sidebar->>createSidebarSortingStrategy: Pass compactThreadRows
  createSidebarSortingStrategy->>Sidebar: Calculate 64px drag positions
Loading

Suggested reviewers: juliusmarminge

Merge Risk: ⚪ Minimal · up to 5fbf2

Compact thread rows remain opt-in, preserve the default layout, and have matching settings, rendering, and drag-positioning support.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 14.29% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 7 functions across 8 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the main change: adding optional compact thread rows in the web interface.
Description check ✅ Passed The description explains the change, motivation, UI behavior, verification results, and related work. It includes before-and-after screenshots and setting screenshots. It does not reproduce the templa…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
  • Fix all pre-merge checks with AI
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands.

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

Labels

size:L 100-499 changed lines (additions + deletions). vouch:unvouched PR author is not yet trusted in the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant