Skip to content

test(control-ui): add a Team-scale cold-load benchmark - #170033

Merged
steipete merged 4 commits into
mainfrom
steipete/coldload-team-scale-bench
Oct 12, 2026
Merged

steipete merged 4 commits into
mainfrom
steipete/coldload-team-scale-bench

Conversation

@steipete

@steipete steipete commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

Related: #142341

What Problem This Solves

The small Control UI cold-load fixture misses the update volume of a signed-in dashboard deep-link reload at Team scale.

User Impact

This adds a reusable synthetic benchmark and browser fixture for performance work; it does not change runtime UI behavior. It never connects to a real account or Gateway.

Why This Change Was Made

The recorded campaign census had roughly 1,500 Lit updates and 93 RPCs, while the earlier small synthetic fixture produced roughly 35 renders. This fixture includes 300 sessions, 30 off-page pins, 34 owners, 120 people, six agents and UI plugins, 240 transcript messages, 12 inline widgets, and separately delivered catalog/presence frames. The runner builds production assets and records Chrome traces, source-mapped CPU profiles, Lit updates, RPC bytes, and automated filmstrip transitions.

The browser composition is registered in the existing RELEASE_ONLY_UI_TEST_FILES tier. Automatic CI omits it when UI or fixture dependencies select it; the existing exception still runs directly edited test files. Full manual/release validation and an explicit pnpm test ui/src/e2e/team-scale-cold-load.e2e.test.ts --maxWorkers=1 invocation retain it. The reusable fixture stays in the normal UI TypeScript graph.

The initial three-run Sessions baseline at 488c0a3850fc reproduced 1,091–1,104 Lit updates and 85–86 RPCs. Median renderer busy time was 3,263 ms. The committed benchmark guide records that initial baseline; the historical measurements below use fixture head e2f7ddae04da, based on main 823ba031f587.

Current baseline and rejected CPU experiment

Blacksmith Testbox tbx_01m4rv6paf075hqwcrcdcxh4g9, identical production runner, 35 ms reply latency, 4 ms frame spacing, five baseline reloads and five candidate reloads:

Metric Baseline Post-layout scroll candidate
Main-thread busy time, median 3,244 ms 3,996 ms
Long tasks 14 18
Longest task 274 ms 302 ms
Forced layouts 37 38
Forced-layout time 327 ms 482 ms
Navigation to settle, including 750 ms quiet window 4,131 ms 4,871 ms
Lit updates 1,094 1,099
Solid flush inclusive sampled time 629 ms 835 ms
RPC count / request + response bytes 85 / 942,400 85 / 942,400
Filmstrip transition groups 5 5

The candidate moves shared scroll-state reads into ResizeObserver delivery and removes redundant sidebar invalidations. It is not included in this PR and will not be published on this evidence. Although an earlier same-box comparison showed an 8.1% busy-time improvement, this final-head comparison did not reproduce it. Three restored-baseline controls on the same current box returned to 2,760 ms median busy time / 328 ms forced-layout time. The candidate removes the scrollHeight sample but moves expensive geometry work to other readers; it does not establish a repeatable reload improvement. This is a negative benchmark result, not a performance-fix claim.

The current baseline's five largest source-attributed sampled self-time entries, excluding browser program/GC buckets:

Rank Call site Median self time Follow-up
1 scroll-state-observer.ts:19, scrollHeight 117 ms Post-layout candidate rejected above
2 Solid DOM template construction, @solidjs/web/dist/web.js:431 77 ms Chat render/eager menu lane
3 Lit template DOM construction, lit-html.js:6 53 ms Template construction / render volume
4 Lit template parsing, lit-html.js:6 45 ms Template construction / render volume
5 widget-theme.ts:51, getPropertyValue 39 ms Repeated theme token reads

With the candidate, the leading geometry call site becomes the panel-slot width read in chat-sidebar-region.runtime.tsx:241 (115 ms). Source-attributed CPU samples and browser timings vary; compare repeated captures on the same hardware. Automated filmstrip groups are not equivalent to the campaign's manually labeled visual states.

Online reload currently returns to Sessions when live data settles before the cached sidebar snapshot resolves. The Online run deliberately fails rather than mislabeling a Sessions measurement. The browser fixture opens Online explicitly and verifies all 120 people.

Evidence

The Team-scale browser test previously passed in a standalone invocation in 17.73 s wall time, including the production build (4.95 s test time), on Blacksmith tbx_01m4rfdj3v3whn0m1br52ah0wb. A later shared-build run of that same case took 3.617 s; its selected CI job took 83 s. These are measured invocation, case, and job times respectively, not interchangeable timings.

The tier change extends the existing CI planner assertions for default omission, direct-test-edit inclusion, and full validation selection. Formatting and diff checks pass. The pushed head is c337f7552b4132b3285453ab3bef8c3049f1cc8c, rebased onto main a7c6c126faed. CI on this exact head passed, including normal compilation/type-checking of the fixture and the selected browser tests. On this head, the Team-scale test file took 3.356 s (its single case: 3.199 s); the selected UI E2E job took 63 s. Validation uses normal CI selection; there are no application-runtime changes requiring another full UI run.

Independent review found no actionable P0–P2 findings in the tier change.

The required production-LOC command reports +1,328 / −0 lines across six tooling/fixture files. Runtime application changes: zero lines. This growth implements the explicitly requested reusable fixture and measurement contract. No schema, configuration option, or dependency changes.

Limitations: mocked Gateway; tiny synthetic plugin modules; service workers blocked; no HTTP authentication/proxy or server CPU measurement. CPU/profile instrumentation adds overhead, so compare identical runner settings on the same hardware.

Synthetic Team-scale dashboard reload fixture

@clawsweeper

clawsweeper Bot commented Oct 12, 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 app: web-ui App: web-ui scripts Repository scripts size: XL labels Oct 12, 2026
@clawsweeper clawsweeper Bot added P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Oct 12, 2026
@clawsweeper

clawsweeper Bot commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

Adds a shared Team-scale Control UI fixture, a production-bundle cold-load benchmark, and release-tier browser coverage.

Example: Measure a dashboard reload with 300 sessions, 30 off-page pins, 120 people, and 12 inline widgets.

  • Before: The small synthetic fixture substantially underrepresented rendering activity.
  • After: The benchmark records roughly 1,100 Lit updates alongside renderer timings, CPU attribution, RPC bytes, and filmstrip transitions.

Review scores

Measure Result What it means
Overall readiness 🦞 diamond lobster (5/6) Useful benchmark tooling with directly relevant browser evidence, independent accounting contracts, appropriate CI placement, and no actionable findings.
Proof confidence 🦞 diamond lobster (5/6) ✨ media proof bonus Sufficient (screenshot): The benchmark CLI builds production assets and reloads the synthetic dashboard in Chromium; recorded repeated captures report renderer, CPU, RPC, and visual-transition results, and the inspected screenshot confirms rendered transcript and widgets. This proves the benchmark workload, not live authentication, server performance, or the linked presentation fix.
Patch quality 🦞 diamond lobster (5/6) No actionable review findings were identified.

Product

Kind: Test only · Worth it: Yes
User problem: Performance investigations using the small fixture miss the rendering and RPC volume of a large signed-in dashboard reload.
Reason: Maintainer-directed tooling supplies a distinct reusable workload, records unsuccessful experiments honestly, and keeps the broad browser composition in the established release tier.

Merge readiness

✅ Ready for maintainer review

Keep open: this PR provides useful, maintainer-directed performance tooling, and inspection found no actionable introduced defect.

Priority: P3
Reviewed head: c337f7552b4132b3285453ab3bef8c3049f1cc8c

Before merge

None.

Findings

None.

Agent review details

How this fits together

The developer benchmark feeds synthetic Gateway responses and events into the production Control UI in Chromium, then exports traces, profiles, screenshots, and measurement summaries.

flowchart LR
  A[Team scale fixture] --> B[Mock Gateway and scheduled frames]
  B --> C[Production Control UI in Chromium]
  D[Loopback sandbox host] --> C
  C --> E[Browser probes and Chrome profiling]
  E --> F[Trace summaries and artifacts]
Loading

Technical review

Best possible solution:

Retain the reusable benchmark and release-tier composition, with measurements explicitly limited to the synthetic renderer workload.

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

This is measurement infrastructure rather than a bug fix; supplied benchmark runs exercise the intended production-browser workload, and no target code was executed during review.

Is this the best way to solve the issue?

The shared fixture and existing production-build, mock-Gateway, sandbox, and CI owners provide a coherent measurement path without duplicating application behavior.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 529b4d75b703.

Provenance checked

Testing

Proof path: shipped entry point.

Security

None.

Evidence

What I checked:

  • Verified introduced change: The pinned introduction contains benchmark tooling, fixtures, tests, documentation, and one release-tier inventory addition; it contains no application-runtime patch. (scripts/bench-control-ui-cold-load.ts:199, c337f7552b41)
  • Existing CI owner retained: The new composition joins the existing release-only inventory. The planner preserves direct-test-edit inclusion and full-validation coverage while excluding dependency-selected release compositions. (scripts/lib/ci-proof-test-inventory.mts:24, c337f7552b41)
  • Browser composition: The browser case exercises dashboard deep-link rendering, 30 pins outside the first roster page, plugin navigation, 120 online people, and production sandboxed widgets. (ui/src/e2e/team-scale-cold-load.e2e.test.ts:94, c337f7552b41)
  • Supplied behavior evidence inspected: The directly inspected dashboard screenshot shows synthetic transcript and widget rendering; the PR records repeated production-runner captures and explicitly rejects an unrepeatable performance experiment. Related-issue screenshots do not prove this benchmark. Preparation of that issue's video failed with 'ffprobe failed: spawnSync ffprobe ENOENT'; it is not needed for this verdict. (scripts/bench-control-ui-cold-load.md:65, c337f7552b41)
  • Distinct contribution and linked discussion: Control UI startup reveals several mismatched loading layouts in succession #142341 concerns coordinated startup presentation, with additional observations from vyctorbrzezowski. This PR supplies measurement infrastructure and correctly uses Related rather than claiming to resolve that issue; searches also found separate rendering and cached-transcript work.
  • Current-main ownership: Feature history shows sustained work by Peter Steinberger on UI fixture lifecycle, reproducible captures, renderer readiness, and CI selection; current-main blame independently verifies an authored inventory line. (scripts/lib/ci-proof-test-inventory.mts:14, 235df0bd2196)

Likely related people:

  • Peter Steinberger: Raw commit 235df0b adds scripts/lib/ci-proof-test-inventory.mts:14 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 235df0bd2196; files: scripts/lib/ci-proof-test-inventory.mts)

PR surface

Tests +884, Docs +87, Other +698. Total +1669 across 10 files. Added test files: 4.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 6 885 1 +884
Docs 1 87 0 +87
Config 0 0 0 0
Generated 0 0 0 0
Other 3 698 0 +698
Total 10 1670 1 +1669

Review metrics

Metric Value Why it matters
Tooling versus test growth Tooling +698/-0 LOC; tests and fixtures +885/-1 LOC Excludes the 87-line guide; growth implements the opt-in measurement pipeline and shared workload without expanding application-runtime code.
Benchmark options 5 benchmark-only CLI options Runs, latency, frame spacing, sidebar view, and output directory configure the developer benchmark without adding Gateway settings.

Labels

Label changes:

  • add rating: 🦞 diamond lobster: Overall readiness is 🦞 diamond lobster; proof is 🦞 diamond lobster and patch quality is 🦞 diamond lobster.
  • remove rating: 🐚 platinum hermit: Current PR rating is rating: 🦞 diamond lobster, so this older rating label is no longer current.

Label justifications:

  • P3: Developer measurement infrastructure and release-tier coverage introduce no runtime user-behavior change.
  • rating: 🦞 diamond lobster: Overall readiness is 🦞 diamond lobster; proof is 🦞 diamond lobster and patch quality is 🦞 diamond lobster.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.
  • proof: sufficient: Contributor real behavior proof is sufficient.
  • proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence.

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.

History

Review history (7 earlier review cycles)
  • reviewed 2026-10-12T17:17:36.154Z sha 79c8a05232e1bd392b53fae9f0bd20d64bb054b3 :: needs maintainer review before merge. :: none
  • reviewed 2026-10-12T17:46:51.608Z sha 5cf2044c77fb0cdd6cb201ae366e402bf0349bf2 :: needs maintainer review before merge. :: none
  • reviewed 2026-10-12T17:53:56.850Z sha 5cf2044c77fb0cdd6cb201ae366e402bf0349bf2 :: needs changes before merge. :: none
  • reviewed 2026-10-12T18:27:37.725Z sha e2f7dda :: needs maintainer review before merge. :: none
  • reviewed 2026-10-12T18:57:41.530Z sha e2f7dda :: needs maintainer review before merge. :: none
  • reviewed 2026-10-12T20:05:55.564Z sha e2f7dda :: needs maintainer review before merge. :: none
  • reviewed 2026-10-12T20:25:06.601Z sha e2f7dda :: needs maintainer review before merge. :: none

Reviewed October 12, 2026, 4:58 PM ET / 20:58 UTC (Revision 8).

@steipete
steipete force-pushed the steipete/coldload-team-scale-bench branch from 79c8a05 to 5cf2044 Compare October 12, 2026 17:39
@clawsweeper clawsweeper Bot added status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. and removed status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Oct 12, 2026
@steipete
steipete force-pushed the steipete/coldload-team-scale-bench branch from 5cf2044 to e2f7dda Compare October 12, 2026 18:10
@clawsweeper clawsweeper Bot added status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. proof: sufficient ClawSweeper judged the real behavior proof convincing. and removed status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. labels Oct 12, 2026
Add a reusable synthetic workload and production-bundle renderer measurements for dashboard deep-link reloads. Preserve raw traces, mapped CPU samples, RPC accounting, and filmstrip transitions for campaign comparisons.
@steipete
steipete force-pushed the steipete/coldload-team-scale-bench branch from e2f7dda to c337f75 Compare October 12, 2026 20:50
@clawsweeper clawsweeper Bot added rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. and removed rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. labels Oct 12, 2026
@steipete
steipete merged commit 5559404 into main Oct 12, 2026
133 of 134 checks passed
@steipete
steipete deleted the steipete/coldload-team-scale-bench branch October 12, 2026 21:14
This was referenced Oct 15, 2026
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. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. scripts Repository scripts size: XL 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