Skip to content

refactor(chat-core): route scene popover and feedback sends through sendTurn; drop api.steerChat - #9593

Merged
iamwhatever merged 1 commit into
mainfrom
refactor/chat-core-p2-scene-incident-feedback
Sep 9, 2026
Merged

iamwhatever merged 1 commit into
mainfrom
refactor/chat-core-p2-scene-incident-feedback

Conversation

@CrysisDeu

@CrysisDeu CrysisDeu commented Sep 9, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Chat-core RFC P2, batch C of #9570 — the last two hand-rolled dashboard senders move onto the chat-core transport sendTurn, and api.steerChat is deleted (no caller left).

Stacked on #9576 (base refactor/chat-core-p2-app-seeds) so the two batches do not collide on the RFC §4.2 table; GitHub retargets this PR to main when #9576 merges.

hooks/useSceneInteraction.tsx (scene agent popover composer)

The running/idle fork — api.steerChat mid-turn, api.sendChat + a local readSendReceipt otherwise — becomes one call: sendTurn({ message, slot, steer: !!src?.running }). steer is a flag of the same endpoint (#8689), not a different receipt shape.

receipt.status Composer
dispatched / queued sent tick, mini-thread echo (as before)
refused failed + retry, payload appended back (as before)
transport-error same as refused (as before, via the outer catch)
unknown back to idle, nothing claimed, payload not restored (as before)
response-late retry offered, payload appended back, and the core's pages.chatPage.delivery_unconfirmed copy shown unwrapped as a warn status line (lucide AlertTriangle glyph, the popover's own dark-safe #fb0 — the popover is fixed dark chrome in every theme, so theme tokens are not legible there) and the Send button kept neutral (no red Retry — the copy says to check the transcript first) — not an ErrorNotice, because an unconfirmed delivery is a warning, not an error (errors-use-error-notice says warnings must not be dressed as errors; ChatPage draws the same distinction with its ⚠️ notice) — new: the old path awaited without bound. Nothing proves the gateway saw the request and the draft was cleared at send start, so silence would discard the text; a visible duplicate is user-repairable (GPT r1, UX r3)

Two things change on the steer branch and both are receipt-defect fixes the RFC names: a refused steer used to surface only through the outer catch (steerChat parsed via j, which throws on a non-2xx) — now it is a refused receipt with the same on-screen result; and a {ok:false} steer inside a 200, which j passed through silently as success, is now reported on the composer.

App.tsx feature-request send

refused → error row with the server's reason; transport-error → error row; unknown / response-late → silent (the request was or may have been accepted; the row is the pill's only signal and claiming a failure it cannot prove tells the user to resend a request that already went out).

Failed-send line → ErrorNotice

The composer's failure line (Send failed: <reason> under the Retry button) was a hand-written role="status" div. This PR touches its condition (response-late now feeds it), so per errors-use-error-notice it migrates to ErrorNotice variant="inline" with the same string; askAgent stays off with a No hand-off comment naming the restored draft the composer holds (GPT, round 2).

api/client.ts

steerChat deleted; sendChat's comment now describes the steer flag it carries as the transport's wire. sendChat still hands the raw response back (the transport reads the receipt; a 4xx must resolve) but now runs the same auth recovery every j-parsed call has — sendResponseAuthRecovery: the pre-body 403 X-Auth-Required hook (silent refresh / banner), the body-borne 401 stale-owner code, read off a clone so the receipt stays readable, and the 2xx banner-clear so a send that succeeds after auth was restored elsewhere dismisses a stale banner. The deleted steerChat went through j and had both; this keeps them for the steer path and extends them to every sendTurn caller on the dashboard wire (GPT r1, r3).

Tests

  • UseSceneInteractionCoverage.test.tsx mocks the transport's wire (api.sendChat), so the real sendTurn classifier runs. Asserts steer is forwarded true from a running agent and false idle; adds a refused-steer case and a deadline (response-late) case driven by the transport's abort signal under fake timers, asserting the text comes back with a retry. Every existing assertion's intent is kept.
  • ApiClient.coverage.test.tsx: sendChat on a 403 X-Auth-Required resolves with the raw response and triggers the silent refresh; on a 401 stale-session body it raises the stale-owner prompt while json() still reads. A 2xx clears an already-shown session-expired banner.
  • App.featureRequestFailure.test.tsx (and the existing App.test.tsx feature-request assertion now matches sendTurn's six-argument wire call): header updated; the accepted case now also pins that the wire is handed the deadline signal.
  • Dead steerChat stubs removed from ApiClient.coverage.test.tsx (its steerChat it deleted), ChatPage.steerQueuedReceipt.test.tsx, ChatPage.steerWithSubagents.test.tsx, SideSlashCommand.steer.test.tsx.

Tested

Why no screenshot: no layout change; the styling deltas are the scene composer's failed-send line moving from a hand-written 10px red div to the shared ErrorNotice inline variant at its stock size (icon, same string, same position under the Retry button; colour pinned to the popover's dark-safe #f88 because the chrome is dark in every theme), and the new unconfirmed state, a text-warn status line with a lucide warn glyph in the same slot (Send button stays neutral). The other deltas are existing states appearing where they were silent (failed/retry on a refused steer or a late receipt).

Refs #9570 (batches A #9576 and B #9587 carry the other senders).

Closes #9570

@CrysisDeu
CrysisDeu requested review from a team and iamwhatever and removed request for a team September 9, 2026 00:03
@github-actions github-actions Bot added the readiness: checking Automated validation is still running label Sep 9, 2026
@CrysisDeu
CrysisDeu force-pushed the refactor/chat-core-p2-scene-incident-feedback branch from 50fe774 to 6360361 Compare September 9, 2026 00:03
@github-actions

github-actions Bot commented Sep 9, 2026 •

Copy link
Copy Markdown
Contributor

GPT 5.6 Review — ✅ no blocking findings

GPT 5.6 completed its review of e043fa91e01e6ee34b9b3c1e74ddf6a4961d05b9 and found no blocking issues.

This comment is updated in place on each push.

Review details

No findings.
[GPT-REVIEWED] e043fa9

False positive or not applicable? A repository writer can comment:
/ai-review override gpt e043fa91e01e6ee34b9b3c1e74ddf6a4961d05b9: <one-sentence reason>

@github-actions

github-actions Bot commented Sep 9, 2026 •

Copy link
Copy Markdown
Contributor

UX Review (Fable 5) — 🟡 CONCERNS

UX-level review of e043fa91e01e6ee34b9b3c1e74ddf6a4961d05b9 — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS/CONCERNS are advisory.

I have everything I need. The diff is a transport refactor, but it introduces two visible states in the scene-popover composer (an ErrorNotice-styled failure line and a new amber "delivery not confirmed" line) with no committed screenshots, so the blind read could not run. The strings themselves are sound — the unconfirmed copy asserts what happened and offers an action, and the code genuinely doesn't hold the delivery state at that point, so no block predicate applies. One real risk: the feature-request path treats response-late as total silence while ChatPage's own sibling pattern surfaces a warn notice for the same state.

UX-Verdict: CONCERNS

Sound send-failure UX, but the new unconfirmed-delivery state and restyled failure line shipped unseen — no screenshot, so the blind read never ran.

Watch

  • Feature-request response-late is silent while the user watches a stuck spinner: requestFeature navigates to /chat, appends an optimistic bubble and setSlotRunning(true); the new branch ("response-late … deliberately silent", App.tsx:2951-2966) never clears it or says anything, so an undelivered request leaves a "running" session that never resolves. ChatPage handles this exact state with a ⚠️ delivery_unconfirmed notice row (ChatPage.tsx:1025) — a warning, not the failure claim the comment argues against. Rare (deadline expiry) × indefinite-wait confusion × every occurrence. Fix: append a role: 'notice' row with pages.chatPage.delivery_unconfirmed and clear the optimistic running flag.

Evidence gaps

  • New unconfirmed-delivery state in the scene popover (amber AlertTriangle line + Send button staying neutral, useSceneInteraction.tsx) — needs a screenshot of the popover in that state.
  • Failed-send line migrated to ErrorNotice variant="inline" (icon added, 10px→12px, !text-[#f88]) — the PR's no-visual-delta marker is contradicted by its own styling-delta list; needs a before/after screenshot.
  • Blind read not performed (no images committed), so neither state has a cold-read result.

[UX-REVIEWED] e043fa9

@github-actions

github-actions Bot commented Sep 9, 2026 •

Copy link
Copy Markdown
Contributor

Design Review (Fable 5) — ✅ PASS

Design-level review of e043fa91e01e6ee34b9b3c1e74ddf6a4961d05b9 — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS/CONCERNS are advisory.

Design-Verdict: PASS

Consolidation onto one receipt contract fixes two real steer receipt defects, keeps per-surface reactions as call-site policy, and deletes the last bespoke sender cleanly.

The design holds up under scrutiny: the divergent response-late policies (popover warns and restores; feature-request stays silent) are principled per-surface decisions the transport contract explicitly delegates ("What to do is call-site policy"), not inconsistency — the popover's draft was user-typed and cleared at send start, the feature-request's is canned. sendResponseAuthRecovery sits at the right seam (the fetch wire, beside j), so the raw-response path keeps the session recovery steerChat had. Tests mock the wire rather than the transport, so the real classifier is exercised. No steerChat caller remains, and the RFC table is updated in the same commit.

Suggestions

  • j, jNullable, and sendResponseAuthRecovery now carry three copies of the checkSessionExpired + banner-clear prologue; extracting that pre-body half into one shared call would stop a future auth-header change from silently missing the raw wire.

[DESIGN-REVIEWED] e043fa9

@github-actions

github-actions Bot commented Sep 9, 2026 •

Copy link
Copy Markdown
Contributor

First Principles Review (Fable 5) — ✅ PASS

Premise-level review of e043fa91e01e6ee34b9b3c1e74ddf6a4961d05b9 — 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 claims verified: steerChat has zero remaining consumers, sendTurn is the transport with the documented receipt contract, the errors-use-error-notice rule is a documented invariant in website/AGENTS.md:62-67, the delivery_unconfirmed catalog key pre-exists (used by ChatPage.tsx:1025), the RFC table row for batch C is updated in the same commit, and api.sendChat has exactly one non-test consumer (the transport itself). The popover chrome is indeed hardcoded dark (#0d0d15). No warn-tone notice component exists to reuse. Final review follows.

First-Principles-Verdict: PASS

Closes #9570 will auto-close the tracking issue at merge even though batch B (#9587) is a separate unmerged PR — confirm merge order or downgrade to Refs.

What this change ships

Inventory (9 items) — 9 justified

Intent: finish RFC chat-core P2 batch C — the last two hand-rolled dashboard senders move onto the one transport and the bespoke steer helper is deleted. FIX (consolidation tracked by a documented RFC row).

  1. Scene popover's running/idle send fork becomes one sendTurn call with a steer flag — justified
  2. api.steerChat deleted; zero callers remain (grepped steerChat: 0 non-comment hits) — justified
  3. A refused steer, including {ok:false} inside a 200, now shows failed+retry instead of a false "sent" tick — justified
  4. Popover sends now bounded by the transport's 10s deadline instead of awaiting forever — justified
  5. New unconfirmed-delivery state: late receipt restores the text with a warn line, Send stays neutral — justified
  6. Popover's failed-send line now renders through ErrorNotice — justified
  7. Feature-request send rides sendTurn; transport errors get the error row, indeterminate outcomes stay silent — justified
  8. Every dashboard send now runs the auth recovery (silent refresh, stale-owner prompt, banner clear) j-parsed calls had — justified
  9. RFC §4.2 batch-C row updated in the same commit — justified

[FIRST-PRINCIPLES-REVIEWED] e043fa9

@CrysisDeu
CrysisDeu force-pushed the refactor/chat-core-p2-app-seeds branch from 1589f00 to 4bfff54 Compare September 9, 2026 00:08
@github-actions

github-actions Bot commented Sep 9, 2026 •

Copy link
Copy Markdown
Contributor

Opus 4.8 Review — ✅ no blocking findings

Reviewed e043fa91e01e6ee34b9b3c1e74ddf6a4961d05b9 — this comment is updated in place on each push.

Review details

No findings.

The candidate's rendered value is the static pages.chatPage.delivery_unconfirmed copy, set only on the response-late status (deadline before any receipt). The errors-use-error-notice rule decides "by where the VALUE comes from, not by how it is rendered" and explicitly excludes "warnings, or status text about something that has not failed." A late/unconfirmed delivery is not a proven failure — ChatPage renders the same string as a warn-tone role: 'notice' row with a ⚠️ glyph, not through ErrorNotice. The sendState === 'failed' guard is a rendering condition, not the value's origin. No rule violation; nothing else in the diff grounds a defect.

[OPUS-REVIEWED] e043fa9

Verdict parsed from the review's SHA-scoped output markers for commit e043fa91e01e6ee34b9b3c1e74ddf6a4961d05b9.

False positive or not applicable? A repository writer can comment:
/ai-review override fable e043fa91e01e6ee34b9b3c1e74ddf6a4961d05b9: <one-sentence reason>

@CrysisDeu
CrysisDeu force-pushed the refactor/chat-core-p2-scene-incident-feedback branch 2 times, most recently from 26ac70a to 7220e23 Compare September 9, 2026 00:14
@CrysisDeu

Copy link
Copy Markdown
Contributor Author

This PR's RFC diff against its base (#9576) now touches only its own §4.2 row and adds only #9593 to implementation-prs. The batch-B row and #9587 are left as #9576 has them; #9587 records its own state.

@github-actions github-actions Bot added readiness: action required A blocking check or review needs attention and removed readiness: checking Automated validation is still running labels Sep 9, 2026
@CrysisDeu
CrysisDeu force-pushed the refactor/chat-core-p2-app-seeds branch from 4bfff54 to 0bcd395 Compare September 9, 2026 00:30
@CrysisDeu
CrysisDeu force-pushed the refactor/chat-core-p2-scene-incident-feedback branch from 7220e23 to 28c1503 Compare September 9, 2026 00:37
@CrysisDeu

CrysisDeu commented Sep 9, 2026 •

Copy link
Copy Markdown
Contributor Author

self-added: yes

  • A timed-out request silently discards the user's message — fixed in 28c1503 (span=32092eeb1358)

response-late now takes the failure branch: reportFailedSend hands the payload back into the composer (appended, never clobbering newer text) and marks it failed with the core's pages.chatPage.delivery_unconfirmed copy, which tells the user to check the transcript before sending again. Only unknown (a 2xx, so the gateway provably took the request) keeps the idle silence. Pinned by the deadline test (fetch rejects on the transport's abort signal after 10 s; retry shown, text restored, nothing echoed). This ruling covers every finding that requires an unconfirmed send on this composer to hand the text back.

@CrysisDeu

CrysisDeu commented Sep 9, 2026 •

Copy link
Copy Markdown
Contributor Author

self-added: yes
mechanism: api.sendChat runs checkSessionExpired on its raw response (every dashboard-wire sendTurn caller)

  • Scene steers bypass session-expiry recovery — fixed in 28c1503 (span=204c37ce3932)

The recovery is restored at the wire, not the caller: api.sendChat still resolves the RAW response for the transport's receipt read, but passes it through checkSessionExpired first, so a 403 X-Auth-Required on ANY sendTurn send -- the scene steer, the scene send, the feedback send, ChatPage, ChatPane -- runs the same silent-refresh / banner path every j-parsed call has. Pinned in ApiClient.coverage.test.tsx (403 challenge resolves with status 403 and triggers /api/auth/refresh). Findings that require a transport send to reach session-expiry recovery are covered by this ruling.

@CrysisDeu
CrysisDeu force-pushed the refactor/chat-core-p2-app-seeds branch from 0bcd395 to b904346 Compare September 9, 2026 00:56
@CrysisDeu
CrysisDeu force-pushed the refactor/chat-core-p2-scene-incident-feedback branch from 28c1503 to 603c231 Compare September 9, 2026 00:56
@CrysisDeu

CrysisDeu commented Sep 9, 2026 •

Copy link
Copy Markdown
Contributor Author

self-added: yes

  • Send failures bypass ErrorNotice — fixed in 603c231 (span=32092eeb1358)

The composer's failed-send line (Send failed: <reason>, shown for refused sends, transport errors and now a late receipt) renders through ErrorNotice variant="inline" with the same core-owned string. askAgent stays off, with a No hand-off comment naming the draft it protects: the composer above holds the text this failure handed back, and the hand-off navigation would discard it. The test asserts the role="alert" notice carries the framed reason and no hand-off button. This ruling covers this composer's failure surface for every receipt status that reaches it.

@github-actions github-actions Bot added readiness: passed Eligible automated validation passed for the current revision and removed readiness: action required A blocking check or review needs attention labels Sep 9, 2026
@CrysisDeu
CrysisDeu force-pushed the refactor/chat-core-p2-app-seeds branch from b904346 to 40dbfc7 Compare September 9, 2026 01:14
@CrysisDeu
CrysisDeu force-pushed the refactor/chat-core-p2-scene-incident-feedback branch from 603c231 to 0fb2127 Compare September 9, 2026 01:15
@github-actions github-actions Bot removed the readiness: passed Eligible automated validation passed for the current revision label Sep 9, 2026
@CrysisDeu

Copy link
Copy Markdown
Contributor Author
  • Watch: the popover brands an unconfirmed delivery as "Send failed: Delivery not confirmed" — fixed in 0fb2127

response-late now reports through a separate unconfirmed flag: the notice renders the delivery_unconfirmed copy UNWRAPPED, in warn tone (text-warn), never inside the "Send failed: {{error}}" frame -- the same failure-vs-unconfirmed distinction ChatPage draws with its ⚠️ notice. Refusals and transport errors keep the "Send failed" frame. Pinned: the deadline test asserts the alert carries the unconfirmed copy and not the "Send failed" prefix.

@github-actions github-actions Bot added the readiness: checking Automated validation is still running label Sep 9, 2026
@github-actions github-actions Bot added readiness: checking Automated validation is still running merge conflict Branch has merge conflicts with its base — author must resolve before merge and removed readiness: passed Eligible automated validation passed for the current revision labels Sep 9, 2026
@CrysisDeu
CrysisDeu force-pushed the refactor/chat-core-p2-scene-incident-feedback branch from e81ee16 to caf1b18 Compare September 9, 2026 08:14
@github-actions github-actions Bot removed the merge conflict Branch has merge conflicts with its base — author must resolve before merge label Sep 9, 2026
@CrysisDeu
CrysisDeu force-pushed the refactor/chat-core-p2-scene-incident-feedback branch from caf1b18 to c6e545b Compare September 9, 2026 08:39
@CrysisDeu

Copy link
Copy Markdown
Contributor Author
  • Evidence gaps: the unconfirmed-delivery warn line and the migrated failed-send ErrorNotice ship unscreenshotted; blind read not run — acknowledged, standing waiver kept (same ruling as on 5618bba / e81ee16)

This head is the rebase of e81ee16 onto main after #9576 merged; no rendered line changed. The screenshot question is already escalated to the maintainer (pod screenshot vs. waiver) and their answer, not another round, decides it. The no-visual-delta marker on the body names the two states it declines to show, so a reader can tell an intentional omission from a forgotten one. The same ruling covers every restatement of this evidence gap on this PR.

@CrysisDeu

Copy link
Copy Markdown
Contributor Author
  • Evidence gaps: the unconfirmed-delivery warn line and the migrated failed-send ErrorNotice ship unscreenshotted; blind read not run — acknowledged, standing waiver kept (same ruling as on caf1b18 / e81ee16 / 5618bba)

This head only updates two test assertions to sendTurn's wire signature; no rendered line changed since e81ee16. The screenshot-vs-waiver question is escalated to the maintainer and their answer, not another round, decides it. The no-visual-delta marker names the two states it declines to show so the omission reads as intentional. This ruling covers every restatement of this evidence gap on this PR.

@CrysisDeu

Copy link
Copy Markdown
Contributor Author
  • Suggestion: the warn line (text-[12px], 14px glyph) is larger than the composer's 10–11px elements; match the 10px scale — rebutted (deliberate: it matches the sibling failure line, and 10px was the state UX asked us out of)

The two status lines are the same size on purpose: ErrorNotice variant="inline" renders at its stock 12px, and the warn line mirrors it so a failure and an unconfirmed delivery read as siblings, not as a heading and a footnote. Forcing the notice down to the composer's 10px is the !text-[10px] override an earlier UX round on this PR flagged as a fragile class-stacking fight; matching the buttons' 10px would reintroduce it. One step above the 11px popover body is also what UX asked for on e81ee16 ("verify the amber line is prominent enough to be noticed above the restored draft"). Findings that ask the two status lines to shrink to control-label size are covered by this ruling.

@github-actions github-actions Bot added readiness: action required A blocking check or review needs attention and removed readiness: checking Automated validation is still running labels Sep 9, 2026
@CrysisDeu
CrysisDeu force-pushed the refactor/chat-core-p2-scene-incident-feedback branch from c6e545b to a08422c Compare September 9, 2026 11:23
@github-actions github-actions Bot added readiness: checking Automated validation is still running readiness: action required A blocking check or review needs attention and removed readiness: action required A blocking check or review needs attention readiness: checking Automated validation is still running labels Sep 9, 2026
…gh sendTurn; drop api.steerChat

Chat-core RFC P2, batch C of #9570. The last two hand-rolled dashboard
senders call the transport's `sendTurn` and branch on its receipt, so
the deadline and the six-way classification are the core's:

- `hooks/useSceneInteraction.tsx` (scene agent popover composer): the
  running/idle fork -- `api.steerChat` mid-turn, `api.sendChat` plus a
  local `readSendReceipt` otherwise -- becomes ONE call,
  `sendTurn({ message, slot, steer: !!src?.running })`; `steer` is a flag
  of the same endpoint (#8689), not a different receipt shape.
    refused         -> report on the composer, hand the payload back
    transport-error -> report on the composer, hand the payload back
    unknown         -> composer back to idle, nothing claimed (as before)
    response-late   -> report on the composer with the core's
                       delivery-unconfirmed copy, hand the payload back
                       (NEW: the old path awaited without bound; nothing
                       proves the gateway saw the request, so silence would
                       discard the text -- same policy as ChatPage)
    dispatched/queued -> 'sent' tick + mini-thread echo, as before
  A refused steer used to surface through the outer catch (steerChat
  parsed via `j` and threw on a non-2xx); it is now a `refused` receipt
  with the same user-visible result, and a `{ok:false}` steer inside a
  200 -- which `j` passed through silently -- is now reported too.

- `App.tsx` feature-request send: `refused` -> error row with the
  server's reason; `transport-error` -> error row; `unknown` and
  `response-late` stay silent (the request was or may have been
  accepted; the row is the pill's only signal).

- The composer's failed-send line migrates from a hand-written
  `role="status"` div to `ErrorNotice variant="inline"` (same string),
  `askAgent` off with a No hand-off comment naming the restored draft
  (errors-use-error-notice: this diff touches its condition).

- `api.steerChat` had no remaining caller and is deleted; `sendChat`'s
  comment now describes the steer flag it carries for the transport, and
  `sendChat` runs `checkSessionExpired` on its raw response so a 403
  auth challenge on any transport send keeps the silent-refresh / banner
  recovery the `j`-parsed steer helper had.

Tests: the scene coverage file mocks the transport's wire (`api.sendChat`)
so the REAL classifier runs; it asserts `steer` is forwarded from the
running state, adds a refused-steer case and a deadline (`response-late`)
case. The feature-request test pins that the send rides the transport
(deadline signal on the wire). Dead `steerChat` stubs removed from four
test files. RFC 4.2 row split into the three #9570 batches.

Refs #9570
@CrysisDeu
CrysisDeu force-pushed the refactor/chat-core-p2-scene-incident-feedback branch from a08422c to e043fa9 Compare September 9, 2026 11:47
@CrysisDeu

Copy link
Copy Markdown
Contributor Author

self-added: yes

  • Successful sends no longer clear recovered auth state (span=204c37ce3932) — fixed in e043fa9

sendResponseAuthRecovery now runs if (r.ok) removeAuthBanner() exactly as j / jNullable do, so a send that succeeds after auth was restored in another tab dismisses the stale session-expired banner itself instead of waiting for the next parsed request. ApiClient.coverage.test.tsx gains a case that shows the banner via a terminal 403→401 refresh, then asserts a 2xx sendChat removes it. This wrapper now carries all three halves of j's auth recovery (403 hook, 401 stale-owner body, 2xx clear); findings that compare it against j for a missing recovery step are covered by this ruling.

@CrysisDeu

Copy link
Copy Markdown
Contributor Author
  • Evidence gaps: the unconfirmed-delivery warn line and the migrated failed-send ErrorNotice ship unscreenshotted; blind read not run — acknowledged, standing waiver kept (same ruling as on c6e545b / caf1b18 / e81ee16)

This head is a rebase onto main for an upstream test fix (#9682); no rendered line changed since e81ee16. The screenshot-vs-waiver question is escalated to the maintainer and their answer, not another round, decides it. The no-visual-delta marker names the two states it declines to show so the omission reads as intentional. This ruling covers every restatement of this evidence gap on this PR.

@github-actions github-actions Bot added readiness: checking Automated validation is still running and removed readiness: action required A blocking check or review needs attention labels Sep 9, 2026
@CrysisDeu

Copy link
Copy Markdown
Contributor Author
  • Watch: feature-request response-late is silent while the pill shows a stuck spinner; append a delivery_unconfirmed notice row and clear the running flag — rebutted (same ruling as the response-late Suggestion on 5618bba: disproportional, no fitting copy without a new string)

The feature-request payload is a canned constant with no draft to hand back, so pages.chatPage.delivery_unconfirmed ("your text is back in the composer") and delivery_unconfirmed_option ("re-pick the option") both tell the user to do something that does not exist here; a truthful notice needs a new catalog string, which is outside a transport-routing PR whose scope is zero behaviour change beyond receipt defects. The optimistic running flag self-heals from the next server snapshot exactly as it always has for the equally-silent unknown outcome the old api.sendChat path produced. Findings asking this PR to add a new notice string or a new running-flag reset for the feedback send are covered by this ruling.

@CrysisDeu

Copy link
Copy Markdown
Contributor Author
  • Evidence gaps: the unconfirmed-delivery warn line and the migrated failed-send ErrorNotice ship unscreenshotted; blind read not run — acknowledged, standing waiver kept (same ruling as on a08422c / c6e545b / caf1b18 / e81ee16)

This head adds one line to sendResponseAuthRecovery and a test; no rendered line changed since e81ee16. The screenshot-vs-waiver question is escalated to the maintainer and their answer, not another round, decides it. The no-visual-delta marker names the two states it declines to show so the omission reads as intentional. This ruling covers every restatement of this evidence gap on this PR.

@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 9, 2026

@bolichen97 bolichen97 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I traced the thing a refactor like this most easily breaks — whether steering an in-flight turn still steers rather than queueing a new turn — and it holds. Old api.steerChat(msg, slot) POSTed /api/chat?ws=1 with {message, slot, steer:true}; the new path is sendTurn({message, slot, steer: !!src?.running}) → api.sendChat(..., true) → the identical body on the identical URL (client.ts:3214). The steer-vs-queue decision was always server-side on that flag, with no client branch carrying it, so there is no queueing regression. api.steerChat also has zero live references left at the head — the only hits are RFC prose and one explanatory test comment.

Dropping App.tsx's try/catch is sound too, since sendTurn catches around both api.sendChat and readSendReceipt and returns a receipt on every path. Optimistic UI on the scene path is unchanged: draft cleared at send start, mini-thread echo still only on dispatched/queued, sameComposer() guards intact.

One real defect, and it is the second half of a finding you already answered:

App.tsx:2969 — on response-late the feature-request path returns silently, leaving the optimistic user bubble on screen next to a slot still marked slotRunning: true. Before SEND_ABORT_MS existed, a send refused at 12s still resolved and cleared the flag; now the code stops watching at 10s. The UX lane raised this twice and you rebutted on the grounds that no existing catalog string fits — that argument covers the copy half, but clearing setSlotRunning(false) needs no new string, and that is the half still undone. Impact is bounded: your own comment at App.tsx:2920 notes a stale flag self-heals from the server snapshot on the next switch-back, so it is a transient stuck spinner rather than a permanent one.

Both new behaviours are real improvements worth naming, since they are what a reviewer might otherwise read as scope creep: a refused steer and an {ok:false} inside a 200 are now reported on the composer, where the first previously surfaced only through the outer catch and the second passed silently as success.

Not approving from here — the open call is yours, not mine: you escalated "pod screenshot vs <!-- no-visual-delta --> waiver" across four heads, and this diff does change what the scene popover renders (a new amber "delivery not confirmed" line, the failed-send line moved to ErrorNotice variant="inline", and the red Retry treatment now gated behind sendFailedHard). All five lanes are SUCCESS on e043fa91e with every non-PASS item dispositioned on that head, and there are no unresolved threads.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

chat-core P2-rest: route the remaining app-local senders through sendTurn

3 participants