Add archive search and project collapse#2758
Conversation
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Adds client-side filtering for archived threads in Settings > Archive, including project-level matches and thread-level matches across title, branch, and worktree path. Adds local per-project collapse controls and focused unit/browser coverage while leaving archive data loading and server contracts unchanged.
255f391 to
014d46f
Compare
ApprovabilityVerdict: Needs human review This PR adds new user-facing features (archive search and project collapse) rather than being a simple bug fix or mechanical change. New interactive capabilities warrant human review even when well-tested and self-contained. You can customize Macroscope's approvability policy. Learn more. |
What Changed
Why
Archived threads can become hard to scan once several projects accumulate history. This keeps the fix small and UI-only by filtering the existing archived snapshot in the web app without changing server contracts, persistence, or archive loading.
UI Changes
This changes the Settings > Archive UI by adding a search field and per-project collapse button.
Before
After
Checklist
Verification
bun run --cwd apps/web test src/components/settings/SettingsPanels.logic.test.tsbun run --cwd apps/web test:browser src/components/settings/SettingsPanels.browser.tsxbun fmtbun lintbun typecheckNote
Low Risk
UI-only filtering and local collapse state on existing archived snapshots; no API, persistence, or auth changes.
Overview
Settings > Archive gains client-side search and per-project collapse so large archived histories stay scannable without changing how archived data is loaded from environments.
A search field filters the already-built archived groups via new
filterArchivedThreadGroupslogic: whitespace-normalized tokens must all match project name/path or individual thread title, branch, or worktree path; a project-level match keeps every thread in that group. An empty query shows all groups; no matches show a dedicated empty state.Each archived project section can be collapsed from the header (thread count, chevron,
aria-expandedlabels).SettingsSectionnow accepts optionalcontentVisibleto hide the card body while keeping the header.Unit tests cover the filter helper; a browser test covers search and collapse on
ArchivedThreadsPanel.Reviewed by Cursor Bugbot for commit 38e9f6a. Bugbot is set up for automated code reviews on this repo. Configure here.
Note
[!NOTE]
Add search and per-project collapse to ArchivedThreadsPanel
ArchivedThreadsPanelthat filters archived threads by project name, cwd, thread title, branch, and worktree path using token-based matching viafilterArchivedThreadGroups.aria-expandedlabels and thread counts in each section header.SettingsSectionwith an optionalcontentVisibleprop to conditionally hide section body content while keeping the header visible.filterArchivedThreadGroupsand browser tests for search filtering and collapse behavior inArchivedThreadsPanel.Macroscope summarized 38e9f6a.