Skip to content

Refine archived settings panel UX#3552

Open
Quicksaver wants to merge 21 commits into
pingdotgg:mainfrom
Quicksaver:split/archive-settings-ux
Open

Refine archived settings panel UX#3552
Quicksaver wants to merge 21 commits into
pingdotgg:mainfrom
Quicksaver:split/archive-settings-ux

Conversation

@Quicksaver

@Quicksaver Quicksaver commented Jun 25, 2026

Copy link
Copy Markdown

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 confirmThreadDelete preference, 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

  • Added archive sort state and stable archived-thread comparison helpers for archived-at and created-at ordering.
  • Added ranked archive title search using the shared search-ranking helper, with project groups sorted by best match while searching.
  • Reworked archived project groups into collapsible project rows with project favicons, counts, sortable date columns, and compact action buttons.
  • Added inline per-thread icon actions for unarchive and delete, plus right-click context menu support that uses the same action paths.
  • Added bulk project actions to unarchive or delete archived threads in a project, scoped to matching visible rows during search.
  • Added confirmation handling for destructive archived-thread actions that respects confirmThreadDelete, plus shared toast reporting for action failures.
  • Matched the existing thread-action fallback when no local API dialog host is available, so archived confirmation flows do not block the underlying action in hosted or non-local environments.
  • Clarified bulk-action failure toasts so partial unarchive/delete outcomes are not described as total failures, and included interrupted counts when relevant.
  • Disabled project collapse toggles while archive search forces matching groups open, preserving the pre-search expansion state.
  • Encoded archive grouping keys as environment/project tuples so projects remain isolated even when ids contain separator characters.
  • Reused the encoded archive grouping key for React project rows and saved expand/collapse state, avoiding UI identity collisions for the same separator-containing ids.
  • Refreshed the archive panel timestamp labels with the existing relative-time tick hook.

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 check passed with exit 0. The command reported existing lint warnings outside the touched archive settings files.
  • pnpm exec vp run typecheck passed with exit 0.
  • pnpm exec vp test run apps/web/src/components/settings/SettingsPanels.logic.test.ts passed with exit 0.
  • Cursor Bugbot review threads for delete confirmation, bulk failure wording, and search-mode collapse state were fixed and resolved.
  • Cursor Bugbot review feedback for archive panel UI key mismatches was fixed and resolved.
  • Macroscope review feedback for interrupted bulk-action counts, local API confirmation fallback, and archive project key collisions was fixed and resolved.
  • Manually reviewed the saved archive-panel screenshot showing grouped projects, sortable columns, expanded rows, and hover row actions.

Proof

Screenshot 2026-06-25 at 10 17 09

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 SettingsRow entries 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 shared searchRanking, buildArchivedThreadGroups (multi-environment snapshots, JSON tuple keys for environment+project to avoid colon collisions, latest project metadata wins), sort helpers, and runArchivedProjectThreadActions with concurrency 4, collecting Failure results or throwing AggregateError on 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 respect confirmThreadDelete, skip dialogs when no local API, and shared failure/partial bulk toasts (including interrupted counts). Deletes use deleteThread instead of confirmAndDeleteThread with 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

  • Rewrites ArchivedThreadsPanel in 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).
  • Adds per-thread icon actions (unarchive, delete) and project-level bulk unarchive/delete for all or search-matching threads, with confirmation dialogs and aggregated error toasts.
  • Bulk actions run with bounded concurrency (default 4) via runArchivedProjectThreadActions; thrown errors abort remaining work and are rethrown as AggregateError after in-flight tasks settle.
  • Adds search scoring (archivedThreadSearchScore) that ranks threads by phrase match first, then per-token scoring with optional fuzzy matching for tokens ≥3 characters.
  • Adds unit tests in SettingsPanels.logic.test.ts covering search scoring, grouping, sort state transitions, and bulk action concurrency/failure aggregation.

Macroscope summarized 5d8b2f3.

- 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
@github-actions github-actions Bot added vouch:unvouched PR author is not yet trusted in the VOUCHED list. size:L 100-499 changed lines (additions + deletions). labels Jun 25, 2026
@coderabbitai

coderabbitai Bot commented Jun 25, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 80d1d73f-b03e-4ac4-9545-53a0375da99a

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

❤️ Share

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

Comment thread apps/web/src/components/settings/SettingsPanels.tsx
Comment thread apps/web/src/components/settings/SettingsPanels.tsx Outdated
@macroscopeapp

macroscopeapp Bot commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: 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
@github-actions github-actions Bot added size:XL 500-999 changed lines (additions + deletions). and removed size:L 100-499 changed lines (additions + deletions). labels Jun 25, 2026
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.
Comment thread apps/web/src/components/settings/SettingsPanels.tsx
Comment thread apps/web/src/components/settings/SettingsPanels.tsx
Comment thread apps/web/src/components/settings/SettingsPanels.tsx Outdated
- 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
Comment thread apps/web/src/components/settings/SettingsPanels.logic.ts Outdated
- Encode environment and project ids as tuple keys

- Cover colon-containing ids in archive grouping tests
Comment thread apps/web/src/components/settings/SettingsPanels.logic.ts
- Reuse canonical archive group keys in panel state

- Cover colon-containing project key collisions in tests
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XL 500-999 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