Skip to content

fix(chat): show user messages before replies when busy state is stale - #9757

Merged
iamwhatever merged 1 commit into
kirodotdev:mainfrom
Skymore:fix/busy-send-message
Sep 10, 2026
Merged

iamwhatever merged 1 commit into
kirodotdev:mainfrom
Skymore:fix/busy-send-message

Conversation

@Skymore

@Skymore Skymore commented Sep 9, 2026 •

Copy link
Copy Markdown
Contributor

Problem / Motivation

A message sent while the dashboard still considers a conversation busy can be missing until the assistant finishes replying. If a Steer starts a new turn, a later HTTP timeout can also restore the already-delivered text and display a false retry warning.

Why it matters

A successful send looks lost, and the streaming answer appears without its question. Restoring a confirmed message also invites an accidental duplicate send.

What changed (motivation → approach → change)

The busy composer can skip its optimistic user bubble. Immediate dashboard sends previously suppressed the server's user-message event because they assumed that bubble existed. WebSocket-mode sends carrying sendId now publish the persisted user row before starting the reply, through the canonical serializer and the existing per-client slot-authorized WebSocket broadcaster. Raw prompts stay off the unfiltered global SSE queues; ordinary SSE and relay sends preserve their stream contract.

The event inserts the missing row or reconciles an existing one by exact sendId, including across a newer, unrelated Steer. Reconciliation preserves render identity and demotes a provisional Steer when the server starts an ordinary turn. Retaining sendId lets both composers recognize confirmed delivery after an HTTP timeout or connection reset. HTTP receipts confirm existing rows without inserting a skipped bubble late. Queued sends, actual steers and uncorrelated sends retain their existing event paths. The owning dashboard specification is updated.

flowchart LR
  subgraph Before
    direction TB
    B1[Busy snapshot skips bubble]:::ctx --> B2[Reply starts without user echo]:::removed --> B3[Completion refresh reveals message]:::removed
  end
  subgraph After
    direction TB
    A1[Busy snapshot skips bubble]:::ctx --> A2[User echo inserts or confirms bubble]:::added --> A3[Reply appears below the message]:::changed
  end
  Before ~~~ After
  classDef added fill:#DCFCE7,stroke:#16A34A
  classDef changed fill:#FEF3C7,stroke:#D97706
  classDef removed fill:#FEE2E2,stroke:#DC2626,stroke-dasharray:4 3
  classDef ctx fill:#E0F2FE,stroke:#0284C7
  linkStyle 0,1 stroke:#DC2626,stroke-dasharray:4 3
  linkStyle 2,3 stroke:#16A34A,stroke-width:2px
Loading

🟩 added · 🟨 changed · 🟥 removed · 🟦 unchanged

Tests

  • Backend tests verify that the persisted user row precedes reply execution and agrees with the receipt's identity and metadata. Real token middleware, WebSocket clients and an app-token SSE connection verify receiver authorization: dashboard and slot-authorized sockets receive one row; an unscoped socket and global SSE observer receive no raw prompt. Both leak cases fail before the scope fix and pass after it; ordinary/relay stream controls retain their behavior.
  • Store and real-component regressions cover missing optimistic rows, duplicate events, echo/receipt ordering, render identity, interleaved Steers, active/background slots and confirmed delivery before timeouts or resets. Identical text with a different sendId must not confirm a send.
  • A test-only shutdown repair addresses this PR's failed Windows shard 3: the expected outer timeout fired before provider cancellation had entered. The test now observes provider entry before expiring the deadline, then checks cancellation propagation and no inline shutdown. A mutation that swallows CancelledError fails with DID NOT RAISE TimeoutError. Windows shard 3 with the repair and the other three Windows shards passed.
Delivery evidence Composer behavior
Dispatched as a new turn The authorized user echo inserts/reconciles the row; the receipt only confirms it.
Dispatched as an actual Steer The existing steer_push path owns the confirmed row.
Queued The queue card owns the message; remove the provisional Steer bubble.
Explicit refusal Report the refusal and recover the draft.
Unreadable successful response Preserve the existing pending state.
Timeout/reset after a matching confirmed echo Keep the delivered row and cleared composer; suppress false retry/error notices.
Timeout/reset without confirmed delivery Preserve the caller's recovery policy; matching text or an optimistic row alone is insufficient.

Local full-suite validation at 0e8459279, base f1cc1b736:

Check Result
Frontend 1,993 files; 31,510 passed, 1 expected failure, 2 skipped
Electron 1,837 passed, 1 skipped
Backend 94,368 passed, 42 failed, 247 skipped, 9 expected failures; exceptions below
Static/build gates Formatting, lint, types, documentation, i18n rendering, production build, bundle size and chunk-cycle checks passed
Vendored-file integrity Passed after removing generated, untracked bytecode from the vendor directory

Local baseline exception: forty backend failures match host/tooling failures previously reproduced on clean base 7b2a16041 and the feature. Two additional full-run failures (test_reset_with_pid_survives_shutdown_force_kills and test_a_failed_temp_lockdown_leaves_no_temp_and_no_leak) pass on clean f1cc1b736; all six tests pass when the four new scope cases run immediately before them in one worker. No fixture leak was reproduced. The local full-backend gate remains non-green on this host.

Full GitHub CI on 7be21cc8 passed: all four Linux and four Windows backend shards, all four frontend shards, backend/frontend lint and types, Electron, offline E2E, and the coverage combine/gate. Build workflows also passed. Linux shard 4, which had previously hit the job limit after a worker crash, passed in this run. No timeout, worker-restart or coverage setting was relaxed.

Current revision c4a4f3464 is one commit on base 10bdc51fe. The cleanup preserves the executable application change verified by the full CI run above: Python AST and comment-free TypeScript output for the modified application files are unchanged. Local verification passes 32 backend regressions and 346 frontend tests, plus types, formatting, documentation and duplication checks. After syncing the two upstream registry/Slack changes, 381 related backend tests pass with 5 skips. The ordinary-send parameter removed from one new backend test remains covered by the real authorization/stream tests; the idle-Steer metadata/ordering case is retained. A focused independent review reports no findings. Current-head CI results are shown in the PR checks.

Manual verification

Recorded and inspected the built dashboard with a local Playwright generator. It drives mouse/keyboard actions with synthetic text and controlled transport, holding HTTP receipts while the reply streams. The recording generator and its shared-helper extension are excluded from this PR; the media remain committed as required by the PR template. The recordings still represent this revision because the cleanup does not change the emitted application behavior.

The before/after pair sends through the busy composer's Queue option while the backend contract accepts an immediate turn. Assertions find zero user bubbles during streaming under the old event contract, and exactly one above the reply under the fixed contract. Both runs finish with one bubble.

The Steer recording starts with a visible pending Steering… row, then delivers an ordinary server echo for that same send. The pending badge disappears, the message remains above the reply, and both the user-row DOM node and its inner message-bubble node are preserved. Exactly one user row remains after completion. Backend tests separately verify real handler ordering and authorization. No live model or user session is involved.

Screenshots / video

Before: message missing during reply After: message visible above reply
Before: controlled transport replay After: controlled transport replay

Before recording · After recording · Steer becoming an ordinary message

Steer transition stills (the recording above shows continuity)
Pending Steer Ordinary message after the correlated echo
Pending Steer Ordinary message

Related Issues

no linked issue: reported during local dashboard use. Includes the merged send/Steer refactor in #8689.

Pattern harvest

Rule candidate: review-prompt

Pattern: A missing optimistic row needs an ordered server echo with per-recipient authorization. A shared serializer is not an authorization boundary. Correlation must survive asynchronous delivery decisions; receipts must not independently insert duplicates.

Checklist

  • At most two commits (one is the norm), with a Conventional Commits title (feat|fix|docs|refactor|perf|test|chore|ci|build|revert: ...)
  • Existing tests pass and new tests added for new functionality — local baseline exception: see Tests for full-run failures and baseline/retry comparisons.
  • Self-review completed; code follows project style guidelines
  • Documentation updated (if applicable)
  • No secrets, credentials, or internal references in the diff

Contribution License Agreement

@Skymore
Skymore requested review from a team and cixuuz September 9, 2026 19:30
@Skymore

Skymore commented Sep 9, 2026

Copy link
Copy Markdown
Contributor Author

Intent: Make an immediately accepted dashboard send visible before assistant output, even when a stale busy snapshot prevented an optimistic user bubble. Reconcile the server echo with any existing local row by sendId so echo/receipt reordering does not create duplicates.
Not a goal: Redesign edit/resend history truncation or Stop/requeue delivery for pending Steer messages.

@github-actions github-actions Bot added fork Pull request from a fork (external contributor) readiness: checking Automated validation is still running labels Sep 9, 2026
@github-actions

github-actions Bot commented Sep 9, 2026 •

Copy link
Copy Markdown
Contributor

Design Review (Fable 5, fork) — 🟡 CONCERNS

Design-level review of c4a4f346483b99fbc55c6ab6f87ae3640698e357 via the fork AI-review pipeline — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS/CONCERNS are advisory.

Design-Verdict: CONCERNS

Sound root-cause fix — the server now owns busy-send insertion — but an unrelated shutdown-test rewrite is bundled into this chat PR.

Watch

  • The test_session_drain.py rewrite is a different logical change: it re-mechanizes a pinned high-severity guard ("Codex HIGH2" — close_all must not swallow an outer cancel) and drops its wall-clock assertion (elapsed < 1.0). The replacement still pins cancel propagation and no-inline-shutdown (the mutation claim checks out against wait_for semantics), but a flake repair to a shutdown-deadline guard deserves its own reviewable revert unit, not a ride inside a chat-echo commit that a UI-focused reviewer won't scrutinize.
    Clears when: the drain-test repair lands as its own PR, or a human explicitly accepts bundling it here.

Suggestions

  • chat_handlers.api_chat now hand-rolls a second user-echo emission path beside append(broadcast_user=True); the scope asymmetry is real (the broadcast_user path feeds the unfiltered global SSE queues), but a broadcast_ws_only flag on append would keep echo emission in the state layer instead of the handler.

[DESIGN-REVIEWED] c4a4f34

@github-actions

github-actions Bot commented Sep 9, 2026 •

Copy link
Copy Markdown
Contributor

UX Review (Fable 5, fork) — 🟡 CONCERNS

UX-level review of c4a4f346483b99fbc55c6ab6f87ae3640698e357 via the fork AI-review pipeline — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS/CONCERNS are advisory.

All evidence reviewed. The diff adds no new controls or strings — it changes when existing elements appear: the user bubble now shows above a streaming reply on a busy send, a false "Delivery not confirmed" notice is suppressed once a server echo confirms delivery, and a provisional Steer row demotes in place to an ordinary message. The demotion mechanism is verified continuous in the diff (reconcileOptimisticEcho mutates the same row, preserves the render key via clientTs, and UserMessage hands the indicator off in one slot with no remount — satisfying the one-element rule in website/AGENTS.md), and the PR commits steer-demotion.webm as lens-13 evidence. The notice strings assert state and offer an action, and the new selectSendConfirmed guard consumes the state the code holds rather than hedging. No hard swap, no lying label, no new copy. The only thing keeping this from PASS is structural to this lane: the committed screenshots/recordings are binary markers here and no blind read ran.

UX-Verdict: CONCERNS

Sound behavioral fix — bubble appears above its reply, false retry warnings stop — but this fork lane cannot open the committed evidence or run a blind read.

Evidence gaps

  • Busy-send user bubble appearing above the streaming reply: before/after-streaming.png and before/after.webm are committed but are binary markers in this fork lane; push the branch to this repository for the blind-read pass, or a human opens them.
  • "Steering…" pending row demoting in place to an ordinary message: mechanism verified continuous in the diff (same-row reconcile, preserved clientTs render key, one-slot indicator hand-off in UserMessage), but the committed steer-demotion.webm needs a human viewing to confirm the pixels match.
  • Suppressed false "Delivery not confirmed" notice after a confirmed echo (timeout/reset path): shown in no still; the after recording or a human replay would close it.

[UX-REVIEWED] c4a4f34

@github-actions

github-actions Bot commented Sep 9, 2026 •

Copy link
Copy Markdown
Contributor

First Principles Review (Fable 5, fork) — ✅ PASS

Premise-level review of c4a4f346483b99fbc55c6ab6f87ae3640698e357 via the fork AI-review pipeline — why this exists and whether the shipped surface is the smallest honest version. Updated in place on each push. A BLOCK verdict blocks PR readiness; PASS/CONCERNS are advisory.

All verification done. The base already keeps sendId on other paths (the receipt reducer's "deliberately KEEPS sendId" comment, hydrated rows carry it from disk), and the coverage/anchor scans tombstone duplicate sendIds fail-safe — so the strip reversal has no in-repo consumer relying on the old behavior. Every inventory item traced to a named harm, a documented convention, or a reproduction in the diff.

First-Principles-Verdict: PASS

One human check: #3898 item 2's sendId strip is reversed on this PR's new need alone — confirm that issue recorded no second reason for stripping.

What this change ships

Inventory (10 items) — 9 justified, 1 declared rider

Intent: a message sent while the dashboard wrongly thinks the conversation is busy must appear above the streaming reply, and a delivered send must not be restored or flagged after an HTTP timeout/reset — a FIX.

  1. A busy-looking send now appears above the reply while it streams (server echoes the user row first) — justified
  2. That echo reaches only slot-authorized WebSocket clients; global SSE observers never see the raw prompt — justified
  3. Receipt-driven bubble appends for busy steer sends deleted in both composers; the echo owns insertion — justified
  4. A confirmed send survives HTTP timeout/reset without a false retry notice or restored draft — justified
  5. A provisional Steer bubble demotes in place when the server starts an ordinary turn — justified
  6. sendId persists on rows after reconcile (reverses the fix(chat): pipelined sends cause duplicate bubbles and orphaned optimistic rows #3898 one-shot strip) — justified
  7. Reconciled rows keep render identity via the existing clientTs key contract — justified
  8. Flaky Windows shutdown test rewritten to event-based observation — rides along (declared, linked failing run)
  9. Six before/after recordings under temp-screenshots/busy-send-echo/ — justified (PR-template requirement)
  10. New spec section in learn-cron-dashboard.md — justified (AGENTS.md same-commit rule)

Counts run: broadcast_user (append's echo path feeds unfiltered _sse_queues via _on_message — the new broadcast_ws call is not a second spelling); clientTs readers (30+ real render-key consumers); meta.sendId base readers (all duplicate-safe); temp-screenshots (documented in .github/PULL_REQUEST_TEMPLATE.md:47); ws=1 (the dashboard transport pins it, so no unfixed SSE-composer sibling).

[FIRST-PRINCIPLES-REVIEWED] c4a4f34

@github-actions

github-actions Bot commented Sep 9, 2026 •

Copy link
Copy Markdown
Contributor

GPT 5.6 Review (fork) — ✅ no blocking findings

Reviewed c4a4f346483b99fbc55c6ab6f87ae3640698e357 via the fork AI-review pipeline; updated in place on each push.

Review details

No findings.
[GPT-REVIEWED] c4a4f34

@github-actions

github-actions Bot commented Sep 9, 2026 •

Copy link
Copy Markdown
Contributor

Opus 4.8 Review (fork) — ✅ no blocking findings

Reviewed c4a4f346483b99fbc55c6ab6f87ae3640698e357 via the fork AI-review pipeline; updated in place on each push.

Review details

The discovery pass produced no candidates, so Step 1 has nothing to falsify. My independent examination confirms the change is sound: the backend echo (chat_handlers.py:807-815 region) fires only after every queue/steer/crew/remote branch has already returned, so it cannot double-emit; it routes through broadcast_ws → the per-socket deny-by-default event-scope gate (verified in chat_message_frame docs and the dedicated scope test), so raw user content never reaches the unfiltered SSE queues; and the frontend reconcile matches on unique sendId, keeping sendId and demoting only the exact matched row. No groundable defect at the required bar.

No findings.

[OPUS-REVIEWED] c4a4f34

@github-actions github-actions Bot added readiness: passed Eligible automated validation passed for the current revision readiness: action required A blocking check or review needs attention readiness: checking Automated validation is still running merge conflict Branch has merge conflicts with its base — author must resolve before merge and removed readiness: checking Automated validation is still running readiness: passed Eligible automated validation passed for the current revision readiness: action required A blocking check or review needs attention labels Sep 9, 2026
@Skymore
Skymore force-pushed the fix/busy-send-message branch from 558b1a1 to 95fe998 Compare September 10, 2026 07:12
@Skymore

Skymore commented Sep 10, 2026

Copy link
Copy Markdown
Contributor Author

self-added: yes
mechanism: retain the existing sendId on confirmed rows and consult those rows before ambiguous HTTP failure recovery.

fixed — Demoted Steer loses late-delivery correlation.

The ordinary echo now clears the provisional Steer/optimistic flags while keeping the sendId. ChatPage and ChatPane check the originating slot for a confirmed row with that exact ID before recovering from either a response timeout or a connection reset. The same predicate covers ordinary sends, since their HTTP connection can also fail after the user echo proves delivery. Explicit refusals still report failure, and an optimistic row or identical text with another ID cannot suppress recovery.

Real-component regressions cover ordinary and actual Steer echoes before both failure statuses, plus a different send with identical text. The corrected regression fixtures fail against the pre-fix production code and pass with the fix. No extra delivery registry, timer, or retry mechanism was added.

@Skymore

Skymore commented Sep 10, 2026

Copy link
Copy Markdown
Contributor Author

self-added: yes
mechanism: none; retain the existing verification assets required by the PR template.

rebutted — Committed verification media.

The repository's base-ref .github/PULL_REQUEST_TEMPLATE.md, under “Screenshots / video”, explicitly requires committing UI proof under temp-screenshots/<feature>/ and embedding commit-pinned links. These four files follow that instruction and remain outside the packaged application. Removing them or ignoring this directory would conflict with the repository's current contribution contract. The recordings contain synthetic text and controlled transport only; the reproducible capture script is included.

@Skymore

Skymore commented Sep 10, 2026

Copy link
Copy Markdown
Contributor Author

self-added: yes
mechanism: none; retain the existing controlled browser reproduction.

kept — Capture script and recordings.

The failure is a transient missing user bubble during streaming, so before/after motion evidence is part of verifying the reported behavior. The PR template requires committed visual proof for a UI change and prefers a recording for a multi-step flow. The script drives the real built SPA with synthetic inputs, holds the receipt, and asserts message count and order before taking each frame. It is verification tooling outside the packaged application, as the review noted.

@Skymore

Skymore commented Sep 10, 2026

Copy link
Copy Markdown
Contributor Author

self-added: yes
mechanism: none; retain the optional harness bundle path.

kept — Harness dist option.

The capture script needs to serve a selected prebuilt bundle when comparing frontend revisions. The optional argument only forwards to serveDist's existing parameter; omitting it preserves every existing caller's default. This keeps the shared bootstrap and transcript harness usable for before/after recordings without copying that harness or changing the running gateway.

@Skymore

Skymore commented Sep 10, 2026

Copy link
Copy Markdown
Contributor Author

self-added: yes
mechanism: none; retain commit-pinned visual proof without changing the fork review permission boundary.

acknowledged — The fork reviewer cannot fetch the visual proof.

The PR description links the two PNGs and two recordings at a fixed commit on the fork, following the repository template. I inspected the local before/after frames and reran the capture script against the updated built SPA: the old transport contract has zero user bubbles during streaming, the fixed contract has one above the reply, and both finish with one. This is controlled transport replay, not a live model recording.

This author-side verification does not give the fork review lane access to the images or claim that it has reviewed their pixels. A maintainer can inspect the linked recordings directly; the lane's permission boundary is unchanged.

@Skymore

Skymore commented Sep 10, 2026

Copy link
Copy Markdown
Contributor Author

Additional chat_message consumer audit from the First Principles review:

  • Mochi filters events to its own slot. Its sendMessage() posts no sendId, so its existing echoOwnMessage() is not followed by the new correlated echo. A dashboard-originated send to that slot has no corresponding Mochi-local optimistic row.
  • Crew Companion's chat_message arm records only role === 'error'; user frames do not create or duplicate a transcript row there.
  • The SSE path in dashboard/handlers/updates.py forwards the shared chat_message_frame serialization. This change does not add an insertion path there or alter its metadata authorization check.

Checked website/src/apps/mochi/panel/panelBridge.ts, website/src/apps/crew-companion/sessionWatch.ts, and src/kiro_crew/dashboard/handlers/updates.py on the updated branch. The changed backend broadcast remains gated on the send's correlation ID.

@github-actions github-actions Bot removed the merge conflict Branch has merge conflicts with its base — author must resolve before merge label Sep 10, 2026
@Skymore
Skymore force-pushed the fix/busy-send-message branch from 95fe998 to b6dc668 Compare September 10, 2026 08:48
@Skymore

Skymore commented Sep 10, 2026

Copy link
Copy Markdown
Contributor Author

self-added: yes
mechanism: route the added user echo through the existing authorized WebSocket broadcaster.

fixed — Correlated prompt echo authorization.

The new echo uses the existing per-client slot-authorized WebSocket broadcaster and canonical chat_message_frame serializer. The append keeps broadcast_user=False, so the raw user row never enters the unfiltered global SSE queues. The echo is limited to WebSocket-mode sends carrying sendId; ordinary SSE and relay requests retain their existing stream contract.

Real token middleware, real WS clients and an app-token /api/stream connection reproduce the leak before the fix. After the fix, owner and slot-authorized app sockets receive exactly one user row before the reply, an unscoped app socket receives none, and the SSE app receives no raw prompt. Ordinary and relay stream controls pass. No new SSE authorization registry or permission model was added.

@github-actions github-actions Bot added readiness: passed Eligible automated validation passed for the current revision readiness: action required A blocking check or review needs attention readiness: checking Automated validation is still running and removed readiness: checking Automated validation is still running readiness: passed Eligible automated validation passed for the current revision readiness: action required A blocking check or review needs attention labels Sep 10, 2026
A stale busy snapshot can suppress the optimistic user bubble even when
the server starts a new turn. Echo correlated dashboard sends before the
reply starts so the user message appears in event order. Use the existing
per-client slot-authorized WebSocket path for raw user content.

Reconcile echoes by sendId while preserving the row rendering identity.
Keep the correlation so an HTTP timeout or connection reset cannot restore
an already delivered send. HTTP receipts confirm existing rows without
inserting duplicates after streaming or navigation.

Cover delivery ordering, app scope isolation, interleaved steers and
ambiguous HTTP failures, with controlled browser recordings. Synchronize
the shutdown drain test on provider entry so it verifies cancellation
independent of scheduling.
@Skymore
Skymore force-pushed the fix/busy-send-message branch from 7be21cc to c4a4f34 Compare September 10, 2026 11:43
@github-actions github-actions Bot added readiness: action required A blocking check or review needs attention readiness: checking Automated validation is still running and removed readiness: passed Eligible automated validation passed for the current revision readiness: action required A blocking check or review needs attention readiness: checking Automated validation is still running labels Sep 10, 2026
@Skymore

Skymore commented Sep 10, 2026

Copy link
Copy Markdown
Contributor Author

needs-a-decision — Bundled Windows test repair.

Maintainer: can you accept this bounded test-only repair in this PR? It fixes this PR's recorded Windows failure (https://github.com/kirodotdev/KiroCrew/actions/runs/34424147280/job/102706436136). The old timer could expire before provider cancellation started. The replacement observes that entry, applies an outer cancellation, asserts propagation and no inline shutdown, and always joins the task. A cancellation-swallowing mutation fails; the complete Windows matrix on7be21cc8 passed. Restoring the shorter timing assumption would reintroduce that demonstrated CI race. No production shutdown code is changed.

@Skymore

Skymore commented Sep 10, 2026

Copy link
Copy Markdown
Contributor Author

rebutted — Additional append broadcast mode.

The handler composes the existing canonical chat_message_frame serializer with the existing slot-authorized broadcast_ws API. It does not implement another serializer or authorization rule. A new broadcast_ws_only option on append would add an emission mode and flag combinations for this one caller. The current ws=1/sendId guard expresses the caller-specific contract at the request boundary, with ordinary/relay and unscoped-SSE negative controls. Keeping this existing API call is the smaller complete fix.

@Skymore

Skymore commented Sep 10, 2026

Copy link
Copy Markdown
Contributor Author

needs-a-decision — Busy-send visual evidence access.

The before/after media remain committed under temp-screenshots/busy-send-echo and the PR links them at7be21cc8, where all links were verified HTTP200. The local real-SPA recordings show missing versus present user rows above the streaming reply, and the corresponding regression tests remain. The author-side replay is not the lane's independent blind read. Maintainer: can you view the linked busy-send recordings? The restricted fork lane has no image access.

@Skymore

Skymore commented Sep 10, 2026

Copy link
Copy Markdown
Contributor Author

needs-a-decision — Steer-demotion visual evidence access.

The committed steer-demotion.webm shows the pending badge clearing while the row remains above the reply. Its recording run verified both the outer row and inner message-bubble DOM identities. The emitted frontend behavior is unchanged by this cleanup; the generator is kept local at the contributor's request, with the required media retained. Maintainer: can you view that recording to confirm the pixels? No automated blind-read pass is claimed.

@Skymore

Skymore commented Sep 10, 2026

Copy link
Copy Markdown
Contributor Author

rebutted — Additional false-notice recording.

This path removes an incorrect notice and draft restoration without introducing a new control, string, layout or animation. The real ChatPage and ChatPane regressions deliver an ordinary/Steer echo, reject the POST with a deadline abort or connection reset, await the actual response handler, and assert a single confirmed row, an empty composer and no notice/error row. The different-send control still restores and warns. Those positive and negative controls provide direct evidence for this absence of a false warning. A separate recording is not needed for the unchanged notice rendering; the visible insertion and Steer transition are recorded.

@Skymore

Skymore commented Sep 10, 2026

Copy link
Copy Markdown
Contributor Author

Checked the original issue requested by First Principles: #3898, item 2 explicitly objected to keeping the wire correlation ID in durable message metadata. It proposed stripping it server-side or moving it to a request-only field. I found no additional reason or retention constraint in that issue's comments.

#3963 implemented the strip in the frontend echo reconciler. The current base already keeps sendId in the HTTP-confirmed frontend row, passes the supplied metadata into slot.append, and restores metadata from history. This PR changes neither the persisted metadata shape nor the server-side retention policy. It fixes the inconsistent frontend lifetime: an early echo must not erase the ID before the pending HTTP request can recognize that this send was delivered.

The original durable-metadata concern is real historical context, so it is not being dismissed as absent. Moving correlation outside persisted metadata would be a separate protocol/storage change; restoring the frontend-only deletion would break the delivery checks this fix requires.

@github-actions github-actions Bot added readiness: passed Eligible automated validation passed for the current revision and removed readiness: checking Automated validation is still running labels Sep 10, 2026
@iamwhatever
iamwhatever merged commit b165ba1 into kirodotdev:main Sep 10, 2026
77 checks passed
@github-actions github-actions Bot removed the readiness: passed Eligible automated validation passed for the current revision label Sep 10, 2026
amadsalmon pushed a commit to amadsalmon/KiroCrew that referenced this pull request Sep 22, 2026
…kirodotdev#9757)

A stale busy snapshot can suppress the optimistic user bubble even when
the server starts a new turn. Echo correlated dashboard sends before the
reply starts so the user message appears in event order. Use the existing
per-client slot-authorized WebSocket path for raw user content.

Reconcile echoes by sendId while preserving the row rendering identity.
Keep the correlation so an HTTP timeout or connection reset cannot restore
an already delivered send. HTTP receipts confirm existing rows without
inserting duplicates after streaming or navigation.

Cover delivery ordering, app scope isolation, interleaved steers and
ambiguous HTTP failures, with controlled browser recordings. Synchronize
the shutdown drain test on provider entry so it verifies cancellation
independent of scheduling.

Co-authored-by: Rui Tao <ruit@amazon.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fork Pull request from a fork (external contributor)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants