Skip to content

Refine archived settings panel UX#3552

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

Refine archived settings panel UX#3552
Quicksaver wants to merge 30 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, surface unexpected bulk-action exceptions as incomplete operations while refreshing the archive list, keep archive project grouping plus UI keys collision-free when environment or project ids contain colons, fetch archived snapshots for every configured environment rather than only environments with active projects, and label filtered bulk context-menu actions as matching-row actions.

The latest upstream merge split more settings surfaces into dedicated modules, so this branch now keeps the Archive settings UI in apps/web/src/components/settings/ArchiveSettings.tsx. SettingsPanels.tsx still re-exports ArchivedThreadsPanel for the existing route, and the archive grouping/search/sort/bulk-action logic remains in SettingsPanels.logic.ts.

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.
  • Added bulk-action exception handling so unexpected per-thread throws show incomplete-operation feedback and still refresh the archived snapshot after confirmed project actions.
  • 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.
  • Moved the Archive settings panel UI into ArchiveSettings.tsx while preserving the existing ArchivedThreadsPanel route export through SettingsPanels.tsx.
  • Changed the archive settings snapshot query inputs to come from the environment catalog, matching the mobile archive route and keeping archived-only environments visible even when they have no active projects.
  • Changed project-level archive context-menu labels during search from "all" to "matching" so destructive bulk actions accurately describe the visible-row scope.

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.
  • git diff --check passed with exit 0 after the ArchiveSettings.tsx extraction.
  • 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.
  • Macroscope review feedback for unexpected bulk-action exception handling was fixed in 0d07f3a14 and resolved.
  • Macroscope review feedback for archived-only environments being omitted from the settings archive was fixed in 10632e199.
  • Macroscope review feedback for filtered bulk context-menu labels was fixed in 26eea31c7.
  • pnpm exec vp test run apps/web/src/components/settings/SettingsPanels.logic.test.ts passed with exit 0 after the environment-list fix.
  • pnpm exec vp run typecheck passed with exit 0 after the environment-list fix.
  • pnpm exec vp check passed with exit 0 after the environment-list fix, with existing lint warnings outside the touched archive settings file.
  • git diff --check passed with exit 0 after the environment-list fix.
  • pnpm exec vp test run apps/web/src/components/settings/SettingsPanels.logic.test.ts, pnpm exec vp run typecheck, pnpm exec vp check, and git diff --check passed with exit 0 after the filtered context-menu label fix.
  • 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 and per-thread delete permanently clear conversation history; behavior is gated by confirmations and existing thread actions, but mistakes or partial bulk failures are user-visible data operations.

Overview
Replaces the flat archived-threads settings list with a project-grouped archive browser in ArchiveSettings.tsx, and wires the /settings/archived route to that module instead of SettingsPanels.tsx.

The new UI adds title search (shared ranking helpers), sortable archived/created columns, expand/collapse per project, and inline/context-menu actions for unarchive and delete. Project-level bulk unarchive/delete runs on all threads in a group or only search-matching rows, with confirmations that honor confirmThreadDelete, local-API/window.confirm fallbacks, and toasts for partial or unexpected failures.

SettingsPanels.logic.ts now owns grouping (JSON tuple keys so environment/project ids with colons stay distinct), search scoring, sort toggles, and a concurrency-limited bulk action runner; tests cover these behaviors. Archived snapshots are loaded for every configured environment via useEnvironments(), not only environments that still have active projects.

Reviewed by Cursor Bugbot for commit 26eea31. Bugbot is set up for automated code reviews on this repo. Configure here.

Note

Refine archived threads settings panel with search, sort, and bulk actions

  • Extracts ArchivedThreadsPanel from SettingsPanels.tsx into a new ArchiveSettings.tsx with significantly expanded functionality.
  • Adds search over archived thread titles using phrase and token-based fuzzy scoring via archivedThreadSearchScore, with results grouped and ranked by relevance per project.
  • Adds sortable columns (archived date / created date) with compareArchivedThreads and nextArchivedThreadSortState to control ordering.
  • Adds per-thread unarchive/delete actions and project-level bulk actions scoped to matching or all threads, running concurrently (default 4) via runArchivedProjectThreadActions with AggregateError on failures.
  • Adds comprehensive unit tests in SettingsPanels.logic.test.ts covering scoring, grouping, sort transitions, and bulk action concurrency.

Macroscope summarized 26eea31.

- 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: 88c415a8-d710-4fd7-8155-392d77f9289d

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 Outdated
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 new user-facing features for archived thread management including search/filter, sorting, and bulk unarchive/delete actions. While well-structured and tested, new feature scope warrants 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 Outdated
Comment thread apps/web/src/components/settings/SettingsPanels.tsx Outdated
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
- Split archived thread UI into its own component
- Re-export the panel from the settings entrypoint
- Keep archived delete confirmations when browser APIs are used

- Add an explicit project actions menu button
- Add the project action spacer column to archived thread rows
- Restore no-local-api confirmation behavior

- Share interrupted failure handling for archive menus

- Surface multiple archived bulk action errors
- Require confirmation when local API is unavailable
@github-actions github-actions Bot added size:XXL 1,000+ changed lines (additions + deletions). and removed size:XL 500-999 changed lines (additions + deletions). labels Jun 27, 2026
Comment thread apps/web/src/components/settings/ArchiveSettings.tsx Outdated
Comment thread apps/web/src/components/settings/ArchiveSettings.tsx
Comment thread apps/web/src/components/settings/ArchiveSettings.tsx Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XXL 1,000+ 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