Repository navigation
fix(staged): show a project session waiting on repo sessions as running - #1127
Merged
Merged
Conversation
A project session that calls `wake_when_repo_sessions_end` and ends its turn is `completed` with a wake-up armed. Since #1121 its row in the project's notes list said so: "Waiting on N repo sessions" as the row's subtitle ahead of the repo sessions' badges, or as the title of an hourglass row when the note was not written yet. To the user the session is still at work, through the repo sessions it started. The row now reads as running for as long as the wake-up is armed: - `noteRowPhase` maps a session waiting on its wake-up to `running`, written note or not, and the `waiting` phase and the `waiting-note` row type are gone. The row gets the spinner, sorts with the running rows, opens its chat, offers no Resume and carries no unread dot. - `finishedSecondaryMeta` no longer produces the "Waiting on" line, so the subtitle is the repo sessions' badges alone, as on any running row. A written note keeps its title; an unwritten one reads "Generating note…". - The chat pane's notice, which is where the wait is explained and stopped, spins instead of showing an hourglass. The wake-up itself, its store and events, and the MCP tools are untouched. A finished session that left repo sessions going without a wake-up still says "N repo sessions still running". Signed-off-by: Matt Toohey <contact@matttoohey.com> Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…to be woken 60e6366 made a project session that is waiting on its wake-up read as running. For a session that had already written its note this took more than the row's look, and the review of that commit flagged three things. The note's own state went with the row's phase. `isCompletedProjectNote` asked the wake-up-aware phase, so the note lost "New session referring to this note" and Mark as read/unread from its context menu, and its row lost the chat button's state and the reply-draft mark, for as long as the repo sessions ran. It now asks about the note alone: written, by a session that is not in a turn. The row's look, sort position, click target and Resume still follow the wake-up-aware phase. The unread dot does too, through a separate `showsNoteUnread`: a written note whose session is in a turn already shows none, and a waiting row matches that. The note stays unread, the menu still offers to mark it read, and the dot is back when the wait ends. The row could read "A finished note / Generating note". With no child badges the subtitle fell back to the running placeholder, on every project open until the children were read, and for as long as the awaited sessions were between states. A waiting session with a written note now reads as the finished note's row does: its title ("Untitled note" when it has none) and, when there are no badges, when it was written. Badges still take the subtitle's place. A waiting session that has not written its note is unchanged. The component tests could not see any of this. The row stub now records `unread`, `chatState`, `hasDraft` and the context-menu key, and the context-menu stub records each action's hashtag ref and its read marks. New tests pin a written, unread note with an armed wake-up (no dot; chat state, draft mark, reference and Mark as read kept), a read one (Mark as unread kept), the dated subtitle, and the mid-turn row the dot is matched to. Not changed: an unwritten row still drops from the turn's live title to "Generating note…" when the turn ends. The live rows drop a session's title once the stream says it is no longer running, and a project note carries no ACP title, so keeping it would need new state. Signed-off-by: Matt Toohey <contact@matttoohey.com> Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
The notice a project session shows while it waits on repo sessions read, for two of them: Waiting on 2 repo sessions. Staged starts a new turn here when they end. If that has not happened, Staged checks in around 1:50 pm. [Stop waiting] That is more than a user needs, and "turn" is not a word users know. The notice is now the spinner, "Waiting on 2 repo sessions" and Stop waiting, on one line. Every variant follows the same rule: no "turn", nothing about what Staged does when the wait ends or when it checks in. - The message is `wakeupWaitLabel` alone: "Waiting on 1 repo session", "Waiting on N repo sessions", "Waiting on any of N repo sessions" for a wake-up on the first to end, "Waiting on repo sessions" for one that names none. The "Staged starts a new turn here when it ends / they end / the first one ends" sentence is gone from each. - The second line is gone in both its forms: "If that has not happened, Staged checks in around <time>." and, once that time had passed, "A check-in is due. Staged starts a new turn here soon." Neither asked anything of the user. - The Stop waiting tooltip said "Staged will not start a new turn here when the repo sessions end". It now says "this session will not continue when the repo sessions finish. They keep running.": what the button does, kept because the button's two words do not say it. "Failed to stop waiting: <error>" on the composer is unchanged; it carries no jargon and is the one thing here the user has to act on. Stop waiting has no confirmation and no toast. `wakeupNotice`, its `WakeupNotice` type and `CHECK_IN_DUE_NOTICE` only built the dropped text and are removed, with the notice's use of `minuteNow` and `formatPauseTime` (both still used elsewhere). The wake-up's `checkInAt`, the store, the backend and the MCP tools are untouched, and so is the session's row in the project's notes list. The tests pin the whole of the notice's text for the plural, singular and "any of" cases, with a check-in ahead and with one due, and that it holds none of the dropped sentences, "turn", "check-in" or "Staged". Signed-off-by: Matt Toohey <contact@matttoohey.com> Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A project session that calls
wake_when_repo_sessions_endand ends its turn iscompletedwith a wake-up armed. Since #1121 its row in the project's notes list said "Waiting on N repo sessions", either as the subtitle or as the title of an hourglass row. To the user, though, the session is still working through the repo sessions it started. This PR makes the row read as running, and cuts the chat pane's wake-up notice down to one line.Notes list row
noteRowPhasemaps a session waiting on its wake-up torunning. Thewaitingphase and thewaiting-noterow type (hourglass) are removed. The row gets the spinner, sorts with the running rows, opens its chat on click, and offers no Resume.finishedSecondaryMetano longer produces a "Waiting on" line, so the repo sessions' badges are the whole subtitle.isCompletedProjectNote). While the session waits, the context menu still offers referring and Mark as read/unread, and the chat state and reply-draft mark stay on the row. The unread dot is hidden while the row reads as running (showsNoteUnread), the same as for a note whose session is in a turn. It comes back when the wait ends.Chat pane wake-up notice
wakeupNotice,WakeupNoticeandCHECK_IN_DUE_NOTICEare removed.The wake-up itself (
checkInAt, the store, the events, the backend and the MCP tools) is unchanged.Tests
unread,chatState,hasDraft, the menu key, the hashtag refs and the read marks.🤖 Generated with Claude Code