Repository navigation
fix(ui): retain test coverage when files use TSX - #168337
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs maintainer review before merge. What this changesPreserves 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.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete 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 Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherDeveloper 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]
Technical reviewBest 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
TestingProof path: shipped entry point. SecurityNone. EvidenceWhat I checked:
PR surfaceSource -7, Tests +476, Docs 0, Config 0, Other +44. Total +513 across 32 files. Added test files: 2. View PR surface stats
LabelsLabel changes:
Label justifications:
Rating scale6/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. WorkflowClawSweeper edits this one comment on every review. Comment HistoryReview history (9 earlier review cycles; latest 8 shown)
Reviewed October 10, 2026, 9:22 AM ET / 13:22 UTC (Revision 10). |
|
@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. |
|
🦞👀 Re-review progress:
|
|
@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. |
|
🦞👀 Re-review progress:
|
|
Merged via explicitly authorized admin squash with attributed pre-existing CI failures.
|
* 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
What Problem This Solves
Renaming Control UI files from
.tsto.tsxcan 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.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.45c7bc9e9ca9a838115d560ec13b67d287c3d2b4: 1,623 UI targets, 135 browser targets, and 457 owner watches preserved; zero lost selections or watch matches.Single-worker test cost, measured with
pnpm test <file> --maxWorkers=1on Testbox:test/scripts/ui-tsx-discovery.test.tstest/scripts/stylelint-tsx.test.tstest/scripts/changed-lanes.stylelint.test.tstest/scripts/check-deadcode-exports.test.tstest/vitest/vitest.pattern-file.test.tstest/vitest-ui-package-config.test.tsThe 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
e25dd126256c1ca96dd144df71e9aa7e76bf1759and merge base45c7bc9e9ca9a838115d560ec13b67d287c3d2b4(git merge-base origin/main HEAD), with identical explicit test files and CI configurations:extensions/agentsapi/agentsapi-attempt.test.tsfailed, receivedok.extensions/memory-core/src/memory/manager-search-reindex-backoff.test.tstest/cli-json-stdout.models.e2e.test.tsThe first two files ran individually on macOS with:
The model-catalog file ran on Linux/Node 24 through Testbox 38054554230, lease
tbx_01m4jytwv5ysdmfnxwtnjsz0b1, after building each revision separately: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:native-conversation.e2e.test.ts: y=154 instead of 52114203387133chat-collaborator-scroll.e2e.test.ts: delta 26 instead of at most 1114203387187new-session-page.instant-thread.e2e.test.ts: 50px shifts114203387158mobile-shell-geometry.e2e.test.ts: matching bounds assertions114203387180chat-position-rail.e2e.test.ts: 50px misalignment114203387147src/dockerfile.test.ts: missing Solid lint workspace manifest114203388322docs-sync-publish.test.ts: missing copied cleanup runtime114203388349The recorded CI checkout is merge
f9b0fd10ed5cf034d38ba9cfb9fc1e33bfa0dc7f, with ordered parents maine3415ea8c5543462464b02fb422551aeb32c491dand 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
8420f82cbbf8bd0114cacc39fa51299f92851a6fand 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.