Skip to content

test(ui): split the oversized cron view suite to unbreak main - #127018

Merged
steipete merged 1 commit into
mainfrom
steipete/split-cron-view-test
Aug 21, 2026
Merged

steipete merged 1 commit into
mainfrom
steipete/split-cron-view-test

Conversation

@steipete

Copy link
Copy Markdown
Contributor

What Problem This Solves

main is red. check-lint-core-5 fails on every run, including runs on main itself (for example run 32447829557 at 9bc772ba506):

ui/src/pages/cron/view.test.ts
  1124:4  error  File has too many lines (1004).  eslint(max-lines)
✖ 1 problem (1 error, 0 warnings)
[oxlint] FAILED (exit 1)

Every PR opened since inherits the failure, so the merge gate is blocked repo-wide. I hit it landing an unrelated core change and traced it rather than assuming it was mine — my own files lint clean.

The file has been drifting toward the cap for a while, and the reported count is code lines, not physical:

commit physical lines
fa75cdd01cc (#126718) 1104
2acfc47b7fe (#126962) 1116
a4b3f63a872 (#126945) 1124

It crossed 1000 code lines at a4b3f63a872, which is where CI went red.

Why This Change Was Made

Repo policy is explicit that a max-lines suppression is not an option — existing ones are grandfathered TODOs, and new ones are forbidden. So the file gets split.

It already had the seam. Three top-level describes, one of which was roughly two thirds of the file:

block lines destination
cron view list pane 51–368 stays in view.test.ts
cron view editor 370–1078 moves to view.editor.test.ts
cron view selects 1080–1124 stays in view.test.ts

The four DOM helpers (getButtonByText, getElement, selectSegmented, findToggleByLabel) were local to the test file and used from more than one block. Rather than duplicate them across the two files, they move into the existing view.test-support.ts sibling that already holds createCronViewJob and renderCronView — the file that exists for exactly this. Each test file then imports only the helpers it actually uses, which is why the two import lists differ.

No test content, ordering, or assertion changed. This is a pure relocation.

User Impact

None at runtime. check-lint-core-5 goes green, which unblocks the merge gate for every open PR.

Evidence

Test parity, before and after:

test files tests it( declarations
before (origin/main) 1 42 passed 41
after 2 42 passed 41

File sizes now 373 / 721 / 143 lines, all comfortably under the 1000 cap.

oxlint --config .oxlintrc.json ui/src/pages/cron/ — exit 0, no findings across the whole directory (the first pass caught three unused imports from the mechanical split; those were trimmed rather than suppressed). oxfmt --check ui/src/pages/cron/*.ts — all 19 files correctly formatted. node scripts/run-vitest.mjs ui/src/pages/cron/view.test.ts ui/src/pages/cron/view.editor.test.ts — 2 files, 42 passed, rc=0.

`main` is red: `check-lint-core-5` fails with

    ui/src/pages/cron/view.test.ts
      1124:4  error  File has too many lines (1004).  eslint(max-lines)

The file has been growing for a while (1104 lines at fa75cdd, 1116 at
2acfc47) and crossed the 1000 code-line cap at a4b3f63 (#126945). Every
PR opened since inherits the failure, so this is not any one PR's fault to fix
in passing -- it blocks the merge gate for everyone.

Repo policy forbids a `max-lines` suppression, so the file is split along the
seam it already had: three top-level describes, one of which was two thirds of
the file. `cron view editor` moves to `view.editor.test.ts`; `cron view list
pane` and `cron view selects` stay in `view.test.ts`. The four DOM helpers the
blocks shared move into the existing `view.test-support.ts` sibling rather than
being duplicated, and each file imports only what it uses.

No test content changed: 42 tests before, 42 after, same 41 `it(` declarations.
Sizes drop to 373 / 721 / 143 lines, all well under the cap.
@clawsweeper

clawsweeper Bot commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

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

@steipete
steipete marked this pull request as ready for review August 21, 2026 04:51
@openclaw-barnacle openclaw-barnacle Bot added the maintainer Maintainer-authored PR label Aug 21, 2026
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. 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 21, 2026
@clawsweeper

clawsweeper Bot commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

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

ClawSweeper review

What this changes

Splits the Control UI cron view tests into list/select and editor suites, moving shared DOM assertions into the existing cron test-support module to restore the file-size lint gate.

Regression provenance

Possible regression — probable (reviewed change; failure trace). No predecessor PR is attributed.

Merge readiness

⚠️ Ready for maintainer review - 4 items remain

Keep open for normal maintainer merge handling: the test-only split is mechanically sound and current main still has the oversized suite, but exact-head checks are incomplete and the required structured autoreview could not start in this environment.

Priority: P2
Reviewed head: d02a5b498651eea7227da371d568d8588b68dafa
Owner decision: Required. See Decision needed.

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) The patch is a clean, byte-preserving test split with focused validation evidence, pending final repository gates.
Proof confidence 🌊 off-meta tidepool Not applicable: This maintainer-owned test-only change has no user-visible runtime behavior; focused lint and test evidence is the relevant proof.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: This maintainer-owned test-only change has no user-visible runtime behavior; focused lint and test evidence is the relevant proof.
Evidence reviewed 5 items Current main still needs the repair: Current main retains the 1,124-line cron view test and has no editor-suite sibling; the lint rule applies a 1,000 nonblank/noncomment line limit to UI tests.
Relocation preserves test content: The base editor, list, and select describe blocks are byte-identical to their new locations; only file headers, imports, and helper exports change.
Test runner and shared-owner boundary: The UI test project includes all src/**/*.test.ts files, and the support module already supplies fixtures to several sibling cron suites; the new helper exports are used by both split files.
Findings None None.
Security None None.

Live Verification

Command: node scripts/run-vitest.mjs ui/src/pages/cron/view.test.ts ui/src/pages/cron/view.editor.test.ts

Result: PASS (completed)

node scripts/run-vitest.mjs ui/src/pages/cron/view.test.ts ui/src/pages/cron/view.editor.test.ts
runner@runnervm76f27:/tmp/clawsweeper-live-proof-127018-539X1g/target$ node scripts/run-vitest.mjs ui/src/pages/cron/view.test.ts ui/src/pages/cron/view.editor.
test.ts
[test] starting test/vitest/vitest.ui.config.ts

 RUN  v4.1.10 /tmp/clawsweeper-live-proof-127018-539X1g/target

node scripts/run-vitest.mjs ui/src/pages/cron/view.test.ts ui/src/pages/cron/view.editor.test.ts
 ✓  ui  ui/src/pages/cron/view.test.ts (17 tests) 886ms
 ✓  ui  ui/src/pages/cron/view.editor.test.ts (25 tests) 1486ms

 Test Files  2 passed (2)
      Tests  42 passed (42)
   Start at  04:59:46
   Duration  4.13s (transform 2.51s, setup 290ms, import 2.54s, tests 2.37s, environment 1.42s)

[test] passed 1 Vitest shard in 4.66s
runner@runnervm76f27:/tmp/clawsweeper-live-proof-127018-539X1g/target$ node scripts/run-vitest.mjs ui/src/pages/cron/view.test.ts ui/src/pages/cron/view.editor.
test.ts
[test] starting test/vitest/vitest.ui.config.ts

 RUN  v4.1.10 /tmp/clawsweeper-live-proof-127018-539X1g/target





























Assertions:

  • PASS expect_output: 42 passed

How this fits together

The Control UI cron renderer displays automation list, editor, and schedule controls; colocated Vitest suites exercise those views through shared fixtures. This PR reorganizes that test boundary without changing the served UI or gateway behavior.

flowchart LR
  A[Automation fixtures] --> B[Cron view renderer]
  B --> C[List and select tests]
  B --> D[Editor tests]
  C --> E[Shared test helpers]
  D --> E
  C --> F[Vitest and lint gates]
  D --> F
Loading

Decision needed

Question Recommendation
After exact-head checks and the required structured autoreview pass, should this maintainer-owned test-only repair be merged? Merge after gates: Merge the byte-preserving split once the exact PR head is green and a provisioned autoreview reports no actionable findings.

Why: The maintainer label requires explicit human handling, while no product or API direction remains unresolved.

Before merge

  • Resolve merge risk (P1) - Exact-head checks are still in progress and GitHub reports the branch behind main; refresh merge status after they finish.
  • Resolve merge risk (P1) - Structured autoreview did not start because this reviewer environment lacks TruffleHog, so landing should obtain its required clean result in a provisioned environment.
  • Complete next step (P2) - No repair lane is needed; the maintainer-labeled PR needs ordinary human merge handling after its outstanding gates complete.
Agent review details

Security

None.

PR surface

Source +43, Tests -30. Total +13 across 3 files.

View PR surface stats
Area Files Added Removed Net
Source 1 43 0 +43
Tests 2 724 754 -30
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 3 767 754 +13

Review metrics

Metric Value Why it matters
Production versus test LOC production +0/-0; tests and test support +767/-754 raw, +13 net All changes are a byte-preserving test relocation plus shared test-helper exports; no runtime code changes.

Stored data model

Persistent data-model change detected: database schema: ui/src/pages/cron/view.editor.test.ts. Confirm migration or upgrade compatibility proof before merge.

Merge-risk options

Maintainer options:

  1. Decide the mitigation before merge
    Keep the minimal test-only relocation and merge after a clean PR-scoped autoreview plus exact-head required checks.
  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 minimal test-only relocation and merge after a clean PR-scoped autoreview plus exact-head required checks.

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

Yes — current main’s 1,124-line test file is covered by the 1,000-code-line UI-test lint rule, matching the reported failing boundary; this read-only review did not execute lint locally.

Is this the best way to solve the issue?

Yes — splitting at the existing editor describe boundary and reusing the already-shared support fixture is cleaner than a forbidden max-lines suppression or duplicate helpers.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 1fb4857e3cc2.

Labels

Label changes:

  • add P2: This repairs a required main-branch lint gate and unblocks normal validation without changing user runtime behavior.
  • 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-owned test-only change has no user-visible runtime behavior; focused lint and test evidence is the relevant proof.

Label justifications:

  • P2: This repairs a required main-branch lint gate and unblocks normal validation without changing user runtime behavior.
  • 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-owned test-only change has no user-visible runtime behavior; focused lint and test evidence is the relevant proof.

Evidence

What I checked:

  • Current main still needs the repair: Current main retains the 1,124-line cron view test and has no editor-suite sibling; the lint rule applies a 1,000 nonblank/noncomment line limit to UI tests. (ui/src/pages/cron/view.test.ts:1124, 1fb4857e3cc2)
  • Relocation preserves test content: The base editor, list, and select describe blocks are byte-identical to their new locations; only file headers, imports, and helper exports change. (ui/src/pages/cron/view.editor.test.ts:13, d02a5b498651)
  • Test runner and shared-owner boundary: The UI test project includes all src/**/*.test.ts files, and the support module already supplies fixtures to several sibling cron suites; the new helper exports are used by both split files. (ui/vitest.config.ts:168, d02a5b498651)
  • Feature-history provenance: The current-main version of the oversized test file was last changed by the merged cron trigger-capability work; its preceding cron UI changes also belong to the same recent area owner. (ui/src/pages/cron/view.test.ts:370, a4b3f63a8728)
  • Structured-review limitation: The requested autoreview helper was invoked but stopped before model review because TruffleHog is absent; no test or repository file was modified. (d02a5b498651)

Likely related people:

  • steipete: Recent merged changes to the cron view test and its support fixture, including the current-main editor block, are authored by this contributor. (role: recent cron Control UI feature owner; confidence: high; commits: fa75cdd01cc1, 2acfc47b7fe2, a4b3f63a8728; files: ui/src/pages/cron/view.test.ts, ui/src/pages/cron/view.test-support.ts)

Rank-up moves

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

  • Complete exact-head required checks.
  • Run the required PR-scoped autoreview where TruffleHog is available.

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 merged commit da18d2f into main Aug 21, 2026
201 checks passed
@steipete
steipete deleted the steipete/split-cron-view-test branch August 21, 2026 05:06
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 22, 2026
…aw#127018)

`main` is red: `check-lint-core-5` fails with

    ui/src/pages/cron/view.test.ts
      1124:4  error  File has too many lines (1004).  eslint(max-lines)

The file has been growing for a while (1104 lines at b7ec570, 1116 at
ed40a7d) and crossed the 1000 code-line cap at 4310d65 (openclaw#126945). Every
PR opened since inherits the failure, so this is not any one PR's fault to fix
in passing -- it blocks the merge gate for everyone.

Repo policy forbids a `max-lines` suppression, so the file is split along the
seam it already had: three top-level describes, one of which was two thirds of
the file. `cron view editor` moves to `view.editor.test.ts`; `cron view list
pane` and `cron view selects` stay in `view.test.ts`. The four DOM helpers the
blocks shared move into the existing `view.test-support.ts` sibling rather than
being duplicated, and each file imports only what it uses.

No test content changed: 42 tests before, 42 after, same 41 `it(` declarations.
Sizes drop to 373 / 721 / 143 lines, all well under the cap.
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 P2 Normal backlog priority with limited blast radius. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. 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