Skip to content

fix(ui): keep audit tooltip presentation lazy on plugin visits - #201677

Merged
steipete merged 1 commit into
mainfrom
steipete/perf-micro-main-red-ui-asset-bound-20260919
Nov 19, 2026
Merged

steipete merged 1 commit into
mainfrom
steipete/perf-micro-main-red-ui-asset-bound-20260919

Conversation

@steipete

Copy link
Copy Markdown
Contributor

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 11b65598aa4d6 is 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:changed passes, with existing advisory Solid warnings in the untouched capability-control renderer.

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]>
@clawsweeper

clawsweeper Bot commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

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

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@openclaw-barnacle openclaw-barnacle Bot added the app: web-ui App: web-ui label Nov 19, 2026
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor
Codex Review Summary: ✅ Completed

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

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-19T06:35:02.925935Z 3a13ed9 PR opened
ℹ️ 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.

@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Nov 19, 2026
@clawsweeper

clawsweeper Bot commented Nov 19, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

This 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.

  • Before: The reported production-build measurement fetches 57 ready-window assets, including unused tooltip presentation.
  • After: The reported measurement fetches 56 assets, with tooltip presentation deferred until reveal.

Review scores

Measure Result What it means
Overall readiness 🧂 unranked krab (1/6) The implementation is focused and source-consistent, but supplied proof does not clear the real-behavior requirement and the failing UI shard remains unexplained.
Proof confidence 🧂 unranked krab (1/6) Real behavior proof is not required for maintainer- or bot-authored pull requests.
Patch quality 🦐 gold shrimp (3/6) No actionable review findings were identified.

Product

Kind: Bug fix · Worth it: Yes · Fix scope: Complete
User problem: Opening Plugins downloads tooltip presentation before the user requests any tooltip.
Reason: The maintainer-authored repair restores an existing lazy-loading contract without changing the approved audit explanation or introducing machinery.

Regression provenance

Possible 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
Reviewed head: 3a13ed989e32fb9c33918573d90222b8d0073284

Before merge

None.

Findings

None.

Tests

  • Missing end-to-end proof: Provide a redacted current-head browser network trace against an isolated real Gateway showing no tooltip presentation request on Plugins entry and successful loading and explanation on reveal.
Agent review details

How this fits together

Plugin 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]
Loading

Technical review

Best 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

Testing

Proof path: in-process harness.

Security

None.

Evidence

What I checked:

Likely related people:

  • Peter Steinberger: Raw commit c3b57f7 adds ui/src/pages/plugins/overview.tsx:41 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: c3b57f74833d; files: ui/src/pages/plugins/overview.tsx)

PR surface

Source +4, Tests +8. Total +12 across 2 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 1 7 3 +4
Tests 1 8 0 +8
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 2 15 3 +12

Preflight source

Source unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified.

Labels

Label changes:

  • add P3: This removes one unnecessary first-visit asset request while preserving the existing interaction; no blocked user workflow or measurable latency improvement is established.
  • add rating: 🧂 unranked krab: Overall readiness is 🧂 unranked krab; proof is 🧂 unranked krab and patch quality is 🦐 gold shrimp.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Label justifications:

  • P3: This removes one unnecessary first-visit asset request while preserving the existing interaction; no blocked user workflow or measurable latency improvement is established.
  • rating: 🧂 unranked krab: Overall readiness is 🧂 unranked krab; proof is 🧂 unranked krab and patch quality is 🦐 gold shrimp.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Supply the current-head real-Gateway network evidence described above.

Rating scale

6/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.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

Reviewed November 19, 2026, 1:47 AM ET / 06:47 UTC.

@steipete

Copy link
Copy Markdown
Contributor Author

The failed UI shard is now diagnosed: chat-transcript-projection-scale.test.ts → “moves live activity to the current eligible group after replacement and run changes” expected the live headline but received []. The asset/request test and affected UI E2E passed in this run.

The focused file passes normally on both this head and the CI checkout's exact main parent 1bdaaeb388381d5cd0ee9512ff7168eb3d9e4982, using the pinned Bun fork (14/14 each). A controlled event-loop fixture delaying 1 ms real interval callbacks to 8 ms reproduces the identical assertion on that unchanged main parent. waitForSolid advances fake time only 1 ms per real poll, while Vitest imposes a 1,000 ms real-time deadline. The initial 200 ms presentation hold was introduced by 18136c960eaf70cac7ee083959c55d13d159afc2 / #198133; its immediate predecessor displays the initial headline without that hold. This is a pre-existing load-sensitive test-clock mismatch, not evidence that the tooltip change broke transcript rendering. The delayed-poll fixture is diagnostic, not a claim that the original CI scheduler was measured.

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 3a13ed989e32fb9c33918573d90222b8d0073284 with no findings and zero open checklist items. The production-build request test and 44 affected E2E cases exercise the network boundary and preserved explanation behavior; this repair does not change Gateway behavior.

@steipete
steipete merged commit 71b5e60 into main Nov 19, 2026
153 of 156 checks passed
@steipete
steipete deleted the steipete/perf-micro-main-red-ui-asset-bound-20260919 branch November 19, 2026 07:02
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Nov 20, 2026
…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]>
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 P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. size: XS status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant