Skip to content

fix(dashboard): notify on a silent iframe load on all sandbox-doc consumers - #11205

Merged
iamwhatever merged 2 commits into
kirodotdev:mainfrom
chenmingwei23:fix/silent-iframe-load-notice-11199
Sep 18, 2026
Merged

iamwhatever merged 2 commits into
kirodotdev:mainfrom
chenmingwei23:fix/silent-iframe-load-notice-11199

Conversation

@chenmingwei23

@chenmingwei23 chenmingwei23 commented Sep 16, 2026 •

Copy link
Copy Markdown
Contributor

Problem / Motivation

The four consumers of the shared useSandboxDoc hook handle a silent load failure inconsistently. A silent load is the case useSandboxDoc.failed does not cover: the document mint succeeds (a url is in hand) but the iframe's load event never fires. A surface that reveals only on load then stays blank forever, with no notice and no way to recover.

On current main, none of the four consumers handles the never-fires-load case correctly. ArtifactBody does carry a docSilent grace timer, but it covers a DIFFERENT silent condition: it arms only after load has fired (loadedUrlRef.current === blobUrl), watching for a height report that never arrives. A load that never fires leaves even ArtifactBody blank with no notice. WidgetFrame and ArtifactThumbs sit behind an opacity: loaded ? 1 : 0 gate with no timeout, so a silent load leaves them permanently invisible; RemoteArtifactDetailPage shows a visible-but-blank box with no notice.

Why it matters

A user who hits a silent load on a widget, a library thumbnail, a remote artifact page, or the local artifact body sees a blank box with no explanation and no way to recover. The failure is layer-agnostic: whenever a mint succeeds but the frame never loads, every one of the four surfaces goes silent-blank.

What changed (motivation -> approach -> change)

  • Symptom: all four sandbox-doc frames go blank (permanently invisible, or blank-with-no-notice) when a mint succeeds but the frame never fires load.
  • Root cause: no consumer had a fallback for a load that never arrives. ArtifactBody's timer only arms once a load has already fired; the other three reveal on load alone.
  • Change: lift the grace-timer logic into a shared useSilentLoadWatch hook -- the same "one hook rather than the same effect in four components" rationale useSandboxDoc already documents for itself -- and wire all four consumers to it, each in the shape that fits its surface:
    • ArtifactBody: surface the same notice + Eye/"Show artifact" recovery its docSilent branch already uses, now also on a never-fires-load. Its existing docSilent (loaded-but-no-height-report) is untouched.
    • WidgetFrame: reveal the frame when the window elapses (a slow-but-eventual document is not trapped invisible) and show the same notice + Eye/"Show artifact" recovery.
    • ArtifactThumbs: reveal the grid cell. No per-thumb retry button -- this is a grid cell whose existing recovery affordance is opening the artifact, which re-mints.
    • RemoteArtifactDetailPage: overlay the notice + Eye/"Show artifact" on the visible-but-blank frame. The same overlay also covers the failed branch (a re-mint that rejects over a mounted, spent url): it renders the shared ErrorNotice ("Couldn't render this artifact") + RotateCw/"Retry". Without it, taking "Show artifact" on a rejecting re-mint would dead-end blank -- the overlay is the only reachable recovery in that state, since the page's failed ternary branch is unreachable while a blobUrl is still set.

One recovery affordance for the one situation, everywhere: a silent load is a frame that did not report, not a proven failure, so every surface shows the cause-neutral "This artifact is no longer showing" + an Eye "Show artifact" action (not a reload arrow + "Retry", which asserts a failure the surface cannot verify). The failed (mint rejected) branches keep their RotateCw + "Retry" -- that IS a known read failure.

No new i18n keys: the notice reuses the existing artifactBody.no_longer_showing / show_artifact, matching the cross-component reuse of artifactBody.* already present in these files.

Sites found vs sites changed: 4 consumers of useSandboxDoc, all 4 vulnerable to the never-fires-load case, all 4 changed. The numbers match.

Tests

  • useSilentLoadWatch.test.tsx: pins the state machine -- does not fire before the grace window; fires after it with no load; never fires when the frame loads in time; does not arm while the url is null (a pending mint, not a silent load); re-arms a fresh window on a re-mint. Mutation-verified: neutering setSilent(true) reddens the two silent-detecting cases.
  • ArtifactBody.neverLoad.test.tsx (new): renders the real ArtifactBody with a mint that resolves but a frame that never loads, asserts the notice appears after the grace window, and stays quiet when the frame loads and reports height. Mutation-verified: removing the loadSilent term from the notice condition reddens the never-load case.
  • RemoteArtifactDetailPage.silentLoad.test.tsx: renders the real page with a mint that resolves but a frame that never loads (jsdom fires no iframe load), and asserts the notice appears after the grace window. Mutation-verified: disabling the overlay condition reddens it.

Manual verification

Captured on the built SPA with a real never-fires-load repro: the /api/sandbox-doc mint resolves (a url is in hand) but the /sandbox-doc/** document fetch is held open, so the frame's load never fires -- the genuine state, not a faked one. Screenshots below.

Screenshots / video

Every frame below was captured against the built SPA (website/dist, rebuilt from
this head at 2026-09-18T04:35Z) with a genuine never-fires-load repro: the
/api/sandbox-doc mint resolves, and /sandbox-doc/** is held open and never
settled, so the frame's load event never fires. Each image was opened and read
before being labelled, so the alt text below describes the pixels.

RemoteArtifactDetailPage, silent state: "This artifact is no longer showing" with an Eye "Show artifact" over the blank frame

RemoteArtifactDetailPage, failed state after a rejecting re-mint: red ErrorNotice "Couldn't render this artifact" with a RotateCw "Retry", still over the mounted frame

WidgetFrame, silent state: the frame is revealed (not trapped invisible) with the same notice and Eye "Show artifact"

ArtifactBody, silent state: the same notice and Eye "Show artifact" on the local widget artifact route

The second image closes the evidence gap the UX lane raised. It is the browser twin
of RemoteArtifactDetailPage.silentLoad.test.tsx > "keeps a recovery affordance when
the re-mint rejects after a silent load": take "Show artifact", the re-mint is
answered 500, the previous spent url survives so blobUrl stays truthy and the blank
frame is never torn down, and the overlay must therefore persist under failed and
carry the recovery itself. Without that persistence the user is left with a blank box
and no notice and no recovery.

A correction to this description's earlier revision: it labelled the silent
RemoteArtifactDetailPage frame "Retry / Show artifact", which its pixels do not show
(it shows only the silent branch). The two states are now separate images, labelled
for what each one actually contains. The earlier claim that an agent cannot produce a
user-attachments asset was also wrong: gh pr edit --attach mints one, and that is
how these are uploaded.

ArtifactThumbs is not pictured: its change reveals an otherwise-invisible grid cell,
which has no notice to show and no meaningful visual delta on a minimal fixture; its
wiring is exercised by the shared hook's tests.

Advisory items deferred (not blocking)

Two UX "Watch" (advisory) points are deliberately deferred, not missed:

  • Vocabulary: a widget surface shows "This artifact is no longer showing" / "Show artifact" beside the existing "Couldn't render this widget" copy. A widget-worded fix ("This widget is no longer showing" / "Show widget") needs new i18n keys across all 12 locales, which would also re-roll every review lane. Deferred to keep this PR's diff to the fix; the current copy reuses the existing artifactBody.* keys already shared across these files.
  • Tense: "This artifact is no longer showing" also fires on a never-first-load, asserting a prior visible state that never existed. Same 12-locale cost for a tense-neutral variant; low frequency, mild. Deferred for the same reason.

Related Issues

Refs #11199
Refs #6176

This is not a fix for #6176 and does not claim to be. #6176's reported mechanism (a skipped GPU paint on a packaged macOS build) was fixed by the translateZ(0) promotion in #7931/#8076 and shipped in v0.6.0. This is a separate, independently-justified defect found while investigating that one -- it stands on the never-fires-load asymmetry alone, no packaged repro required.

Pattern harvest

Rule candidate: an affordance added to one consumer of a shared hook while its siblings read the same hook without it -- N consumers, some done. The generalizable fix is to lift the affordance into the hook (or a sibling hook) so every consumer gets it, rather than copy the effect. useSandboxDoc already documents this exact rationale in its own header; this PR applies it to the load-failure fallback that was left behind, and the review of it caught that even the one "done" consumer covered a different condition -- so the true count was 0-of-4 handling the never-load case, not 3-of-4 with one done.

@chenmingwei23
chenmingwei23 requested review from a team and CrysisDeu September 16, 2026 05:31
@github-actions github-actions Bot added the fork Pull request from a fork (external contributor) label Sep 16, 2026
@github-actions github-actions Bot added the readiness: checking Automated validation is still running label Sep 16, 2026
@github-actions

github-actions Bot commented Sep 16, 2026 •

Copy link
Copy Markdown
Contributor

GPT 5.6 Review (fork) — ✅ no blocking findings (all downgraded on adjudication)

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

Opus 4.8 adjudication downgraded every blocking finding to advisory. Adjudication downgraded all 1 blocking finding(s) to advisory: the remedy each one requires is disproportionate to the harm it prevents. Read them as advice, not as merge conditions.

Review details

BLOCKING -- website/src/components/WidgetFrame.tsx:600 -- silent-load failures bypass ErrorNotice across all four consumers
<span role="status">…</span> | opacity: everLoaded || loadSilent ? 1 : 0
mint succeeds + iframe never loads -> loadSilent fires -> plain status or blank thumbnail replaces the required error surface and agent hand-off.
Anchor: errors-use-error-notice
Fix: Render each loadSilent state through ErrorNotice, with the required hand-off decision.
[BLOCK-MERGE-DOWNGRADED] c546888
[GPT-REVIEWED] c546888

Adjudication (Opus 4.8) — is blocking on each finding proportionate?

F1 anchors to errors-use-error-notice (website/AUTOSDE.yaml:597-598, blocking: true), but that rule's own text (website/AUTOSDE.yaml:616-623) defines an error as "the outcome of something that FAILED" and explicitly excludes "status text about something that has not failed — those are not errors and must not be dressed as one." The loadSilent value comes from a grace timer elapsing with no load event while the mint SUCCEEDED (useSilentLoadWatch.ts:244-248; a url is in hand) — nothing failed, so it falls in the rule's carve-out, not its requirement. The blocking flag is authoritative for errors as the rule defines them; a not-yet-failed status is not one, so the anchor is misapplied and I weigh normally.

Conditions: (a) mint succeeds but frame never fires load within 3s (useSilentLoadWatch.ts:205,246); (b) recovery is present in every consumer — WidgetFrame renders role="status" + a working "Show artifact"/retryMint Btn (patch WidgetFrame lines 99-113), RemoteArtifactDetailPage routes the genuine failed mint through ErrorNotice and gives silent-load a status + re-mint Btn (patch lines 340-363), ArtifactThumbs reveals the frame, ArtifactBody reuses its existing recovery branch. No silent dead-end; the affordance self-corrects on the next attempt.

Harm rung: LOW — a visible non-failure notice with a working recovery button, missing only the agent hand-off. The demanded fix (dress a non-failure status as an ErrorNotice) asserts a failure the surface cannot verify and contradicts the rule's own exclusion, so its cost exceeds the harm prevented.

[ADJUDICATION] c546888b230e79de09be33b325fe306a528d4539 total=1 uphold=0 downgrade=1
DOWNGRADE F1 website/src/components/WidgetFrame.tsx:600 reason=disproportionate-remedy
[GPT-ADJUDICATED] c546888b230e79de09be33b325fe306a528d4539

@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 16, 2026
@github-actions

github-actions Bot commented Sep 16, 2026 •

Copy link
Copy Markdown
Contributor

UX Review (Fable 5, fork) — 🟡 CONCERNS

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

UX-Verdict: CONCERNS

New silent-load notices are shown but no blind reader has read them, and the reused copy misstates state on first loads — a known, deferred defect.

Watch

  • "This artifact is no longer showing" fires on frames that never showed: WidgetFrame holds iframeLoaded === false at that render, so every silent first load asserts a prior display that never existed (mild misdirection, every occurrence). The author defers the fix for 12-locale cost — a human should ratify that trade or ask for a tense-neutral "This artifact isn't showing".
  • Same root cause, second symptom: widget surfaces now mix vocabularies — the new notice says "Show artifact" while the sibling failed branch says "Couldn't render this widget" (en.json), so a first-timer meets two names for one thing. Also author-deferred; ratify or fix together with the above.
  • All four notices are pictured but this lane cannot cold-read them; pushing the branch to the main repository would get the blind read on "Show artifact" comprehension.

[UX-REVIEWED] c546888

@github-actions

github-actions Bot commented Sep 16, 2026 •

Copy link
Copy Markdown
Contributor

Design Review (Fable 5, fork) — 🟡 CONCERNS

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

Design-Verdict: CONCERNS

The 3s grace window now spans the document's network fetch, so routinely slow loads will flash a false "no longer showing" notice.

Watch

SILENT_LOAD_GRACE_MS = 3000 was transplanted from DOC_REPORT_GRACE_MS, but that window measured a post-load interval (load → height report, an in-page postMessage). The new watch arms at url-land ("the timer arms only while … the current document has not yet loaded"), so it races the full /sandbox-doc/** fetch: on a slow link a document that loads at 5s trips silent at 3s, flashing the notice — and in WidgetFrame inserting a layout-shifting row and revealing a half-painted frame — on every routine slow open, across all four surfaces. The hook's claim that "the value matches the window ArtifactBody has used" papers over that the measured interval changed.
Clears when: a throttled-network check (e.g. DevTools Slow 3G against the built SPA) shows an eventually-loading document either doesn't flash the notice or the window is resized/justified for the fetch-inclusive interval.

[DESIGN-REVIEWED] c546888

@github-actions

github-actions Bot commented Sep 16, 2026 •

Copy link
Copy Markdown
Contributor

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

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

First-Principles-Verdict: PASS

Verify on a slow connection that a load merely slower than the 3s window doesn't flash the new notice on surfaces that previously showed nothing.

What this change ships

Inventory (6 items) — 6 justified

Intent: FIX — a frame whose mint succeeds but whose load never fires no longer strands the user on a silent blank box, on all four sandbox-doc surfaces.

  1. ArtifactBody shows the notice + "Show artifact" when load never fires — justified
  2. WidgetFrame reveals its hidden frame after the grace window and shows the same notice + recovery — justified
  3. ArtifactThumbs grid cell becomes visible after the grace window instead of staying at opacity 0 — justified
  4. RemoteArtifactDetailPage overlays the notice + "Show artifact" on a silent blank frame — justified
  5. That overlay also shows "Couldn't render" + Retry when a re-mint rejects over a still-mounted url — justified
  6. New shared useSilentLoadWatch hook (4 counted consumers: ArtifactBody, WidgetFrame, ArtifactThumbs, RemoteArtifactDetailPage; grepped useSilentLoadWatch) — justified

Verified against base: 4 of 4 useSandboxDoc consumers exist and all reveal-on-load (grepped, 7 hits minus hook + 2 tests); docSilent genuinely arms only after load (ArtifactBody.tsx:318), so no existing mechanism covers this; grace window matches base DOC_REPORT_GRACE_MS = 3000; the i18n keys exist in en.manual.json + all locales, so "no new keys" holds; the remote page's failed ternary branch is unreachable while blobUrl is set (RemoteArtifactDetailPage.tsx:407-431); useSandboxDoc keeps the prior url on a failed mint (useSandboxDoc.ts:30). No pins deleted. Defect provenance is pointable: refs #11199, a written repro, and tests that red on base. Failure-path handling, not product shape.

[FIRST-PRINCIPLES-REVIEWED] c546888

@github-actions

github-actions Bot commented Sep 16, 2026 •

Copy link
Copy Markdown
Contributor

Opus 4.8 Review (fork) — ✅ no blocking findings

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

Review details

I've independently traced the hook state machine, all four consumers, and the useSandboxDoc contract they build on. The arming/reset logic (re-mint re-arms via the [url] reset + loadedUrl !== url guard, onLoaded clears for the current url, null url never arms), the notice/reveal guards (loadSilent && !mintFailed, iframeLoaded || loadSilent, everLoaded || loadSilent), and the RemoteArtifactDetailPage overlay's failed-wins-over-loadSilent branching all resolve correctly, and the ErrorNotice/role="status" split matches the errors-use-error-notice rule. No candidate exists to falsify and nothing groundable to 80+ surfaced under my own inspection.

No findings.

[OPUS-REVIEWED] c546888

@chenmingwei23
chenmingwei23 force-pushed the fix/silent-iframe-load-notice-11199 branch from ff527b1 to 8a7d0ca Compare September 16, 2026 11:52
@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 16, 2026
@chenmingwei23
chenmingwei23 force-pushed the fix/silent-iframe-load-notice-11199 branch from 8a7d0ca to c6edebf Compare September 16, 2026 12:01
@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 16, 2026
@chenmingwei23
chenmingwei23 force-pushed the fix/silent-iframe-load-notice-11199 branch from c6edebf to 8fc201f Compare September 16, 2026 12:25
@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 16, 2026
@chenmingwei23
chenmingwei23 force-pushed the fix/silent-iframe-load-notice-11199 branch from 8fc201f to 438ae24 Compare September 16, 2026 12:35
@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 16, 2026
@chenmingwei23

Copy link
Copy Markdown
Contributor Author

/ai-review override ux 438ae24: The only blocker is a recoverable evidence gap, not a reachable defect - the lane cannot see a screenshot. This host cannot mint a user-attachments asset (browser drag-and-drop). The code is covered by three mutation-verified tests, the PR body describes each frame, and the two Watch items are advisory and deferred to avoid a 12-locale i18n re-roll. Nothing here is unrecoverable: a maintainer can view the live control.

@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 18, 2026
…sumers

A sandbox-doc frame whose mint succeeds but whose `load` event never fires
was left permanently blank with no notice on three of the four consumers of
useSandboxDoc. Only ArtifactBody surfaced a notice + retry in that case;
WidgetFrame, ArtifactThumbs and RemoteArtifactDetailPage did not.

Lift the grace-timer affordance into a shared useSilentLoadWatch hook -- the
same one-hook-not-four rationale useSandboxDoc already documents -- and wire
the three missing consumers to it, each in the shape that fits its surface:
WidgetFrame reveals the frame and shows its existing retry notice;
ArtifactThumbs reveals the grid cell (no per-thumb retry, opening the
artifact re-mints); RemoteArtifactDetailPage overlays the notice + retry.

Tests: useSilentLoadWatch hook test (silent detection, load-clears-window,
null-url, re-mint reset) and a RemoteArtifactDetailPage render test proving
the notice appears on a silent load. Both mutation-verified.

Refs kirodotdev#11199
Refs kirodotdev#6176
@chenmingwei23
chenmingwei23 force-pushed the fix/silent-iframe-load-notice-11199 branch from 0128931 to f9a514a Compare September 18, 2026 03:17
@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 18, 2026
@chenmingwei23

Copy link
Copy Markdown
Contributor Author

/ai-review override ux f9a514a: the verdict is "cannot evaluate: missing screenshot", an evidence gap rather than a reachable defect. The exact state it cannot see -- the RemoteArtifactDetailPage overlay's failed branch after a rejecting re-mint, with the known-failure copy plus Retry -- is asserted by website/src/test/RemoteArtifactDetailPage.silentLoad.test.tsx > "keeps a recovery affordance when the re-mint rejects after a silent load", which pins that the overlay does NOT hide on failed and that the previous url survives a failed mint so the frame is never torn down. I ran the PR's three silent-load files on this rebased head: 3 files, 9 tests, all passing. The lane reports no crash, data loss, security exposure or removed guard, and the gap is recoverable -- a maintainer can view the live control. The two Watch items (notice tense on a never-loaded frame, "artifact" wording on widget surfaces) are advisory and remain deferred for 12-locale re-translation cost; they are disclosed here rather than chased.

@github-actions

Copy link
Copy Markdown
Contributor

AI-review override not recorded: keep the reason to 500 characters or fewer.

@chenmingwei23

Copy link
Copy Markdown
Contributor Author

/ai-review override ux f9a514a: verdict is "cannot evaluate: missing screenshot" -- an evidence gap, not a reachable defect. The overlay's failed branch after a rejecting re-mint is asserted by RemoteArtifactDetailPage.silentLoad.test.tsx > "keeps a recovery affordance when the re-mint rejects after a silent load", which passed on this head (3 files, 9 tests). No crash, data loss, security exposure or removed guard; the gap is recoverable on the live control.

@github-actions

Copy link
Copy Markdown
Contributor

Human judgment recorded

@chenmingwei23 marked the ux AI finding as false positive, not applicable, or explicitly accepted for f9a514a6cec35a43e24b88a7f94d5997f6766730.

verdict is "cannot evaluate: missing screenshot" -- an evidence gap, not a reachable defect. The overlay's failed branch after a rejecting re-mint is asserted by RemoteArtifactDetailPage.silentLoad.test.tsx > "keeps a recovery affordance when the re-mint rejects after a silent load", which passed on this head (3 files, 9 tests). No crash, data loss, security exposure or removed guard; the gap is recoverable on the live control.

This decision applies only to this commit. A new push requires a new judgment.

@github-actions

Copy link
Copy Markdown
Contributor

Human judgment recorded, but the following reviewer lane(s) could not be re-run automatically: UX Review. Re-run the lane's latest workflow run for f9a514a6cec35a43e24b88a7f94d5997f6766730 manually from the Actions tab.

The remote-artifact silent-mint ErrorNotice carried askAgent, but its
hand-off navigates to the chat and unmounts the whole RemoteArtifactDetailPage,
including the CommentsSidebar's unsaved draft. The three sibling ErrorNotices
on this page already keep the hand-off off for exactly this reason. Retry via
the RotateCw Btn remains, so recovery is preserved.

Addresses the upheld GPT/Opus F1 finding on this PR.
@chenmingwei23
chenmingwei23 force-pushed the fix/silent-iframe-load-notice-11199 branch from f9a514a to c546888 Compare September 18, 2026 04:52
@github-actions github-actions Bot added readiness: checking Automated validation is still running readiness: action required A blocking check or review needs attention readiness: passed Eligible automated validation passed for the current revision and removed readiness: action required A blocking check or review needs attention readiness: checking Automated validation is still running labels Sep 18, 2026
@iamwhatever
iamwhatever merged commit 99dc588 into kirodotdev:main Sep 18, 2026
128 of 129 checks passed
@github-actions github-actions Bot removed the readiness: passed Eligible automated validation passed for the current revision label Sep 18, 2026
amadsalmon pushed a commit to amadsalmon/KiroCrew that referenced this pull request Sep 22, 2026
…sumers (kirodotdev#11205)

* fix(dashboard): notify on a silent iframe load on all sandbox-doc consumers

A sandbox-doc frame whose mint succeeds but whose `load` event never fires
was left permanently blank with no notice on three of the four consumers of
useSandboxDoc. Only ArtifactBody surfaced a notice + retry in that case;
WidgetFrame, ArtifactThumbs and RemoteArtifactDetailPage did not.

Lift the grace-timer affordance into a shared useSilentLoadWatch hook -- the
same one-hook-not-four rationale useSandboxDoc already documents -- and wire
the three missing consumers to it, each in the shape that fits its surface:
WidgetFrame reveals the frame and shows its existing retry notice;
ArtifactThumbs reveals the grid cell (no per-thumb retry, opening the
artifact re-mints); RemoteArtifactDetailPage overlays the notice + retry.

Tests: useSilentLoadWatch hook test (silent detection, load-clears-window,
null-url, re-mint reset) and a RemoteArtifactDetailPage render test proving
the notice appears on a silent load. Both mutation-verified.

Refs kirodotdev#11199
Refs kirodotdev#6176

* fix(artifact): drop askAgent hand-off on remote silent-mint error

The remote-artifact silent-mint ErrorNotice carried askAgent, but its
hand-off navigates to the chat and unmounts the whole RemoteArtifactDetailPage,
including the CommentsSidebar's unsaved draft. The three sibling ErrorNotices
on this page already keep the hand-off off for exactly this reason. Retry via
the RotateCw Btn remains, so recovery is preserved.

Addresses the upheld GPT/Opus F1 finding on this PR.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fork Pull request from a fork (external contributor)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants