Repository navigation
Conversation
…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
ApprovabilityVerdict: 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. |
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
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
openProjectFromSearchinCommandPalette.tsxchooses the thread to open withgetLatestThreadForProject(single project) orsortThreads(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,
getFallbackThreadIdAfterDeletepicks 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), fromapps/web:With the fix:
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'sCommandPalette.tsx, and the after run uses this branch.main): lands on the settled threadNot 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.