Skip to content

improve(ui): defer offscreen plugin row rendering - #125585

Merged
steipete merged 1 commit into
mainfrom
perf/control-ui-plugin-row-containment
Aug 18, 2026
Merged

steipete merged 1 commit into
mainfrom
perf/control-ui-plugin-row-containment

Conversation

@steipete

@steipete steipete commented Aug 18, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • defer layout and paint work for offscreen plugin rows with content-visibility: auto
  • provide a 73 px remembered intrinsic block size so the full catalog keeps stable scroll geometry before rows become visible
  • preserve the complete installed catalog in the DOM, including existing search, grouping, details, and mutation behavior

Performance

Matched production Chromium benchmark on current main (916aca13f34), using 1,000 realistic installed plugin records (251,611-byte Gateway payload), seven fresh browser contexts per variant, and a cold direct navigation to /settings/plugins:

Median Current main This PR Change
Ready 854.4 ms 713.2 ms -16.5%
Startup long-task total 389 ms 224 ms -42.4%
Longest startup task 215 ms 120 ms -44.2%
Rendered plugin rows 1,000 1,000 unchanged
DOM elements 11,310 11,313 unchanged

The benchmark also searched to one exact result, restored the full catalog, scrolled to plugin 1,000, and opened its detail view successfully in both variants.

Scaling checks on the same builds were intentionally more modest: at 250 plugins, ready changed 581.9 → 571.7 ms while startup long-task time fell 122 → 59 ms; at 100 plugins, ready changed 534.0 → 520.1 ms and long-task time was neutral at 50 → 52 ms. This PR claims the large-catalog improvement, not a latency win for ordinary small catalogs.

Validation

  • pnpm --dir ui exec vitest run --config vitest.config.ts src/pages/plugins/view.test.ts src/pages/plugins/plugins-page.test.ts src/pages/plugins/plugins-page.routing.test.ts src/pages/plugins/route-data.test.ts — 70/70 passed
  • Plugins production Chromium E2E — 6/6 passed, including browse, search, install, enable, policy warning, read-only, failure, and retry flows
  • pnpm ui:build — passed, including Control UI bundle/performance budgets
  • pnpm exec stylelint --config config/stylelint.config.mjs ui/src/styles/plugins.css — passed
  • branch autoreview — clean, correctness 0.99
  • TruffleHog filesystem scan — 0 verified or unverified secrets

@clawsweeper

clawsweeper Bot commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

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

@steipete steipete self-assigned this Aug 18, 2026
@openclaw-barnacle openclaw-barnacle Bot added app: web-ui App: web-ui size: XS maintainer Maintainer-authored PR labels Aug 18, 2026
@clawsweeper clawsweeper Bot added P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Aug 18, 2026
@clawsweeper

clawsweeper Bot commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed August 18, 2026, 12:28 AM ET / 04:28 UTC.

ClawSweeper review

What this changes

The PR adds browser containment to plugin catalog rows so offscreen rows defer rendering while retaining a 73-pixel fallback height for scrolling.

Merge readiness

⚠️ Ready for maintainer review - 1 item remains

No blocking patch defects found. This maintainer-authored Control UI performance PR should remain open for routine exact-head CI and maintainer review.

Priority: P3
Reviewed head: 3ff773e48b229ea9982b909ca0a93ebb096b8d28

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused, source-aligned CSS optimization with strong stated browser validation and no actionable correctness finding.
Proof confidence 🌊 off-meta tidepool Not applicable: This maintainer-authored PR is not subject to the external-contributor proof gate; its body nevertheless records after-fix Chromium benchmark and interaction evidence.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: This maintainer-authored PR is not subject to the external-contributor proof gate; its body nevertheless records after-fix Chromium benchmark and interaction evidence.
Evidence reviewed 6 items Changed rendering boundary: The two declarations apply only to plugin-row articles, preserving the existing row markup and handlers.
Caller and interaction owner: The page controller passes catalog state and mutation handlers into the view, while the view renders each installed plugin as the contained row with its existing detail and action handlers.
Shared layout contract: Plugin rows inherit the settings-row flex layout, padding, and minimum height; the containment is attached at the row boundary rather than changing the data or action layer.
Findings None None.
Security None None.

How this fits together

The Control UI receives the installed plugin catalog from the Gateway and renders it as searchable, actionable settings rows. The change affects browser layout and paint work for large catalogs without altering catalog data or plugin mutations.

flowchart LR
  A[Gateway plugin catalog] --> B[Control UI page controller]
  B --> C[Plugin list view]
  C --> D[Settings rows]
  D --> E[Offscreen row containment]
  E --> F[Search, actions, and details]
Loading

Before merge

  • Complete next step (P2) - No repair lane is needed because the review found no actionable defect; retain normal exact-head CI and maintainer review.
Agent review details

Security

None.

PR surface

Source +2. Total +2 across 1 file.

View PR surface stats
Area Files Added Removed Net
Source 1 2 0 +2
Tests 0 0 0 0
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 1 2 0 +2

Review metrics

Metric Value Why it matters
Production vs test LOC production +2, tests +0 The small CSS-only addition reuses an existing Control UI containment pattern and does not add a data, configuration, or API surface.

Technical review

Best possible solution:

Keep containment at the shared plugin-row boundary and land it after the exact-head checks complete green.

Do we have a high-confidence way to reproduce the issue?

Not applicable: this is a performance improvement, and the PR body provides a concrete Chromium benchmark plus catalog interaction checks rather than a reported defect reproduction.

Is this the best way to solve the issue?

Yes. Applying containment at the existing plugin-row selector preserves the page controller, catalog data, search, actions, and detail flow while targeting the repeated browser work directly.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 9de3ca5fc93d.

Labels

Label changes:

  • add P3: This is a narrowly scoped Control UI rendering-performance improvement with no demonstrated functional regression.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: This maintainer-authored PR is not subject to the external-contributor proof gate; its body nevertheless records after-fix Chromium benchmark and interaction evidence.

Label justifications:

  • P3: This is a narrowly scoped Control UI rendering-performance improvement with no demonstrated functional regression.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: This maintainer-authored PR is not subject to the external-contributor proof gate; its body nevertheless records after-fix Chromium benchmark and interaction evidence.

Evidence

What I checked:

  • Changed rendering boundary: The two declarations apply only to plugin-row articles, preserving the existing row markup and handlers. (ui/src/styles/plugins.css:176, 3ff773e48b22)
  • Caller and interaction owner: The page controller passes catalog state and mutation handlers into the view, while the view renders each installed plugin as the contained row with its existing detail and action handlers. (ui/src/pages/plugins/view.ts:795, 3ff773e48b22)
  • Shared layout contract: Plugin rows inherit the settings-row flex layout, padding, and minimum height; the containment is attached at the row boundary rather than changing the data or action layer. (ui/src/styles/settings.css:286, 3ff773e48b22)
  • Existing containment precedent: The UI already uses the same content-visibility and remembered intrinsic block-size pattern for large file preview content. (ui/src/components/file-preview-modal.ts:374, 3ff773e48b22)
  • Behavior coverage: The existing browser test exercises plugin browse, keyboard detail opening, search, install, enable, removal, retry, and responsive layout; the PR body additionally reports an after-fix 1,000-row Chromium benchmark and final-row/detail interaction. (ui/src/pages/plugins/plugins.e2e.test.ts:444, 3ff773e48b22)
  • Feature provenance: Current-main blame ties the pre-existing plugin-row structure to the recent Control UI change, so the selected containment point is the established row owner rather than a downstream workaround. (ui/src/styles/plugins.css:176, 49cdd5425929)

Likely related people:

  • steipete: The current-main blame for the plugin-row selector points to this contributor's recent Control UI refactor, and the same contributor opened this PR. (role: recent Control UI row owner; confidence: high; commits: 49cdd5425929; files: ui/src/styles/plugins.css, ui/src/pages/plugins/view.ts)

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

@steipete
steipete force-pushed the perf/control-ui-plugin-row-containment branch from 3ff773e to a92f212 Compare August 18, 2026 04:38

Copy link
Copy Markdown
Contributor Author

Rebased onto current main (ca8bd59df50) after #125539 landed and repeated the matched production-Chromium benchmark on the exact new base: 826.3 → 716.3 ms ready (-13.3%), 375 → 238 ms startup long-task total (-36.5%), and 207 → 124 ms longest task (-40.1%). Both variants retained 1,000 rows and successfully searched, scrolled to row 1,000, and opened its details. Exact-head plugin unit tests (70/70), production Chromium E2E (6/6), and stylelint pass.

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Aug 18, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event exact_review_queue).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@steipete
steipete force-pushed the perf/control-ui-plugin-row-containment branch from a92f212 to 6145b25 Compare August 18, 2026 04:43

Copy link
Copy Markdown
Contributor Author

Final exact-head update: rebased onto latest main (916aca13f34); the diff remains exactly the two CSS declarations in plugins.css. The repeated seven-run matched benchmark on this base/head measured ready 854.4 → 713.2 ms (-16.5%), startup long-task total 389 → 224 ms (-42.4%), and longest task 215 → 120 ms (-44.2%), with all 1,000 rows retained and the final-row details flow passing in both variants. The prior head’s only CI failure was an unrelated Chat geometry exact-equality flake of 0.000015 px.

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Aug 18, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event exact_review_queue).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@steipete
steipete merged commit e6a427c into main Aug 18, 2026
104 checks passed
@steipete
steipete deleted the perf/control-ui-plugin-row-containment branch August 18, 2026 04:50
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 maintainer Maintainer-authored PR P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. 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.

2 participants