oficina / equipo Public

Brief: thinking state, streaming, coalescing, markdown

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
claude 780d5db7cc8d12286205eb20c0bcbf2cbe8da1e1 parent 1b29d0d
1 file changed, +52 −0
  • docs/superpowers/plans/CODEX-BRIEF-chat-feel.md +52 −0
diff --git a/docs/superpowers/plans/CODEX-BRIEF-chat-feel.md b/docs/superpowers/plans/CODEX-BRIEF-chat-feel.md
new file mode 100644
index 00000000..73a0ab32
--- /dev/null
+++ b/docs/superpowers/plans/CODEX-BRIEF-chat-feel.md
@@ -0,0 +1,52 @@
+# Brief: make the coordinator chat feel alive
+
+Branch `chat-feel` from main 1b29d0d (DEPLOYED; owner mode; coordinator
+replies now arrive). Paul (2026-11-06, live screenshot): "Nothing. And no
+indication that there's any response happening. We should have a very
+attractive loading state when waiting for a response. Will the response
+stream?" Observed on production: the coordinator's reply rendered
+`**amadan.net/oficina/equipo**` literally; it says "If you tap **Set
+up**" but no project card shows; a backlog of queued turns is processed
+one per message so new messages wait silently; a system note "owner mode"
+is posted before every reply. Product rule: magic, zero setup.
+
+Deliver:
+1. Thinking state: the instant a message is sent (optimistic bubble
+ exists), show an attractive coordinator "thinking" bubble (icon +
+ name, subtle animated dots or shimmer, theme tokens, respects
+ prefers-reduced-motion) that persists through queued/claimed/running
+ and becomes the reply. If the turn is blocked, it becomes the plain
+ note instead. Phone and desktop.
+2. Streaming: the coordinator reply streams into that bubble as it is
+ generated: runner forwards partial text deltas from the provider
+ (Claude 2.1.312 stream-json partial messages; check the flag the
+ pinned binary supports and bind it into the launch policy — owner mode
+ means no recertification needed for the owner's runner, but update
+ manifests/tests consistently) through the existing coordinator event
+ endpoint (bounded size/rate), instance stores the in-progress text and
+ pushes it via Rastrillo live to the feed; final message replaces it.
+ Contract fixtures for the new event; tests.
+3. Coalescing: when several person messages are waiting for one
+ coordinator, the next turn answers all of them together (one reply);
+ older queued turns are superseded, not answered one by one.
+4. Markdown: render a safe subset in coordinator/specialist messages
+ (bold, italic, inline code, code blocks, lists, links with
+ rel=noopener, paragraphs); escape everything else; tests for XSS.
+5. Project card: the propose_project card must appear in the feed right
+ after the message that proposes it; find why it didn't (production
+ evidence via read-only `carlos db query --app equipo --account
+ oficina`), fix, and add an e2e-live assertion.
+6. Owner mode: show it once as a quiet label (e.g. on the coordinator
+ header or Connections), not a system note per turn; remove the
+ per-turn note.
+Prove with `make e2e-live` (thinking bubble visible within 300 ms of
+send; first streamed text before the turn completes; markdown rendered;
+card present; two quick messages → one reply). AUTHORISATION: live model
+use only via the harness on claude-a, <= 30 turns; do not touch
+production data or the docs-t1 runner service. New strings
+`// COPY REVIEW PENDING`. ONE full `make -k ci` (rerun at most twice).
+Commit subject < 80, body `Co-Authored-By: Astra <noreply@openai.com>`;
+commit only, the controller pushes. CONTROLLER-REPORT-chat-feel.md with
+screenshots (1280/390) in docs/mockups/built/2026-11-06/. Loopback only;
+stop servers; scratch removed; no copy-review server. Print a five-line
+summary.