Skip to content

fix(ui): retain test coverage when files use TSX - #168337

Merged
steipete merged 11 commits into
mainfrom
solid2/p1-01
Oct 10, 2026
Merged

steipete merged 11 commits into
mainfrom
solid2/p1-01

Conversation

@steipete

@steipete steipete commented Oct 10, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Renaming Control UI files from .ts to .tsx can silently drop tests, change CI ownership, or send TypeScript through the CSS parser.

User Impact

No runtime UI change. UI migration work retains test discovery, typecheck ownership, and CI coverage when files use TSX, including unstaged local renames.

Why This Change Was Made

Extend discovery and lint patterns and resolve inventoried owners through one TS/TSX path helper. One cached Git working-tree inventory includes untracked destinations and removes deleted indexed paths, preserving execution isolation without per-owner filesystem probes. Shared globs remain valid Git pathspecs, recursive and non-recursive selection both preserve explicit extension bounds, and the six UI compiler shards retain TSX bootstrap and helper ownership.

The main integration retains the Solid compiler and shared CI policy. It also preserves #168385's completed WebKit repair and removal of the expected-failure machinery. Stylelint parses TSX with and without tagged CSS and still rejects invalid CSS. No dependencies, budgets, baselines, or assertions were weakened.

Release-note context: tooling foundation for the Control UI migration.

Evidence

Head: e25dd126256c1ca96dd144df71e9aa7e76bf1759.

  • Testbox proof, lease tbx_01m4jtkmcb11br7qw12vz911zy: payload exited 0 in 315.882 seconds. Passed script lint; TSX/Stylelint, Knip, native Vitest discovery, CI owner selection, and retention suites; the existing no-filesystem-scan planner contract; real Solid/Lit TSX execution; changed-check dry run; script and test-root typechecks. Implementation proof completed; remote leases stopped at handoff.
  • Inventory comparison against main 45c7bc9e9ca9a838115d560ec13b67d287c3d2b4: 1,623 UI targets, 135 browser targets, and 457 owner watches preserved; zero lost selections or watch matches.
  • The unstaged-rename probe failed before the repair (missing TS owner retained; TSX owner absent) and passed afterward. The permanent regression exercises the isolated-owner module in a real temporary Git repository.
  • Three added non-recursive-glob regression cases failed before the extension-intersection repair; all 37 pattern-selection cases now pass.
  • Codex autoreview of the merged head and final repair: no actionable P0–P2 findings.

Single-worker test cost, measured with pnpm test <file> --maxWorkers=1 on Testbox:

Test file Wall seconds CI test seconds (reported file duration)
test/scripts/ui-tsx-discovery.test.ts 10.29 7.212
test/scripts/stylelint-tsx.test.ts 1.59 0.158
test/scripts/changed-lanes.stylelint.test.ts 2.80 1.292
test/scripts/check-deadcode-exports.test.ts 2.24 0.231
test/vitest/vitest.pattern-file.test.ts 1.71 0.100
test/vitest-ui-package-config.test.ts 9.77 7.459

The Stylelint, changed-Stylelint, dead-code and package-config timing rows reuse unchanged tests' earlier measurements. The longer cases exercise actual CI planning and native project discovery; the new rename regression itself took 30 ms.

Inherited failures

CI run 38050580664, attempt 2 retains ten independently attributed failing jobs. The Android-only retry passed: job 114218782612. The other failed jobs retained their original execution timestamps and results; they were not rerun.

Direct A/B uses head e25dd126256c1ca96dd144df71e9aa7e76bf1759 and merge base 45c7bc9e9ca9a838115d560ec13b67d287c3d2b4 (git merge-base origin/main HEAD), with identical explicit test files and CI configurations:

Test file Head and base result Matching output
extensions/agentsapi/agentsapi-attempt.test.ts Both exit 1: 3 failed, 9 passed The new-run, reset-binding, and new-budget steering cases expected terminal failed, received ok.
extensions/memory-core/src/memory/manager-search-reindex-backoff.test.ts Both exit 1: 2 failed, 4 passed Both force cases expected the embedding mock once, received zero calls.
test/cli-json-stdout.models.e2e.test.ts Both exit 1: 1 failed, 7 passed Refresh output lacks the expected “A running Gateway applies the update …” sentence.

The first two files ran individually on macOS with:

CI=1 OPENCLAW_CI_TEST_RUNTIME_POLICY=bun-compatible node scripts/run-vitest.mjs --config test/vitest/vitest.extension-database-workers.config.ts <file> --maxWorkers=1

The model-catalog file ran on Linux/Node 24 through Testbox 38054554230, lease tbx_01m4jytwv5ysdmfnxwtnjsz0b1, after building each revision separately:

pnpm build qaRuntime
CI=1 OPENCLAW_CI_TEST_RUNTIME_POLICY=bun-compatible OPENCLAW_E2E_USE_PREBUILT_DIST=1 node scripts/run-vitest.mjs --config test/vitest/vitest.e2e.config.ts test/cli-json-stdout.models.e2e.test.ts --maxWorkers=1

Both builds succeeded. The A/B collection completed with exit 0, retaining each test's failing exit 1. Its initial harness attempt stopped before tests because it compared the source SHA with Testbox's carrier commit; the corrected harness verified the exact source tree. No test or source behavior was changed.

The other seven failing files independently match main run 38048680925, checkout b0e5f302dd8d7ad6e2c141c9e9667bd11b8de645:

Failure Matching main job
native-conversation.e2e.test.ts: y=154 instead of 52 114203387133
chat-collaborator-scroll.e2e.test.ts: delta 26 instead of at most 1 114203387187
new-session-page.instant-thread.e2e.test.ts: 50px shifts 114203387158
mobile-shell-geometry.e2e.test.ts: matching bounds assertions 114203387180
chat-position-rail.e2e.test.ts: 50px misalignment 114203387147
src/dockerfile.test.ts: missing Solid lint workspace manifest 114203388322
docs-sync-publish.test.ts: missing copied cleanup runtime 114203388349

The recorded CI checkout is merge f9b0fd10ed5cf034d38ba9cfb9fc1e33bfa0dc7f, with ordered parents main e3415ea8c5543462464b02fb422551aeb32c491d and this PR head. The relevant runtime owners and failing test sources are byte-identical between that baseline and merge. This source comparison supports the independent executions; it is not used alone to claim inheritance.

Gateway test TS2345 was fixed on main by 8420f82cbbf8bd0114cacc39fa51299f92851a6f and is incorporated. Earlier worker-wire and session-color timeouts are not current failures and are not claimed as inherited.

The coordinator authorized the documented inherited-failure landing path. Codex autoreview and exact-head ClawSweeper review have no actionable findings. No auto-merge is enabled.

@clawsweeper

clawsweeper Bot commented Oct 10, 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: L labels Oct 10, 2026
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Oct 10, 2026
@clawsweeper

clawsweeper Bot commented Oct 10, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

Preserves test discovery, execution ownership, typechecking, and stylesheet linting when Control UI files use TSX.

Example: Rename ui/src/app/bootstrap.test.ts to bootstrap.test.tsx without staging it.

  • Before: The isolated-test inventory retains the missing TS path and misses the TSX destination.
  • After: The working-tree inventory selects bootstrap.test.tsx and preserves isolated execution.

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A coherent repair with focused boundary coverage and recorded execution evidence; failed CI remains subject to the native inherited-failure checks.
Proof confidence 🐚 platinum hermit (4/6) Maintainer-authored tooling work is outside the contributor proof gate; supplied evidence exercises native discovery, linting, CI planning, and real TSX execution at the reviewed head.
Patch quality 🦞 diamond lobster (5/6) No actionable review findings were identified.

Product

Kind: Bug fix · Worth it: Yes · Fix scope: Complete
User problem: Developers can lose test coverage or change execution ownership by renaming UI files to TSX.
Reason: The maintainer-directed migration needs reliable coverage, and the patch fixes concrete tooling gaps without changing product defaults.

Merge readiness

✅ Ready for maintainer review

Keep open: this maintainer-directed PR repairs concrete TSX coverage gaps that remain on main; no actionable patch defects were found.

Priority: P2
Reviewed head: e25dd126256c1ca96dd144df71e9aa7e76bf1759

Before merge

None.

Findings

None.

Agent review details

How this fits together

Developer tooling consumes UI source paths and Git inventories, then produces Vitest selections, CI ownership, compiler inputs, and lint targets.

flowchart TD
  A[UI source paths] --> B[Git working tree inventory]
  B --> C[Shared TS and TSX path owner]
  C --> D[Vitest project selection]
  C --> E[CI test ownership]
  A --> F[Typecheck and stylesheet lint]
Loading

Technical review

Best possible solution:

Land the shared TS/TSX repair while preserving existing isolation, browser, and release-only test ownership.

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

Current-main source shows literal TS owner paths and incomplete TSX discovery; the supplied regression evidence records the unstaged-rename failure before repair.

Is this the best way to solve the issue?

The patch repairs existing discovery and classification owners, shares rename resolution, and preserves extension bounds without adding dependencies or weakening assertions.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 8a7542b53c8b.

Provenance checked

  • Native non-browser matching and extension intersections keeps the original intent (aa9d51a: Keep root and package inventories equivalent while retaining browser, isolated, and timing owners.)
  • Solid and TSX compiler integration keeps the original intent (a9c6920: Compile and test Solid components alongside Lit before renderer migration.)
  • Browser CI owner selection keeps the original intent (80823b2: Select browser E2E tests through changed source owners instead of broadly selecting unrelated routes.)
  • Stylesheet parsing keeps the original intent (3807591: Apply stylesheet rules to CSS and embedded Lit templates through postcss-lit.)
  • Production versus full-tree dead-code roots keeps the original intent (906c733: Prevent test-only consumers from hiding unused production exports while retaining a separate full-tree audit.)

Testing

Proof path: shipped entry point.

Security

None.

Evidence

What I checked:

  • Pinned patch and clean checkout: Reviewed the introduced merge-base-to-head diff. Git status was clean before and after inspection; no target code or tests were executed. (e25dd126256c)
  • Current main still needs the repair: Main retains literal TS execution-owner entries and omits plugin-browser TSX discovery from shared globs. (test/vitest/vitest.ui-paths.mjs:2, 8a7542b53c8b)
  • Earlier findings addressed: The cached Git inventory includes untracked destinations and removes deleted indexed paths; extension intersections preserve TS-only and TSX-only selection. The dead-code regression now checks matching behavior instead of obsolete literal globs. (test/vitest/vitest.ui-paths.mjs:9, e25dd126256c)
  • Recorded behavior validation: The full PR body records exact-head native discovery, real Solid/Lit TSX execution, parser checks, CI selection, and zero lost inventory selections. Testbox run 38050039304 has successful admission and check jobs. Expanded log retrieval was blocked by the proxy, so underlying logs were not independently inspected. (e25dd126256c)
  • CI remains failed, with baseline attribution recorded: The current gate remains failed. The updated body records matching head/base failures for three files and matching main failures for seven others; Android now passes. The linked A/B workflow reports cancelled, while the body reports payload completion, so its workflow conclusion is not treated as passing proof. (e25dd126256c)
  • Feature ownership: Feature-history searches identify Peter Steinberger across native non-browser discovery, Solid tooling, browser owner inventories, and Stylelint adoption; current-main blame corroborates that routing. (test/vitest/vitest.include-patterns.ts:5, 8a7542b53c8b)

PR surface

Source -7, Tests +476, Docs 0, Config 0, Other +44. Total +513 across 32 files. Added test files: 2.

View PR surface stats
Area Files Added Removed Net
Source 2 14 21 -7
Tests 18 623 147 +476
Docs 1 1 1 0
Config 1 1 1 0
Generated 0 0 0 0
Other 10 106 62 +44
Total 32 745 232 +513

Labels

Label changes:

  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.
  • remove status: ⏳ waiting on author: Current PR status label is status: 👀 ready for maintainer look.

Label justifications:

  • P2: Silent coverage loss during TSX migration is a concrete tooling defect with limited runtime impact.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🦞 diamond lobster.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

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 need explicit maintainer commands such as @clawsweeper autofix or @clawsweeper automerge.

History

Review history (9 earlier review cycles; latest 8 shown)
  • reviewed 2026-10-10T08:53:45.617Z sha 9ee2fb0 :: needs changes before merge. :: [P2] Keep default shard planning free of filesystem probes | [P2] Update the dead-code audit regression for TSX roots
  • reviewed 2026-10-10T09:19:40.523Z sha 9ee2fb0 :: needs changes before merge. :: [P2] Keep default shard planning free of filesystem probes | [P2] Update the dead-code audit regression for TSX roots
  • reviewed 2026-10-10T10:00:27.235Z sha cd73c10 :: needs changes before merge. :: [P2] Resolve unstaged renames from working-tree facts
  • reviewed 2026-10-10T10:48:25.121Z sha ea05eb8 :: needs changes before merge. :: [P2] Resolve unstaged renames from working-tree facts
  • reviewed 2026-10-10T11:22:52.510Z sha 48e69ea :: needs changes before merge. :: [P2] Resolve unstaged renames from working-tree facts
  • reviewed 2026-10-10T11:41:44.117Z sha 2b52226 :: needs changes before merge. :: none
  • reviewed 2026-10-10T12:10:03.699Z sha e25dd12 :: needs maintainer review before merge. :: none
  • reviewed 2026-10-10T13:02:25.701Z sha e25dd12 :: needs changes before merge. :: none

Reviewed October 10, 2026, 9:22 AM ET / 13:22 UTC (Revision 10).

@clawsweeper clawsweeper Bot added rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. and removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. labels Oct 10, 2026
@clawsweeper clawsweeper Bot added rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. and removed rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. labels Oct 10, 2026
@steipete

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

The unstaged TSX rename finding is fixed in 2b52226. The isolated-owner regression now uses a real Git repository with an unstaged rename; the cached Git inventory includes untracked destinations and excludes deleted indexed paths. The existing no-filesystem-scan planner contract, inventory comparison, affected suites, and typechecks passed on Testbox run 38048347755. The main integration preserves the completed WebKit expected-failure removal.

@clawsweeper

clawsweeper Bot commented Oct 10, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. and removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. labels Oct 10, 2026
@steipete

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

Head e25dd12 resolves the main conflict while retaining both Solid lint guidance and TSX Stylelint guidance. It also preserves explicit extension bounds for non-recursive globs, with a regression that failed before the repair. The unstaged-rename repair remains intact. Exact-head Testbox run 38050039304 passed inventory comparison (zero losses), script lint, affected suites, Solid/Lit TSX execution, and typechecks. Codex autoreview is clean.

@clawsweeper

clawsweeper Bot commented Oct 10, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added the status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. label Oct 10, 2026
@clawsweeper clawsweeper Bot removed the status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. label Oct 10, 2026
@clawsweeper clawsweeper Bot added status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Oct 10, 2026
@steipete
steipete merged commit 235df0b into main Oct 10, 2026
448 of 472 checks passed
@steipete
steipete deleted the solid2/p1-01 branch October 10, 2026 13:27
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via explicitly authorized admin squash with attributed pre-existing CI failures.

steipete added a commit that referenced this pull request Oct 10, 2026
Merge main at 7b12513, including TSX test discovery from #168337. No conflict resolutions or integration-only source changes.
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 11, 2026
* fix(ui): retain test coverage when files use TSX

* fix(ui): keep shared discovery globs compatible with Git

* fix(ui): preserve native non-browser discovery while narrowing

* test(ui): derive project types from the owning config

* fix(ui): keep inventory discovery within CI contracts

* fix(ui): lint TSX owner inventory adapters

* fix(ui): retain extension bounds in shallow test globs
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 P2 Normal backlog priority with limited blast radius. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. scripts Repository scripts size: L 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