Refine archived settings panel UX#3552
Conversation
- Group archived threads by project with collapsible sections - Add sortable archived/created columns and inline row actions - Support direct delete and bulk project actions with confirmation
|
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 |
ApprovabilityVerdict: Needs human review This PR introduces substantial new functionality to the archived threads panel including search, sorting, collapsible groups, and bulk actions. While well-organized with extracted logic and tests, the scope represents a new feature with new user workflows rather than a refinement, warranting human review. You can customize Macroscope's approvability policy. Learn more. |
- Replace inline project-level unarchive/delete buttons with a right-click menu - Keep the existing confirmation flow for bulk archived-thread actions
- Add case-insensitive search across archived thread titles - Rank exact phrase, full-term, and partial matches; auto-expand matching projects - Update archive empty states and preserve project actions under search
- Use filtered archive rows for project actions during search
- Use the full project archive list for bulk context actions - Keep search filtering from narrowing project-wide confirmations
- Limit project archive actions to filtered visible threads - Add archive search ranking tests
Selective archive-settings portion of main commit 1c6f66b. Keeps the branch-local extracted search-ranking helper and tests while preserving the project header interaction cleanup.
- Move archived search and grouping into logic helpers - Share bulk action and sort helpers with the panel - Add tests for grouping, sorting, and bulk action concurrency
- Wait for active bulk-action workers before rethrowing - Assert archived project bulk actions cover queued threads
- Aggregate archived bulk action errors - Index archived threads by project - Strengthen archived settings logic tests
- Skip local dialog confirmation when no local API is available
- Encode environment and project ids as tuple keys - Cover colon-containing ids in archive grouping tests
- Reuse canonical archive group keys in panel state - Cover colon-containing project key collisions in tests
Summary
This updates the Archive settings panel from a flat settings-row list into a compact project-grouped archive browser. Archived conversations are grouped by project, projects can be expanded or collapsed, the list can be searched by title, and visible rows can be sorted by archived or created time.
Archive management actions are available directly in the archive view, including per-thread unarchive/delete actions and project-level bulk unarchive/delete actions. Bulk actions are scoped to the currently visible matching rows during search, so filtered archive management does not affect hidden conversations.
Review follow-up commits keep archived delete confirmation behavior aligned with the existing
confirmThreadDeletepreference, skip archived confirmation dialogs when no local API is available, keep search-forced project expansion from mutating saved collapse state, make partial bulk-action failure toasts account for interrupted operations, and keep archive project grouping plus UI keys collision-free when environment or project ids contain colons.What Changed
confirmThreadDelete, plus shared toast reporting for action failures.Why
The previous archive settings view did not scale well for users with many archived conversations because every archived thread appeared as a full settings row. Grouping by project, ranking search results, collapsing inactive groups, exposing sortable dates, and keeping actions close to each row makes the archive easier to scan and manage without leaving the settings surface.
Validation
pnpm exec vp checkpassed with exit 0. The command reported existing lint warnings outside the touched archive settings files.pnpm exec vp run typecheckpassed with exit 0.pnpm exec vp test run apps/web/src/components/settings/SettingsPanels.logic.test.tspassed with exit 0.Proof
Note
Medium Risk
Bulk delete/unarchive touches conversation data across environments with new concurrency and confirmation paths; changes are settings-scoped with substantial new logic but no auth/core infra changes.
Overview
Reworks the Archive settings panel from flat
SettingsRowentries into a project-grouped browser with search, collapsible groups, sortable date columns, and inline actions.Logic layer (
SettingsPanels.logic.ts): Adds ranked title search via sharedsearchRanking,buildArchivedThreadGroups(multi-environment snapshots, JSON tuple keys for environment+project to avoid colon collisions, latest project metadata wins), sort helpers, andrunArchivedProjectThreadActionswith concurrency 4, collectingFailureresults or throwingAggregateErroron thrown errors.UI (
ArchivedThreadsPanel): Search input; expand/collapse per project (search forces groups open without mutating saved collapse state); Archived / Created sort toggles; per-thread unarchive/delete (icons + context menu); project-level bulk unarchive/delete scoped to all or matching rows when searching; confirmations respectconfirmThreadDelete, skip dialogs when no local API, and shared failure/partial bulk toasts (including interrupted counts). Deletes usedeleteThreadinstead ofconfirmAndDeleteThreadwith archived-specific copy.Tests: Broad unit coverage for scoring, grouping edge cases, sort state, and bulk runner behavior.
Reviewed by Cursor Bugbot for commit 5d8b2f3. Bugbot is set up for automated code reviews on this repo. Configure here.
Note
[!NOTE]
Refine archived threads settings panel with search, sorting, and bulk actions
ArchivedThreadsPanelin SettingsPanels.tsx to support searching by title, grouping threads by project across environments, collapsible project groups, and sort controls (by archived or created time, ascending/descending).runArchivedProjectThreadActions; thrown errors abort remaining work and are rethrown asAggregateErrorafter in-flight tasks settle.archivedThreadSearchScore) that ranks threads by phrase match first, then per-token scoring with optional fuzzy matching for tokens ≥3 characters.Macroscope summarized 5d8b2f3.