oficina / equipo Public
Chat feel
Branch chat-feel, based on deployed 1b29d0d. The coordinator now appears immediately after send, streams its reply, and answers queued messages together. This branch is for the controller to review and push.
Changes
The optimistic send adds the coordinator icon, name and animated dots in the same browser task as the person's bubble. The server keeps that state through queueing and execution. A blocked turn replaces it with its existing plain note. Motion stops under prefers-reduced-motion.
The pinned Claude 2.1.312 executable lists --include-partial-messages in its help. Coordinator policies now include that exact argument. The adapter forwards native text deltas and the partial body string of post_message; other tool arguments stay out of the feed. The runner journals bounded text snapshots and sends them through the existing authenticated coordinator event endpoint at most five times per second. The instance checks the current roster, claim, session, action, turn, sequence, payload size and rate. There are at most 1,024 snapshots per turn, each within the existing 16 KiB event limit. Rastrillo live publishes the saved draft. The committed message replaces it; draft text cannot prove delivery.
Polling supersedes older unclaimed turns and audits that change in the same transaction. The latest claim contains all represented message IDs in Pending, including repeated coalescing before a claim. The context limit cannot silently discard one of those messages. A newer message invalidates an older poll offer, including a web send that has not reached the queue yet. Running and uncertain attempts keep their existing fences. Reset can still requeue uncompleted messages in the next generation, including a stale claim that was fenced during rebinding. Completed combined replies remain answered after reset.
Coordinator and specialist messages render paragraphs, emphasis, inline code, code blocks, lists and safe links with rel="noopener". Raw HTML is escaped. Person messages retain literal text. The Markdown dependency is pinned to Goldmark v1.8.6.
Pending project cards move immediately after a coordinator reply that names their repository. Repeated proposals retain the same decision and action URL. Owner mode is a quiet label in the live chat header; claiming a turn no longer appends a system message. Historical owner-mode notes are hidden in the rendered feed without deleting stored messages.
Migration 0035_chat_stream adds draft text, sequence, timestamp, committed-message ID and coalescing-parent columns. The schema snapshot and upgrade fixture agree. Shared chat state and stream extraction have their own small packages. Existing size ceilings are unchanged.
The old coordinator certificate no longer describes the launch arguments. Its active manifest entries were retired, and the new coordinator inventory is explicitly uncertified. Owner mode uses the new policy without recertification, as authorized. Historical evidence files are untouched.
Production evidence
Read only:
carlos db query --app equipo --account oficina --sql "SELECT m.sequence,m.author_kind,substr(m.body,1,650) AS body,c.kind,c.resource_id,p.state FROM conversation_messages m LEFT JOIN conversation_cards c ON c.id=m.id LEFT JOIN project_proposals p ON p.id=c.resource_id ORDER BY m.sequence DESC LIMIT 18"The replica was at transaction 6901, written 2026-11-06 16:42:53 UTC. Sequence 20 contained the pending equipo setup card. Sequence 28 contained the later reply referring to Set up, with owner-mode messages at sequences 21–27. The card existed but remained at the earlier proposal's position. The fix brings the existing card beside the current proposing reply. No production data was changed.
Verification
Initial red command:
CGO_ENABLED=0 go test ./internal/plan3test ./internal/runner/provider/claude -run 'TestChatFeel|TestCoordinatorPartialMessages' -count=1It failed because polling returned the oldest turn, the text event was rejected, and the partial frame remained stream_event. Markdown and partial-tool-body tests also failed before their implementations existed. The chat tests now live in internal/chatfeeltest, using the shared Plan 3 fixtures.
The following guards were temporarily broken, tested, then restored. Every mutation below produced a behavioral failure. The first identity mutations were masked by the rate check; the test now sets timestamps independently, and each identity mutation fails on its own.
| Command, with CGO_ENABLED=0 and -count=1 | Broken behavior observed | | --- | --- | | go test ./internal/runner/provider/claude -run '^TestCoordinatorPartialMessages$' | Partial decoding and the policy flag, separately | | go test ./internal/chatfeeltest -run '^TestChatFeelCoalescesQueuedMessages$' | Older queued work was not superseded | | go test ./internal/chatfeeltest -run '^TestChatFeelStreamBoundaries$' | Draft persistence, session, action, turn, sequence, rate and event cap, separately | | go test ./internal/chatfeeltest -run '^TestChatFeelPendingAndProjectCard$' | Thinking state and project-card placement, separately | | go test ./internal/chatfeeltest -run '^TestChatFeelClaimRaceAndAudit$' | Stale poll offer and coalescing audit, separately | | go test ./internal/chatfeeltest -run '^TestChatFeelOwnerQuiet$' | Per-turn owner note reintroduced; a separate red test caught historical notes remaining in the feed | | go test ./internal/chatmarkdown -run '^TestSafeSubset$' | HTML escaping and safe link schemes, separately | | go test ./internal/chatstream -run '^TestBoundedForwarding$' | Forwarding rate limit removed | | go test ./internal/runnerproto -run '^TestPendingContextCannotBeTrimmed$' | Pending message silently trimmed |
Restored focused tests pass, including repeated coalescing, revoked membership, snapshot replay, Unicode split across chunks, Markdown XSS cases, recorded instance/runner contracts and migration checks. The existing browser chat test passed.
Live run 1 reached the timing, streaming, coalescing and card assertions, then failed because the owner label was outside a live region. That header is now a live region. Run 2 stopped at provider preflight before any model turn. Run 3 passed in 99.17 seconds: thinking at 5.5, 3.0 and 3.0 ms; streamed text while the turn was running; two quick messages produced one reply; Markdown rendered; the setup card followed the proposing reply; owner mode appeared once. Its isolated implementation smoke test also passed.
The first full make -k ci run completed. Build, vet, formatting, staticcheck, govulncheck, gitleaks, size budgets, adapter checks, namespace checks, migration checks and performance passed. Cold boot had a median of 111 ms against 500 ms; every screen passed its 150 ms budget. The reference inventory needed exact entries for the new browser DOM and Markdown-tree references. Tests needed the new two-certificate manifest counts, timing hooks for the three new packages, and the combined-message expectation after an explicit retry. Those checks now pass individually. TestReviewExpiredAccountSignsIn/claude also hit provider_account_busy in the full run and passed unchanged on the targeted rerun.
The full run reported timing warnings for the main runner (354.685 s / 330 s), discovery tests (10.063 s / 10 s), provider (22.396 s / 15 s), Claude (47.626 s / 45 s) and Codex (39.321 s / 35 s). Timing warnings do not fail a local run but can fail hosted CI. No ceiling was raised.
Run 4 answered only the first request after a connection changed. A deterministic test reproduced the cause: the old poll offer was fenced during rebinding, and the next poll incorrectly treated that old-generation row as handled. The generation query now distinguishes uncompleted old work from completed combined replies. Both the rebind case and the completed-group reset case failed before the fix and with their respective guards temporarily removed, then passed after restoration. Run 5 passed in 95.84 seconds.
Final make e2e-live, run 6, passed in 112.71 seconds on the final implementation. Thinking appeared at 6.3, 2.9 and 3.5 ms. The browser saw streamed text while the turn was running. The recorded first claim contained both pending message IDs; the later project claim used generation 2 without replaying the answered group. All Markdown, card, owner-label and implementation-smoke assertions passed. The screenshots below were replaced by this final run. At most 13 live model turns were used across all attempts, all through the local harness on claude-a, below the limit of 30.
The second full make -k ci completed with exit 0. Its test stage ran 41 packages with zero failures. All adapter, namespace, migration and performance checks passed. Cold boot had a median of 100 ms against 500 ms; every screen passed its 150 ms budget. The same timing warnings remain: runner 357.983 s / 330 s, discovery 10.868 s / 10 s, provider 22.821 s / 15 s, Claude 48.433 s / 45 s and Codex 40.185 s / 35 s. The controller should retain this hosted-CI timing caveat. There were two full gate runs in total.
Screenshots
All screenshots are from the real local browser and live-model harness.
| State | Desktop, 1280 px | Phone, 390 px | | --- | --- | --- | | Thinking | thinking-1280.png | thinking-390.png | | Streaming | streaming-1280.png | streaming-390.png | | Reply and project card | reply-card-1280.png | reply-card-390.png |
Copy and handoff
conversation.thinking is the only new runtime string: “Thinking”. It is individually marked // COPY REVIEW PENDING in internal/equipo/copy.go and included in the existing copy inventory. The README is unchanged. No copy-review server was started.
All local harness processes stopped, and the task's scratch files were removed. The existing docs-t1 service was left running unchanged. The work is committed on chat-feel for the controller to push. No merge, push, deployment or production write was performed.