Skip to content

test(ui): consolidate dynamic route startup coverage - #124287

Merged
steipete merged 1 commit into
mainfrom
test/consolidate-ui-route-startup
Aug 15, 2026
Merged

steipete merged 1 commit into
mainfrom
test/consolidate-ui-route-startup

Conversation

@steipete

Copy link
Copy Markdown
Contributor

What Problem This Solves

ui/src/app-route-paths.test.ts repeated 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-level location, 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/uirouter loader contract.

User Impact

None. This is a test-only consolidation; Control UI routing behavior and production code are unchanged.

Evidence

  • Seven focused UI owner suites — 126 tests passed.
  • 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.
  • Structured autoreview — clean, no accepted/actionable findings.
  • Test delta: -133 lines. No production, docs, changelog, schema, protocol, migration, or operator-state change.

@clawsweeper

clawsweeper Bot commented Aug 15, 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 15, 2026 21:19
@openclaw-barnacle openclaw-barnacle Bot added app: web-ui App: web-ui size: S maintainer Maintainer-authored PR labels Aug 15, 2026
@clawsweeper clawsweeper Bot added P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. 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 15, 2026
@clawsweeper

clawsweeper Bot commented Aug 15, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed August 15, 2026, 5:24 PM ET / 21:24 UTC.

ClawSweeper review

What this changes

The 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 readiness

⚠️ Ready for maintainer review - 1 item remains

No 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
Reviewed head: 2f6c390387a2129d45c4409e319c80bc70ec19bb

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused, net-negative test consolidation with no identified patch defect; exact-head CI remains to complete.
Proof confidence 🌊 off-meta tidepool Not applicable: This maintainer-authored test-only PR does not require external contributor real-behavior 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-authored test-only PR does not require external contributor real-behavior proof.
Evidence reviewed 6 items Shared startup coverage: The changed table covers Agents, Chat, Dashboards, Workboard, Memory, and Plugins; it retains the active-match location and no-history-write assertions, while the later-navigation case checks the second loader input location.
Router owner boundary: Startup maps dynamic browser paths to an exact route, then re-navigates that route with the original browser location; this is the shared behavior the consolidated tests exercise.
Rendered-location consumer: The Control UI derives shell route state from the selected active match rather than the router's top-level location, supporting the retained active-match assertion.
Findings None None.
Security None None.

How this fits together

The 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
Loading

Before merge

  • Resolve merge risk (P1) - The exact @openclaw/uirouter package source was unavailable locally and the registry could not resolve; retain successful test-type and exact-head CI validation before landing.
Agent review details

Security

None.

PR surface

Tests -133. Total -133 across 1 file.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 1 12 145 -133
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 1 12 145 -133

Review metrics

Metric Value Why it matters
Production vs test LOC production 0; tests -133 The single changed file is a test consolidation, so the reduction does not alter shipped Control UI behavior.

Merge-risk options

Maintainer options:

  1. Decide the mitigation before merge
    Keep one table-driven dynamic-startup test at the shared router boundary, with the existing browser test retaining end-to-end reconnect coverage.
  2. Pause or close
    Do not merge this PR until maintainers decide whether the risk is worth taking.

Technical review

Best 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.

Labels

Label changes:

  • add P3: This is a low-risk test-maintenance cleanup with no production behavior change.
  • 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-authored test-only PR does not require external contributor real-behavior proof.

Label justifications:

  • P3: This is a low-risk test-maintenance cleanup with no production behavior change.
  • 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-authored test-only PR does not require external contributor real-behavior proof.

Evidence

What I checked:

  • Shared startup coverage: The changed table covers Agents, Chat, Dashboards, Workboard, Memory, and Plugins; it retains the active-match location and no-history-write assertions, while the later-navigation case checks the second loader input location. (ui/src/app-route-paths.test.ts:118, 2f6c390387a2)
  • Router owner boundary: Startup maps dynamic browser paths to an exact route, then re-navigates that route with the original browser location; this is the shared behavior the consolidated tests exercise. (ui/src/app-routes.ts:188, 73c45824e1e2)
  • Rendered-location consumer: The Control UI derives shell route state from the selected active match rather than the router's top-level location, supporting the retained active-match assertion. (ui/src/app/app-host-route-state.ts:24, 73c45824e1e2)
  • Existing browser coverage: An existing Playwright Control UI test independently checks that the Plugins Discover deep link loads once and remains single-loaded through reconnect. (ui/src/e2e/dynamic-route-loader-count.e2e.test.ts:24, 73c45824e1e2)
  • Current-main provenance: Blame ties the current startup matrix and dynamic-route bridge to the same current-main history commit, making the shared-matrix consolidation coherent with the feature's present owner boundary. (ui/src/app-route-paths.test.ts:118, 1610771b1d7a)
  • Dependency signal and validation gap: The changed test directly imports the pinned @openclaw/uirouter dependency. Its source was unavailable in this dependency-less checkout and registry DNS was unavailable, while the supplied exact-head context reports the test-type check passing. (ui/package.json:33, 73c45824e1e2)

Likely related people:

  • steipete: Current-main blame attributes both the shared dynamic startup test matrix and its router bridge to Peter Steinberger's recent commit history. (role: recent feature contributor; confidence: high; commits: 1610771b1d7a; files: ui/src/app-route-paths.test.ts, ui/src/app-routes.ts)

Rank-up moves

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

  • Retain the successful test-type and UI checks on the exact PR head before landing.

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

Copy link
Copy Markdown
Contributor Author

Land-ready proof for 2f6c390387a2129d45c4409e319c80bc70ec19bb:

ClawSweeper's dependency-evidence risk is resolved: I directly inspected the installed @openclaw/uirouter declarations and runtime. Loaders receive options.location, and successful navigation publishes the run location to the active match; the retained tests now assert those application-consumed boundaries. Exact-head test-type and UI checks are green.

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.

@steipete
steipete merged commit 50df307 into main Aug 15, 2026
144 of 146 checks passed
@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 maintainer Maintainer-authored PR P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: S 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