feat: complete the feedback loop — session thread, piggyback delivery, watch guidance#3
Merged
Merged
Conversation
Comments not attached to a snippet (sideshow comment without --snippet, or POST /api/comments with only a session) were stored and delivered to agents but never rendered anywhere in the viewer — the agent believed it had replied while the user saw nothing. Found while dogfooding the MCP flow end to end. A session thread now sits at the bottom of each session's stream: it renders snippet-less comments live over SSE and adds a composer so the user can message the agent without picking a snippet (the long-poll already delivers those to agents). New snippet cards insert above the thread; existing e2e selectors scoped to exclude it. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Agents previously heard feedback only while blocked on the long-poll. A per-session delivered-to-agent cursor (agentSeq, both stores; SQLite column added via pragma probe for pre-existing boards) now lets every publish/update/agent-reply response carry a userFeedback array with comments the user left since the agent's last call — delivered once. An author=user wait also advances the cursor so consumed feedback is not re-delivered. MCP tool descriptions and instructions teach the field; the stdio server passes it through untouched. Docs now describe all three delivery paths (piggyback, blocking wait, background watch): the skill and /setup teach arming `sideshow wait` as a background process and re-arming on exit instead of polling. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.
Started as the session-thread fix; grown (per discussion) into the full feedback-delivery story. Three commits, three layers:
1. Session thread in the viewer (
0ebe057)Comments not attached to a snippet (
sideshow commentwithout--snippet, orPOST /api/commentswith only asession) were stored and delivered to agents but never rendered in the viewer — the agent believed it replied; the user saw silence. The reverse was impossible too: no UI existed for the user to write a snippet-less comment.A session thread now sits at the bottom of each session's stream: renders snippet-less comments live over SSE, and adds a "Message the agent…" composer. New snippet cards insert above it. Verified live in the browser; e2e on Chromium + WebKit.
2. Piggyback feedback delivery (
7ade106)Agents previously heard feedback only while blocked on the long-poll — so they either waited needlessly or missed comments until the next checkpoint.
Now every agent write (publish, update, reply) may carry a
userFeedbackarray: comments the user left since the agent's last call. Mechanics:agentSeqcursor (both stores). SqlStore adds the column via apragma_table_infoprobe so pre-existing Durable Object boards migrate in place.author=userwait advances it too (no re-delivery in either direction). The viewer's unfiltered reads never touch the cursor.POST /api/commentsnever carries feedback; only agent-authored writes do.userFeedbackas messages from the user; the stdio server passes the field through untouched.3. Background watch guidance (docs, same commit)
For the stretches where the agent isn't touching sideshow at all: the skill,
/setupblock, and design guide now teach armingsideshow wait --timeout 600as a background process — it exits the moment the user comments, which surfaces the output through the harness's background-task notifications; handle and re-arm. (Proven live in a Claude Code session: comment typed in browser → background long-poll exited → agent woke and replied, no polling.) Includes the arm-on-the-right-session caveat learned the hard way.Together: piggyback covers actively-publishing agents, background watch covers quiet stretches, blocking
waitremains for explicit checkpoints.Tests
agentSeqdefaults, monotonic advance, unknown-session no-op; JsonFileStore reload persistence (including pre-agentSeqdata files).🤖 Generated with Claude Code