Skip to content

fix(server): sever RevealGroupContext in createErrorBoundary to match client behavior#2874

Open
AmariahAK wants to merge 1 commit into
solidjs:nextfrom
AmariahAK:fix/2872-errored-reveal-group-context
Open

fix(server): sever RevealGroupContext in createErrorBoundary to match client behavior#2874
AmariahAK wants to merge 1 commit into
solidjs:nextfrom
AmariahAK:fix/2872-errored-reveal-group-context

Conversation

@AmariahAK

Copy link
Copy Markdown

Description

## Summary

The server-side `createErrorBoundary` did not sever `RevealGroupContext` for its
children, unlike the client-side `createCollectionBoundary` which clears the
reveal controller context for all boundary types (both Loading and Errored).

This caused an `<Errored>`-wrapped `<Loading>` to incorrectly register with an
ancestor `<Reveal>` group on the server, holding the entire group to the slowest
slot on hard refresh while SPA navigation revealed independently.

**Fix:** Moved `RevealGroupContext` from `server/hydration.ts` to
`server/signals.ts` (resolving a circular dependency), then added
`setContext(RevealGroupContext, null, owner)` in `createErrorBoundary` — matching
the client's pattern at `boundaries.ts:386`.

Closes #2872.

## How did you test this change?

```bash
# Server-side reveal tests (27 passed, including the new test)
pnpm build && cd packages/solid && npx vitest run test/server/reveal-ssr.spec.ts

# Client-side reveal order tests (29 passed — no regressions)
cd packages/solid-signals && npx vitest run tests/createRevealOrder.test.ts

# Full server test suite (173 passed)
cd packages/solid && npx vitest run test/server/

New test added: "Errored-wrapped Loading does not join ancestor Reveal group" in
reveal-ssr.spec.ts — verifies that only the direct Loading registers in the
group and the Errored-wrapped one does not.

The server-side createErrorBoundary did not sever RevealGroupContext for its
children, unlike the client-side createCollectionBoundary which clears the
reveal controller context for all boundary types (both Loading and Errored).

This caused an <Errored>-wrapped <Loading> to incorrectly register with an
ancestor <Reveal> group on the server, holding the entire group to the
slowest slot on hard refresh while SPA navigation revealed independently.

Fix: move RevealGroupContext from server/hydration.ts to server/signals.ts
(resolving a circular dependency), then call setContext(RevealGroupContext,
null, owner) in createErrorBoundary — matching the client's pattern at
boundaries.ts:386.

Co-authored-by: atlarix-agent <agent@atlarix.dev>
@changeset-bot

changeset-bot Bot commented Jul 11, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 7bffb17

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

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.

2 participants