Skip to content

fix(staged): show a project session waiting on repo sessions as running - #1127

Merged
matt2e merged 3 commits into
mainfrom
waiting-on-shouldnt-be-in-subtitle
Dec 3, 2026
Merged

matt2e merged 3 commits into
mainfrom
waiting-on-shouldnt-be-in-subtitle

Conversation

@matt2e

@matt2e matt2e commented Dec 3, 2026

Copy link
Copy Markdown
Contributor

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

  • noteRowPhase maps a session waiting on its wake-up to running. The waiting phase and the waiting-note row type (hourglass) are removed. The row gets the spinner, sorts with the running rows, opens its chat on click, and offers no Resume.
  • finishedSecondaryMeta no longer produces a "Waiting on" line, so the repo sessions' badges are the whole subtitle.
  • If the waiting session has already written its note, the row shows the finished note's title ("Untitled note" when it has none) and, when there are no badges, the date it was written. It no longer shows "Generating note…".
  • The note's own state is decided without the wake-up (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.
  • A finished session that left repo sessions running without arming a wake-up still says "N repo sessions still running".

Chat pane wake-up notice

  • The notice is now a spinner, "Waiting on N repo sessions" (or "any of N", "1 repo session", "repo sessions") and Stop waiting, all on one line.
  • Removed: the "Staged starts a new turn here when…" sentence and the check-in line ("checks in around " / "A check-in is due"). "Turn" is not a word users know, and neither line asked them to do anything.
  • The Stop waiting tooltip now reads: "this session will not continue when the repo sessions finish. They keep running."
  • wakeupNotice, WakeupNotice and CHECK_IN_DUE_NOTICE are removed.

The wake-up itself (checkInAt, the store, the events, the backend and the MCP tools) is unchanged.

Tests

  • The row and context-menu test stubs now record unread, chatState, hasDraft, the menu key, the hashtag refs and the read marks.
  • New component tests cover a written note with an armed wake-up, both unread and read, plus the dated subtitle and the mid-turn row the unread dot is matched to.
  • The notice tests pin its full text for the plural, singular and "any of" cases, with a check-in still ahead and with one due.

🤖 Generated with Claude Code

matt2e and others added 3 commits December 3, 2026 13:20
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>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Dec 3, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-12-03T03:29:07.511541Z 8dc0f6c PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@matt2e
matt2e merged commit 991ee7c into main Dec 3, 2026
8 checks passed
@matt2e
matt2e deleted the waiting-on-shouldnt-be-in-subtitle branch December 3, 2026 03:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant