Repository navigation
Conversation
Design Review (Fable 5) — ✅ PASSDesign-level review of Design-Verdict: PASS Verify the dashboard wire's [DESIGN-REVIEWED] 7cc67a6 |
UX Review (Fable 5) — 🟡 CONCERNSUX-level review of UX-Verdict: CONCERNS Refusal errors surface raw backend vocabulary — "slot agent mismatch", "declare chat access in its permissions" — the blind reader could extract nothing actionable from. Watch
Suggestions
[UX-REVIEWED] 6603be0 |
GPT 5.6 Review — 🔴 changes requested (blocking)GPT 5.6 found at least one blocking issue that must be resolved before merging This comment is updated in place on each push. BLOCKING -- website/src/app-sdk/appSendWire.ts:99 -- Login redirects discard the embed’s only message copy Adjudication (Opus 5) — is blocking on each finding proportionate?F1 — HIGH (a single unsent composer draft, not stored data; no server state corrupted). Conditions confirmed: Real fix cost: the scoped helper is deliberately a parsed-JSON seam ( [ADJUDICATION] 7cc67a6 total=0 uphold=0 downgrade=0 [ADJUDICATION-FENCED] 7cc67a6 fenced=1 flagged=1 🏷️ Fenced finding(s) machine-flagged as likely edge caseThe security fence keeps these findings blocking regardless of adjudication; the only clearance path is a human override. The annotate-only pass judged the condition combination each one requires extreme, and pre-drafted the override rationale below. A repository writer must independently verify a rationale before posting it — it is machine-authored, and a wrong override on a security-class finding ships exactly the class the fence exists to stop.
False positive or not applicable? A repository writer can comment: |
First Principles Review (Fable 5) — 🔴 BLOCKPremise-level review of First-Principles-Verdict: BLOCK 22 binary screenshots ride into gitignored Not justified as shipped
What this change shipsInventory (10 items) — 9 justifiedIntent: FIX — a refused or unconfirmed chat send on ChatEmbed, SideChat and the app surfaces no longer looks sent while the typed text is silently lost; every send path reads the shared transport receipt. Defect provenance is checkable: the new receipt tests fail on base, and the RFC (
BlockersCommitted screenshot binaries reverse a recorded repo decision and the fix ships without them. Trigger (b), all four parts read off the diff: lens 1 calls this a FIX; the PNGs ride along; their zero option costs nobody anything (the capture scripts under [FIRST-PRINCIPLES-REVIEWED] 7cc67a6 |
Opus 4.8 Review — ✅ no blocking findingsReviewed Review detailsNo blocking issues; one advisory finding. FINDING — website/src/pages/chat/SideChat.tsx:798 — the over-limit hint is gated behind [OPUS-REVIEWED] 6603be0 Verdict parsed from the review's SHA-scoped output markers for commit False positive or not applicable? A repository writer can comment: |
45b35ec to
d40a771
Compare
d40a771 to
4aead39
Compare
|
GPT 5.6 — disposition for
|
|
First Principles — disposition for
|
4aead39 to
33a10cb
Compare
|
UX — disposition for
|
|
GPT 5.6 — disposition for
|
|
First Principles — disposition for
|
|
/ai-review override gpt 33a10cb: the wire's reject→transport-error branch fires only when the scoped api threw before any request left (permission check) or fetch itself rejected — a received-but-dropped response resolves and is classified unknown/refused; this mirrors the dashboard wire contract merged in #5909, and the onSend half of the finding was accepted and fixed in this SHA. |
Human judgment recorded@CrysisDeu marked the gpt AI finding as false positive, not applicable, or explicitly accepted for
This decision applies only to this commit. A new push requires a new judgment. |
33a10cb to
21ba33a
Compare
|
UX — disposition for
|
|
First Principles — disposition for
|
85d0b9f to
e0be365
Compare
|
self-added: no
Disposition: rebutted — the relabel is not an inference from the rule: the GPT lane BLOCKED head 8c1ea3b for rendering the over-limit hint in |
|
self-added: no
Disposition: rebutted (this theme's nineteenth round, each under a new span id; reported to the author as a standing item) — the reason is the server's own sentence and every surface on main frames it the same way (ChatPane / ChatPage / App.tsx interpolate the same body into the same |
|
self-added: no
Disposition: needs-a-decision (the standing UX-vs-first-principles conflict on this key, reported to the author each round) — an earlier UX round asked for exactly this clause ("name the app and point to the permission", span 6758577b7692); the last four UX rounds ask for its removal, and the first-principles lane asks to drop the display-name prop the key exists for (span 19d4f822b0f3). The head keeps the current copy until the author decides; nothing is flipped here. |
|
self-added: no
Disposition: accept-and-defer — the clause points at where the reply WILL appear if the turn landed (the |
|
self-added: no
Disposition: accept-and-defer — the affordance is on screen: the rail keeps the request's Send control beside the banner (the harness asserts it, |
|
self-added: no
Disposition: acknowledged — agreed, and that is the intended path: |
|
self-added: no
Disposition: rebutted (this theme's twentieth round, each under a new span id; reported to the author as a standing item) — the reason is the server's own sentence and every surface on main frames it the same way (ChatPane / ChatPage / App.tsx interpolate the same body into the same |
|
self-added: no
Disposition: accept-and-defer — the clause points at where the reply WILL appear if the turn landed (SideChat's |
|
self-added: no
Disposition: needs-a-decision (the standing UX-vs-first-principles conflict on this key, reported to the author each round) — an earlier UX round asked for exactly this clause ("name the app and point to the permission", span 6758577b7692); the last five UX rounds ask for its removal, and the first-principles lane asks to drop the display-name prop the key exists for (span 19d4f822b0f3). The head keeps the current copy until the author decides; nothing is flipped here. |
|
self-added: no
Disposition: needs-a-decision (eighth round on this item; reported to the author as a standing question: delete the later-restore replay or keep it) — the replay exists so that retiring the FIRST of two restored unconfirmed sends does not silently drop the second's restored text from the composer; the lane's point that the compound is rare is taken. Deleting it is a behaviour change on the recovery path the author asked to keep until decided; the head keeps it until the author decides. Clears the moment the author picks either way. |
|
self-added: no
Disposition: acknowledged — agreed on both counts (rides along; derived from the rule the GPT lane BLOCKED head 8c1ea3b on); it stays inventoried in the description as a ride-along, with the over-limit frame the UX lane asked for. |
|
self-added: no
Disposition: acknowledged — agreed; the shared cases (post-dispatch rejection → |
|
self-added: no
Disposition: rebutted (this theme's twenty-first round, each under a new span id; reported to the author as a standing item) — the reason is the server's own sentence and every surface on main frames it the same way (ChatPane / ChatPage / App.tsx interpolate the same body into the same |
|
self-added: no
Disposition: needs-a-decision (the standing UX-vs-first-principles conflict on this key, reported to the author each round with a recommendation: keep the display name, cut this clause) — an earlier UX round asked for exactly this clause (span 6758577b7692); the last six UX rounds ask for its removal, and the first-principles lane asks to drop the display-name prop the key exists for (span 0e7b8eaa2b5f). The head keeps the current copy until the author decides; nothing is flipped here. |
|
self-added: no
Disposition: accept-and-defer — agreed the denial is permanent for that mount (the grant is the host's manifest, not something the user changes from the row), so a send control that looks live is a fair catch. The app-sdk wire deliberately collapses every refusal into |
… paths through the transport wire ChatEmbed (the app-sdk's embeddable chat) posted to the bare /api/chat, read its SSE stream as JSON, and called the resulting SyntaxError success; a refused POST rejected the mutation nothing read. Either way the composer had already been cleared, so a failed send looked sent and the text was gone. sendTurn gains an injectable wire (the fetch seam: one POST that resolves on every HTTP status and rejects only when the request never left or the deadline fired); dashboardSendWire is the default, so ChatPane and ChatPage are unchanged. appSendWire re-expresses the scoped AppApi outcomes in that shape (2xx JSON -> ok; 2xx non-JSON -> unknown; non-2xx -> refused with the server's reason via the dashboard's typed ApiError; permission denial -> refused with a human sentence; rejected fetch -> transport-error; deadline -> response-late). ChatEmbed sends through sendTurn over that wire. refused / transport-error render an error row and hand the draft back as typed; response-late renders a "Delivery not confirmed" notice and hands the draft back, retired only when the poll shows THIS send's own user row past the send-start point -- by identity only (meta.sendId, or membership in a merged row's meta.sendIds), never by text. The server keeps the id on every path a send can take: a dispatched send persists it on its row, and a send queued behind a busy slot carries it through the queue entry onto the drained row (#8853), so there is no text-matching fallback to false-retire on. unknown does nothing; dispatched / queued let the poll render. mintSendId now lives once in chat-core/transport; ChatPane's and ChatPage's inline minters use it. useChatSession's seed send moves off the bare SSE endpoint onto the same wire (fire-and-forget; the slot is the deliverable). SideChat (#8655, merged into this branch): the one surface on a different endpoint family (/side/open + /side/turn) with the opposite receipt semantics -- the client helpers resolve JSON on 2xx and reject with an ApiError on non-2xx. A per-surface side wire re-expresses that in the fetch seam's shape, so sendTurn classifies the side panel's send by the same rule as every other surface (deadline, refused vs unreadable vs transport failure) while the acceptance body (run_id, queue_id, steer_id, pending, demoted, still_queued) passes through untouched and its handling is unchanged. Receipt policy: refused / transport-error roll back the optimistic bubble and hand the text back merged, with the server's reason when there is one; response-late hands the text back under an unconfirmed notice only when no bubble holds a copy (steer / queue), and leaves an idle send's bubble alone; unknown does nothing. The delivery-unconfirmed and reason-less transport-failure copy moves from appSdk.chatEmbed to shared pages.chatPage keys so ChatEmbed, ChatPane and SideChat state the same outcome in the same words. Every existing SideChat test passes unmodified. Folds stacked PR #9587 (design-critique, design-tweak and mochi sends through sendTurn), which merged into this branch. Error.name markers spelled as machine tokens (send-refused / send-unconfirmed) to satisfy the i18n all-caps-const check main added. Review round 1: an override (follow-up chip) send no longer clears the send tails, so a late-accepted send's notice can still be retired by proof and its restored text taken back (GPT F1, test-pinned). Mochi bridge tests mock the chat POST with an `ok: true` receipt body, which sendTurn requires. Review round 2 (GPT): mochi ChatPanel's failed-send restore merges the submitted text with any draft typed while the send was in flight (mergeRecoveredDraft) instead of keeping one and dropping the other (test-pinned). Review round 3 (GPT): sideHandBackText creates the slot's side record when absent, so a draft typed into a FRESH side panel survives an unmount; the closed-side frame guards key on the tombstone itself (not the record's absence) so the parked record cannot let a closed run's late frames in (both test-pinned). Review round 4 (GPT): the recovery-drain subscriber re-checks at call time that this instance is mounted and still shows the slot it subscribed for, so a receipt landing between an A->B re-prop and the effect cleanup cannot drain slot A's only copy into slot B. Rebased over #9593 (batch C) and #8947 (Quote / Ask, persisted per-slot Side Chat drafts): SideChat's recovery now hands text back through main's `restoreDraftTo` (the per-slot draft store) for the originating slot, so the unmount park and the `sideHandBackText` reducer this PR added are gone; `acceptOrThrow` keeps main's `sendResponseAuthRecovery` beside it. Fix-up: SelectToAsk's wrong-slot restore test rejects with an ApiError (a refusal, which hands text back) rather than a raw Error after dispatch (delivery unconfirmed, bubble kept). UX round: a composer submit's refused row uses the `_restored` framing (says the text is back; trailing sentence end stripped from the reason so a sentence-shaped reason does not close twice), a chip send keeps the plain framing; `delivery_unconfirmed_option` says "the conversation above" like its sibling (en + en-XA regenerated; other locales already did). UX round (head 0c12193): SideChat composer-submit refusals use the `_restored` framing like ChatEmbed (a pre-filled box with no word about it read as the user's own typing); the scoped-api permission denial names the app and where the grant lives (`AppApiPermissionError.appName`, `app_not_allowed_to_send_named`, 12 catalogs); captures re-taken. Scope (reviewer decision, option (a)): this PR is the transport-wire change only. The ChatInput composer swap (#8631) that was folded into this branch on 2026-09-05 is removed again -- ChatEmbed keeps its own single-line `<input>` composer, the shared recovery join is flattened to a space for it, and the chat-settings `useChatConfig` consolidation that rode along with the swap is dropped too. #8631 lands as its own PR. Screenshots re-captured on this head (temp-screenshots/chat-embed-send-receipt/, side-chat-send-receipt/). Review round on 754a423: `retireSendTail` replays later restores with the caller's merge (ChatEmbed's flattens the paragraph break for its single-line input; the replay used the raw rule and wrote the newline back -- GPT/Opus finding). The AbortError-as-indeterminate idiom is documented on `SendWire` and spelled once as `indeterminate()`; `AppApiPermissionError.appName` is required and the unreachable nameless key/branch are gone; ChatEmbed's dead `transport-error` clause is dropped; SideChat's over-limit hint stays on main's ErrorNotice path (the relabel was a rider). Review round on 06f4a08: `retireSendTail` takes the merge as a required parameter (one caller); `AppApiProvider` gains `appDisplayName` (AppHost passes the manifest display name) so the permission-denied row names the app as the user knows it, not by id; a non-JSON refusal body (proxy 502 page, bodyless 413) yields a reason carrying the status (`server_refused_with_status`, 13 catalogs) instead of falling through to "check your connection" (Opus); ChatEmbed's live region announces only the newest tail; SideChat's standing unconfirmed notice reads at body weight. Review round on 8c1ea3b: SideChat's over-limit hint is back in its own plain-text state (AUTOSDE `errors-use-error-notice` -- GPT blocked the ErrorNotice revert the previous UX/FP round asked for), rendered at body weight; the `SendWire` doc names the dashboard wire's exemption from the indeterminate rule and why; the non-JSON refusal copy ends with an action. Review round on 254bb42: an idle SideChat send whose receipt is `response-late` now rolls its optimistic bubble back and hands the text back under the standing unconfirmed notice, like every other late send -- the panel has no slot poll that could ever clear a `pending` the server never confirmed, so keeping the bubble left it busy for good (GPT). Tests mock `api.kirocrewConfig` now that SideChat's footer (#9609) loads it. Review round on 5d66d30: design-critique's bare-fetch wire rejects with `indeterminate()` on a raw fetch failure (a reset after the gateway took the POST must not become a retry-safe `transport-error` that runs the critique twice -- Opus); the poll settles it. Review round on 1516c1b: the RFC status table no longer says #8599 carries #8631 (split back out 2026-09-10; #8631 re-lands as its own PR); `server_refused_with_status` no longer restates the row's frame ("The server rejected it (HTTP <status>) — try again in a moment."). Review round on 78d5006: `SendTail.seenCount` (and `PendingEmbedRecovery.tail.seenCount`) had three writers and no reader -- retirement matches `meta.sendId` alone -- so the field, its `messageCountRef` feeder and the stale positional-gate comments are deleted (first-principles). `designCritiqueApi.send` no longer tests `transport-error`: `critiqueSendWire` converts every rejection to `indeterminate()`, so that status had no producer there. Two tests updated for main's P5-e virtualized transcript (`scrollToBottom` through the list ref, not a `scrollIntoView` sentinel) and for `mintSendId` living in `chat-core/transport` (module mock spreads `importOriginal`). Review round on dcacaf6: ChatPane's `doSteer` still minted its sendId inline; it now calls the shared `mintSendId()` like every other send path (first-principles), so the description's "one minter" claim holds. Review round on 5b9615a: the embed hand-back buffer is keyed by app AND slot (GPT, security-fenced) -- two apps can embed one slot, and a receipt parked by one carried that app's user's text into the other's composer while deleting the only copy. `useAppInfo().name` supplies the app; `embedSendRecovery.test.ts` pins the isolation. Review round on 1a0c25e: design-critique's follow-up poll accepted the slot's latest assistant row, which on a shared thread slot is the PREVIOUS answer -- so a send the wire reports as indeterminate (rejected before headers, never landed) was "answered" by it and persisted under the new question (GPT, data-corruption class). `pollForText` now takes the pre-send row count and accepts only a row appended after it; a send that never landed runs to the existing timeout. Pinned in the coverage test. Review round on 883d44a: mochi's ChatPanel rendered an UNCONFIRMED send in ErrorNotice (GPT; errors-use-error-notice) -- it now goes to a role=status line the next send clears, like SideChat's. `AppApiError` was a second spelling of `ApiError` (status + body text, same message); the scoped helper now throws `ApiError` and the wire reads `.body` (first-principles).
bolichen97
left a comment
There was a problem hiding this comment.
Rebased onto main fddab6f8 on the author's behalf (maintainer rebase, commits and authorship preserved; still one commit, head 7cc67a6d22).
Conflicts resolved in:
website/src/pages/chat/SideChat.tsx— main's over-limitlengthHint(warn strip,data-testid,question_too_long_with_paste, cleared inonDraftChange) replaces this branch's equivalentvalidationHint; the per-slotsendStatusstanding notice is layered on top of it.website/src/components/ChatPane.tsx— kept main's paste-token expansion in the steer path; only the inlinesendIdminter becamemintSendId().website/src/app-sdk/useChatSession.ts— import merge (main'sensureChatFolder+ the wire imports).docs/feature-map/README.md— kept main's new Crew log row, applied thesideTurnWire.tsnote to the Side chat row.- 13 locale catalogs (
en.manual.json,en-XA, bn, de, es, fr, hi, it, ja, ko, pt, ru, zh-CN) — main's value forpaste_token_url_or_raw_tokenand its newmodel_auto_jev_descriptionkept;accepted_body_unreadablestays in alphabetical position inapi.client,delivery_unconfirmed_optionappended at the end ofpages.chatPage.
Semantic fixes:
SendWirePayload.steerwidened toboolean | 'auto'to match main'sapi.sendChat/SendTurnOptions.steer(typecheck failure otherwise).- SideChat's receipt hand-back (
refused/response-late/unknown) now restores a collapsed paste as its token + block viarestoreSideChatDraft, the rule main'sonErroralready applied, instead of the expanded text (SideChat.pasteSidecar.test.tsxred otherwise).
Verified locally: npm run typecheck clean; vitest on every test file this PR touches plus the whole src/i18n suite: 69 files / 2126 tests pass; supplementary run of the SideChat / ChatPane / ChatPage steer / Mochi / AppHost / design-tweak / chatSlice suites covering the touched modules: 43 files / 510 tests pass (the two paste-sidecar cases fixed above included).
Shared files with sibling PRs being rebased in the same wave: website/src/api/client.ts, docs/feature-map/README.md, en.manual.json + the 13 locale catalogs (with #11092, #9367, #12787) — kept additions self-contained per file ordering.
bolichen97
left a comment
There was a problem hiding this comment.
Requesting changes: the scoped App SDK JSON helpers change their public error types
The receipt work is fine. The problem is createScopedApi, the client behind useAppApi(). Installed apps get the same client, because website/src/app-sdk/shared-modules.ts hands them the host's live @kirocrew/app-sdk. Its JSON helpers now wrap every failure that happens after a 2xx:
website/src/app-sdk/scopedApi.ts:162-175
try { text = await res.text() } catch (e) { throw new AcceptedBodyUnreadable(e) }
...
try { return JSON.parse(text) as T } catch (e) { throw new AcceptedBodyUnreadable(e) }That goes against the published contract, and the PR does not update it:
docs/app-kit/api-reference.md:85-86: "Network, abort and successful-response JSON parsing failures retain their original error types."- The
AppApiErrortype doc atscopedApi.ts:43is unchanged: "Network, abort and JSON parsing errors retain their original types."
AcceptedBodyUnreadable is not exported from app-sdk/index.ts or from public/vendor/kirocrew-app-sdk.mjs, so an app cannot catch it by type.
Failure scenario. docs/app-kit/migration-guide.md:97 still tells authors to write api.post('/api/chat', {message, slot}). That bare endpoint answers with SSE, so on main the helper throws SyntaxError. The natural way to handle that is the pattern ChatEmbed and design-critique use on main:
.catch(err => { if (err instanceof SyntaxError) return; throw err })With this PR, every successful send from an app written this way rejects with AcceptedBodyUnreadable ("The server accepted the request, but its reply could not be read."). A turn that was delivered is then reported as an error or becomes an unhandled rejection, and the user is likely to resend. A narrower case: code that filters on e.name === 'AbortError' now gets the wrapper when its signal aborts while a 2xx body is being read.
Who is affected. Installed App Kit apps that check for SyntaxError, TypeError or AbortError from a JSON helper after a 2xx. The PR converts every in-tree caller, and appSdkScopedApi.test.tsx:215-219 pins the new type. Apps that do no type check already got an error on main and still get one.
Smallest fix. Keep the tagging inside the send wire, which is its only scoped-API consumer. For example, appSendWire.ts can call api.raw(APP_SEND_PATH, …) and wrap its own body read and parse, which leaves jsonFetch identical to main. Another option is to rethrow the original error with a marker so it keeps its type. If the new type is meant to be public, export it from the barrel and the vendor stub, and update api-reference.md:85-86, scopedApi.ts:43 and docs/system-specs/modules/app-kit-platform.md:27-29 in this PR.
From a full open-PR audit against origin/main c66f95b (2026-09-25); findings were checked by independent reviewers reading the code. Reply here if this is wrong.
bolichen97
left a comment
There was a problem hiding this comment.
Open-PR triage (origin/main af1eb612da, head 7cc67a6d22): REBASE + CONTINUE-DEVELOPMENT, not superseded
- Main still has the bug. On main,
website/src/app-sdk/ChatEmbed.tsx:231-234still posts to bare/api/chatand treatsSyntaxErroras success.useChatSession.ts:109still seeds over bare/api/chat.sendTurn.tshas noSendWire, and none ofappSendWire.ts,sideTurnWire.ts,receiptCopy.ts,embedSendRecovery.tsorembedSendTails.tsexist on main. #8631, #8655 and #9587 show as "merged", but they were merged into this PR's branch (feat/chat-core-p2-embed), not into main. Only #9576 (issue-radar/auto-improvement seeds) reached main, and it does not touch these files. - Stale. The branch is 1,713 commits behind main.
git merge-treereports 24 conflicting files:api/client.ts,store/chatSlice.ts,components/ChatPane.tsx,pages/chat/ChatPageMessageContent.tsx, the Mochi panel/bridge and its tests,docs/feature-map/README.mdand all 13 locale catalogs. Please rebase. - Still blocking on this head: @bolichen97's 2026-09-25 CHANGES_REQUESTED. The scoped
jsonFetchchange (scopedApi.ts:162-175,AcceptedBodyUnreadable) changes the public App SDK error types.docs/app-kit/api-reference.md:85andscopedApi.ts:41on main still promise the original types. I agree this is a breaking change. I'm not filing a duplicate review. - Overlaps to coordinate (complementary, not duplicates):
- #10876 rewrites the same ChatEmbed composer block (
<input>→ auto-grow<textarea>), while this PR rewrites the send path in the same component. - #15720 edits
createScopedApi'sfetchline (relocateRequestUrl) anddesign-critique/api.ts,design-tweak/api.tsandmochi/panel/panelBridge.ts, which this PR also changes. - Agree on a landing order with those authors to avoid a third rebase.
- #10876 rewrites the same ChatEmbed composer block (
- First-principles BLOCK still applies: 22 PNGs force-added under
temp-screenshots/, which is gitignored at.gitignore:120, a channel #12322 removed repo-wide. Please drop them from the commit and attach them to the PR instead.
Problem / Motivation
ChatEmbed(the app-sdk's embeddable chat) was the third of four hand-written send paths. It posted to the bare/api/chat, which answers with an SSE stream; the scopedAppApiJSON helper buffered that stream and threwSyntaxError, and the embed's.catchcalled that success. A refused POST (409 slot-agent mismatch, 403 from an app that never granted/api/chat) rejected the mutation, but nothing readsendMutation.isError. Either way the composer had already been cleared, so a failed send looked sent and the text was gone.Why it matters
The chat-core extraction RFC (P0 contract inventory) named this the worst of the four paths: it is the one that can lose a user's turn with no trace. It is also the one surface that cannot import the dashboard client, because an app's sends must stay a permission the host app grants (
allowedApiPaths).What changed (motivation → approach → change)
Transport (
website/src/chat-core/transport/sendTurn.ts).sendTurnwas hard-wired to the dashboard client'sapi.sendChat. It gains an injectable wire — the fetch seam: one POST that resolves on every HTTP status and rejects only when the request never left or the deadline signal fired.dashboardSendWireis the default, so ChatPane (#5909) is unchanged. Receipt classification (readSendReceipt, the abort deadline, the six statuses) stays in the one place.App-sdk wire (
website/src/app-sdk/appSendWire.ts, new). Re-expresses the scopedAppApi.postoutcomes in the seam's shape: 2xx JSON → resolvedok; 2xx non-JSON (SyntaxError) → resolvedokwhosejson()rejects, i.e.unknown— the exact shape the old path swallowed; non-2xx → resolved!okcarrying the body text so the server's reason survives; a scoped-api permission denial → resolved!okwhose body carries a human sentence ("This app isn't allowed to send chat messages.", new keyappSdk.chatEmbed.app_not_allowed_to_send, 12 locales + en-XA) as therefusedreason — "check your connection" would be advice that can never succeed, and the raw app/path/grant detail is developer vocabulary, so it goes to the console instead — via a typedAppApiPermissionErrorthrown by the permission check; offline / fetch rejected →response-late, deliberately nottransport-error— the scoped helper cannot tell a request that never left from one whose response was lost (a raw network rejection covers both), and the dashboard wire'stransport-errorinvites a retry-safe resend that would run a turn twice if the POST did land;appSendWire.contract.test.tspins this per-wire divergence ("classifies a rejected fetch as response-late, never the retry-safe transport-error"); deadline →AbortError→response-late(the scoped helper takes no signal, so the deadline is honoured at the receipt). TheAbortError-as-indeterminate idiom is now part of theSendWirecontract doc and spelled once asindeterminate()inchat-core/transport, which both the app-sdk wire and the side wire reject with. The POST targets/api/chat?ws=1; the scoped path check reads only the pathname, so no new permission is required from apps.To read status and body back without parsing the
API <status>: <text>message string,createScopedApinow throws the dashboard's own typedApiError(website/src/api/apiError.ts, already imported by the app-sdk forAcceptedBodyUnreadable) with that same message and the body in.body-- one spelling for "scoped non-2xx" rather than a second class. Nothing new is re-exported from the barrel (the vendor stub mirrors the barrel value-for-value, so that would be an SDK surface change); apps keep seeing the sameErrorwith the same message.AppApiPermissionErrorstays app-sdk-local: it is the one error only the scoped helper can raise.ChatEmbed (
website/src/app-sdk/ChatEmbed.tsx). Sends throughsendTurnwith the app-sdk wire (theagentthe embed was mounted with rides on the wire, not the transport contract). Receipt policy:refused→ anerrorrow at the transcript tail (the existing registry renderer, no new component; there is notransport-errorclause — the app-sdk wire never yields it, a raw rejection being indeterminate →response-late) — the server's reason framed — a composer submit throughpages.chatPage.send_failed_with_error_restored("Couldn't send this message: . Your text is back in the composer.", the reason's own sentence end folded into the template) and a chip send, which consumed no draft, throughpages.chatPage.send_failed_with_error("Send failed: ") — so a raw "slot agent mismatch" does not read as the agent erroring mid-work; a reason-less transport failure states its cause ("Couldn't send — check your connection and try again.", shared core keypages.chatPage.send_failed_connection) instead of a bare "Send failed" — and the text handed back viamergeRecoveredDraftas typed (the composer's draft, whitespace and all — the wire carries the trimmed text, the recovery gives back what the user wrote; the shared rule's paragraph-break join is flattened to one space before it reaches the field, because this composer is a single-line<input>and a browser silently drops newlines assigned to an input's value);response-late→ the text handed back under anoticerow ("Delivery not confirmed — …", retired only when the poll shows this message's own user row — identified by identity only: the client-mintedmeta.sendIdthe embed stamps on every send (mintSendId, now owned once bychat-core/transport— ChatPage's and ChatPane's identical inline minters are replaced by the shared one in this PR), read back off the polled slot detail either as the row'smeta.sendIdor as a member of a merged row'smeta.sendIds. The server keeps that id on every path a send can take — a dispatched send persists it on its row directly, and a send queued behind a busy slot carries it on the queue entry so the drain writes it onto the row (#8853, which this PR depends on) — so there is no text-matching fallback: an id-less row with the same words is some other writer's (an older backend, an injection, a resend) and is never proof (isOwnUserRow) — and when the proof arrives the restored text is taken back out of the composer, unless the user has edited it since. (The record once also carried the transcript length at send time as a positional gate; nothing read it — retirement has always been by id alone — so the field is gone.) Unrelated growth (a prior turn still streaming, a cron/sub-agent injection, a same-text row with another id, an older backend that dropsmeta) is not proof and leaves both notice and text alone, so a late turn that did land never sits above a standing "not confirmed" with a resendable copy below it, and an undelivered one is never silently withdrawn; new i18n keysappSdk.chatEmbed.delivery_unconfirmed/delivery_unconfirmed_optionin all 12 locales + en-XA) — this embed keeps no optimistic bubble, so once the composer cleared the user's text had no visible copy left, which is the one indeterminate outcome the transport contract names as recoverable (ChatPane leaves it alone only because its bubble is still on screen);unknown→ nothing (a 2xx was received, restoring could duplicate a running turn);dispatched/queued→ the poll renders it. An option chip's direct send never restores into the composer (it did not consume the draft — the same gate ChatPane/ChatPage keep). A host-suppliedonSendrejection proves nothing about delivery (a host may have posted and lost the answer), so it is treated as unconfirmed — notice + text handed back — never as a failure that invites a duplicate-turn retry. On a follow-up-chip send the unconfirmed notice uses its own copy (delivery_unconfirmed_option: "…re-pick the option if it is missing") because the draft-clobber gate means nothing was restored. The send-tail row is folded into the top-anchored embed's new-message scroll hash, so a failure/unconfirmed row is announced rather than appended below the fold, and mirrored into a politerole="status"live region so a screen-reader user hears the outcome instead of only noticing the button re-enable. Polling, approvals, follow-up chips and the composer itself are untouched. Unmount-safe recovery (round 2 on the combined diff, GPT F1): a receipt is asynchronous, and a host can unmount the embed mid-send (switch specs, open a new one, close a drawer) or re-prop it to another slot; writing the failure/unconfirmed row and the handed-back text into the dead instance would lose the only copy of a refused send — the server never took it, so no poll will ever show it. A receipt that finds its embed gone is now parked by the app and slot the send belonged to (website/src/app-sdk/embedSendRecovery.ts, module-local; the app is part of the key because two apps can embed the same slot and one must never drain -- and render -- the other's handed-back text — the same shape SideChat gets from the store's per-slotsendStatus/sideHandBackText, kept out of the store because the app-sdk embed deliberately owns no slice) and drained by the next embed mounted for that slot; an embed already showing the slot when the receipt lands is notified and drains immediately. The buffer is a queue per slot, not one record: the in-flight guard is per instance (isPendingresets on a fresh mount), so a remounted embed can send again while the first instance's send is still out, and if both come back refused each keeps its copy — the drain applies every parked receipt oldest-first, merging each handed-back text on top of the previous one (round 3, GPT F1). OneapplyRecoveryrenders the outcome on both the live and the drained path so they cannot diverge; a receipt parked for slot A is never shown by an embed for slot B, and one parked by app A is never shown by app B's embed for the same slot (embedSendRecovery.test.ts).useChatSessionseed (website/src/app-sdk/useChatSession.ts). The RFC's "four hand-written send paths" undercounted: the app-sdk session hook seeded a new slot through the same bare/api/chatPOST with the same swallowedSyntaxError. It now sends the seed throughsendTurnover the app-sdk wire, fire-and-forget (the slot is the deliverable; creation must not wait out the transport deadline for an answer it ignores). The receipt is deliberately not acted on — the slot exists either way, and a seed that did not go out is an empty session, not a lost user message — but the SSE-as-JSON root cause is gone from the app-sdk entirely.RFC placement. Chat-core extraction P2 (transport), second and third slices. After #5909 (ChatPane), #8689 (ChatPage's send and steer, merged 2026-09-05) and this PR (ChatEmbed + SideChat), all 4 user-facing send paths plus the app-sdk seed send are on
sendTurn. Corrected inventory — the RFC's "four paths" undercounted. Batch B (#9587, stacked on this branch and merged into it 2026-09-09) is folded in here:apps/mochi/panel/panelBridge.ts(echoed the user bubble before the POST and never read the receipt — now sends throughsendTurn, rejects onrefused/transport-error/response-latewith the outcome flagged byError.name—SEND_REFUSEDcarries the server's reason,SEND_UNCONFIRMEDa late receipt — and echoes only on a confirmed acceptance; the vendoredChatPanelrestores the text on rejection, merging it with any draft typed meanwhile),apps/design-tweak/api.ts(resolved a non-JSON 2xx as{ok: true}— nowsendTurnwith the same flagged rejection) andapps/design-critique/api.ts(the identical.catch(SyntaxError)swallow on the SSE endpoint — same conversion; its own bare-fetchwire rejects withindeterminate()on a raw fetch failure, so a connection reset after the gateway took the POST resolves asresponse-latefor the poll to settle instead of a retry-safe failure that would run the critique twice; because the follow-up thread shares one slot, its poll now accepts only an assistant row appended after the pre-send row count -- a send that resolved indeterminate but never landed times out instead of persisting the previous answer under the new question, pinned inDesignCritiquePage.coverage.test.tsx). Batch A (apps/issue-radar/agentSession.ts,apps/auto-improvement/agentSession.ts) landed on main as #9576. Still offsendTurnafter this PR (batch C, #9570):hooks/useSceneInteraction.tsx(re-implementsreadSendReceiptclassification without the deadline) andApp.tsx(the feedback send). SideChat was #8655 (stacked on this branch; a second receipt adapter for the/side/*reject-semantics endpoint) and is now merged into this branch — see the third-slice section below. Rebased onto main after #8689:SendWirePayloadnow also carriessteer/colorThemeso the default dashboard wire forwards ChatPage's flags unchanged; the app-sdk wire ignores them (the server refuses app-authenticated steers). The reason-less transport-failure copy and the delivery-unconfirmed notices now live under sharedpages.chatPage.*keys (see the SideChat section), so ChatEmbed, ChatPane and SideChat state the same outcome in the same words.Third slice — SideChat (#8655, merged into this branch 2026-09-07). Reviewed and converged as its own stacked PR (all five lanes, human-approved) and squash-merged here so the whole P2 user-facing set lands as one commit. SideChat is the one surface on a different endpoint family (
/side/open+/side/turn) with the opposite receipt semantics — the client helpers resolve JSON on 2xx and reject with anApiErroron non-2xx. A per-surface side wire (website/src/pages/chat/sideTurnWire.ts, new) performs the two-call sequence the panel has always made and re-expresses the helpers' outcomes in the fetch seam's shape, sosendTurnclassifies the side panel's send by the same rule as every other surface (deadline, refused vs unreadable vs transport failure) while the acceptance body (run_id,queue_id,steer_id,pending,demoted,still_queued) passes through untouched and its handling is byte-for-byte the previousonSuccess. A post-2xx body-read failure from/side/turnis taggedAcceptedBodyUnreadable(api/apiError.ts, human messageapi.client.accepted_body_unreadable, 12 locales + en-XA) via a phase-preservingjAccepted, so a stream cut mid-body reads asunknown(never a duplicate-inviting failure) — the same tagging is applied in the app-sdk'sjsonFetch, so ChatEmbed's wire maps it tounknowntoo, and the/sideslash interceptor inChatInput.tsxtreats it as accepted; the abort race (settleUnderSignal) now lives once inchat-core/transportand both wires use it.SideChat.tsx'smutationFnbecomes onesendTurncall; receipt policy:refused/transport-errorroll back the optimistic bubble and hand the text back merged with the server's reason framed throughpages.chatPage.send_failed_with_error(or the connection copy);response-latehands the text back under a standing unconfirmed notice on every send — an idle send's optimistic bubble is rolled back first, because this panel has no slot poll that could ever clear apendingthe server never confirmed (a kept bubble stranded the panel busy: refresh disabled, thinking indicator forever, the next send demoted behind a phantom turn) — and uses the "re-pick the option" copy for a chip send;unknowndoes nothing. Every hand-back is addressed to the originating slot: the text throughrestoreDraftTointo the per-slot Side Chat draft store (#8947'ssideChatDrafts, which the composer is controlled by), the status that explains it through the per-slotSideState.sendStatus— so a receipt landing after a slot switch or panel unmount is neither lost nor merged into another slot's draft. Catalogs: the three receipt strings this surface shares with ChatEmbed (send_failed_connection,delivery_unconfirmed,delivery_unconfirmed_option) live underpages.chatPage.*(the #4240 precedent; the first two already landed via #8689) — the retiredappSdk.chatEmbed.*copies are deleted from every locale andsendFailedSharedKey.test.tsguards both invariants. Every existing SideChat test passes unmodified. Full history in #8655.Rebase onto main (2026-09-06). One gate-only adjustment, no behaviour change:
pages.chatPage.dismiss_upload_errorwas dropped from all 13 catalogs — main's ErrorNotice sweep had already removed its only call site and the key, and this branch's catalogs carried it back in through the rebase, so it registered as the 30th dead key against thedeadKeys.test.tsbaseline of 29; the branch's dead-key count now equals main's. The eager i18nallchunk had also tripped the Bundle Size Gate by 1.1 KB on the previous head (a pristinemainbuild measured 10,737 KB, 4.8 KB under the 10,490 KB ceiling, and this PR's 13-locale receipt/refusal copy adds ~6 KB); main has since re-measuredCHUNK_BUDGETS.allto 10,975 KB itself, so this PR no longer touchesscripts/check-bundle-size.mjsand builds the chunk at 10,491 KB inside main's ceiling.Review round 2026-09-15 (two product fixes, no new surface).
unknownreceipts on the poll-less surfaces. SideChat and Mochi treated a 2xx whose body could not be read (unknown) as "the server has it, do nothing" — SideChat kept its optimistic bubble pending, Mochi echoed the bubble and stayed waiting. Neither surface has a slot poll; the only thing that ever clears SideChat'spending(besides an explicit rollback) is the terminal SSE frame, and reconnect refetches slots, not side state — so the outage that cut the body could also swallow that frame and leave the panel "thinking" for good with refresh disabled (GPT finding). Both now take theresponse-laterecovery: bubble rolled back, text handed back under the standing "delivery not confirmed" notice (never an error — the server probably has it, so no "try again").SEND_UNCONFIRMEDnow coversunknownas well;sendTurn.tsdoc updated.panel.html+applyTheme()give the pet's window only the core theme variables — no Tailwind — so theErrorNoticestrip and therole=statusline would have rendered as bare text in the shipped window. Restyled the way the rest of the vendored panel is: inline styles on the strip containers, and a scoped.mochi-send-striprule block in ChatPanel's existing<style>supplying the few layout rules theErrorNoticeutility classes would have (flex/gap/danger colour/dismiss button).ErrorNoticeitself is unchanged and keeps the alert semantics the errors-use-error-notice rule asks for. Found by making the capture harness faithful to the shipped window (below).delivery_unconfirmed_optionsaid "re-pick the option"; blind readers did not know what "the option" referred to. Now uses the chips' visible vocabulary — "tap the suggestion again" — in all 13 locales (en-XAregenerated).thinkingon a send that never became a turn.panelBridge.sendMessagereportsuser_input(pet → thinking) before the POST, and only a turn's own lifecycle frames ever move the pet on —thinkinghas no timeout. A refused / transport-failed / unconfirmed send threw without a terminal event, so the pet stayed thinking indefinitely (GPT finding). The send now reports its own terminal pet event before rejecting:errorfor a definite failure (auto-recovers to idle),task_complete(→ idle) for an unconfirmed one — if that turn did land, its frames drive the pet from idle exactly as they would have./sideslash sends with an unreadable receipt no longer clear the composer.interceptSlashCommandtreated a 2xx-with-unreadable-body fromapi.sideTurnas success: the composer was cleared and nothing reported, while the outage that cut the body can also swallow the WS row that would show the question in the panel — so the question could vanish from the UI (GPT finding). Now it is UNCONFIRMED, the SideChat policy for the same receipt: the command stays in the composer (nothing lost), no error is reported (a retry could run the turn twice), and the side panel — which the command opened — stands its "delivery not confirmed" notice.sideSendStatusnow creates the panel's state when a first send has none yet, so that notice cannot be dropped on the very send with no row to fall back on. A later/sidesubmit clears the previous one's standing notice before it sends (the rule SideChat's own submit applies), so an accepted second question never sits under the first one's "not confirmed" (Opus finding)./side). A connection reset after an acceptedPOST /api/chatcannot be told from a request that never left, and both surfaces had just completed a POST on the same link (ensureSlot,/side/open) — so Mochi'stransport-errorand the slash path's rawapi.sideTurnrejection were "Send failed, try again" invitations to run the turn twice (GPT finding). Mochi now flags every non-refusalSEND_UNCONFIRMED(onlyensureSlot's own failure keeps the connection copy);/side <message>now sends throughsideTurnWire+sendTurn— the same wire SideChat's composer uses — so a refusal (ApiError), an unreadable 2xx, a raw post-dispatch rejection and the transport deadline classify by the one shared rule, and the last three keep the composer under the panel's "delivery not confirmed" notice.chat-core/transport/receiptCopy.ts(sendFailureCopy,deliveryUnconfirmedCopy), so the surfaces cannot drift (first-principles finding).Tests
chatCoreTransport.contract.test.ts(+3): an injected wire receives{message, slot, meta}plus anAbortSignaland the dashboard fetch is not touched; its resolved non-2xx isrefusedand its rejectiontransport-error; the deadline fires through it asresponse-late. 14 pass.appSendWire.contract.test.ts(new, 9): agent + JSON-receipt path on the wire; queued ≠ dispatched;ApiError→refusedwith server reason (and with a non-JSON HTML 500 body);SyntaxErroron 2xx →unknown(the old swallowed shape); permission denial →refusedwith a human sentence that names the app as the user knows it (AppApiProvider.appDisplayName, whichAppHostfills from the manifest; the id is the fallback) and says where its grant lives + console detail; a non-JSON refusal body (a proxy 502 page, a bodyless 413) →refusedwith the status as the reason (server_refused_with_status) instead of a reason-less receipt; rejected fetch →response-late, never the retry-safetransport-error; deadline →response-latewithout a signal; a settlement after the deadline does not flip the receipt.ChatEmbed.sendReceipt.test.tsx(new, 24; chip-notice assertion follows the new copy): refused → error row with server reason + text handed back; transport failure → generic copy + handed back; merge with text typed mid-flight; unreadable 2xx → no row, no restore; deadline →noticerow + text handed back; dispatched → nothing; next send clears the row; option-chip send does not clobber the draft;onSendrejection → notice + handed back, no error row; timed-out chip send says "re-pick the option", not "text is back"; a failure row in a top-anchored embed triggers the new-message scroll; proven delivery (own user row bymeta.sendId) retires the notice and takes back an untouched restore, leaves an edited draft alone, a send the poll showed before the deadline leaves nothing behind, unrelated transcript growth keeps both notice and text, a same-text row with another sendId is not proof, a same-text row with no sendId is not proof either (no text fallback), a merged queued row naming this send inmeta.sendIdsis proof, a permission denial shows the human sentence, a transport failure names the connection, a refused send hands back the draft as typed (leading/trailing whitespace kept) while the wire carried the trimmed text, an Enter mid-flight pulses the spinner and announces "Sending…" without a second request, and an error row stays whatever arrives.ChatEmbed.test.tsx: send-path expectations updated to/api/chat?ws=1; default receipt{ok: true}. 35 pass.useChatSession.test.ts: seed expectations updated to the JSON-receipt path; a refused seed still yields a ready session.npm run typecheck, changed-file ESLint, and the i18n added-lines gate (0 untranslated) are clean.ChatEmbed.sendReceipt.test.tsx, +4): a refusal landing after the embed unmounted is shown, text and all, by the next embed for that slot; a receipt parked for slot A is not shown by an embed for slot B; a late send whose embed remounted before the deadline still gets its notice and text on the mounted embed; two overlapping sends that both fail after their embeds unmounted each get their text back (first\n\nsecond), nothing overwrites.SideSlashCommand.test.tsx/.steer.test.tsx: refusals areApiErrors (asj()throws them); +1 case pinning that a raw post-dispatch rejection is unconfirmed (composer kept, panel notice, no error); the unreadable-2xx case pinsfailed + unconfirmed, the side panel's standing notice, no error, panel opened.MochiPanelBridgeCoverage.test.tsx: the rejecting-POST case now pinssend-unconfirmed+task_complete(noerror); theunknown-echoes case now pins the unconfirmed rejection +task_completepet event (noerror); +1 case pinning that a refused send reports the peterrorevent afteruser_input.SideChat.refresh.test.tsx(1 assertion updated, not weakened): its "sendMutation rejects" case mockedapi.sideTurnwith a bareError. Under the side wire a bare rejection after/side/turnwas dispatched is indeterminate (response-late— the request may have been taken and only the answer lost; pinned bySideChat.sendReceipt.test.tsx), so the test now rejects with theApiErrora real server refusal is, and asserts the same rollback + hand-back it always did. feat(chat-core): route SideChat's send through the transport over a side wire #8655's "every SideChat test passes unmodified" was true on its stacked base, whereci.ymlnever ran on the final head; this was the one pre-existing SideChat test that encoded the old "any rejection = refusal" semantics.SideChat.sendReceipt.test.tsx(new, 14 — refusal/rollback + framed reason, never-left vs post-dispatchTypeError, late steer/chip/idle policies, deadline during/side/opennever dispatches/side/turn,AcceptedBodyUnreadable→ the unconfirmed recovery: bubble rolled back, text handed back under the notice,pendingclear, no alert — updated 2026-09-15 from the earlier "do nothing" pin; per-slot hand-back across slot switch and unmount);sendFailedSharedKey.test.ts(+3, shared keys in every locale, retired surface keys absent from catalogs and source);SideSlashCommand.test.tsx(+1);appSdkScopedApi.test.tsx(+3) /appSendWire.contract.test.ts(+1, tagged stream cut →unknown);ApiClient.coverage.test.tsx(+3,api.sideTurnreceipt phases). Compatibility evidence: every pre-existing SideChat suite (steerQueue73,refresh,multiturn,close,imeEnter,oversizeQuestion,planExclusion,thinking,SideSlashCommand.steer) passes on the new path unmodified.Manual verification
Screenshot harnesses:
website/capture/chat-embed-send-receipt.*(realChatEmbedunder the realAppApiProvider, fetch stubbed to refuse the send; asserts the error row and the restored composer before capturing — and now waits for the row'sanimate-scale-inentrance to finish before the frame is taken, since a first-frame capture showed an empty gap where the row was)website/capture/side-chat-send-receipt.*(realSideChatwithapi.sideTurnstubbed to refuse, or to never answer for theresponse-lateframe) andwebsite/capture/mochi-send-receipt.*(real MochiChatPanelover the realmochiApi→panelBridge.sendMessage→ chat-coresendTurnpath; fetch stubbed so the slot bind succeeds andPOST /api/chatanswers 409 or never; the bridge's dashboard socket is stubbed open so the panel reads online). The Mochi harness is faithful to the shipped window: it mirrorspanel.html(reset + font, no utility stylesheet), writes?themeto themc-theme/mc-color-themekeys the panel reads, and calls the panel's ownapplyTheme()— the same filtered variable injection the pet's window gets. It asserts the light frames differ from the dark ones byte-for-byte (the earlier harness applied a fixed palette and photographed dark twice).website/capture/design-tweak-send-receipt.*(the REAL Design Tweak page over the realapi.ts→sendChatMessage→sendTurnpath; fetch stubbed to serve one project and one draft request, seal it on/send, adopt the slot, and refuse the turn with a 409). Every harness asserts the strip text, the composer contents and — for Mochi — that no bubble was painted for a send the server never took, before the frame is written; the Design Tweak one also asserts the request keeps its Send control after the refusal.Screenshots / video
Frames are of this head's surface —
ChatEmbed's own single-line<input>composer (this PR does not change the composer; the ChatInput swap lands separately as its own PR) — captured with the repository harness (website/capture/chat-embed-send-receipt.*: realChatEmbedunder the realAppApiProvider, transport stubbed to refuse / deny / never answer; the harness asserts the row text and the restored composer before taking each frame). PNGs are committed in this head's tree undertemp-screenshots/chat-embed-send-receipt/,temp-screenshots/side-chat-send-receipt/,temp-screenshots/mochi-send-receipt/andtemp-screenshots/design-tweak-send-receipt/, pinned to44cc28be730b3af189aaa7e59c8f88284950d25e.noticerow, text handed backrefusedreceipt naming the appChatEmbed light theme (idle / refused / late / denied)
Chip send (
delivery_unconfirmed_option). A send that originates from a follow-up chip's "send now" segment never consumed the draft, so its unconfirmed notice says to tap the suggestion again instead of claiming a restore — and the half-typed draft is left exactly as it was. Same harness,?chips=1&refuse=late: the transcript ends in an[OPTIONS: …]footer, the user has typedAlso cap the per-, and sendsAdd a per-IP fallbackfrom the chip. Asserted: the row is the chip variant and the composer still holds the draft.SideChat slice (#8655). A composer-submit refusal rolls the optimistic bubble back, hands the text back, and says so in the framed
_restoredrow (Couldn't send this message: <reason>. Your text is back in the composer.); a chip send keeps the bareSend failed: <reason>framing because it never consumed the draft. Harness:website/capture/side-chat-send-receipt.*.SideChat
response-late(?refuse=late):/side/turnnever answers, the transport deadline fires, the optimistic bubble rolls back, the question is handed back, and a STANDINGrole=statusnotice (held until the next submit, not auto-dismissed) says delivery is unconfirmed — this panel has no slot poll that could ever clear a pending bubble, so a turn the server may never have received cannot be left "thinking" forever.SideChat over-limit hint (ride-along, mandated by the errors-use-error-notice rule: validation is not a failed operation): a question past
MAX_QUESTION_BYTESis not sent and the panel says how far to cut, as arole=statusline at body weight — no longer the redErrorNotice— cleared on edit. Same harness; client-side only.Mochi ChatPanel. The user bubble appears only after the server accepts. A refused send restores the text under an
ErrorNotice(role=alert) framed asSend failed: <server reason>; a send with no usable receipt (response-lateorunknown) restores it under arole=status"delivery not confirmed" line — not an error, because the send MAY have landed and "try again" would invite a duplicate. Frames are from the faithful harness (website/capture/mochi-send-receipt.*: the panel's ownapplyTheme(), no utility stylesheet — what the pet's window actually renders); asserted per frame: the strip text, the restored composer at the panel's--textcolour (#dcdadfon dark,#4a464fon light — the same core variable the whole dashboard reads its body text from), and that no bubble was painted.Mochi light theme (refused / late)
Design Tweak. A request is marked delivered only on a CONFIRMED acceptance. A refused dispatch (here the host's 409) is a
SEND_REFUSEDrejection rendered through the page's existingbridgeErrorErrorNoticeasSend failed: <server reason>, and the sealed request stays actionable in the rail for a resend — before this branch a{ok:false}refusal inside a 200 (or any non-JSON 2xx) was marked delivered and the sealed edits were lost. Harness:website/capture/design-tweak-send-receipt.*; asserted per frame: the alert text and that the request still has its Send control.Related Issues
Chat-core extraction RFC, phase P2 (transport). Builds on #5909 and #8689. Depends on #8853 (gateway-side
sendIdthrough the queue drain; opened from this PR's GPT finding — merged). Includes #8655 (SideChat slice, merged into this branch). Downstream rebase point: #6825. no linked issue: RFC phase work tracked in the RFC, not an issue.Checklist
SendWireContribution License Agreement
N/A — repository placeholder only; no OSPO CLA text has been supplied.