Skip to content

test(ui): avoid app boot in MCP surface fixture - #178709

Merged
steipete merged 1 commit into
mainfrom
solid2/w-test-speed-ui-mcp-fixture
Oct 20, 2026
Merged

steipete merged 1 commit into
mainfrom
solid2/w-test-speed-ui-mcp-fixture

Conversation

@steipete

@steipete steipete commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

The responsive layout suite's MCP App background case loads the full app, then discards its body and mounts a small component fixture. In full UI run 39477098124, that case took 10.536 seconds; the file took 37.754 seconds. App startup is incidental to its two iframe-background assertions.

Why This Change Was Made

Serve one empty same-origin document for this fixture's initial navigation. Keep the real MCP App registration, its component-owned CSS, application context, both component mounts, and both exact color assertions. The one-use route is page-scoped; module requests still go to the existing Vite server. No production code, test case, assertion, geometry wait, browser isolation, or dependency changes.

The accepted tradeoff is removing incidental shell startup from a component CSS fixture. The suite's actual app tests continue to exercise startup. Static relative UI imports avoid 311 boot-only files; that count excludes package/dynamic imports and is not a measured request count or speedup.

Evidence

Acceptance requires all unchanged responsive cases to pass and measured improvement in the same file/case on CI. Local proof passed once: frozen-lockfile install, pnpm tsgo:ui, targeted type-aware lint/format, and pnpm test ui/src/pages/chat/chat-responsive.browser.test.ts --maxWorkers=1 on the pinned default Bun runtime. All 66 local cases passed, including the three extra WebKit image-alignment cases skipped on Linux (63 baseline cases). Vitest took 61.54 s; wrapper 68.47 s. The MCP case took 2.292 s locally; comparing it directly with a different CI host would not establish a speedup. Exact-head CI unit results are now available below; all 14 full UI gates passed. Independent P0–P2 review found no actionable issue; the simplification pass kept only the one-use document fixture.

Metric Before After
Responsive file wall / body 40.934 s / 39.482 s (latest scheduled main) 27.691 s / 26.209 s
MCP background case 10.219 s (latest scheduled main) 4.311 s
Emitted Linux cases 63 63 retained; 66/66 local incl. WebKit
MCP exact color assertions 2 2, unchanged
Helper LOC 178 188
Production LOC, startup bytes and CSS Unchanged Unchanged

Concurrent case durations do not add up to file or shard wall time. No shard saving is claimed from the historical baseline alone; full-unit step observations will be reported separately. No product visual change. Solid production refactor-checklist counts remain unchanged. No local E2E or app build under the campaign budget.

Exact-head CI39482614583, unit2 job118835318491 passed the same63names on merge1881ca94 (head3d18a370 into3508eba1). Latest completed-main responsive file was40.934 s/body39.482 s and its MCP case10.219 s; candidate27.691/26.209/4.311 s remains below both full-workload observations. Collection stayed about1.4 s. The same656-file unit inventory had a383 s Test step; no aggregate saving is attributed to this single case.

Latest completed scheduled-main shard comparison (39476345087): actual Test Control UI step 416 → 383 s (observed −33 s), with identical 656-file inventories. Both compared unit2 jobs passed. This is observed whole-shard elapsed, not causal savings assigned to this diff, and is not summed with overlapping module wall spans.

Full exact-head run 39482614583 completed successfully with all 14 UI jobs passing. Merged as 994480ac503f791cde1a72fb2a89ef74e5c9205f, verified reachable from origin/main.

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

clawsweeper Bot commented Oct 20, 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.

@steipete
steipete marked this pull request as ready for review October 20, 2026 19:20
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 20, 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-20T19:23:10.660373Z 3d18a37 Draft marked ready
ℹ️ 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 P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. 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 20, 2026
@clawsweeper

clawsweeper Bot commented Oct 20, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

This PR serves an empty same-origin document before mounting the MCP component fixture, avoiding incidental application startup.

Example: The browser test checks dashboard and inline MCP iframe backgrounds.

  • Before: The fixture starts the application before replacing its body.
  • After: The fixture imports the real component directly and retains the expected rgb(12, 34, 56) and transparent backgrounds.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) The patch is focused and preserves the tested contracts, while the performance benefit awaits comparable measurements.
Proof confidence 🦐 gold shrimp (3/6) This maintainer-authored test-only change reports a passing 66-case local browser run; comparable CI timing for the changed fixture remains pending.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Test only · Worth it: Yes · Fix scope: Complete
User problem: Maintainers pay application startup cost for a component background assertion.
Reason: The author has accepted the narrower fixture boundary, and inspection confirms the original component-context repair and independent color expectations remain intact.

Merge readiness

✅ Ready for maintainer review

Keep open: this maintainer-authored PR makes a focused test-fixture improvement, with no actionable correctness or security findings.

Priority: P3
Reviewed head: 3d18a37035271dd819b0bd0d3f2c228f9c344057

Before merge

None.

Findings

None.

Tests

  • Missing end-to-end proof: No additional product E2E is needed for this test-only change; comparable before-and-after CI timing remains outstanding.
Agent review details

How this fits together

The responsive browser suite loads UI modules from its Vite server, mounts the MCP component inside an application-context fixture, and reads computed iframe colors.

flowchart LR
  A[Responsive browser test] --> B[One-use document route]
  B --> C[Same-origin empty page]
  C --> D[Real MCP component and context]
  D --> E[Computed background assertions]
Loading

Technical review

Best possible solution:

Keep the empty document local to this fixture while preserving the existing component, stylesheet, context provider, and assertions.

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

Source inspection confirms the original fixture boots the application and then replaces its body; no target code was executed during this read-only review.

Is this the best way to solve the issue?

The change removes unnecessary work at the existing fixture owner without adding a parallel renderer or weakening the assertions.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 52714b572789.

Provenance checked

  • MCP browser fixture navigation and application context keeps the original intent (7158f2b: Repair missing application context after the MCP Solid cutover while retaining real component registration and assertions.)

Testing

Proof path: in-process harness.

Security

None.

Evidence

What I checked:

  • Verified introduced change: The pinned introduction adds only a page-scoped route with times: 1; navigation, module imports, and provider mounting remain unchanged. (ui/src/pages/chat/chat-layout.browser.test-support.ts:165, 3d18a3703527)
  • Distinct component contracts retained: The caller still mounts both dashboard and inline cases and asserts their exact background colors; the real component imports its own stylesheet. (ui/src/pages/chat/chat-responsive.browser.test.ts:1205, 3d18a3703527)
  • Original fixture intent: The fixture introduction repaired missing Solid application context while preserving real registered components and assertions; this PR retains that repair. (ui/src/pages/chat/chat-layout.browser.test-support.ts:164, 7158f2b1df01)
  • Current-main behavior: Fetched main still navigates to the application document before constructing the component fixture, so the proposed optimization remains distinct. (ui/src/pages/chat/chat-layout.browser.test-support.ts:165, 52714b572789)
  • Recorded direction and validation: The maintainer-authored body explicitly accepts removing incidental shell startup and reports all 66 local browser cases passing; the inspected exact-head checks still include queued and running jobs. (3d18a3703527)
  • Inspection limits: The installed Solid cheatsheet is absent, and an extended historical content search encountered an unavailable promisor object; the introduced diff, fixture introduction, current-main fixture, and caller were directly readable.

PR surface

Tests +10. Total +10 across 1 file. Added test files: 0.

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

Labels

Label changes:

  • add P3: This is a contained test-runtime improvement with no production behavior change.
  • add rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Label justifications:

  • P3: This is a contained test-runtime improvement with no production behavior change.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • 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.

  • Confirm the unchanged responsive suite passes and the existing CI measurements show improvement for the file and MCP case.

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 October 20, 2026, 3:35 PM ET / 19:35 UTC.

@steipete
steipete enabled auto-merge (squash) October 20, 2026 19:38
@steipete
steipete merged commit 994480a into main Oct 20, 2026
171 of 175 checks passed
@steipete
steipete deleted the solid2/w-test-speed-ui-mcp-fixture branch October 20, 2026 20:17
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash auto-merge.

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. P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. 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