Skip to content

/_browser routes appear in application Routes UI even though corresponding controllers are not in /app #2577

Closed

Description

@zainforbjs

Describe the bug
In the Routes section of a Wheels application, several /_browser routes are displayed under the application routes list. Examples include:

  • /_browser/home
  • /_browser/login
  • /_browser/dashboard
  • /_browser/login-as

However, the corresponding controllers and views do not exist in the application's /app directory. These routes are internal browser test fixture routes and are not part of the developer's application code.

This can be confusing because the Routes UI suggests that these are application-defined routes.

To Reproduce
Steps to reproduce the behavior:

  1. Create or run a Wheels application.
  2. Navigate to the Routes section.
  3. Observe the /_browser routes listed under application routes.
  4. Check the /app/controllers and /app/views directories.
  5. Note that no corresponding files exist in the application.

Expected behavior
One of the following should happen:

  1. Internal /_browser routes should not be shown in the application Routes UI.
  2. These routes should be displayed in the “Internal” section.
  3. If they are no longer needed, they should be removed entirely.

Screenshots
Image

Desktop:

  • OS: Any

Additional context
These routes appear to be defined for browser testing and point to framework-provided controllers rather than application controllers.
Showing them alongside application routes:

  • Creates confusion for developers
  • Makes the route list noisier
  • Blurs the distinction between framework internals and user-defined routes

Suggested improvement:

  • Move these routes to an internal routes file if they are framework-owned.
  • Exclude them from the application Routes UI.
  • Alternatively, display them under the “Internal” section.

Activity

  1. wheels-bot commented on May 11, 2026

    @wheels-bot
    Contributor

    Wheels Bot — Triage

    Classified as bug.

    Suspected layer

    router — see vendor/wheels/public/views/routes.cfm for the categorization logic.

    Fix sketch

    The Routes UI splits routes into "Internal" vs "Application" using a single condition in vendor/wheels/public/views/routes.cfm (line 12):

    if ((StructKeyExists(r, "controller") && r.controller EQ "wheels.public")
     || (StructKeyExists(r, "pattern") && r.pattern eq "/wheels/app/tests"))

    The /_browser fixture routes are registered with controllers like BrowserTestHome and BrowserTestSessions (see vendor/wheels/public/browser-fixtures/routes.cfm). Neither controller name matches wheels.public, and none of their patterns match /wheels/app/tests, so they fall through to appRoutes. The fix is to extend the condition to also match routes whose pattern starts with /_browser — a one-line change in routes.cfm.

    Confidence: high

    The reproduction steps are clear, the screenshot confirms the symptom, the faulty condition is pinpointed to one file and one line, and the fix is mechanical with no design trade-offs or cross-engine concerns.

    <!-- wheels-bot:triage:2577 -->
    <!-- wheels-bot:triage-class:bug -->
    <!-- wheels-bot:triage-confidence:high -->

  2. wheels-bot commented on May 11, 2026

    @wheels-bot
    Contributor

    Wheels Bot — Fix proposed

    Draft PR: #2588

    Spec: vendor/wheels/tests/specs/view/routesViewBrowserFixturesSpec.cfc — failing → passing
    Implementation: vendor/wheels/public/views/routes.cfm

    A human review is required before merge. Reviewer A and Reviewer B will weigh in shortly. Doc updates (MDX guides, .ai/wheels/, CLAUDE.md) are handled separately by bot-update-docs.yml.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions