Files
loki/scripts
CatoandClaude f5d9790252 feat(projects): Watch it work — a project's run as a live, readable thread (#963)
Asked for 2026-09-28: "I'm not sure if I can actually see the chat, just like
here in Claude, and watch how things get implemented." What existed was the
raw terminal (a TUI on a phone) and a one-line phase chip.

/projects/[id]/watch tells the latest run as a conversation:
- You: what the agent was asked (prompt_history.resolved_prompt by run id),
  clamped with "Show the full brief".
- Loki: every hop the run declared (run_events) in words, heartbeats
  collapsed into one "working" line stamped with the latest, blocked hops in
  the warning tone with the reason; older hops fold once there are more than
  six.
- The agent's screen: the last lines it printed, ANSI and box borders
  stripped, refreshed every 6s while it works.
- Agent: its handoff summary (done / next / commit), or what went wrong.
- One status card from the same hydrate + work-phase as Terminal's rail and
  Feedback's Watch, with the terminal offered only when a session exists.
- Setup steps while a server-run kickoff is still going.

The pure half is lib/project-watch (tested); /api/projects/[id]/watch serves
it; the screen capture moved to lib/peek-tab-client so Control's peek drawer
and Watch share one copy. "Watch it work" / "Watch it start" in the kickoff
card and the build strip now open this page instead of Terminal.

Also: the cloud-builder-offline ask reads "The cloud builder is offline — the
work waits and starts when it reconnects" instead of naming the box-runner
process.


Claude-Session: https://claude.ai/code/session_016aYbEpWEk7bkf1qt44Xtbh

Co-authored-by: Claude <noreply@anthropic.com>
2026-09-28 08:54:20 -07:00
..
2026-08-31 09:23:30 +00:00
2026-08-31 09:23:30 +00:00
2026-08-31 09:23:30 +00:00
2026-08-31 09:23:30 +00:00
2026-08-31 09:23:30 +00:00