Skip to content

refactor(ui): render native toast content - #171817

Merged
steipete merged 17 commits into
mainfrom
solid2/rest-toast
Oct 14, 2026
Merged

steipete merged 17 commits into
mainfrom
solid2/rest-toast

Conversation

@steipete

@steipete steipete commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Toast messages still went through a Lit adapter although production callers provide strings or DOM nodes. Render them directly in Solid and use native icon names for provider feedback, removing the adapter and unused Lit content types.

The renderer memoizes message identity, then snapshots a fragment's actual child nodes for Solid to reconcile. This preserves a consumed fragment's recovery link and focus across unrelated options updates, and removes the old message when a second rich toast replaces it. The real sidebar hide action creates a fresh fragment for each notification; the regression reproduced stale old content before the correction, not a NotFoundError.

The PR also adds bounded, failure-only diagnostics around a plugin-help Settings-navigation timeout found in integration CI. It preserves the original actions, searchbox deadline, assertions, and error rethrow; it does not claim to repair that unresolved timeout.

The plain TypeScript controller continues to own dismissal deadlines, callbacks, queues, placement, and modal handoff. Host tags, CSS classes, message formatting, and lazy view loading remain unchanged. Existing catalog and responsive Details fixtures keep their assertions while waiting on their actual publication and layout boundaries.

Evidence

Proof Result
Fragment replacement regression Extended the existing recovery-layout case through the real showToast API. Before the correction, the second link appeared while the first remained connected. After the correction, the case passed all nine width/placement combinations, including exact new text, old-link removal, node identity, focus, and same-fragment options refresh (1,903 ms; Chromium; four other cases excluded).
UI types and targeted lint The Toast correction passed its focused checks. The current navigation diagnostic passed UI types, targeted lint, formatting, and whitespace checks. Its initial typecheck encountered stale installed fs-safe 0.26.4 against locked 0.26.5; a frozen install changed no manifest or lockfile, and the repeated typecheck passed.
Independent review The migration, fixture corrections, and fragment correction passed isolated P2 review. The navigation diagnostic also completed a fresh scoped-clean P2 review, including final source verification.
Current-head CI Run 38645450364 passed on da1470db6e0f5fd4b9ae98144ee9dd741884ab84: all 64 jobs completed, with 38 successful and 26 skipped. UI shard 3, plugin-help E2E shard 6, both real-Gateway shards, security-fast, and openclaw/ci-gate passed.
Prior corrected-head CI Run 38615010868, attempt 1, completed all 63 jobs on f04284f9c02a11ef0f7e90061f3d5d47a83459f9: 36 passed, 25 skipped, two failed. Both real-Gateway shards and security-fast passed. The only failed test job is mocked E2E shard 8 with the inherited People fixture failures described below; its aggregate gate remains red.
Production Knip on prior head Corrected head f04284f9c02a11ef0f7e90061f3d5d47a83459f9 passed with no findings or new ignores (11m 53.6s), after a clean-checkout and exact-head preflight.
Same-machine startup comparison Original migration comparison: exact base eda41b03 versus production candidate 8e8d89b, 348,433 → 348,455 B startup JavaScript gzip (+22 B), eight JS requests, and one 49,702 B CSS request unchanged. Raw bytes and JS after chunk-name normalization were identical. This measurement is scoped to that migration; the later fragment correction stays inside the existing lazy ToastView boundary.
Screenshots Two inspected synthetic before/after pairs below, both pixel-identical.

Prior-head CI qualification (f04284f9): all 11 failures in people-activity-card.e2e.test.ts match scheduled main run 38607531526, job 116007250417 by exact case name and error signature. Each times out after 30 seconds at selectOnlineView, line 116 (tap) or 118 (click), waiting for the exact “Online” rail button. Main commit 4fa4e7e8d6d054d7b59ecb45a2a80ce93048fdd4 deliberately renamed that button to “Users”; the fixture still expects the old label. The CI table initially classified this by job name only; every individual signature was then compared with the retained main log. Toast does not change that fixture or rail label. This is an inherited-failure qualification, not a green CI claim.

The integration consumes canonical main repair 46ed68fb425dcee69647e8a5d32c4a22259a54c7, which updates the People activity-card fixture to select “Users.” The failed run above remains prior-head evidence.

The next completed integration, run 38635818282 on 3c295df2c658d92121e2aab75018de14858aa574, finished all 64 jobs: 35 passed, 26 skipped, and three failed. UI shard 3 failed with 27 invalid-EventTarget teardown errors and the Usage overview-retention assertion. Its tested merge introduced the main-owned jsdom resource tracker; canonical repair 5e4a1bed3a86187d42997946f62d5c2518be89d5, landed through main 923e59a01e20549965381a1e72a471762981db9d, captures the owning Window and releases explicitly removed listener references. The current integration consumes that repair. Its owner reproduced both signatures before the change and passed both selected files afterward: 55 tests passed, two unrelated cases excluded. No production Usage change was required.

Mocked E2E shard 6 in that same run passed 92 files and 438 tests but timed out in the plugin-help installed-help case, waiting 30 seconds for the Settings searchbox after closing the assistant and clicking Settings. The aggregate gate also failed. The current diagnostic records the synthetic path/query, Settings-link target, bounded editor visibility, and bounded page errors only when the original operation fails. This timeout remains unexplained; no local E2E replay was run for the diagnostic. Current-head CI passes the full shard, which validates the current integration without establishing a repair of the original failure.

The Board retry fixture now uses its existing board-document fetch helper. Its exact two-document count, retry pacing, iframe identity, and no-authorization-refresh assertions remain intact. The focused Bun case passed, independent P2 review completed scoped clean, and UI shard 3 passed in the full integration CI. The original failed run counted four fetches but did not retain their URLs, so that interleaving is not claimed reproduced.

The French Workboard failure was identical to scheduled main 38590548763, job 115948443588, waiting for English “Edit board” at line 71:79. The integration consumes canonical main fix efbe8513fc85d8f49532a9153a8bd157f70dddf1; no duplicate Workboard fix is included.

Earlier CI 38555096076 failed the model-picker catalog replacement case while the Gateway recorded plugin lifecycle lease verification failing before reload. Merged diagnostic #172138 retains the previously omitted nested cause/code. Both subsequent integration runs passed both real-Gateway shards, but those passing runs do not establish a repair of the underlying lease defect. An older run also exceeded the real-Gateway job's 20-minute budget after its executed cases passed; it remains historical failed evidence.

Current integration head: da1470db6e0f5fd4b9ae98144ee9dd741884ab84, incorporating actual main 923e59a01e20549965381a1e72a471762981db9d through merge 828c6a09033860f880644f4c14a4c668f041c2a2. The seven previously reviewed PR files remain identical; only the approved plugin-help diagnostic is added. Existing Toast review, focused proof, screenshots, and Knip evidence are reused for those unchanged files and remain explicitly scoped to their tested heads. Against the actual merge base, eight files total +102/−48. The three production files go from 1,007 to 999 lines (−8); five test files go from 2,582 to 2,644 lines (+62). No dependencies or new abstractions are added. ci:full covers this shared overlay surface.

Screenshots

The baseline is eda41b03; the preserved production head is 8e8d89b. Later changes repair reviewed fixtures and fragment replacement while preserving the same host, markup, CSS, and lazy view boundary. Main's native-span test conversion is superseded by the reviewed DocumentFragment identity/focus fixture; the canonical accepted-input assertion remains after the route and bridge readiness waits. Both pairs are synthetic-only and pixel-identical.

Before provider error:
Before provider error

After provider error:
After provider error

Before mobile recovery:
Before mobile recovery

After mobile recovery:
After mobile recovery

@steipete steipete added the ci:full Keep ordinary native-locale CI selection on the next PR run. label Oct 14, 2026
@clawsweeper

clawsweeper Bot commented Oct 14, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-14T22:11:37.453046Z da1470d New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 8e8d89b163

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread ui/src/lib/toast-view.tsx Resolved
Adopt main's complete canonical environment and usage fixtures. Preserve the reviewed toast implementation while integrating lazy-view recovery cancellation and Gateway response-buffer reuse for fresh runtime proof.
Reuse the existing board-document fetch helper so the retry count tracks only board document requests. Preserve exact retry pacing, iframe identity, and authorization-refresh assertions. The focused Bun case passes; isolated review found no actionable issues. The original CI extra request URLs were not retained.
@steipete

steipete commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor Author

Coordination on the catalog E2E change in this PR: #172060 at cafa82a6967e4faa195505d445d19d07896ed717 failed real-Gateway shard 1 in Control UI catalog publication with a real Gateway > refreshes open search after publication and retains results through a failed read. The first Model search unavailable status wait timed out at line 626; the other 23 cases passed. The failure artifact shows a connected Gateway and responsive renderer, but does not retain publication.json to establish whether the injected catalog error reached the browser.

The same named case passed on scheduled main in 24.3 seconds. I am treating the failure as unresolved rather than inherited.

I see this PR now checks the successful refresh receipt and waits for an injected rejected catalog response before the status assertion. Please confirm whether you own a diagnosed repair for this failure, or whether those changes are collecting the missing evidence. I am holding edits to this E2E file; #171863 and #171846 also touch the command-palette controller, so any controller interface change should be coordinated with those owners. I can continue the reader/store investigation without competing edits.

Update: one ordinary local reproduction of the whole three-case file completed its runtime and UI builds, then exited 143 when the Vitest wrapper hit its 300,000 ms no-output watchdog before any assertion result. It produced no publication trace, so this provides no failure attribution; no rerun is planned. The file remains unchanged locally. The current version here passes real-Gateway shard 1 in run 38635818282, but I have not treated that pass or the prerequisite assertions as a diagnosed fix.

Source follow-up: the original fixture omits a real precondition. The refresh path reaches refreshPublishedModelRuntimeCatalog without wait: true, and loadFullModelCatalog uses the five-second foreground discovery limit. A resolved models.list({ refresh: true }) can therefore contain the previously published rows while discovery continues. Catalog publication also schedules the metadata refresh asynchronously; the RPC result alone does not establish that the browser received the injected failure.

I rechecked the fixture patch at da1470db6e0f5fd4b9ae98144ee9dd741884ab84. Its provider/model assertions enforce the publication precondition, and its rejected-response poll synchronizes the transport-failure precondition before asserting the UI status. Those are useful ordering/evidence corrections, although our missing failure trace still prevents claiming they explain the historical timeout. Scheduled main run 38640790586 also passes the exact case in 31.2 seconds; the latest run 38648053570 passes it again in 29.5 seconds.

Please land this reviewed fixture correction through the native workflow when ready, or split that focused correction if the wider PR remains blocked. At 2026-10-14 22:36 UTC, head da1470db6e0f5fd4b9ae98144ee9dd741884ab84 is mergeable with no pending or failed checks; real-Gateway shard 1 passed. The PR remains open without an auto-merge request. I will avoid competing edits while you own the file.

@steipete
steipete merged commit d912f0c into main Oct 14, 2026
104 checks passed
@steipete
steipete deleted the solid2/rest-toast branch October 14, 2026 23:43
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 15, 2026
* refactor(ui): render native toast content

* test(ui): await lazy toast rendering

* test(ui): await environment picker controls before measuring

* test(ui): observe route and catalog readiness boundaries

* test(ui): await terminal boot imports before readiness checks

* test(ui): preserve publication-driven usage recreation proof

* test(ui): wait for mobile details controls after resize

* test(ui): scope Board retry fetch fixture to documents

Reuse the existing board-document fetch helper so the retry count tracks only board document requests. Preserve exact retry pacing, iframe identity, and authorization-refresh assertions. The focused Bun case passes; isolated review found no actionable issues. The original CI extra request URLs were not retained.

* fix(ui): replace rich toast fragments without stale content

* test(ui): diagnose plugin settings navigation failures
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app: web-ui App: web-ui ci:full Keep ordinary native-locale CI selection on the next PR run. size: S

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant