Skip to content

test(ui): split the oversized Control UI e2e suites - #114889

Merged
steipete merged 4 commits into
mainfrom
claude/split-oversized-e2e-tests
Jul 28, 2026
Merged

steipete merged 4 commits into
mainfrom
claude/split-oversized-e2e-tests

Conversation

@steipete

Copy link
Copy Markdown
Contributor

What Problem This Solves

Three Control UI e2e files had grown past the point where anyone can navigate them: chat-flow.e2e.test.ts (4537 lines), new-session-page.e2e.test.ts (4475) and session-management.e2e.test.ts (1926). All three were grandfathered into config/max-lines-baseline.txt, whose header says the list may only shrink — so every addition to those suites either bounced off the max-lines gate or pushed the debt further out.

This is developer-facing: finding the test that covers a behavior, and adding one next to it, was needlessly hard.

Why This Change Was Made

Each file is split into sibling suites named after what they assert, rather than chopped by line count:

  • chat-flow → messaging, streaming, follow-ups, history-recovery, media-files, models-reasoning, navigation-presentation
  • new-session-page → places, workspace-memory, workspace-validation, prompt-attachments, catalog-reconnect, cloud-startup
  • session-management → sidebar, groups, archive

Shared fixtures, constants, helpers and the browser/server lifecycle move into colocated *.test-support.ts modules — one per original file, plus control-ui-e2e-suite.test-support.ts for what all three shared — following the terminal-panel.test-support.ts / app-host.test-support.ts precedent from #114737. No production code changes, and all three entries are removed from config/max-lines-baseline.txt.

The branch also carries the bounded locator-poll helper from #114828 forward into the six new-session-page suites (49 call sites), so the de-flake landed there is not lost in the split.

User Impact

None at runtime. Contributors get e2e suites they can find their way around, and the max-lines ratchet moves in the direction it is supposed to move.

Evidence

Every test survives verbatim — per-file it( counts before and after the split:

Original file tests before tests after (across siblings)
chat-flow.e2e.test.ts 54 54
new-session-page.e2e.test.ts 46 46
session-management.e2e.test.ts 21 21
node scripts/run-vitest.mjs ui/src/e2e/          # full Control UI e2e suite: 96 files, 337 tests passed
node scripts/run-vitest.mjs ui/src/e2e/new-session-page   # after the poll-helper port: 6 files, 47 passed
node scripts/run-oxlint.mjs <changed files>      # clean — no max-lines errors
node scripts/run-tsgo.mjs -p test/tsconfig/tsconfig.core.test.json   # clean

Largest resulting file is new-session-page.cloud-startup.e2e.test.ts at 944 physical lines, comfortably inside the 1000-line budget (which excludes blanks and comments).

Codex autoreview over the split (chunked, 3 chunks): clean, no accepted/actionable findings.

Rebased onto main after #114828 landed; the modify/delete conflict on the pre-split new-session-page.e2e.test.ts resolves to the split, with that PR's poll-helper change already carried into the siblings.

@steipete
steipete marked this pull request as ready for review July 28, 2026 03:10
@openclaw-barnacle openclaw-barnacle Bot added app: web-ui App: web-ui size: XL maintainer Maintainer-authored PR labels Jul 28, 2026
@clawsweeper clawsweeper Bot added rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. labels Jul 28, 2026
@clawsweeper

clawsweeper Bot commented Jul 28, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs real behavior proof before merge. Reviewed July 28, 2026, 12:50 AM ET / 04:50 UTC.

ClawSweeper review

What this changes

Splits three oversized Control UI Playwright E2E suites into behavior-focused sibling files with shared support modules, removes their max-lines exemptions, and updates the related QA smoke reference.

Merge readiness

⛔ Blocked until real behavior proof from a real setup is added - 4 items remain

Keep this PR open. The split is a focused test-maintenance refactor with no concrete patch defect found, but it still lacks inspectable after-fix real behavior proof and carries the protected maintainer label, so it needs human handling before merge.

Priority: P3
Reviewed head: 1579d474c5ba3b42e39d03408af98644dbb444dc

Review scores

Measure Result What it means
Overall readiness 🧂 unranked krab (1/6) The patch is a coherent, focused refactor, but its merge readiness is capped by missing inspectable real behavior proof.
Proof confidence 🧂 unranked krab (1/6) Needs real behavior proof before merge: The body reports mocked-Gateway E2E, static checks, and CI results, but no inspectable redacted after-fix artifact shows the split suites executing in a real browser-harness run; add a terminal transcript, recording, live output, or runtime log and redact private details. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Needs proof Needs real behavior proof before merge: The body reports mocked-Gateway E2E, static checks, and CI results, but no inspectable redacted after-fix artifact shows the split suites executing in a real browser-harness run; add a terminal transcript, recording, live output, or runtime log and redact private details. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.
Evidence reviewed 5 items Focused refactor scope: The PR replaces the three grandfathered Control UI E2E files with smaller behavior-named suites and shared lifecycle/support helpers, while removing the corresponding three max-lines baseline entries.
Shared suite lifecycle: The new shared helper centralizes Chromium availability checks, browser lifecycle, local server startup, and optional tracked-context cleanup for the split suites.
Existing merged predecessor: The bounded locator polling carried into the split new-session suites corresponds to the merged Control UI startup-navigation work, so this PR is preserving an already-accepted reliability fix rather than introducing a parallel behavior path.
Findings None None.
Security None None.

How this fits together

Control UI E2E tests start a local browser/server harness and exercise UI flows against a mocked Gateway. These suites provide regression coverage for chat, new-session, and session-management behavior, while the max-lines baseline prevents oversized test files from accumulating further debt.

flowchart LR
  A[Control UI source] --> B[Local E2E server]
  B --> C[Playwright browser suites]
  D[Mocked Gateway responses] --> C
  C --> E[Behavior-focused test files]
  E --> F[QA smoke scenario]
  E --> G[Max-lines quality gate]
Loading

Before merge

  • Add real behavior proof - Needs real behavior proof before merge: The body reports mocked-Gateway E2E, static checks, and CI results, but no inspectable redacted after-fix artifact shows the split suites executing in a real browser-harness run; add a terminal transcript, recording, live output, or runtime log and redact private details. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.
  • Resolve merge risk (P1) - The changed behavior has not yet been demonstrated with inspectable after-fix runtime evidence; mocked-Gateway tests and CI are useful validation but do not satisfy the external-PR real-behavior proof gate.
  • Resolve merge risk (P1) - The protected maintainer label requires explicit human review even if the branch remains mechanically clean.
  • Complete next step (P2) - A maintainer should review the protected-label PR after the contributor supplies inspectable real browser-harness proof; there is no discrete code defect for an automated repair lane.
Agent review details

Security

None.

PR surface

Source +652, Tests -373, Other -3. Total +276 across 26 files.

View PR surface stats
Area Files Added Removed Net
Source 4 652 0 +652
Tests 20 10583 10956 -373
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 2 2 5 -3
Total 26 11237 10961 +276

Review metrics

Metric Value Why it matters
Max-lines exemptions 3 removed Removing all three grandfathered Control UI E2E entries restores the ratchet for the suites this PR reorganizes.

Stored data model

Persistent data-model change detected: persistent cache schema: ui/src/e2e/chat-flow.test-support.ts, serialized state: ui/src/e2e/chat-flow.history-recovery.e2e.test.ts, serialized state: ui/src/e2e/chat-flow.media-files.e2e.test.ts, serialized state: ui/src/e2e/chat-flow.test-support.ts, serialized state: ui/src/e2e/session-management.archive.e2e.test.ts, serialized state: ui/src/e2e/session-management.e2e.test.ts, and 10 more. Confirm migration or upgrade compatibility proof before merge.

Merge-risk options

Maintainer options:

  1. Decide the mitigation before merge
    Keep the focused split, add a redacted terminal transcript or equivalent artifact showing the renamed Control UI E2E suites run successfully in the browser harness, then let a maintainer review the exact head once the pending checks finish.
  2. Pause or close
    Do not merge this PR until maintainers decide whether the risk is worth taking.

Technical review

Best possible solution:

Keep the focused split, add a redacted terminal transcript or equivalent artifact showing the renamed Control UI E2E suites run successfully in the browser harness, then let a maintainer review the exact head once the pending checks finish.

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

Not applicable: this PR reorganizes existing test coverage rather than reporting a current product failure. The relevant behavior to verify is that the browser harness executes the split suites after the refactor.

Is this the best way to solve the issue?

Yes. Splitting by asserted behavior, sharing only lifecycle and fixtures, and deleting the max-lines exemptions is a maintainable way to reduce the existing test-file debt; no competing implementation path is evident from the supplied predecessor work.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 01f6ad67d52a.

Labels

Label justifications:

  • P3: This is developer-facing test-organization cleanup with no stated runtime user impact.
  • rating: 🧂 unranked krab: Overall readiness is 🧂 unranked krab; proof is 🧂 unranked krab and patch quality is 🐚 platinum hermit.
  • status: 📣 needs proof: The PR needs real behavior proof before ClawSweeper can clear the contributor ask. Needs real behavior proof before merge: The body reports mocked-Gateway E2E, static checks, and CI results, but no inspectable redacted after-fix artifact shows the split suites executing in a real browser-harness run; add a terminal transcript, recording, live output, or runtime log and redact private details. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.

Evidence

What I checked:

  • Focused refactor scope: The PR replaces the three grandfathered Control UI E2E files with smaller behavior-named suites and shared lifecycle/support helpers, while removing the corresponding three max-lines baseline entries. (config/max-lines-baseline.txt:986, 1579d474c5ba)
  • Shared suite lifecycle: The new shared helper centralizes Chromium availability checks, browser lifecycle, local server startup, and optional tracked-context cleanup for the split suites. (ui/src/e2e/control-ui-e2e-suite.test-support.ts:1, 1579d474c5ba)
  • Existing merged predecessor: The bounded locator polling carried into the split new-session suites corresponds to the merged Control UI startup-navigation work, so this PR is preserving an already-accepted reliability fix rather than introducing a parallel behavior path. (ui/src/e2e/new-session-page.test-support.ts:35, a0530259e2fa)
  • Proof gate remains unmet: The PR body reports mocked-Gateway E2E, static checks, and CI commands, but provides no inspectable redacted terminal transcript, recording, runtime log, or linked artifact showing the reorganized suites executing after the split. The prior ClawSweeper review reached the same conclusion, and the later head commit only adds test wait budgets. (ui/src/app/bootstrap.test.ts:18, 1579d474c5ba)
  • Protected review state: The live item context includes the maintainer label. Repository review policy requires protected-label items to remain open for explicit maintainer handling. (AGENTS.md:1, 01f6ad67d52a)

Likely related people:

  • steipete: Recent merged Control UI work established the adjacent test-support splitting precedent and the bounded polling behavior this branch carries into the reorganized suites. (role: recent Control UI contributor; confidence: high; commits: 1c0ccdddcd9d, a0530259e2fa; files: ui/src/e2e/new-session-page.test-support.ts, ui/src/app/bootstrap.test.ts)

Rank-up moves

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

  • Add a redacted terminal transcript, recording, or linked artifact showing the split Control UI E2E suites execute successfully after the change.
  • After adding proof to the PR body, allow the automatic re-review to run; if it does not, ask a maintainer to comment @clawsweeper re-review.

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.

History

Review history (3 earlier review cycles)
  • reviewed 2026-07-28T03:14:45.006Z sha 4554d90 :: needs real behavior proof before merge. :: none
  • reviewed 2026-07-28T03:56:27.586Z sha f7ca48e :: needs real behavior proof before merge. :: none
  • reviewed 2026-07-28T04:15:41.534Z sha 52d38ce :: needs real behavior proof before merge. :: none

@clawsweeper clawsweeper Bot added rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. and removed rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. labels Jul 28, 2026
@steipete steipete self-assigned this Jul 28, 2026
@steipete
steipete force-pushed the claude/split-oversized-e2e-tests branch from 52d38ce to 1579d47 Compare July 28, 2026 04:46
@steipete
steipete merged commit a5ee503 into main Jul 28, 2026
92 checks passed
@steipete
steipete deleted the claude/split-oversized-e2e-tests branch July 28, 2026 05:07
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

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 extensions: qa-lab maintainer Maintainer-authored PR 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: XL status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant