Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
1de9b0a
Remove internal "agnostic" types (#14765)
brophdawg11 Feb 19, 2026
792e435
chore: generate markdown docs from jsdocs
remix-run-bot Feb 19, 2026
492d7c3
Update modal example to react 18
brophdawg11 Feb 19, 2026
5745c4b
Add CLAUDE.md file linking to AGENTS.md file
brophdawg11 Feb 19, 2026
7df15d3
Merge branch 'release-next' into dev
brophdawg11 Feb 23, 2026
d8ffb2d
chore: format
remix-run-bot Feb 23, 2026
e0c207d
Fix clientLoader hydrate behavior when ancestor route is hydrating a …
brophdawg11 Feb 27, 2026
fdcdcef
chore: replace chalk with picocolors (#14837)
roli-lpci Feb 27, 2026
5e12c46
chore: deduplicate `pnpm-lock.yaml`
remix-run-bot Feb 27, 2026
d827bb9
Add support for `future.unstable_passThroughRequests` (#14775)
brophdawg11 Feb 27, 2026
c4642c8
RSC: tighten route match typing in server render (#14830)
Nandann018-ux Feb 28, 2026
bbe4a73
chore: format
remix-run-bot Feb 28, 2026
bda5bb7
Fix typo in comment (#14844)
timdorr Mar 2, 2026
7990dd5
chore: generate markdown docs from jsdocs
remix-run-bot Mar 2, 2026
8a10826
docs: fix typo in useNavigate documentation (#14848)
timdorr Mar 4, 2026
c5012af
chore: generate markdown docs from jsdocs
remix-run-bot Mar 4, 2026
9636a7d
docs: remove typo in framework testing documentation (#14863)
amtins Mar 10, 2026
11d2800
chore: format
remix-run-bot Mar 10, 2026
7d21b1c
Add additional unit test - hydrate fallback rendering for SPA middlew…
brophdawg11 Mar 10, 2026
7f10149
fix: handle non-regular files in dev watcher to prevent crashes (#14854)
RomanBaiocco Mar 12, 2026
ea28e66
Escape locations in prerendered redirect HTML (#14880)
brophdawg11 Mar 17, 2026
8646d39
Align redirect protocol validation in RSC flows (#14882)
brophdawg11 Mar 17, 2026
830d3ba
Fix percent encoding in relative path navigation (#14786)
veeceey Mar 17, 2026
1cd923e
chore: format
remix-run-bot Mar 17, 2026
8c3c7ce
fix: allow Framework Mode route components to be passed to createRout…
brophdawg11 Mar 18, 2026
2469dd6
Add bug fixing skill
brophdawg11 Mar 18, 2026
06c1149
Merge branch 'main' into release-next
brophdawg11 Mar 18, 2026
d904466
Enter prerelease mode
brophdawg11 Mar 18, 2026
c68a9b3
chore: Update version for release (pre) (#14893)
github-actions[bot] Mar 18, 2026
c604398
Draft release notes
brophdawg11 Mar 18, 2026
5096d69
Update release notes
brophdawg11 Mar 23, 2026
a71c922
Exit prerelease mode
brophdawg11 Mar 23, 2026
aadb56f
chore: Update version for release (#14908)
github-actions[bot] Mar 23, 2026
a842fca
Merge branch 'release-next'
brophdawg11 Mar 23, 2026
921db15
chore: format
remix-run-bot Mar 23, 2026
a11a013
Copy preview workflow to main for manual workflow_dispatch usage
brophdawg11 Mar 23, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
151 changes: 151 additions & 0 deletions .agents/skills/fix-bug/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,151 @@
---
name: fix-bug
description: Fix a reported bug in React Router from a GitHub issue. Use when the user provides a GitHub issue URL and asks to fix a bug, investigate an issue, or reproduce a problem. Handles the full workflow: fetching the issue, finding the reproduction, writing a failing test, and implementing the fix.
disable-model-invocation: true
---

# Fix React Router Bug

Fix the bug reported in the following GitHub issue: $ARGUMENTS

## Branching

Bug fixes should start from a clean working tree. If there are changes, prompt me to resolve them before continuing.

Bugs should be fixed from the `dev` branch in in a new branch using the format `{author}/{semantic-branch-name}` (i.e., `brophdawg11/fix-navigation`):

```sh
git branch {author}/{semantic-branch-name} dev
git checkout {author}/{semantic-branch-name}
```

## Workflow

### 1. Fetch and Understand the Issue

Use `gh issue view <number> --repo remix-run/react-router` or `WebFetch` to read the full issue.

Extract:

- Bug description and expected vs actual behavior
- React Router version and mode (Declarative / Data / Framework / RSC)
- Any code snippets in the issue
- Links to reproductions (StackBlitz, CodeSandbox, GitHub repo, etc.)

### 2. Validate the Reproduction

**If there's a StackBlitz/CodeSandbox/online sandbox link:**

- Use `WebFetch` to read the sandbox URL and extract the relevant code
- Identify the exact sequence of events that triggers the bug

**If there's a GitHub repository link:**

- Use `WebFetch` to read key files (`package.json`, relevant source files) from the raw GitHub URL
- Identify the route configuration, loaders, actions, or components involved

**If no reproduction link exists:**

- Search the issue comments with `gh issue view <number> --repo remix-run/react-router --comments`
- Look for code snippets in comments
- Ask the user: "No reproduction was provided. Can you share a minimal reproduction or paste the relevant code?"

### 3. Identify the Affected Code

Based on the bug, locate the relevant source files. Consult the key file map:

| Area | Files |
| ---------------------- | ----------------------------------------------------------- |
| Core router logic | `packages/react-router/lib/router/router.ts` |
| React components/hooks | `packages/react-router/lib/components.tsx`, `lib/hooks.tsx` |
| DOM utilities | `packages/react-router/lib/dom/` |
| Vite/Framework plugin | `packages/react-router-dev/vite/plugin.ts` |
| RSC | `packages/react-router/lib/rsc/` |

Use `Grep` and `Glob` to trace the relevant code paths.

### 4. Write a Failing Test

**Unit test** (for router logic, hooks, pure component behavior — no build needed):

- Location: `packages/react-router/__tests__/`
- Use Jest; run with: `pnpm test packages/react-router/__tests__/<file>`
- Match the style of nearby test files (describe/it blocks, `createStaticHandler`, `createMemoryRouter`, `render`, `screen`, etc.)

**Integration test** (for Vite plugin, SSR, hydration, Framework Mode):

- Location: `integration/`
- Use Playwright with `createFixture()` → `createAppFixture()` → `PlaywrightFixture`
- Run with: `pnpm test:integration:run --project chromium integration/<file>`
- Build first if needed: `pnpm test:integration --project chromium`

Write the test to **reproduce the bug exactly** — it must fail before the fix.

Run it and confirm it fails:

```bash
pnpm test packages/react-router/__tests__/<file> # unit
# or
pnpm test:integration:run --project chromium integration/<file> # integration
```

### 5. Implement the Fix

- Make the minimal change needed to fix the bug
- Do not refactor unrelated code
- Confirm the fix addresses the root cause, not just the symptom
- Consider all five modes: does this fix break anything in Declarative / Data / Framework / RSC?

Run the failing test again — it must now pass:

```bash
pnpm test packages/react-router/__tests__/<file>
```

Run the broader test suite to check for regressions:

```bash
pnpm test packages/react-router/
```

If the fix touches Framework/Vite code, run integration tests too:

```bash
pnpm test:integration:run --project chromium
```

Confirm linting and typechecking pass:

```bash
pnpm lint
pnpm typecheck
```

### 6. Create a Changeset

Create `.changeset/<descriptive-name>.md`:

```markdown
---
"react-router": patch
---

fix: <brief description of what was fixed>
```

Use `patch` for bug fixes. Only include packages in the frontmatter that were actually changed.

### 7. Report Results

Summarize:

- What the bug was and why it happened
- What code was changed and why
- That the test now passes
- Any edge cases or related issues noticed

Ask me to review the changes and iterate based on any feedback.

### 8. Open PR

Once I approve the fix, commit the changes and open a PR to `dev`. Include a `Closes #NNNN` in the description to link the PR to the original issue. Also link the issue in the `Development` sidebar
78 changes: 78 additions & 0 deletions .github/workflows/preview.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
# Create "installable" preview branches
#
# Commits to `dev` push builds to a `preview/dev` branch:
# pnpm install "remix-run/react-router#preview/dev&path:packages/react-router"
#
# Can also be dispatched manually with base/installable branches to provide
# `experimental` branches from PRs or otherwise.

name: Preview Build

on:
push:
branches:
- dev
workflow_dispatch:
inputs:
baseBranch:
description: Base Branch
required: true
installableBranch:
description: Installable Branch
required: true

concurrency:
# Include `event_name` here because when a pull_request is merged (closed), the
# `github.ref` goes back to `ref/heads/dev` which will conflict with the run on
# `dev` from the merged PR
group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.ref }}
cancel-in-progress: true

jobs:
preview:
if: github.repository == 'remix-run/react-router'
runs-on: ubuntu-latest
steps:
- name: Checkout (push)
if: github.event_name == 'push'
uses: actions/checkout@v4

- name: Checkout (workflow_dispatch)
if: github.event_name == 'workflow_dispatch'
uses: actions/checkout@v4
with:
ref: ${{ inputs.baseBranch }}

- name: Install pnpm
uses: pnpm/action-setup@v4

- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version-file: "package.json"
cache: pnpm

- name: Install dependencies
run: pnpm install --frozen-lockfile

- name: Setup git
run: |
git config --local user.email "hello@remix.run"
git config --local user.name "Remix Run Bot"

# Build and force push over the preview/dev branch
- name: Build/push branch (push)
if: github.event_name == 'push'
run: |
pnpm run setup-installable-branch preview/dev
git push --force --set-upstream origin preview/dev
echo "💿 pushed installable branch: https://github.com/$GITHUB_REPOSITORY/commit/$(git rev-parse HEAD)"

# Build and normal push for experimental releases to avoid unintended force
# pushes over remote branches in case of a branch name collision
- name: Build/push branch (workflow_dispatch)
if: github.event_name == 'workflow_dispatch'
run: |
pnpm run setup-installable-branch ${{ inputs.installableBranch }}
git push --set-upstream origin ${{ inputs.installableBranch }}
echo "💿 pushed installable branch: https://github.com/$GITHUB_REPOSITORY/commit/$(git rev-parse HEAD)"
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,6 @@ worker-configuration.d.ts

# v7 reference docs
/public

.claude/settings.local.json
.claude/skills
Loading