Skip to content

Show a Bot as waiting for work it sent, and void stale question cards - #2

Closed
neotechnet wants to merge 7 commits into
feat/combined-sidebar-025from
feat/waiting-on-sent-jobs
Closed

neotechnet wants to merge 7 commits into
feat/combined-sidebar-025from
feat/waiting-on-sent-jobs

Conversation

@neotechnet

@neotechnet neotechnet commented Nov 1, 2026 •

Copy link
Copy Markdown
Owner

Two local fixes on top of the combined-sidebar 0.2.5 build (draft, not for merge yet).

  • A Bot that sends message_bot from its own chat now shows as waiting for the recipient until the reply. It uses the work message_bot already opens, so no new state; reply_to user is no wait. Client unchanged.
  • Carries the question lifecycle work from feat/question-lifecycle: a stale card closes after a later visible turn, and void_question lets a Main Bot withdraw one. void_question moves to rt.teamTools, since 0.2.5 scopes team tools per Bot session.

Tests: whole ds-bot suite 1457 tests, 1455 passed, 0 failed, 2 skipped, and all four CI test jobs pass. New test/waiting-sent.test.js has 9 cases, 6 fail without the change. Lint is clean after dropping an unused variable from the base commit. Leak scan stays red on the dsh-bot:sessions event name from the base commit, which the Harness fork listens for; Test result is red only because of it.

🤖 Generated with Claude Code

neotechnet and others added 7 commits November 1, 2026 17:52
A question card was cleared only when the user answered it. A Bot that moved
on in a later turn left the card on screen, and nobody but the user could
remove it.

A completed turn that asked nothing now closes the card the turn opened on,
so a turn that asks keeps its own card. A failed or stopped turn says nothing
about the card and leaves it, as does the handoff turn of a fresh part, which
carries it over.

void_question lets a Main Bot withdraw another Bot's card; the Bot is told in
a new turn. A click on a closed card takes the existing bot/stale refusal.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Steve's decision: a completed turn clears the card it opened only when that
turn was user-facing. A hidden Bot-to-Bot turn shows the user nothing, so
clearing there could remove a question before it was ever read.

Hidden means what the rest of the plugin means by it: the turn is recorded in
exchangeTurns, the same test ask_user and the live feed use. A request a Bot
sends with reply_to "user" stays visible, so that turn still clears the card.

The Bot prompt, README and changelog now say the same thing. Voiding, the
refusal of a late answer, a turn that asks keeping only its own card, and a
failed or stopped turn clearing nothing are unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Team tools are scoped per Bot session on 0.2.5, so the question lifecycle
tests read them from rt.teamTools.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
message_bot already opens a persisted work for these sends, but nothing above
it held the wait, so the sender showed idle. waitingView and statusOf now count
a work with a recipient and no live parent as the sender waiting for that Bot,
with an empty for list. The work closes on the reply, on a stopped turn and
when either Bot is deleted, and survives a restart, so no new state is added.
reply_to user opens no work and stays no wait.

Three tests that pinned the old idle sender now expect the wait.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A message that lands while a Bot is mid-work is delivered twice: the running turn
reads it at its next step, then turn/end hands it back so the Bot can answer it in a
turn of its own. Both hand-back loops re-sent the whole text (request.text in the
joined loop, result.text in the later loop), and both of those come from a
user/message event the model has already been shown in that Session. So the model
read one message twice, under one exchangeId, with nothing anywhere to catch it.

The hand-back keeps its identity: same exchangeId, same role, same sender, still
deferred, so the sender still gets its answer and the ledger still records one send.
It now carries a one-line pointer instead of the body.

deliver takes a new handedBack flag and stamps source.handedBack on the delivery.
exchangeText is the one reader that needs to tell the two apart, so it skips a
delivery marked handedBack when it reads a message back from the Session for the
exchanges dialog, which still shows the real text.

test/handback.test.js covers a joined request, a reply handed back for other work,
one body across the steer and the hand-back together, and a message to an idle Bot
left untouched. Three of its four cases fail on the unpatched tree.

Five existing assertions in test/bot-messages.test.js and test/group-work.test.js
compared a hand-back against the full body; they now compare it against the pointer.
The "name with brackets" case no longer had a body to check, so it proves what still
holds: the bracketed sender name leaves a well-formed header.

Restored onto feat/waiting-on-sent-jobs after the 0.2.5 upgrade dropped it. The one
conflict was the deliver comment and signature in delivery.js: this branch's wording
about resent messages is kept and the handedBack parameter and comment are added.
test/handback.test.js reaches its tools through rt.teamTools, as 0.2.5 requires.

(cherry picked from commit c428983)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@neotechnet

Copy link
Copy Markdown
Owner Author

Superseded by #4: this change is carried in stack/installed-0.2.7 (21eff5d), installed in the live profile and proven on 2026-11-03. Head was 83b91af.

@neotechnet neotechnet closed this Nov 3, 2026
@neotechnet
neotechnet deleted the feat/waiting-on-sent-jobs branch November 3, 2026 21:54
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