Skip to content

fix: do not bind ":branch" to "new" from onboarding URLs#3977

Open
jeffal wants to merge 7 commits into
codecov:mainfrom
jeffal:fix/onboarding-branch-leak
Open

fix: do not bind ":branch" to "new" from onboarding URLs#3977
jeffal wants to merge 7 commits into
codecov:mainfrom
jeffal:fix/onboarding-branch-leak

Conversation

@jeffal

@jeffal jeffal commented May 4, 2026

Copy link
Copy Markdown

Description

Fixes #3976.

/bundles/new and /tests/new are onboarding URLs, not branch URLs. The repo-page route in src/App.tsx was capturing new as :branch and propagating it through useNavLinks into sibling tab links, breaking branch filtering.

Notable Changes

  • Match the literal onboarding paths first so :branch stays undefined on those URLs.
  • Add matchPath tests over the route patterns to cover both onboarding and branch URLs.

Note

Low Risk
Small router ordering change in App.tsx with regression tests; no auth, data, or API surface changes.

Overview
Fixes repo-page routing so bundle and test onboarding URLs (/bundles/new, /tests/new) are not parsed as branch-scoped paths.

The shared REPO_PAGE_ROUTE_PATHS list now registers those literal paths before the bundles/:branch and tests/:branch patterns, so :branch stays unset on onboarding and real branch segments still match. RepoPage uses this exported list instead of an inline path array. matchPath tests lock in onboarding vs branch behavior.

Reviewed by Cursor Bugbot for commit d62c010. Bugbot is set up for automated code reviews on this repo. Configure here.

@jeffal

jeffal commented May 18, 2026

Copy link
Copy Markdown
Author

Hi Codecov folks 👋 may I have a review? cc @calvin-codecov @drazisil-codecov

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bundle and test onboarding URLs bind ":branch" to "new"

2 participants