Repository navigation
Conversation
The Routes UI predicate previously matched only `controller == "wheels.public"` or `pattern == "/wheels/app/tests"`, so the `/_browser/*` browser-test fixture routes (registered via `loadBrowserTestFixtures` in dev/test environments) fell through to the Application tab even though they ship with the framework and have no corresponding files under /app. Extend the predicate to also classify routes whose pattern begins with `/_browser` as internal.
… tab in Routes UI Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Wheels Bot — Docs updatedAdded a doc commit to this PR:
|
There was a problem hiding this comment.
Wheels Bot — Reviewer A
TL;DR: This is a minimal, correct one-line extension to the route-classification predicate in routes.cfm that moves /_browser/* fixture routes from the App tab to the Internal tab in the dev Routes UI. The fix is well-scoped, cross-engine safe, and the regression spec follows the established structural-assertion pattern for view files. No blocking findings — two minor nits only.
Correctness
The fix is sound:
// vendor/wheels/public/views/routes.cfm, line 15
|| (StructKeyExists(r, "pattern") && Left(r.pattern, 9) EQ "/_browser")"/_browser"is exactly 9 characters, so theLeft()call is correct.- The
StructKeyExists(r, "pattern")guard (already used for the/wheels/app/testsarm) is correctly applied here too, preventing null-key access on routes that only carry acontrollerkey. - Short-circuit
&&evaluation meansLeft()is never called whenpatternis absent.
Cross-engine
No issues. The one cross-engine concern in the area (Left(str, 0) crashing Lucee 7) does not apply here — the second argument is the fixed literal 9, never zero.
Tests
vendor/wheels/tests/specs/view/routesViewBrowserFixturesSpec.cfc
Extends wheels.WheelsTest, uses BDD describe/it closures, and ##2577 is correctly double-hash-escaped in the string literals. Three cases cover the new arm plus the two pre-existing arms as non-regression guards.
Minor nit — comment/code mismatch (line 28–30):
// Look in the categorization region (the first ~600 chars
// after the bucket declaration).
var windowLen = Min(800, Len(src) - anchor);The comment says "~600 chars" but the code uses 800. Harmless in practice (the /_browser predicate is at line 15, only ~200 chars past the first "internalRoutes" on line 7), but the comment should match the code. Suggest updating to "~800 chars" or noting that the window must extend past the entire if block.
Minor nit — anchor resolves to struct initializer, not predicate (line 25):
var anchor = findNoCase("internalRoutes", src);This resolves to the struct-literal initializer at line 7 ("internalRoutes" = []), not to the classification predicate itself. The 800-char window from there does include the predicate, and "/_browser" does not appear anywhere in the HTML output section of the file, so the assertion is valid today. A more targeted anchor such as findNoCase("ArrayAppend(routes.internalRoutes", src) would be more precise and survive future growth of the cfscript preamble, but given that this mirrors the established structural-assertion pattern used by packageListViewTestsLinkSpec.cfc and MigratorViewIconsSpec.cfc, the current form is acceptable.
Commits
fix(router): classify /_browser fixture routes as Internal in Routes UI — valid type (fix), optional scope (router), subject under 100 chars, not ALL-CAPS.
Docs
CHANGELOG [Unreleased] → Fixed entry is present and accurate.
There was a problem hiding this comment.
Wheels Bot — Reviewer A
TL;DR: The new docs(web/guides) commit closes the documentation gap flagged in the prior round — CLAUDE.md and browser-tests.mdx both now note that /_browser/* routes appear under the Internal tab in the Routes UI. No new correctness, cross-engine, or security issues are introduced. One pre-existing nit from the previous review remains unaddressed (minor). Overall verdict: comment (no blocking findings).
Correctness
The docs-only commit is accurate:
CLAUDE.mdline updated:They must come before .wildcard() in routes.cfm. In the Routes UI (/wheels/routes) all /_browser/* routes appear under the Internal tab, not Application.— matches the predicate change inroutes.cfm.browser-tests.mdxappend: same fact, correctly placed immediately after the paragraph describingloginAsand the/_browser/login-asfixture route.
Both additions are factually correct. The first commit's core fix (Left(r.pattern, 9) EQ "/_browser" with StructKeyExists guard, "/_browser" = 9 chars) was validated in the previous review and is unchanged.
Tests
The routesViewBrowserFixturesSpec.cfc from the first commit is unchanged and remains correct. One pre-existing nit from the prior review is still present:
File: vendor/wheels/tests/specs/view/routesViewBrowserFixturesSpec.cfc, lines 28-29
// Look in the categorization region (the first ~600 chars
// after the bucket declaration).
var windowLen = Min(800, Len(src) - anchor);The comment says "~600 chars" but the actual window is 800. The assertion is correct in practice (the /_browser literal is ~200 chars from the anchor), but the comment is misleading. Suggest updating to "~800 chars" or removing the size claim entirely. This does not block merge.
Commits
Both commits conform to commitlint.config.js:
| Commit | Type | Scope | Subject | Valid? |
|---|---|---|---|---|
0ee2d25 |
fix |
router |
classify /_browser fixture routes as Internal in Routes UI | Yes |
cafcd82 |
docs |
web/guides |
note /_browser fixture routes appear under Internal tab in Routes UI | Yes |
Docs
CHANGELOG.md— entry present under[Unreleased] > Fixed.CLAUDE.md— updated.web/sites/guides/src/content/docs/v4-0-0-snapshot/testing/browser-tests.mdx— updated.- All three changes are accurate and consistent with each other.
Cross-engine / Security
No changes to these dimensions. The Left(str, 9) call with a fixed literal 9 does not trigger the Lucee 7 Left(str, 0) crash. No security surface affected.
Wheels Bot — Reviewer B (round 1)A's review is clean — accurate claims, no false praise, two real (minor) nits. One process observation about SHA coverage, but nothing that changes the recommendation. Converging on approve. SycophancyNone detected. A used COMMENTED (not APPROVED) despite calling out only minor nits, and the summary is honest: "No blocking findings — two minor nits only." False positivesNone detected. Each of A's claims checked out against the diff:
Missed issuesOne minor process observation: A's review marker carries SHA No other missed issues. The Verdict alignmentA's COMMENTED state with "no blocking findings" is consistent with what the diff shows: a minimal, correct one-line predicate extension, a structural regression spec that mirrors the established pattern, and two genuine but non-blocking nits. Verdict is appropriate. ConvergenceAligned. The docs-commit gap is a process observation, not a correctness gap. A's implicit approve recommendation is correct for this change. The two nits A raised (comment/code mismatch on the window size description, imprecise anchor for the structural assertion) are real but do not require changes before merge. A human can decide whether to ask the author to fix the comment or let it ride. |
Wheels Bot — Reviewer B (round 1)A's round-2 review is accurate and appropriately scoped. No sycophancy, no false positives. One minor editorial observation: A silently dropped the anchor-precision nit it raised in round 1 without noting the omission, but A did label that nit "acceptable" in round 1, so dropping it in round 2 is defensible. The one carried-forward nit (comment says "~600 chars", code uses 800) is genuine and verified. A's "comment" verdict with explicit "does not block merge" is effectively an approval with a minor note — converging approve. SycophancyNone detected. A chose False positivesNone detected. I verified each of A's claims against the diff:
Missed issuesOne editorial gap: A's round-1 review raised two nits but round 2 carries only one. The dropped nit (anchor resolves to struct initializer at line 7 rather than the classification predicate) was already labeled "acceptable" in round 1, so omitting it is reasonable — but a note like "second nit from round 1 accepted as-is" would have been clearer. Not a substantive miss. No other missed issues. The Verdict alignmentA's ConvergenceAligned. The PR is a minimal, correct fix with accurate documentation and a regression spec that follows the established structural-assertion pattern. The one remaining nit (misleading comment in test file) is non-blocking by A's own assessment and confirmed by B. Joint recommendation: approve and merge. |
Summary
Classifies framework-internal
/_browser/*browser-test fixture routes asInternal in the dev Routes UI instead of leaking them into the Application
tab. The bucket predicate in
vendor/wheels/public/views/routes.cfmpreviously matched only
controller == "wheels.public"orpattern == "/wheels/app/tests", so the fixture routes (which usecontrollers like
BrowserTestHome/BrowserTestSessionsand areauto-mounted when
loadBrowserTestFixturesis enabled in dev/test) fellthrough to the App tab even though they ship with the framework and have
no corresponding files under
/app. One-line extension to the predicateadds a
Left(r.pattern, 9) EQ "/_browser"check.Related Issue
Closes #2577
Type of Change
Feature Completeness Checklist
vendor/wheels/tests/specs/view/routesViewBrowserFixturesSpec.cfcpins the predicate so the classification can't drift back. Failing → passing.bot-update-docs.ymlwill add MDX updates as a follow-up commit if needed).bot-update-docs.yml).bot-update-docs.yml).[Unreleased] → Fixed.bash tools/test-local.sh view→pass:506 fail:0 err:0after the fix. Before the fix the new spec producedpass:505 fail:1.Test Plan
loadBrowserTestFixtures=true, open/wheels/routes./_browser/*routes (home, login, dashboard, login-as, logout, authenticate) now appear under the "Internal" tab, not "App".wheels.publicand/wheels/app/testsinternal classifications are unchanged.