Skip to content

[pull] main from remix-run:main#276

Merged
pull[bot] merged 26 commits into
code:mainfrom
remix-run:main
May 14, 2026
Merged

[pull] main from remix-run:main#276
pull[bot] merged 26 commits into
code:mainfrom
remix-run:main

Conversation

@pull
Copy link
Copy Markdown

@pull pull Bot commented May 14, 2026

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.4)

Can you help keep this open source service alive? 💖 Please sponsor : )

brophdawg11 and others added 26 commits May 5, 2026 10:34
…14942)

* fix: fire onError for errors already present in initial router state

When a loader throws synchronously and the error is already in the
initial router state at mount time, the onError callback was never
called because it only fires inside the router subscriber (which only
runs on subsequent state updates).

Added a useEffect that checks for errors in router.state on mount and
fires onError for each one. This ensures the onError callback is called
for all errors, including those that occur before the subscriber is set
up.

Fixes #14941

* Add changeset and sign CLA

* Updates

* Apply suggestions from code review

Co-authored-by: Matt Brophy <matt@brophy.org>

* Migrate changeset

---------

Co-authored-by: Matt Brophy <matt@brophy.org>
…on (#15022)

* fix(react-router): clear isHydrationRequest on entry so aborted hydrations dont leak stale SSR data into subsequent loader calls

When a clientLoader.hydrate=true loader is still pending (awaiting async work before serverLoader()) and the hydration POP is aborted by a new navigation, the finally block that clears isHydrationRequest never runs. The next loader invocation reuses the same closure, sees isHydrationRequest=true, and serverLoader() returns the SSR initialData captured for the original URL instead of fetching fresh data. Capture the flag into a local on entry and clear the closure immediately so any subsequent invocation observes false regardless of whether the prior call ever completed.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* Remove focused test

---------

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* Cleanup lint issues in tests, examples, scripts, and integration

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* Cleanup lint issues in source code

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* Revert "Cleanup lint issues in source code"

This reverts commit 949599b.

* Revert "Cleanup lint issues in tests, examples, scripts, and integration"

This reverts commit db7be24.

* Fix lint errors

* Fix test

---------

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…ry name (#15027)

When Vite's `base` config and React Router's `basename` both share
the same path segment as the app directory (e.g. `base: "/app/"`,
`basename: "/app/"`), Vite strips the base prefix from server-build
virtual module import paths during SSR module loading. This caused
"Failed to load url /root.tsx" errors because "/app/root.tsx" was
being resolved to "/root.tsx".

Fix by passing `publicPath` to `resolveFileUrl` when generating
server-build virtual module imports, so that the function falls back to
the `/@fs/` absolute path form when the root-relative URL would
conflict with the Vite base path.

Fixes #13716

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…tations (#15028)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…15039)

* Fire onError for initial-load errors when RouterProvider mounts late

Buffer state updates that fire while no subscribers are attached and
replay them to the first subscriber, so initial-load errors emitted
during router.initialize() are delivered to onError even when
RouterProvider mounts after the router has finished initializing.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* Update change file

---------

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-authored-by: Remix Run Bot <hello@remix.run>
@pull pull Bot locked and limited conversation to collaborators May 14, 2026
@pull pull Bot added the ⤵️ pull label May 14, 2026
@pull pull Bot merged commit caaae65 into code:main May 14, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants