@@ -20,7 +20,9 @@ sideshow guide # or: curl -s $SIDESHOW_URL/guide
2020```
2121
2222If ` SIDESHOW_URL ` is unset, the surface is at ` http://localhost:4242 ` . If it
23- is not running, start it: ` sideshow serve ` (or ` npx sideshow serve ` ).
23+ is not running, start it: ` sideshow serve ` (or ` npx sideshow serve ` ). If the
24+ ` sideshow ` command is not on PATH but you are inside this repo, use
25+ ` node bin/sideshow.js ... ` as the CLI command.
2426
2527## Publishing
2628
@@ -33,6 +35,9 @@ sideshow publish sketch.html --title "Cache layout" --agent your-name --session-
3335echo ' <p>...</p>' | sideshow publish - --title " Quick note"
3436```
3537
38+ Save the returned ` sessionId ` and snippet ` id ` ; all feedback handling depends
39+ on watching the exact session you published to.
40+
3641Rules of thumb:
3742
3843- On your first publish, set a session title that names the task ("Auth
@@ -49,28 +54,47 @@ Rules of thumb:
4954
5055## The feedback loop
5156
52- Feedback reaches you three ways — prefer them in this order:
57+ Treat sideshow as a two-way surface. Do not assume you will automatically see
58+ comments after publishing; you must either arm a visible watcher or drain
59+ feedback at checkpoints.
60+
61+ Feedback reaches you four ways — prefer them in this order:
5362
54631 . ** Piggyback (no action needed).** Publish/update/reply responses may
5564 include a ` userFeedback ` array: comments the user left since your last
5665 call, delivered once. Read them whenever they appear and treat them as
5766 user instructions.
58- 2 . ** Background watch (don't block, don't poll).** After your first publish,
59- arm a listener as a background process and keep working:
67+ 2 . ** Visible background watch (best non-blocking path).** After your first
68+ publish, arm a listener as a background process only if your harness will
69+ surface the process output back to you:
70+
71+ ``` sh
72+ sideshow wait --session < sessionId> --timeout 600
73+ ```
74+
75+ It exits the moment the user comments. Handle the comments, then re-arm it.
76+ Always watch the actual ` sessionId ` returned by publish — never a guessed
77+ or default session. Do not start a blind detached watcher whose output you
78+ cannot see.
79+
80+ 3 . ** Checkpoint drain (reliable fallback).** If background output is not
81+ surfaced, run a quick drain at the start of each user turn, before final
82+ answers, and before major changes:
6083
6184 ``` sh
62- sideshow wait --timeout 600 # run in the background (e.g. run_in_background)
85+ sideshow wait --session < sessionId > --timeout 1
6386 ```
6487
65- It exits the moment the user comments, which surfaces the output to you.
66- Handle the comments, then re-arm it. Always arm it on the session you just
67- published to — never a guessed one.
88+ This is effectively non-blocking but keeps you aware of comments in
89+ harnesses without background notifications.
6890
69- 3 . ** Blocking wait.** Only when you explicitly need a reaction before
70- continuing: ` sideshow wait --timeout 120 ` in the foreground.
91+ 4 . ** Blocking wait.** Only when you explicitly need a reaction before
92+ continuing: ` sideshow wait --session <sessionId> --timeout 120 ` in the
93+ foreground.
7194
72- Acknowledge briefly with ` sideshow comment "..." --snippet <id> ` when useful;
73- do substantial changes as snippet updates.
95+ When comments arrive, acknowledge briefly with
96+ ` sideshow comment "..." --snippet <id> ` when useful; do substantial changes as
97+ snippet updates, then re-arm the watcher or continue checkpoint-draining.
7498
7599## Remote surfaces
76100
0 commit comments