Skip to content

fix(web): opening a project from the command palette skips settled and snoozed threads - #31894

Open
spoukyii wants to merge 2 commits into
pingdotgg:mainfrom
spoukyii:users/spoukyii/palette-project-skips-parked
Open

spoukyii wants to merge 2 commits into
pingdotgg:mainfrom
spoukyii:users/spoukyii/palette-project-skips-parked

Conversation

@spoukyii

@spoukyii spoukyii commented Nov 6, 2026

Copy link
Copy Markdown
Contributor

Problem

Picking a project in the command palette opens that project's latest thread, even when that thread is settled or snoozed. Settle or snooze a project's newest thread, press Cmd/Ctrl+K, type the project name and pick the project row: you land back on the thread you just parked, not the newest thread still in play.

Expected: the palette opens the newest thread in that project that is not settled or snoozed, and starts a new thread when there isn't one, as it does for an empty project.

Change

openProjectFromSearch in CommandPalette.tsx chooses the thread to open with getLatestThreadForProject (single project) or sortThreads (a project group). Its candidates already leave out archived threads, subagents and side chats (#29891). They still counted settled and snoozed threads. The handler now filters its candidates first, with the same test the delete fallback uses: settledOverride !== "settled" and !effectiveSnoozed(thread, { now }). Both the single-project and grouped branches read the filtered list. The palette's thread search results are untouched, so you can still search for and open a settled or snoozed thread by name. The Add project path for a folder that is already a project (CommandPalette.tsx, the existing-folder branch) is also left as it is: #11804 already decided how it treats a settled latest thread, and open #30353 edits it.

Scope and approval

This is the same defect #29643 fixed for deleting the open thread ("deleting the open thread no longer opens a snoozed or settled thread"). There, getFallbackThreadIdAfterDelete picks the project's next thread and now skips settled and snoozed ones. Opening a project from the palette picks the project's latest thread in the same way and still lands on one. The filter is copied from that fix, so it adds no new rule about which threads count as parked. Merged #11804 ("avoid reopening settled threads when adding projects") made the same call in this file for the Add project path. It is a small, focused fix for an obvious bug, with no new behaviour, setting or contract, so it falls under CONTRIBUTING's "very small, focused fix for an obvious bug" exception.

#30428 (this account's) extends the same test case to skip delegated tasks. The source changes merge cleanly; the test case needs a trivial rebase for whichever lands second.

Verification

I extended the existing case in apps/web/src/components/CommandPalette.browser.test.tsx ("opens a searched project's latest listed thread, not a newer subagent or parked thread"). On top of its parent thread and newer subagent, it now adds a newer settled thread and a newest thread snoozed until 2999. It opens the palette, searches "Acme", clicks the project and checks the route.

On main (test commit only), from apps/web:

vp test run src/components/CommandPalette.browser.test.tsx
× opens a searched project's latest listed thread, not a newer subagent or parked thread
AssertionError: expected '/local/snoozed' to be '/local/parent' // Object.is equality
Tests  1 failed | 2 passed (3)

With the fix:

vp test run src/components/CommandPalette.browser.test.tsx
Test Files  1 passed (1)
Tests  3 passed (3)

The one case covers both filters, because the snoozed thread is the newest and the settled thread comes next. A fix that dropped only one of them would open the other, so the test would still fail.

vp run check:changed: format, lint, knip, typecheck (2 packages), tests (4 files) and react compiler all pass.

To trigger it in the real app: in a project with at least two threads, settle the newest one (thread menu, Settle) or snooze it. Press Cmd/Ctrl+K, type the project's name and pick the project row (not a thread row). Before the fix you land on the settled or snoozed thread. With the fix you land on the newest thread that is still active, or on a new thread if every thread is parked.

In a running dev build (web, Windows), I added a git repository with two threads, "Alpha (active)" and the newer "Bravo (settled)", and settled Bravo from the sidebar. Then I pressed Ctrl+K, typed the project's name and picked the project row. The before run uses main's CommandPalette.tsx, and the after run uses this branch.

The palette, project row on top Before (main): lands on the settled thread After (this branch): lands on the active thread
The command palette with "palette-demo" typed and the project row on top Before: "Bravo (settled)" opens, with "Settled just now · Un-settle" and the thread on the Settled shelf After: "Alpha (active)" opens

Not checked in the running app: a snoozed thread and a project whose threads are all parked. The browser test covers the snoozed thread.

Bug: opening a project from the command palette lands on a settled or snoozed thread

This was written with Claude Opus 5.5 in Claude Code, driven from T3 Code.

…d snoozed threads

Picking a project in the command palette opens that project's latest
thread. The candidates dropped archived threads, subagents and side
chats, but still counted threads the user had settled or snoozed, so a
project whose newest thread was parked opened straight back onto it.

Deleting the open thread already skips settled and snoozed threads when
it picks the next one (pingdotgg#29643). The palette now filters its candidates
the same way, settledOverride and effectiveSnoozed at the current time,
for single and grouped projects alike. When every thread is parked it
starts a new thread, as it does for an empty project.

Bug: opening a project from the command palette lands on a settled or snoozed thread
@github-actions github-actions Bot added vouch:unvouched PR author is not yet trusted in the VOUCHED list. size:S 10-29 changed lines (additions + deletions). labels Nov 6, 2026
@macroscopeapp

macroscopeapp Bot commented Nov 6, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Needs Human Approval

Macroscope's review found this PR requires human approval — Project opening now skips settled and snoozed threads, using the existing new-thread fallback when none remain. The changed default navigation and new react/purity lint suppression require human review.

You can add or adjust custom eligibility rules. Learn more.

@coderabbitai

coderabbitai Bot commented Nov 6, 2026

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

Project search now excludes settled and effectively snoozed threads before choosing the latest thread to open. Browser tests add later-message fixtures for both thread states.

Changes: Project Search Thread Selection

Layer / File(s) Summary
Filter eligible threads and validate selection
apps/web/src/components/CommandPalette.tsx, apps/web/src/components/CommandPalette.browser.test.tsx
openProjectFromSearch filters settled and effectively snoozed threads for grouped-project and environment-specific searches. Browser test fixtures cover settled and snoozed threads with later user messages.

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix

Possibly related issues

  • pingdotgg/t3code issue 22379 concerns which thread project search opens.

Possibly related PRs

  • pingdotgg/t3code#29891: Both changes exclude unsuitable threads from project search selection; that PR excludes hidden subagent and side-chat threads.

Suggested labels: bugfix, size:S

Suggested reviewers: juliusmarminge

Merge Risk: Minimal · up to 5027d

No actionable merge-blocking risk was identified.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title clearly describes the main fix.
Description check Passed The description covers the problem, change, scope, verification, screenshots, and agent details. It identifies the scenarios not checked in the running app.
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Finishing Touches

Generate unit tests (beta)

  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Recent review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 2756da4 and 5027d3a.

Files selected for processing: 2

  • apps/web/src/components/CommandPalette.browser.test.tsx
  • apps/web/src/components/CommandPalette.tsx

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 4 remain after this review.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:S 10-29 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