Skip to content

Sidebar decluttering: card density + per-group overflow cap #70

Closed

Description

@currentbits

Problem

With many projects × many threads the sidebar gets messy:

  1. Every attention thread renders as a ~90–110px card with no per-group cap — only the settled tail paginates (10+25).
  2. Each card repeats the project slug even though it sits under a group header with the same slug.
  3. Cards spend a full row on tags (provider/ssh/wt pills).
  4. No sticky group headers — scrolling long lists loses project context.

The t3 shelf model (pinned / snoozed / settled tail, static createdAt order, collapse persistence) stays untouched.

Plan

  1. Slimmer cards — ThreadCard gets showSlug (slug only for orphan groups); tags merge into the top row next to age; separate tags row removed. Card goes 4 rows → 3 (~65–85px).
  2. Per-group overflow cap — GROUP_ATTENTION_CAP = 8 in sidebarGroups.ts; session-only expandedGroups set; "Show N more / Show fewer" disclosure row (reuses .settledShowMore style); carve-out keeps the active/revealed thread visible; search bypasses the cap; buildVisibleThreadIds mirrors the capped render.
  3. Sticky group headers — position: sticky on the group header with opaque background.

Tests

  • test/sidebar.test.tsx: cap + disclosure, active-thread carve-out, search bypass, slug presence rules, existing tag selectors.
  • test/sidebarSelection.test.ts: visible ids mirror capped render.
  • test/sidebarGroups.test.ts: pin the cap constant.

Full vitest suite + typecheck must stay green.

Activity

  1. added
    plan:doing
    plan:done
    and removed
    plan:doing
    on Aug 16, 2026
  2. currentbits commented on Aug 16, 2026

    @currentbits
    OwnerAuthor

    Shipped in this branch's worktree:

    • ThreadCard showSlug prop: slug only renders for orphan groups; tag pills merged into the card top row (4 rows → 3 per card).
    • GROUP_ATTENTION_CAP = 8 + visibleAttentionCount in src/sidebarGroups.ts; session-only per-group "Show N more / Show fewer"; active/revealed thread carve-out; search bypasses the cap; buildVisibleThreadIds mirrors the capped slice via the shared helper.
    • Sticky group headers (.groupHeaderRow, var(--bg-elevated)).

    Tests: 15 new (cap constant, slice mirroring, render behavior incl. orphan-slug rule). Renderer 664/664, core 38/38, memory 119/119, typecheck clean. The 9 electron-suite failures (orch-server allowedTools, worktrees gh PR) are pre-existing on this branch and unrelated — electron/ imports none of the touched files.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    plan:done

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions