Skip to content

Refine archive management UX across web and mobile#3552

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

Refine archive management UX across web and mobile#3552
Quicksaver wants to merge 59 commits into
pingdotgg:mainfrom
Quicksaver:split/archive-settings-ux

Conversation

@Quicksaver

@Quicksaver Quicksaver commented Jun 25, 2026

Copy link
Copy Markdown

Summary

This replaces the flat Archive settings list with a compact project-grouped browser on web and brings the same information hierarchy and management capabilities to the native Archived Threads screen. Archived conversations can be searched by ranked title matches, sorted by archived or created time, and expanded or collapsed by project.

Both surfaces load archive snapshots for every configured environment and expose scoped per-thread and project-level unarchive/delete actions. Destructive actions preserve each platform's guarded delete behavior, filtered bulk actions affect only matching rows, and bulk execution is bounded and failure-aware.

What Changed

  • Moved the web Archive settings UI into ArchiveSettings.tsx and wired the archived settings route directly to the dedicated panel.
  • Grouped archived conversations by environment and project on web and native, using collision-safe scoped keys for grouping, list identity, and expansion state.
  • Added ranked, case-insensitive multi-term title search with bounded score tiers that preserve phrase/all-token/partial ordering for long titles, search-forced expansion that preserves saved collapse state, sortable archived/created columns, relative timestamps with invalid archive-date fallback, project favicons, counts, and compact rows.
  • Loaded archived snapshots from the full environment catalog so archived-only environments remain visible even when they have no active projects.
  • Filtered active rows defensively from web archive snapshots and kept native project-section ordering aligned with the selected sort field and direction.
  • Added web hover/focus row actions with tooltips, plus native swipe actions and long-press menus for unarchive and guarded delete.
  • Kept archive confirmations aligned with the standard thread-action fallback when no local dialog host is available.
  • Added project-level unarchive/delete menus scoped to all rows or visible search matches, with scope-accurate labels and confirmations that respect confirmThreadDelete on web and native confirmation flows on mobile.
  • Limited bulk work to four concurrent actions, stopped scheduling new work after unexpected exceptions, waited for active workers to settle, refreshed snapshots after attempts, reported partial or interrupted outcomes accurately, and surfaced distinct underlying exception messages on mobile.
  • Distinguished succeeded, failed, and already-in-flight skipped outcomes for native thread actions so overlapping bulk work reports skipped rows separately instead of presenting them as server failures.
  • Kept search ranking, grouping, sorting, and concurrency behavior in dedicated web and native logic modules rather than the React components.
  • Added focused web and native tests for search ranking including long-title tier boundaries, active-row filtering, grouping and collision-resistant keys, timestamp fallback, sorting, bulk scope labels, bounded concurrency, failure aggregation, interruption feedback, and exception handling.
  • Enabled pnpm's global virtual store and pinned the @effect/vitest package extension to the installed beta so its vite-plus dependency resolves consistently in the shared workspace graph.

Why

The previous archive views became difficult to scan and manage for users with large archives, and web and mobile exposed different levels of control. A shared dense hierarchy, consistent search and sort behavior, and actions close to each project or conversation make archive maintenance faster while preserving environment isolation and platform-native interaction patterns. The workspace package-extension update keeps the focused Effect/Vitest test graph reproducible with the pinned prerelease package.

Validation

  • pnpm exec vp test run apps/web/src/components/settings/SettingsPanels.logic.test.ts apps/mobile/src/features/archive/archivedThreadList.test.ts passed with 2 files and 37 tests.
  • The latest focused mobile archive suite passed with 1 file and 13 tests, including long-title ranking tiers and mixed succeeded, failed, and skipped bulk-action outcomes.
  • Focused formatting and type-aware lint passed for the current review-affected files; git diff --check also passed.
  • Playwright verified the isolated web Archive panel filters active rows from archive content and empty-state counts, falls back from an invalid archived timestamp for display, reorders rows when archived-date direction changes, and preserves phrase/all-token/partial ordering when matches occur late in long titles.
  • Mobile device verification could not run because this host had no installed iOS development client or reusable app artifact and no connected Android emulator.
  • Package typechecks were attempted but remain blocked by unrelated existing errors elsewhere in the web and mobile packages.

Proof

Archive settings grouped project browser Screenshot_20260719-223953

Note

Medium Risk
Changes permanent delete and bulk unarchive behavior across environments with new concurrency and error paths; logic is heavily tested but touches thread lifecycle and multi-environment data merging.

Overview
Replaces the flat web Archive settings list with a project-grouped browser in ArchiveSettings.tsx and aligns the native Archived Threads screen to the same hierarchy. Archive data now loads from all configured environments (not only those with active projects), with active snapshot rows excluded from archive content and empty states.

Both surfaces add ranked title search (phrase and multi-token matching), sortable archived/created columns, collapsible project sections (auto-expanded while searching), environment labels when relevant, and invalid archivedAt fallback to createdAt for sort and display. Group keys use JSON-tuple scoped ids to avoid collisions when ids contain separators.

Per-thread unarchive/delete and project-level bulk unarchive/delete are scoped to all rows or visible search matches, with platform-appropriate confirmations (confirmThreadDelete on web). Bulk work runs with bounded concurrency, stops scheduling after thrown errors, refreshes snapshots afterward, and reports partial, skipped-in-flight, and interrupted outcomes with clearer error text. Native thread actions return succeeded / failed / skipped so bulk flows do not treat in-flight rows as failures.

Shared grouping, search, sort, and bulk logic live in SettingsPanels.logic.ts (web) and archivedThreadList.ts (mobile), with expanded unit tests. Minor workspace tooling: pnpm global virtual store and pinned @effect/vitest package extension for vite-plus.

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

Note

Refine archived thread management UX with search, sorting, and bulk actions on web and mobile

  • Replaces the basic ArchivedThreadsPanel in SettingsPanels.tsx with a fully reworked panel in ArchiveSettings.tsx that groups threads by project/environment, supports title search, column sorting by archived/created time, and per-thread and bulk context menus for unarchive/delete.
  • On mobile, ArchivedThreadsScreen.tsx gains expandable/collapsible project groups, inline sort toggles, per-thread long-press menus, busy indicators, and switches from LegendList to FlatList keyed to search query and viewport height.
  • ArchivedThreadsRouteScreen.tsx adds project-level batch unarchive/delete with cross-platform confirmation, concurrency-controlled execution via runArchivedThreadActions, and summarized error reporting.
  • useArchivedThreadListActions now exposes deleteThread and returns a succeeded | failed | skipped status from both actions, with an option to suppress failure alerts for bulk flows.
  • Behavioral Change: buildArchivedThreadGroups now requires parsed search and sort inputs; matching is title-only (branch, project label, and workspace text no longer influence search results); group keys are JSON-stringified [environmentId, projectId] pairs instead of colon-delimited strings.

Macroscope summarized 2485e27.

- 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: dede8918-976f-45b3-b5a2-794eae78a77b

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 significant new archive management features including search functionality, sortable columns, collapsible project groups, and bulk actions (unarchive/delete all). These new user-facing capabilities and components warrant 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
…ngs-ux

# Conflicts:
#	apps/web/src/components/settings/SettingsPanels.tsx
- Add project grouping, sorting, search-aware bulk actions, and confirmations
- Expose native swipe and long-press actions for archived threads
- Document the shared web and mobile archive behavior
- Extend archive UX documentation to cover native mobile parity
- Record native archive files and platform-specific action behavior
@Quicksaver Quicksaver changed the title Refine archived settings panel UX Refine archive management UX across web and mobile Jul 19, 2026
Comment thread apps/mobile/src/features/archive/archivedThreadList.ts
Comment thread apps/web/src/components/settings/SettingsPanels.logic.ts
Comment thread apps/web/src/components/settings/SettingsPanels.logic.ts
Comment thread apps/mobile/src/features/archive/archivedThreadList.ts
Comment thread apps/web/src/components/settings/ArchiveSettings.tsx Outdated
- Enable the global virtual store
- Pin the Effect Vitest package extension to the beta release
- Filter active threads and fall back from invalid archive timestamps
- Keep mobile groups collision-free and aligned with selected sorting
- Report interrupted bulk actions and cover review regressions
Comment thread apps/mobile/src/features/archive/ArchivedThreadsScreen.tsx Outdated
Comment thread apps/web/src/components/settings/ArchiveSettings.tsx Outdated
Comment thread apps/web/src/components/settings/ArchiveSettings.tsx
- Require long press for native archived-row menus
- Exclude active snapshots from archive empty-state counts
- Preserve no-host confirmation fallback behavior
Comment thread apps/mobile/src/features/archive/ArchivedThreadsRouteScreen.tsx
- Expand aggregate failures into distinct user-facing messages
- Cover deduplication and truncation in archive logic tests
- Display labels when archived projects need environment context
- Reuse environment label rules and cover primary and remote cases
- Verify remote labels remain visible with multiple environments

@cursor cursor Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 8463f78. Configure here.

Comment thread apps/mobile/src/features/archive/archivedThreadList.ts Outdated
- Track succeeded, failed, and in-flight-skipped outcomes
- Report skipped mobile bulk actions separately from failures
- Cover mixed bulk results and update branch behavior docs
@Quicksaver
Quicksaver force-pushed the split/archive-settings-ux branch from f1addbd to 30e519e Compare July 21, 2026 18:43
Comment thread apps/mobile/src/features/archive/archivedThreadList.ts
- Bound within-tier scores before applying relevance offsets
- Cover long-title ranking on web and mobile
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