Skip to content

fix: flag a chat embed whose poll keeps failing as stale - #19899

Merged
KiroCrewCaptain merged 1 commit into
mainfrom
fix/embed-stalled-poll
Oct 14, 2026
Merged

KiroCrewCaptain merged 1 commit into
mainfrom
fix/embed-stalled-poll

Conversation

@buluoray

@buluoray buluoray commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

Problem / Motivation

Goal: A chat embed that has lost its session stops claiming the agent is still running and tells the user the connection is lost, with a retry.

ChatEmbed only reported a failed read when nothing was on screen yet (loadFailed = isError && shown == null). Once a page was shown, every later poll error was silent. After a gateway restart, a deleted session or lost access, the embed kept its last snapshot. If that snapshot said running: true, the header's green dot and "streaming" stayed lit forever, the composer kept saying "Agent is working...", and the poll kept hitting the failing endpoint every second.

Why it matters

Every app that mounts ChatEmbed shows a session that looks alive while it is dead. The user waits on a reply that will never come, with no sign anything is wrong and no way to recover short of reloading the page. The 1-second poll against a dead endpoint also adds load on a gateway that is just coming back up.

Not a goal

  • Changing how a first-load failure or a failed "load earlier" read is shown; both keep their existing notices.
  • Changing ChatMessageList or the main chat's live caret. Only ChatEmbed, while its poll is stalled, renders its last streaming row as a settled row so the stale reply loses its caret; this is display-only and does not stop or cancel the backend turn (scope change authorized by the owner, 2026-10-14).
  • Telling the user why the connection was lost (restart vs. deleted session vs. permission).
  • Any other ChatEmbed audit item (send, Stop, tool details, queue, attachments, titles).

What changed (motivation → approach → change)

Symptom: a stale running snapshot reads as live forever. Root cause: the poll's error state is ignored whenever a page is shown, and the poll cadence ignores errors.

  • embedPollInterval (new, exported): healthy polls keep the 1 s running / 5 s idle cadence. A failing poll keeps that cadence until the outage reaches EMBED_STALL_MS (10 s) so the stall is noticed on time, then waits as long as the outage has lasted, capped at EMBED_STALL_POLL_MAX_MS (30 s).
  • embedOutageMs (new, exported): the outage is timed from the FIRST failure of the current run of failed reads, per query key, and resets on success. Timing it from the last success would read one dropped request as a long outage for a key that never succeeded (dataUpdatedAt is 0) and for a tab returning from hidden (the poll pauses there). The cadence and the stall notice share this one measure.
  • stalled: a page is shown, the poll is in error, it is not a failed widen, and the outage is at least EMBED_STALL_MS. A single failed poll stays silent.
  • While stalled, running is forced to false, so the header dot, "streaming", the working footer and the "Agent is working..." placeholder all drop. A tail streaming row is handed to the list as a settled assistant row, so a half-written reply loses its live caret.
  • While stalled, an ErrorNotice ("Lost connection to this chat. Showing its last update.") with a Reconnect button renders above the composer. The first successful read clears it. No hand-off, because the composer draft is unsaved local state.
  • New catalog keys appSdk.chatEmbed.connection_lost and appSdk.chatEmbed.reconnect in all 12 catalogs (+ regenerated en-XA).
  • docs/app-kit/api-reference.md documents the poll cadence, the stall window and the back-off.
  • website/capture/embed-stalled-poll.* + website/scripts/capture-embed-stalled-poll.mjs: the gateway-free capture used for the screenshots below.

Backwards compatibility

Compatible: no prop, endpoint or payload changes; a healthy embed polls exactly as before.

Removes nothing: the change only adds a notice and a back-off on a failing poll; every existing notice, prop and cadence stays.

Tests

Published tree 4aeb7b42abd72c642c070a598c59b8620ca28151, rebased on 85457980aa8c8f7a8491cfc90005fcce88fb9304 after #20212 merged. This latest rebase is patch-equivalent (range-diff =), without conflicts or additional behavior changes. The rebase preserves the shared Composer, optimistic send rows, queue cards and send-tail recovery. This round also fixes the first-failure JSDoc, disables/marks Reconnect busy during a read, re-announces the notice after a failed manual read, and mutes the stale header dot. These are corrective changes, not a conflict-only rebase.

Parent verified: 14 tests in ChatEmbed.stalledPoll.test.tsx; npx tsc -p tsconfig.app.json --noEmit; targeted eslint; 53 test_flake_pattern_ratchet.py tests. No full suite.

Four mutations, run separately with the file restored and a clean status between them:

  • Remove disabled/busy state: marks Reconnect busy while its read is in flight fails.
  • Remove the ErrorNotice retry key: announces the notice again when a Reconnect read fails fails. This proves DOM alert remounting, not a physical screen-reader run.
  • Restore the idle dot: mutes the header dot while stalled instead of showing it idle fails.
  • Leave the stale server tail as streaming: drops the live caret: a stale half-written reply renders as settled and keeps an optimistic send after the settled stale reply, and sending stays enabled fail.

All 14 tests pass after restoration. After rebasing onto the merged #20212 main fix, the parent ran all 10 ChatEmbed test files: 122 passed, zero failures. The five previously inherited optimisticSend failures are resolved by that main test-only fix, not by changes to this PR. Typecheck and targeted eslint pass on this published revision.

Manual verification

The real ChatEmbed and shared Composer run in Chromium via the checked-in gateway-free capture entry. The first scoped read succeeds and later reads return 503. At the stale notice, each capture had made 12 reads and no longer showed streaming. The capture holds the manual read to verify disabled + aria-busy, releases a 503 to verify retry becomes available with the notice intact, then returns success and verifies the notice disappears and streaming resumes. Dark/light 720px, dark 360px, light 320px all pass. No authentication or network exposure change; preview binds loopback only.

Screenshots / video

Fresh real-component captures from published tree 4aeb7b42abd72c642c070a598c59b8620ca28151. The pending button is disabled and dimmed; a failed read re-enables it while retaining the notice. The pending-label polish is held pending the scope decision, not claimed fixed.

Stalled dark 720
Pending reconnect dark 720
Failed reconnect light 320
Stalled dark 360
Recovered light 720

Related Issues

Found in a ChatEmbed audit. Follow-up for status-specific recovery: #20216 (401/403/404), requested by CrysisDeu; intentionally outside this PR’s frozen goal.

Pattern harvest

Rule candidate: review-prompt
Pattern: a polled React Query view that hides isError once it has data, so a stale running/live flag outlives the source and the poll never backs off.

Checklist

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

Contribution License Agreement

Contributions are accepted under the project's Apache-2.0 license; see the Licensing section of CONTRIBUTING.md.

@buluoray
buluoray requested review from a team and KiroCrewCaptain as code owners October 13, 2026 19:17
@buluoray
buluoray requested a review from mbriones98 October 13, 2026 19:17
@github-actions github-actions Bot added the readiness: checking Automated validation is still running label Oct 13, 2026
@github-actions

github-actions Bot commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

Design Review (Opus 5.5) — ✅ PASS

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

Design-Verdict: PASS

Check that a cut-off reply shown as a finished assistant row still reads as incomplete while the stale notice is up, and once it clears.

[DESIGN-REVIEWED] 05ed432

Description read

[DESCRIPTION-READ] f7ef1107712b84029a190dc644b808b4bde0de85289c7f9106f7e6d277a0fb41

That sha256 names everything this verdict read: the PR description, plus the 1 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with .github/scripts/pr-description-capture.sh over the same inputs; if it differs, the description or that evidence changed after this verdict was formed and any finding drawn from either is unproven.

@github-actions

github-actions Bot commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

First Principles Review (Opus 5.5) — ✅ PASS

Premise-level review of 05ed43267a48a9abc681e32dd27070d6f3f721e6 — 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.

First-Principles-Verdict: PASS

Check that the back-off (up to 30 s between reads) stays inside the frozen Goal. Its only support is the "adds load" sentence under Why it matters.

What this change ships

Inventory (9 items) — 9 justified

Intent: a chat embed whose session is gone should stop reading as live and offer a way to reconnect. This is a FIX.

  1. After 10 s of failed polls, the header stops showing "streaming" and the "Agent is working..." footer and placeholder go away — justified
  2. While stalled, the header dot turns muted instead of the idle accent — justified
  3. While stalled, a half-written reply loses its live caret and shows as settled — justified
  4. While stalled, a "Lost connection" notice with a Reconnect button appears above the composer — justified
  5. Reconnect is disabled and marked busy while its read runs, and a failed read announces the notice again — justified
  6. A failing poll backs off, waiting as long as the outage has lasted, up to 30 s — justified
  7. The outage is timed from the first failure in each run of failed reads, per query key, and resets on success — justified
  8. Two new catalog strings in all 12 locales plus en-XA — justified
  9. The app-kit API reference documents the cadence and stall behaviour, and a gateway-free capture entry plus script are added — justified

[FIRST-PRINCIPLES-REVIEWED] 05ed432

Description read

[DESCRIPTION-READ] 58e6ee056920e542ebe1080d1b5f7d3a97d843be048e9db34b2520749719b2b5

That sha256 names the PR description this verdict read. Recompute it with .github/scripts/pr-description-capture.sh; if it differs, the description changed after this verdict was formed and any finding drawn from the description is unproven.

@github-actions

github-actions Bot commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

UX Review (Opus 5.5) — 🟡 CONCERNS

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

UX-Verdict: CONCERNS

Clicking Reconnect shows almost no feedback: the blind reader could not tell the in-flight state from the idle one, and was only guessing at what Reconnect does.

Watch

  • No visible pending state on Reconnect. The only busy state is disabled:opacity-60 on a 12px underlined link. shot-02 (the in-flight read) is meant to show that state, but the reader said "I can't see any difference" from shot-01. A reconnect against a dead gateway can hang for seconds, so the user sees no reaction, clicks again, and assumes the button is broken. This hits every reconnect attempt. Fix: while isFetching, change the label to "Reconnecting…" (new catalog key) instead of relying on opacity.
  • Reconnect's outcome is a guess. The reader said it "tries to connect again and maybe continue the reply… a guess (does it pick up where it stopped, or start the answer over?)". The reader also said the link "sits outside the red box… wasn't sure it belonged to that message." The layout copies the sibling load-error retry, so it is consistent, but the outcome is still unclear. This is friction, not failure, because the reader would still click it. Fix: make the notice copy say what Reconnect does (see Suggestions).

Suggestions

  • In appSdk.chatEmbed.connection_lost, replace "Showing its last update." with "Showing the last reply received; Reconnect to resume." The reader could not tell what "last update" meant or how old it was.

[UX-REVIEWED] 05ed432

Description read

[DESCRIPTION-READ] a6ef5190ba642538070965b86ff9ca073ad2e6afeb70f3d961c4259ab52d17b8

That sha256 names everything this verdict read: the PR description, plus the 8 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with .github/scripts/pr-description-capture.sh over the same inputs; if it differs, the description or that evidence changed after this verdict was formed and any finding drawn from either is unproven.

@github-actions

github-actions Bot commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

GPT 6.1 Review — ✅ no blocking findings

GPT 6.1 completed its review of 05ed43267a48a9abc681e32dd27070d6f3f721e6 and found no blocking issues.

This comment is updated in place on each push.

Review details

No findings.
[GPT-REVIEWED] 05ed432

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

@github-actions

github-actions Bot commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

Opus 5.5 Review — ✅ no blocking findings

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

Review details

No findings.

[OPUS-REVIEWED] 05ed432

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

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

@buluoray

Copy link
Copy Markdown
Contributor Author

🤖 Kiro Crew Auto-Pipeline [operator: buluoray#19899]: dispositions for the review round on 18646d5a2c, fixed in 93d70ef91f.

Opus 5.5 (never-succeeded key) and Design (hidden tab returning) — fixed. Both are the same defect: the outage was errorUpdatedAt - dataUpdatedAt. dataUpdatedAt is 0 on a key that never succeeded, and it predates the hide on a tab coming back (the poll pauses while hidden), so one dropped read jumped to the 30 s back-off or flagged a stall at once. New embedOutageMs times the run from its first failure, per query key, and resets on success; the cadence and the notice share it. Tests: times the outage from its first failure, not from a success long before, starts at zero for a key that never succeeded, measures from the first failure of the run and resets on success — all three go red when the old subtraction is restored.

UX — caret: fixed. While stalled, the tail streaming row is handed to the list as assistant, so the live caret is gone (drops the live caret: a stale half-written reply renders as settled reddens without it). This is inside the Goal ("stops claiming the agent is still running"). The ## Not a goal bullet about the caret is now out of date; that section is frozen, so it is left as written and this comment records the change.

UX — "Retry" reads as a resend: fixed. The button now reads "Reconnect" (new key appSdk.chatEmbed.reconnect, all 12 catalogs).

UX suggestion — "session" → "chat": taken. "Lost connection to this chat. Showing its last update."

UX — composer while disconnected: not taken here. What a send does when it fails, including keeping the draft, is a separate ChatEmbed item handled in its own PR. Disabling send on a stall would also block the one action that can succeed once the gateway is back before the next poll.

Sensitive Change Review on 18646d5a2c was an API read failure ("Could not read the PR from the API"), re-run once after 30 minutes and passed; the diff touches no sensitive path.

@buluoray
buluoray force-pushed the fix/embed-stalled-poll branch from 93d70ef to 9607a2d Compare October 13, 2026 20:20
@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 Oct 13, 2026
CrysisDeu
CrysisDeu previously approved these changes Oct 13, 2026

@CrysisDeu CrysisDeu 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.

Reviewed head 9607a2d. Outage measured from first failure of the run, back-off to 30 s, no new timers (React Query owns the interval), no boundary leak, tests cover threshold/back-off/caret/Reconnect. CI green. Approving.

Please fix:

  • ChatEmbed.tsx:112-114: JSDoc on EMBED_STALL_MS says "measured from its last success"; the code and your own PR body say first-failure. Stale comment contradicts the design it guards.
  • ChatEmbed.tsx:456-462: Reconnect gives no pending state (void refetch()); isFetching is already in scope. disabled={isFetching} plus aria-busy is enough. UX lane raised this and it is unaddressed.
  • 401/403/404 collapse into "Lost connection" with a Reconnect that can never succeed, and the poll runs forever at 30 s against a gone session. You declared it a non-goal; I accept that for this PR, but ScopedApiError.status is right there, so please file the follow-up.

Posted by code-reviewer (Kiro Crew member) on behalf of @CrysisDeu. Full report on file.

@iamwhatever

Copy link
Copy Markdown
Contributor

This PR fixes the root cause of a ChatEmbed that shows "streaming" forever after its session is lost: the poll's error was ignored once a page was on screen. A shown page whose poll has failed for 10 s now gets running=false, a settled tail row and a Reconnect notice, and the failing poll backs off to at most 30 s (website/src/app-sdk/ChatEmbed.tsx:112-158, :230-250, :454-467). I read the full diff and the tests. I tried to fool the outage timer with a hidden tab coming back, a key that never succeeded, a success followed by new failures, and a widen failure. embedOutageMs starts a new run when dataUpdatedAt changes and clears on success, the render path and refetchInterval use the same slotKey:limit key, and widenFailed is excluded, so none of those produced a false stall. The code is sound, but the UX Review CONCERNS on the current head 9607a2d has no ai-review-disposition reply. Your earlier disposition answered the 18646d5 round and covered only the composer point. Still unanswered: (1) Reconnect shows no pending or failed state (void refetch() at ChatEmbed.tsx:461, while isFetching is already available); (2) the header dot shows normal idle purple while stalled, not an offline look; (3) the suggested connection_lost wording. @buluoray, please post a disposition for each one. CrysisDeu's approval also asks for three changes: fix the stale EMBED_STALL_MS JSDoc at ChatEmbed.tsx:112, which still says "measured from its last success"; add disabled={isFetching}/aria-busy to Reconnect; and file the 401/403/404 never-recovers follow-up as an issue linked in the description. Please do those in the same round. — crew-pr-reviewer (deep re-check)

@buluoray

Copy link
Copy Markdown
Contributor Author

🤖 Kiro Crew Auto-Pipeline [operator: buluoray#19899]: fixed on a83e921.

fixed: Reconnect now disables and sets aria-busy during the read; a failed manual read re-mounts the existing alert, then re-enables Reconnect. The named pending and failed-read tests each redden when their change is removed. Real Chromium captures hold the read and cover pending, failed and successful recovery on desktop and narrow widths. The failed state remains the honest connection-lost notice; no read is presented as a resend.

@buluoray

Copy link
Copy Markdown
Contributor Author

🤖 Kiro Crew Auto-Pipeline [operator: buluoray#19899]: rebutted on a83e921.

rebutted: Sending remains available deliberately: a poll failure does not prove the send endpoint or a host onSend callback is unavailable, and the gateway may recover before the next poll. The shared Composer and existing receipt recovery stay intact. The new stalled optimistic-send test proves the send remains usable, the stale streaming row is settled, and the optimistic user row remains visible. Disabling sending or claiming Reconnect is required to send would be inaccurate.

@buluoray

Copy link
Copy Markdown
Contributor Author

🤖 Kiro Crew Auto-Pipeline [operator: buluoray#19899]: fixed on a83e921.

fixed: The header dot uses the existing muted token while stalled, not the idle accent. The test mutes the header dot while stalled instead of showing it idle fails when the old idle color is restored. Current real-component screenshots show the muted dot.

@buluoray

Copy link
Copy Markdown
Contributor Author

🤖 Kiro Crew Auto-Pipeline [operator: buluoray#19899]: rebutted on a83e921.

rebutted: Showing its last update describes the last loaded page. The suggested Replies after this point wording would imply there is a known later boundary; this reader cannot know whether a partial reply ever finished or the slot still exists. Keeping the snapshot wording avoids inventing unseen replies. Status-specific missing-session/authentication recovery is tracked in #20216.

@buluoray

Copy link
Copy Markdown
Contributor Author

🤖 Kiro Crew Auto-Pipeline [operator: buluoray#19899]: corrective round published at a83e921.

CrysisDeu’s requests: the outage JSDoc now says first failure; Reconnect is disabled and aria-busy during its read; the 401/403/404 recovery follow-up is #20216 and is linked in the description. No authentication policy or permission boundary changed.

First Principles PASS punchline: the per-key failure-run record is needed to avoid flagging one dropped read after a hidden-tab gap or a never-succeeded key as a long outage, as the prior blocking round established. Back-off also bounds repeated failed reads: the 60-second fake-clock test makes fewer than 20 reads rather than the roughly 60 one-second reads. This is request-count evidence, not a measured gateway CPU claim; removing the record would restore the false-stall bug.

Design, GPT and Opus on the previous head had no remaining findings. Every UX span has its own current-head disposition above. New-head lanes still need to run.

This was not conflict-only: it preserves main’s Composer/optimism changes and fixes the requested reconnect feedback plus offline dot. Parent verified 14 targeted tests, typecheck, eslint, 53 flake-ratchet tests, four sequential reddening mutations, and real-component pending/failed/recovered captures at 720/360/320px. The broader five optimisticSend failures are a delegate-reported main-baseline match, not claimed clean locally.

The push invalidated the old head’s review; GitHub now reports the prior approval DISMISSED. I did not dismiss any review, approve, merge, or enable auto-merge. Re-requesting CrysisDeu for the new head.

@buluoray
buluoray requested a review from CrysisDeu October 14, 2026 08:50
@buluoray

Copy link
Copy Markdown
Contributor Author

🤖 Kiro Crew Auto-Pipeline [operator: buluoray#19899]: current-head CI classification, a83e921.

Frontend Tests (2) failed on exactly the five ChatEmbed.optimisticSend tests mentioned in the description. I have now independently reproduced all five in a fresh, clean detached worktree at the exact main base 30bb0b3: 7 passed, 5 failed. The test file is absent from this PR diff. Three cases still ask for Send message on a busy slot; the other two concern queued receipts and refused-send tails. This upgrades the earlier delegate-reported comparison to a parent-verified base failure. I am not modifying unrelated base tests here.

GPT, Opus, Design, UX and First Principles all failed to read PR data under the shared installation API rate limit; none completed a new-head verdict. Readiness and Sensitive Change Review also failed API reads. Dependency License Gate reported dependency review unavailable, with no dependency files changed here. No rerun budget has been spent. Each infrastructure run will get at most one rerun, no sooner than 30 minutes after its failure. No code push will be made merely to restart these checks.

@buluoray

Copy link
Copy Markdown
Contributor Author

🤖 Kiro Crew Auto-Pipeline [operator: buluoray#19899]: the main failure has an existing owner and fix: @bolichen97, #20212 at 707462b (issues #20206 and #20211).

I independently ran that exact tree: all 12 optimisticSend tests pass, with production code unchanged from main. On pristine main, the two idle-slot cases also pass when run alone. The three busy-slot cases look up Send message while ComposerSend correctly names the control Queue message. Those cases throw before consuming the queued q1/q2 one-shot mock responses; clearAllMocks does not clear those responses, so they contaminate the later queued-receipt and refused-send tests. The existing fix changes the helper and busy-slot calls only, keeping all row/card assertions.

The verified merge order was #20102 at 07:58:04Z, then #19881 at 07:58:18Z. This is an independent cross-merge test mismatch, not a defect introduced by #19899. I made no edits to those tests or production behavior and opened no competing PR. This branch will need the main fix once it lands.

@buluoray

Copy link
Copy Markdown
Contributor Author

🤖 Kiro Crew Auto-Pipeline [operator: buluoray#19899]: current-head disposition.

Rebutted: the original Motivation names indefinite one-second reads as part of this failure, and the existing fake-clock test counts fewer than 20 failed reads over a minute instead of roughly 60. This is measured request work, not a claimed gateway CPU/latency benchmark. The bounded React Query interval branch preserves healthy pacing and immediate manual Reconnect. Retaining that small branch prevents needless repeated reads of a known failing endpoint; no separate polling subsystem is introduced.

@buluoray

Copy link
Copy Markdown
Contributor Author

🤖 Kiro Crew Auto-Pipeline [operator: buluoray#19899]: current-head disposition.

Accepted visible-feedback improvement, held rather than claimed fixed. The current button is disabled and aria-busy during the real held request; the four-width capture proves recovery works. The opacity change is subtle. Reconnecting copy remains held under the owner-scope decision; the dependency-only rebase intentionally did not bundle advisory polish. No separate cosmetic push or override.

@buluoray

Copy link
Copy Markdown
Contributor Author

🤖 Kiro Crew Auto-Pipeline [operator: buluoray#19899]: current-head disposition.

Rebutted as requiring a layout expansion in this round. Notice and Reconnect occupy the same flex row above the composer, following the existing first-load Retry convention. Fresh 320px and 360px real-component captures show both without clipping. A different grouping can improve prominence but does not fix a broken request; it is not being added while the scope decision is open.

@buluoray

Copy link
Copy Markdown
Contributor Author

🤖 Kiro Crew Auto-Pipeline [operator: buluoray#19899]: current-head disposition.

Rebutted as lost-input behavior: the empty composer disables Send because it is empty, not because the poll is stalled. Typing enables it, proven by the stalled optimistic-send test. A poll failure does not prove a host onSend or the POST will fail, so promising a failed or successful send now would be false. Existing refused/unconfirmed receipt handling restores input; all 122 ChatEmbed tests pass after the base fix. More explanatory notice copy is advisory and held, not a transport defect.

@buluoray

Copy link
Copy Markdown
Contributor Author

🤖 Kiro Crew Auto-Pipeline [operator: buluoray#19899]: current-head disposition.

The proposed last messages received wording is a reasonable copy alternative, but the current notice already names this chat and describes its last loaded snapshot. It is held with the other advisory copy changes while the owner scope decision is pending; no extra string-only publication or claim that this suggestion is implemented.

@buluoray

Copy link
Copy Markdown
Contributor Author

🤖 Kiro Crew Auto-Pipeline [operator: buluoray#19899]: Design PASS question verified on 4aeb7b4.

I temporarily wrapped the mounted real ChatEmbed in React.StrictMode and ran the stalled-poll file: all 14 tests passed, including the threshold, first-failure/hidden-tab, back-off, reconnect and optimistic-row cases. The test wrapper was restored afterward and git status is clean. Source explanation: for an error snapshot with the same dataUpdatedAt, embedOutageMs retains the existing since timestamp; repeated error renders do not restart that failure run. A successful status deliberately clears it. This check did not add production code or claim that every concurrent React scheduling case was exercised.

The new First Principles round calls the caret display change justified, but that bot statement is not Ray authorization. The frozen non-goal mismatch remains with the owner; scope wording and projection remain untouched. The projection changes only the displayed row role, never backend work.

@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 Oct 14, 2026
@buluoray

Copy link
Copy Markdown
Contributor Author

🤖 Kiro Crew Auto-Pipeline [operator: buluoray#it_e2b9fdd2]: Scope change authorized by the PR owner (Ray, 2026-10-14 15:11Z).

The previous "Not a goal" line excluded the live caret on a streaming row, but the code on head 4aeb7b4 already removes it while the poll is stalled (listMessages in ChatEmbed renders the last streaming row as assistant). The owner chose to keep that behaviour, so only that one "Not a goal" line was rewritten to match the code:

  • ChatMessageList and the main chat's caret are unchanged.
  • The change is display-only. It does not stop or cancel the backend turn; the first successful poll restores the live row.

No code was pushed; the head stays 4aeb7b4.

@github-actions github-actions Bot added readiness: checking Automated validation is still running readiness: passed Eligible automated validation passed for the current revision 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 readiness: checking Automated validation is still running labels Oct 14, 2026
mbriones98
mbriones98 previously approved these changes Oct 14, 2026

@mbriones98 mbriones98 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.

Checks green and PR Readiness passed at 4aeb7b4; non-feature change.

@buluoray
buluoray force-pushed the fix/embed-stalled-poll branch from 4aeb7b4 to 05ed432 Compare October 14, 2026 20:50
@github-actions github-actions Bot added readiness: checking Automated validation is still running readiness: passed Eligible automated validation passed for the current revision and removed readiness: passed Eligible automated validation passed for the current revision merge conflict Branch has merge conflicts with its base — author must resolve before merge readiness: checking Automated validation is still running labels Oct 14, 2026
@buluoray
buluoray requested a review from mbriones98 October 14, 2026 22:14

@KiroCrewCaptain KiroCrewCaptain left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Approved after a maintainer read the review lanes on this head. The one open note (feedback while Reconnect is in flight) is follow-up polish, not a blocker.

@KiroCrewCaptain
KiroCrewCaptain merged commit 5359594 into main Oct 14, 2026
102 of 103 checks passed
@KiroCrewCaptain
KiroCrewCaptain deleted the fix/embed-stalled-poll branch October 14, 2026 23:09
@github-actions github-actions Bot removed the readiness: passed Eligible automated validation passed for the current revision label Oct 14, 2026
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.

5 participants