Repository navigation
fix(dashboard): notify on a silent iframe load on all sandbox-doc consumers - #11205
iamwhatever merged 2 commits into
Conversation
GPT 5.6 Review (fork) — ✅ no blocking findings (all downgraded on adjudication)Reviewed 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 detailsBLOCKING -- website/src/components/WidgetFrame.tsx:600 -- silent-load failures bypass ErrorNotice across all four consumers Adjudication (Opus 4.8) — is blocking on each finding proportionate?F1 anchors to Conditions: (a) mint succeeds but frame never fires 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 |
UX Review (Fable 5, fork) — 🟡 CONCERNSUX-level review of 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
[UX-REVIEWED] c546888 |
Design Review (Fable 5, fork) — 🟡 CONCERNSDesign-level review of 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
[DESIGN-REVIEWED] c546888 |
First Principles Review (Fable 5, fork) — ✅ PASSPremise-level review of 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 shipsInventory (6 items) — 6 justifiedIntent: FIX — a frame whose mint succeeds but whose
Verified against base: 4 of 4 [FIRST-PRINCIPLES-REVIEWED] c546888 |
Opus 4.8 Review (fork) — ✅ no blocking findingsReviewed Review detailsI've independently traced the hook state machine, all four consumers, and the No findings. [OPUS-REVIEWED] c546888 |
ff527b1 to
8a7d0ca
Compare
8a7d0ca to
c6edebf
Compare
c6edebf to
8fc201f
Compare
8fc201f to
438ae24
Compare
|
/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. |
…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
0128931 to
f9a514a
Compare
|
/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 |
|
AI-review override not recorded: keep the reason to 500 characters or fewer. |
|
/ai-review override ux f9a514a: verdict is "cannot evaluate: missing screenshot" -- an evidence gap, not a reachable defect. The overlay's |
Human judgment recorded@chenmingwei23 marked the ux AI finding as false positive, not applicable, or explicitly accepted for
This decision applies only to this commit. A new push requires a new judgment. |
|
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 |
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.
f9a514a to
c546888
Compare
…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.
Problem / Motivation
The four consumers of the shared
useSandboxDochook handle a silent load failure inconsistently. A silent load is the caseuseSandboxDoc.faileddoes not cover: the document mint succeeds (a url is in hand) but the iframe'sloadevent 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-loadcase correctly.ArtifactBodydoes carry adocSilentgrace timer, but it covers a DIFFERENT silent condition: it arms only afterloadhas fired (loadedUrlRef.current === blobUrl), watching for a height report that never arrives. A load that never fires leaves evenArtifactBodyblank with no notice.WidgetFrameandArtifactThumbssit behind anopacity: loaded ? 1 : 0gate with no timeout, so a silent load leaves them permanently invisible;RemoteArtifactDetailPageshows 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)
load.ArtifactBody's timer only arms once a load has already fired; the other three reveal onloadalone.useSilentLoadWatchhook -- the same "one hook rather than the same effect in four components" rationaleuseSandboxDocalready 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 itsdocSilentbranch already uses, now also on a never-fires-load. Its existingdocSilent(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 thefailedbranch (a re-mint that rejects over a mounted, spent url): it renders the sharedErrorNotice("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'sfailedternary branch is unreachable while ablobUrlis 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 ofartifactBody.*already present in these files.Sites found vs sites changed: 4 consumers of
useSandboxDoc, all 4 vulnerable to the never-fires-loadcase, 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: neuteringsetSilent(true)reddens the two silent-detecting cases.ArtifactBody.neverLoad.test.tsx(new): renders the realArtifactBodywith 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 theloadSilentterm 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 iframeload), 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-
loadrepro: the/api/sandbox-docmint resolves (a url is in hand) but the/sandbox-doc/**document fetch is held open, so the frame'sloadnever fires -- the genuine state, not a faked one. Screenshots below.Screenshots / video
Every frame below was captured against the built SPA (
website/dist, rebuilt fromthis head at 2026-09-18T04:35Z) with a genuine never-fires-
loadrepro: the/api/sandbox-docmint resolves, and/sandbox-doc/**is held open and neversettled, so the frame's
loadevent never fires. Each image was opened and readbefore being labelled, so the alt text below describes the pixels.
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 whenthe re-mint rejects after a silent load": take "Show artifact", the re-mint is
answered 500, the previous spent url survives so
blobUrlstays truthy and the blankframe is never torn down, and the overlay must therefore persist under
failedandcarry 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-attachmentsasset was also wrong:gh pr edit --attachmints one, and that ishow 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:
artifactBody.*keys already shared across these files.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-loadasymmetry 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.
useSandboxDocalready 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.