Skip to content

Add configurable Sidebar V2 ordering - #4702

Closed
saphid wants to merge 1 commit into
pingdotgg:mainfrom
saphid:feat/sidebar-v2-configurable-ordering
Closed

saphid wants to merge 1 commit into
pingdotgg:mainfrom
saphid:feat/sidebar-v2-configurable-ordering

Conversation

@saphid

@saphid saphid commented Jul 28, 2026 •

Copy link
Copy Markdown
Contributor

What Changed

Adds an opt-in automatic ordering mode to Sidebar V2 on web/desktop and Thread List V2 on mobile.

  • Keeps the existing newest-created-first order as the default.
  • Adds a user-configurable group priority for Needs review, Working, and Other active.
  • Orders Needs review by its latest attention event so recently finished work rises to the top.
  • Clears completion/wake priority after that device opens the thread.
  • Tracks mobile visits from navigation state so taps, deep links, restored routes, new tasks, and auxiliary thread screens behave consistently.

Closes #4695.

Why

Sidebar V2 currently leaves recently completed work below agents that are still working. Automatic mode turns it into an attention queue while preserving the existing static behavior for users who prefer it.

This is one cross-platform preference and ordering model, but it necessarily touches both independently implemented clients. The diff is expected to receive size:XL; it is not presented as a small PR.

UI Changes

Before: static creation order

Mobile Sidebar V2 before automatic ordering

After: Needs review above Working

Mobile Sidebar V2 with Needs review above Working

Ordering controls

Web automatic Sidebar V2 ordering settings

Web sidebar result

Web Sidebar V2 with review work above working agents

Short mobile interaction video

Verification

  • pnpm exec vp test run apps/web/src/uiStateStore.test.ts packages/client-runtime/src/state/threadSnoozed.test.ts apps/web/src/components/Sidebar.logic.test.ts apps/mobile/src/features/threads/threadListV2.test.ts apps/mobile/src/features/threads/navigationThreadVisit.test.ts apps/mobile/src/state/preferences.test.ts packages/contracts/src/settings.test.ts apps/desktop/src/settings/DesktopClientSettings.test.ts — 8 files, 190 tests passed.
  • Targeted typechecks passed for @t3tools/client-runtime, @t3tools/contracts, @t3tools/web, @t3tools/mobile, and @t3tools/desktop.
  • Targeted lint and formatting passed; pnpm lint:mobile exited 0 (optional SwiftLint, ktlint, and detekt tools were not installed and were skipped).
  • Web integrated pass verified persisted automatic mode, configurable priority, and seeded sidebar ordering.
  • iOS Simulator integrated pass verified settings persistence, review-first ordering, and visit-marker persistence for normal and auxiliary deep links.

Checklist

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

Note

Add configurable Sidebar V2 thread ordering with automatic group classification

  • Adds two new client settings (sidebarV2ThreadOrderMode and sidebarV2ThreadGroupOrder) that control whether threads are sorted by creation time or automatically grouped into review, working, and ready buckets with user-configurable priority.
  • The automatic mode classifies threads based on unseen wakes, unseen completions, actionable proposed plans, and resolved status; within the review group, threads are ordered by attention recency.
  • Adds settings UI on both web (BetaSettingsPanel.tsx) and mobile (SettingsRouteScreen.tsx) for toggling mode and reordering group priority.
  • Mobile navigation now records per-thread last-visited timestamps into device-local preferences on startup and on every navigation state change, used to determine whether wakes/completions are unseen.
  • Behavioral Change: markThreadVisited on web now stores a timestamp resolved by resolveThreadVisitTimestamp rather than unconditionally using serverThread.updatedAt.
📊 Macroscope summarized 7a0960a. 13 files reviewed, 0 issues evaluated, 0 issues filtered, 0 comments posted

🗂️ Filtered Issues

No issues evaluated.

@coderabbitai

coderabbitai Bot commented Jul 28, 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 Plus

Run ID: aede7a33-1e4a-4e1f-b0f4-f6c2cd6784da

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.

@github-actions github-actions Bot added vouch:unvouched PR author is not yet trusted in the VOUCHED list. size:XL 500-999 changed lines (additions + deletions). labels Jul 28, 2026
Comment thread apps/mobile/src/App.tsx
return null;
}

function AppNavigation(props: { readonly theme: Theme }) {

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.

🟡 Medium src/App.tsx:73

Rapid consecutive navigation changes can silently lose thread visit records. If the user moves from thread A to thread B before preferencesResult re-renders, both calls to writeThreadVisit read the same stale preferencesResult.value.threadLastVisitedAtByKey map. recordThreadVisit for A adds A to that map and saves it; recordThreadVisit for B adds B to the same old map (missing A) and saves it. The later save overwrites A's visit, leaving thread A classified as unseen even though the user just visited it. The stale render-time snapshot is the problem — writeThreadVisit should accumulate from the latest optimistic preferences state or use an atomic updater rather than replacing the whole map from a closure value.

🤖 Copy this AI Prompt to have your agent fix this:
In file @apps/mobile/src/App.tsx around line 73:

Rapid consecutive navigation changes can silently lose thread visit records. If the user moves from thread A to thread B before `preferencesResult` re-renders, both calls to `writeThreadVisit` read the same stale `preferencesResult.value.threadLastVisitedAtByKey` map. `recordThreadVisit` for A adds A to that map and saves it; `recordThreadVisit` for B adds B to the same old map (missing A) and saves it. The later save overwrites A's visit, leaving thread A classified as unseen even though the user just visited it. The stale render-time snapshot is the problem — `writeThreadVisit` should accumulate from the latest optimistic preferences state or use an atomic updater rather than replacing the whole map from a closure value.

@saphid

saphid commented Jul 28, 2026

Copy link
Copy Markdown
Contributor Author

Closing this draft to restore the repository’s issue-first sequence for cross-client feature work. The implementation branch and media are preserved, but I will wait for explicit maintainer direction on #4695 before reopening or rebuilding an implementation PR. The current XL shape should not be treated as aligned merely because its automated checks passed.

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.

[Feature]: Prioritize Sidebar V2 threads that need review

1 participant