Steering console: send prompts to sessions from the UI + scroll-stable follow output #25
Loading…
Reference in a new issue
No description provided.
Delete branch "oss-oo/observatory-steer-console-teer20260924"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The observatory's first WRITE-capable action: a prompt dialog in the response modal AND the full transcript drawer that runs a follow-up turn in the session through the installed
zcode-dispatch— the observatory still never writes the ZCode DB. Plus the owner-reported scroll fix: the response modal drifted downwards on every refresh cycle; both surfaces are now strictly position-stable with a proper follow-output toggle.Backend
POST /api/session/<id>/steerwith{text}: auto-detects cwd and model exactly like the dispatcher'snotify_parent(session.directory; lastjson_extract(data,'$.modelSelection.modelId')by sequence — never guessed), writes the prompt to~/.config/zcode-dispatch/observatory-steers/<ts>-<sid>.prompt(override:ZDO_STEER_DIR), and spawns the INSTALLED dispatcher detached (start_new_session, stdout/stderr →<ts>-<sid>.log, stdin devnull, no--timeout— long turns legal), returning immediately (202) with steer id/paths.GET /api/session/<id>/steer/latest: the newest steer's incremental result JSON (status/turnStatus/error) + process liveness + exit code + response tail (last 500 chars) + the auto-detected target. After an observatory restart the in-memory record is gone — the newest result file on disk still reports.Frontend
⏳ steer in flight — turn is running…state); on completion the dialog shows the exit-code line and the response tail. Exit-code semantics shown inline:0 ok · 2 bad args/wrong model · 3 busy/lock/mismatch — session has a running turn · 4 failed · 5 timeout, session intact · 6 bridge/config. A steer sent while a modal sits on a terminal session restarts its 5 s poll so the new output streams in.scrollTopis preserved exactly (the old code re-rendered + re-assignedscrollTopevery cycle). Verified programmatically: scrollTop before/after multiple cycles identical in both surfaces.↓ jump to latestpill; scrolling back, clicking the pill, or re-toggling resumes. Both surfaces open at the conversation tail.Evidence
turn-running → completedexit 0 with tail, exit-3 busy semantics, disk fallback after a server restart.zcode-dispatch(GLM-5.3-Flash, worktree scratch dir), steered FROM the drawer UI — API walkedturn-running (alive) → completed (exit 0), dialog showed✅ steer ended — exit 0with the tailE2E-STEERED-OK 43, transcript grew to 4 messages. Screenshots in the PR conversation.py_compile+--help,make check-social-preview, Super-Linter slim v8.7.0 (workflow env) — EXIT 0.Docs
README: "Steering from the observatory" section (what it does, busy semantics, Steer API, exit-code table, scratch-file layout) + "Scroll stability & follow output" section (defaults documented) + security section updated (the observatory now triggers dispatcher runs — still never writes the ZCode DB; steer scratch files contain owner content, no credentials).
Evidence
Real end-to-end steer (real DB, real zcode-dispatch, driven from the drawer UI)
Drawer open on the scratch session (
# Observatory steer e2e scratch session, GLM-5.3-Flash,.e2e-scratch) — target line + prompt dialog + follow toggle:After clicking Send to session (API status at that moment:
turn-running,processAlive: true) — button disabled, in-flight state:Final: API walked
turn-running → completed (exit 0), dialog shows✅ steer ended — exit 0 · turn completedwith the response tailE2E-STEERED-OK 43, transcript grew to 4 messages, send re-enabled:CDP fixture harness (22/22 checks)
Follow toggle ON (default for running) + steer box in the drawer:
Stability probe: scrollTop held at 500 across multiple refresh cycles with no new content (drawer and modal — logged before/after, identical):
Scroll-up pauses follow and shows the ↓ jump-to-latest pill (click returns to bottom and resumes):
Steer in flight in the drawer (fake dispatcher, deterministic states):
Completed with exit-0 line + response tail + legend:
Modal: steer box + stable scroll (scrollTop 40 → 40 across cycles), follow OFF default for terminal sessions:
Exit-3 busy semantics in the modal:
Full checklist (22/22): drawer opens at bottom (follow ON default) · scrollTop untouched over cycles (drawer, modal) · follow-OFF ignores injected new content · follow-ON follows it · re-toggle jumps to bottom · scroll-up shows pill · pill click returns+resumes · steer target lines (both surfaces) · send disabled while in flight · in-flight status visible · exit-0 completion + tail · send re-enabled · one-driver state (disabled + visible status) · exit-3 busy semantics · Shift+Enter keeps draft without sending.