Skip to content

Add thread archiving and settings navigation#1359

Open
shivamhwp wants to merge 24 commits intopingdotgg:mainfrom
shivamhwp:archive-settings-overhaul
Open

Add thread archiving and settings navigation#1359
shivamhwp wants to merge 24 commits intopingdotgg:mainfrom
shivamhwp:archive-settings-overhaul

Conversation

@shivamhwp
Copy link
Collaborator

@shivamhwp shivamhwp commented Mar 24, 2026

What Changed

  • Added durable thread archiving to the orchestration model with new thread.archive and thread.unarchive commands/events.

  • Persisted archive state in the server projection layer and exposed it through the orchestration snapshot/read model.

  • Hid archived threads from the main project/thread sidebar and added archive/unarchive flows to the thread management UI.

  • Overhauled settings into section-based routes under /settings/* with sidebar navigation for General, Models, Advanced, Archived Threads, and About.

  • Added an archived threads settings panel for viewing, opening, unarchiving, and deleting archived threads.

  • Adjusted the settings UI styling and navigation behavior:

    • active section emphasis only
    • slightly larger sidebar text
    • back button exits settings directly
    • wider settings content layout
    • removed redundant section headers above settings cards

    Fixes

Why

Thread archiving needs to be durable and server-backed because thread visibility is currently derived from orchestration state, not local UI state. Making archive status first-class in the event/projection pipeline keeps behavior consistent across refreshes, restarts, and clients.

The settings UI changes were needed to support archived thread management cleanly and to make settings navigation behave more like the rest of the app. Splitting settings into section routes also makes the UX more predictable and easier to extend without keeping everything in one long page.

UI Changes

  • Main sidebar now hides archived threads from the active thread list.
  • Settings now uses left-sidebar section navigation instead of a single long page.
  • Added Archived Threads and About entries to settings navigation.
  • Archived threads are manageable from Settings > Archived Threads.
Screen.Recording.2026-03-24.at.4.13.25.PM.mov

Checklist

  • This PR is small and focused
  • I explained what changed and why
  • I included before/after screenshots for any UI changes
  • I included a video for animation/interaction changes

Note

Medium Risk
Introduces new orchestration commands/events plus DB migrations and projection updates for archivedAt, which impacts read models and persistence. UI behavior changes (hiding archived threads and new settings routes) may affect navigation/state handling but are covered by added tests.

Overview
Implements durable thread archiving end-to-end: new thread.archive/thread.unarchive commands and events with invariants, projector + projection-pipeline handling, snapshot/query surfacing of archivedAt, and SQLite migrations adding archived_at (plus index) to projection_threads.

Updates the web app to hide archived threads from the main sidebar and add an inline archive action (optional confirmation via confirmThreadArchive), centralizing thread operations in a new useThreadActions hook and adding an Archived Threads settings panel for unarchive/delete.

Refactors settings into child routes under /settings/* (redirecting /settings/settings/general) with a dedicated SettingsSidebarNav; desktop/web context menus now support disabled items.

Written by Cursor Bugbot for commit 8c8eb79. This will update automatically on new commits. Configure here.

Note

Add thread archiving and settings navigation with sidebar archive actions

  • Introduces thread.archive and thread.unarchive commands end-to-end: new contracts, decider logic, projector handling, projection pipeline, and DB migrations (017–019) that add archived_at to projection_threads.
  • Adds a useThreadActions hook in the web app exposing archiveThread, unarchiveThread, deleteThread, and confirmAndDeleteThread with session stopping, navigation, and error toasting.
  • Updates the Sidebar to filter out archived threads, show a per-thread hover Archive button (with optional confirmation via confirmThreadArchive setting), and render SettingsSidebarNav when on settings routes.
  • Refactors the /settings route into a layout with child routes /settings/general and /settings/archived, redirecting bare /settings to /settings/general.
  • Adds SettingsSidebarNav and SettingsPanels components for settings navigation and provider status display.
  • Behavioral Change: visiting /settings now redirects to /settings/general; archived threads no longer appear in the sidebar thread list.

Macroscope summarized 8c8eb79.

- persist archivedAt in orchestration and projection storage
- add archive/unarchive commands and thread filtering
- split settings UI into dedicated panels and sidebar nav
@coderabbitai
Copy link

coderabbitai bot commented Mar 24, 2026

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: 3adcaf51-17c7-492c-a6e6-760537bc935b

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 and usage tips.

@github-actions github-actions bot added size:XXL 1,000+ changed lines (additions + deletions). vouch:unvouched PR author is not yet trusted in the VOUCHED list. labels Mar 24, 2026
- Switch thread draft cleanup to `clearDraftThread`
- Keep thread actions aligned with the renamed store API
- Drop the unused About settings route
- Add inline unarchive actions in Archived Threads
- Keep thread deletion routing behavior aligned with archive changes
- Propagate disabled context menu items through desktop IPC and fallback UI
- Prevent archiving active threads and open a new thread after archive/delete
- Treat threads as running only when the session is active and has a live turn
- Prevent archive actions from targeting stale or closed sessions
- trigger a remount when settings are restored
- centralize custom model defaults in settings panels
- Preserve the outlet remount behavior
- Let settings content lay out vertically
@juliusmarminge
Copy link
Member

Not intuitive that "Restore defaults" mutates options from other pages?

CleanShot 2026-03-24 at 09 15 15@2x

I think we can collapse back and only have "General" and "Archive" for now. Someone also worked on more provider details, so in the future we can pull those out to a new "Provider" subpage with information and model options:

image

Someone also had worked on a UI for keybindings, which could be a separate page in the future as well:

image

@juliusmarminge
Copy link
Member

there should be a one-click button to archive when hovering the thread

CleanShot 2026-03-24 at 09 20 37@2x

@shivamhwp
Copy link
Collaborator Author

sure working on it !!

- Hide archived threads from the sidebar
- Add archive action UX with confirm setting
- Backfill archived_at migration and test updates
- Reflow Sidebar.tsx imports and JSX for consistency
- Keep behavior unchanged while reducing formatting noise
@shivamhwp
Copy link
Collaborator Author

image

oooh

- add in-memory fallbacks when browser storage is unavailable
- include diff line wrapping in settings restore tracking
- update tests for the new storage and model selection shape
- Add a settings toggle for wrapping long diff lines
- Wire reset behavior to the default preference
- add migration for `projection_threads(project_id, archived_at)`
- reuse shared storage resolution for web persistence
- simplify terminal state storage handling
- Centralize post-delete navigation in `useThreadActions`
- Keep settings redirect from adding an extra history entry
- Route git prompts through Claude CLI alongside Codex
- Thread model selection and fast-mode/reasoning settings through UI and server
- Add coverage for CLI wiring and output validation
- Restore back navigation in settings to the previous page
- Add shared settings route helpers and register migration 19
- Fix legacy project events lacking `defaultModelSelection`
- Preserve null and non-null model payloads while removing deprecated fields
- Delete obsolete settings route parsing and return-to normalization
- Consolidate navigation logic elsewhere during settings overhaul
# Conflicts:
#	apps/web/src/appSettings.test.ts
#	apps/web/src/appSettings.ts
#	apps/web/src/components/Sidebar.tsx
#	apps/web/src/composerDraftStore.ts
#	apps/web/src/routes/_chat.settings.tsx
Copy link
Contributor

@cursor cursor bot left a comment

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 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.

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.

2 participants