Repository navigation
fix(ui): keep audit tooltip presentation lazy on plugin visits - #201677
Conversation
Preserve the Template and plugin audit explanation from #201620 while using the existing native tooltip owner. Restore the 56-request first-visit bound without widening budgets or changing translations. Co-authored-by: Patrick Erichsen <[email protected]>
|
🦞👀 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 Summary: ✅ CompletedThis 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 uses the existing native tooltip element to defer audit tooltip presentation until it is opened. Example: Open Plugins from a settled New Session with 100 ms simulated latency.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Regression provenancePossible regression — suspected (reviewed change). No predecessor PR is attributed. Merge readiness✅ Ready for maintainer review This PR is a focused repair that preserves the audit explanation while restoring lazy loading; no introduced correctness defect was found, but the failed UI check remains unattributed. Priority: P3 Before mergeNone. FindingsNone. Tests
Agent review detailsHow this fits togetherPlugin and Template pages pass release metadata to a shared renderer, which supplies translated explanation text to the native tooltip owner and retains a separate audit-report link. flowchart TD
A[Plugin page] --> C[Shared metadata renderer]
B[Template page] --> C
C --> D[Native tooltip owner]
D --> E[Presentation loaded on reveal]
C --> F[Audit report link]
Technical reviewBest possible solution: Keep the native tooltip binding and focused request assertion without changing tooltip policy, translations, or asset budgets. Do we have a high-confidence way to reproduce the issue? The static import reaches the presentation module before any tooltip opens, and the PR reports a red-on-base request assertion; no target code was executed during this review. Is this the best way to solve the issue? This is the smallest complete repair: reuse the existing lazy native owner, retain equivalent bindings, and extend the existing production-build request test. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 98537f49b9bc. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource +4, Tests +8. Total +12 across 2 files. Added test files: 0. View PR surface stats
Preflight sourceSource unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified. LabelsLabel changes:
Label justifications:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
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 November 19, 2026, 1:47 AM ET / 06:47 UTC. |
|
The failed UI shard is now diagnosed: The focused file passes normally on both this head and the CI checkout's exact main parent I am rerunning only the failed CI jobs once on the unchanged head. No budgets, timeouts, test expectations, or source have been changed to make that rerun pass. This test-clock weakness remains a main regression follow-up. ClawSweeper reviewed |
|
Merged via squash.
|
…law#201677) Preserve the Template and plugin audit explanation from openclaw#201620 while using the existing native tooltip owner. Restore the 56-request first-visit bound without widening budgets or changing translations. Co-authored-by: Patrick Erichsen <[email protected]>
What Problem This Solves
Opening Plugins loads the audit tooltip renderer before any tooltip is opened. This adds a request and breaks the existing first-visit regression check: 57 assets against a limit of 56, introduced by #201620.
User Impact
Plugins returns to its existing first-visit request bound. The security-audit explanation, translations, hover/click behavior, and separate audit link on both Template and plugin pages are preserved. No configuration or migration is needed.
Why This Change Was Made
The shared audit renderer now binds to the existing native tooltip element, like neighboring plugin controls. The Solid wrapper shares a module with the lazy presentation implementation, so statically importing it made that presentation eager. The native owner already loads it on reveal; this removes the eager dependency without adding a loader or changing budgets or locale chunking.
Credit to @Patrick-Erichsen for the audit explanation in #201620; this preserves that behavior.
Evidence
The original request-count failure reproduces on base
11b65598aa4d6. The strengthened production-build E2E assertion fails before the fix with one eager tooltip renderer request instead of zero. All 44 affected E2E cases pass after the fix, including all four route request bounds, Template audit explanations in light/dark themes, and plugin Settings. Also passed: 30 tooltip browser cases and 15 catalog-rendering cases.Five alternating production-build measurements per revision, from a settled New Session over simulated 100 ms HTTP/Gateway latency, use the existing synthetic 300-agent/1,000-catalog fixture. Ready-window requests are consistently 57 → 56; transferred asset bytes 299,089 → 294,332. Median readiness is 1,207.4 → 1,206.8 ms and renderer main-thread CPU is 127.20 → 127.81 ms. A/A CPU medians are 142.23/133.22 ms, so no latency or CPU improvement is claimed. Separate 4 KiB sampled allocation medians are 17,487,584 → 17,594,364 B; the unchanged control is 17,704,516 B. No live data was used.
Deferred offline inventory remains 874 assets. Raw bytes 11,283,547 → 11,283,542; hash-sensitive gzip 3,498,755 → 3,499,010 B. Production delta is +4 lines solely for explicit multiline native bindings; test delta +8. The renderer, policy and translations are unchanged.
Codex autoreview of the complete local patch against
11b65598aa4d6is scoped-clean through P2. The focused E2E run took 99.57 seconds wall across three files; browser cases 7.57 seconds wall and catalog cases 4.08 seconds wall. The paired asset/inventory check passes without changing any budget: normalized complete chat and New Session boot JavaScript each shrink by 162 B gzip; CSS is byte-identical. The absolute ceilings are already exceeded on the unchanged base (CSS and 21 chat requests against 20); the checker’s existing base-relative rules enforce no new count growth and at most 64 B byte variance.pnpm check:changedpasses, with existing advisory Solid warnings in the untouched capability-control renderer.