Repository navigation
test(ui): consolidate dynamic route startup coverage - #124287
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: needs maintainer review before merge. Reviewed August 15, 2026, 5:24 PM ET / 21:24 UTC. ClawSweeper reviewWhat this changesThe PR consolidates Control UI dynamic-route startup tests, removes duplicated route-specific harnesses, and asserts the location delivered to a later route-loader call. Merge readinessNo blocking findings. This maintainer-authored test-only cleanup keeps the dynamic-route startup invariant at its shared router boundary; exact-head checks remain the normal landing gate. Priority: P3 Review scores
Verification
How this fits togetherThe Control UI router converts browser locations into active route matches and invokes page loaders with route locations. The application shell reads the active match location to render and navigate dynamic pages. flowchart LR
A[Browser location] --> B[Dynamic route bridge]
B --> C[Application router]
C --> D[Active route match]
C --> E[Page loader]
D --> F[Control UI shell]
E --> F
Before merge
Agent review detailsSecurityNone. PR surfaceTests -133. Total -133 across 1 file. View PR surface stats
Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Keep one table-driven dynamic-startup test at the shared router boundary, with the existing browser test retaining end-to-end reconnect coverage. Do we have a high-confidence way to reproduce the issue? Not applicable: this PR consolidates existing test coverage rather than reporting a user-facing defect. Is this the best way to solve the issue? Yes. The startup bridge centralizes dynamic-route handling, and the Control UI reads active-match location, so one route matrix is the maintainable coverage owner. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 73c45824e1e2. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
|
Land-ready proof for
ClawSweeper's dependency-evidence risk is resolved: I directly inspected the installed Test delta: -133 lines. The shared six-route startup matrix now owns one-load, real active-match location, and zero-history-write behavior; later navigation asserts the actual second loader input. Production is unchanged. No behavior, docs, changelog, schema, protocol, migration, or operator-state change. |
|
Merged via squash.
|
What Problem This Solves
ui/src/app-route-paths.test.tsrepeated three full Agent, Memory, and Plugins startup harnesses after a generic dynamic-route startup matrix had already absorbed those route families. Five assertions also read the router's top-levellocation, even though the Control UI consumes the active match location; four duplicated stronger companion assertions, while the later-history case tested the right behavior through the wrong state surface.Why This Change Was Made
The generic six-route startup matrix now owns the shared invariants: one loader invocation, the real active-match location, and no browser-history writes. The duplicate Agent, Memory, and Plugins startup blocks are removed. The later-history test now asserts the second loader call's
options.location, which is the actual page input and the independently typed@openclaw/uirouterloader contract.User Impact
None. This is a test-only consolidation; Control UI routing behavior and production code are unchanged.
Evidence
ui/src/e2e/dynamic-route-loader-count.e2e.test.ts— 1 real-browser test passed.node scripts/check-changed.mjs -- ui/src/app-route-paths.test.ts— passed through the documented local fallback because no remote provider was ready.git diff --check— passed.