Repository navigation
refactor(ui): use native async file preview boundaries - #180480
Conversation
Observe pending preview receipts through stable accessors so bridge prop batching cannot hide a new file read behind previously settled content. Keep keyed render callback arity explicit and compare boxed keys by receipt identity, preserving foreground content and scroll while sibling responses finish. Extend the selected-file retry regression to start from rendered Markdown and follow its relative link while the selected reply is held.
Integrate the official Gateway retry animation fix for the failing 140 percent text-scale case. The nine-file preview patch remains byte-identical to its reviewed form; no conflict resolution or preview logic changes were needed.
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex review: needs maintainer review before merge. What this changesThis PR moves plugin and Claws file previews onto native Solid async boundaries while retaining the dialog shell and file inventory. Example: Opening references/config.md fails, then the user clicks Retry.
Review scores
ProductKind: Refactor · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep open: this maintainer-directed refactor preserves preview ownership and has useful browser evidence; no introduced correctness or security defect was found, but required CI remains unresolved. Priority: P3 Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherPlugin and Claws owners admit Gateway reads and retain accepted content; the shared file-preview modal consumes their completion receipts and renders inventory, documents, errors, and retry controls. flowchart LR
A[User selects a file] --> B[Existing preview owner]
B --> C[Gateway read]
C --> B
B --> D[Request receipts and accepted content]
D --> E[Solid async boundaries]
E --> F[Retained preview dialog]
Technical reviewBest possible solution: Retain the shared native async boundaries and existing request owners, then land once required CI failures are resolved or properly attributed. Do we have a high-confidence way to reproduce the issue? The base's separate loading/error frames explain shell replacement, and submitted built-app captures exercise the affected states; no target code was executed during this read-only review. Is this the best way to solve the issue? The defect is presentation lifetime coupled to read status; the invariant is that loading, errors, and background completion preserve the shell while existing owners control admission and accepted content, and the diff implements that cutover without a competing owner. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against ee3f29e2cf9e. Provenance checked
TestingProof path: shipped entry point. SecurityNone. EvidenceWhat I checked:
PR surfaceSource +23, Tests +168. Total +191 across 10 files. Added test files: 1. View PR surface stats
Review metrics
Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. LabelsLabel changes:
Label justifications:
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment Reviewed October 22, 2026, 5:29 AM ET / 09:29 UTC. |
* refactor(ui): use native async file previews * fix(ui): retain file preview boundaries by request identity Observe pending preview receipts through stable accessors so bridge prop batching cannot hide a new file read behind previously settled content. Keep keyed render callback arity explicit and compare boxed keys by receipt identity, preserving foreground content and scroll while sibling responses finish. Extend the selected-file retry regression to start from rendered Markdown and follow its relative link while the selected reply is held. * test(ui): cover preview selection after unavailable entry
Solid 2 checklist (touched production files)
onCleanuponCleanup2 → 1,onSettled2 → 3LoadingandErroredeach 1 → 2action/createOptimisticlazycreateComponentcallsLoading/RevealcreateRoot/getOwner/runWithOwnerThe remaining
onCleanupbelongs to per-node target tracking. The two pending regions intentionally reveal independently: known inventory stays useful while a document loads. The per-file active bit records owner admission/deduplication, not UI loading state. Production LOC across five path entries: 1,434 → 1,457 (+23). Test LOC across five path entries, including a rename: 1,615 → 1,783 (+168).Problem and change
Plugin skill previews and Claws file previews kept loading/error fields beside their requests. Error and retry replaced the modal shell and file rows. This change feeds stable request accessors into Solid's native async boundaries, preserving the mounted dialog shell and file inventory while the selected document loads or fails. Relative Markdown links, retry, foreground selection, and background completion retain their existing behavior.
The plain TypeScript owners retain request admission, source/version validation, deduplication, accepted content, and stale-result checks. Inventory and selected-document completion receipts are released on close, replacement, and disposal even when the transport is still pending. A regression test closes a held Claws preview, awaits its public readiness receipt, reopens, and confirms the old response cannot replace the new content. Retry and relative links keep their existing events. Both callers use the component returned by the bridge; the redundant registration wrapper and raw-element declaration are removed. Tags, classes, routes, and lazy boundaries stay intact.
Supersedes #179732 after integrating current main. No dependencies changed.
Proof
Current integrated base:
e4798b27c759682499a23ce94127af4fa59af524. Head:300a11807df1f24972d382afeffd2bca43ea0b7d. The one Catalog merge conflict kept Preview cancellation and removed the retired search timer; no other authored changes.The built-app capture verifies initial inventory loading, selected-file failure and Retry, Claws instruction loading, held relative-link navigation, retired reply isolation, scroll 300 → 300 after sibling completion, and reconnect close/reopen. The modal shell retains identity through failure/Retry; the baseline replaces it. Individual file row identity and trigger-focus restoration are unchanged and are not claimed by this refactor. One initial baseline capture stopped because its script incorrectly required the new shell-retention behavior on the base; it was corrected to measure that behavior independently, then both sides passed.
Node was used only for the standalone Playwright capture; unit tests used pinned Bun. Application chunk hashes differ with the source changes; package fingerprint equality and emitted plugin IDs are distinct checks. Full assigned-scope AST totals will be reported after the remaining family merges; these counts cover this complete Preview family.
The first CI attempt timed out in
chat-details-panel-navigation.e2e.test.ts > opens Files from View all and dismisses Details in Chat and Dashboardwhile waiting for the workspace side panel. That exact case passed once on this head and once on basee4798b27c759; the tested merge has identical Chat/App/test source to this head. The timeout diagnostic showed a healthy connected renderer. No causal source defect was established, so the original failure remains recorded and one supported failed-job retry passed without changing the head. Passing replays do not establish an inherited failure.Screenshots
Five pairs below were captured on
dfc65ff/5b536963. They remain valid for the unchanged Preview rendering: modal and Skill Preview blobs are byte-identical on the integrated head, and all six Claws Preview excerpts match. Current combined behavior is additionally covered by 31 Claws tests. These are retained captures, not new integrated-head screenshots.Merged as
361a5ec92cc022a880e8aaac905a4d1e31d62348. All ten changed paths (including two deletions) match the reviewed head and verified main revision. Native merge reconciliation confirms the exact head; the SSD checkout is retained for coordinator cleanup.