Skip to content

fix(signals): publish latest errors with their readers - #4705

Open
GabbeV wants to merge 2 commits into
solidjs:nextfrom
GabbeV:fix/latest-error-boundary-publication
Open

GabbeV wants to merge 2 commits into
solidjs:nextfrom
GabbeV:fix/latest-error-boundary-publication

Conversation

@GabbeV

@GabbeV GabbeV commented Nov 6, 2026

Copy link
Copy Markdown

Summary

While an action holds an update, latest(data) can display a successful proposal immediately but keep the old content when the same computation throws. Proposing removal of an enclosing Show, or adding identity memos, changes whether the error fallback appears. Repeated errors and recovery also disagree with their successful-value counterparts.

Preserve the selected lane when reading an errored lane memo and when converting that error into an Errored fallback. The fallback's error signal and recovery use that publication context too; the original error source remains the reset target. This reuses existing state and adds no node fields.

This follows D-41's value/error publication symmetry and the intent of #3886 / #4106. Five existing intermediate assertions intentionally change: errors from ahead computations now display where their successful values would. Their recovery assertions remain intact; ordinary readers still wait for the held update.

How did you test this change?

Based on next@45648f78.

  • Added 24 JSX timelines covering values/errors, sync/async answers, zero to two identity memos, retained/removing branches, a second error, pending recovery, and an ordinary reader alongside the ahead reader. Added reset, same-value recovery, fallback identity and cleanup coverage.
  • Signals suite: 6,759 passed, 2 skipped.
  • Client web suite: 1,779 passed, 1 skipped, combining the full run with a rerun of artifact-manifest checks after supplying missing generated declarations.
  • Targeted error/latest/boundary hydration tests: 176 passed.
  • Signals dev/prod/observe builds, declaration generation, production purity checks, formatting, diff checks and generated rules index pass.

Tests used the native JSX compiler. Local web config supplies the installed jest-dom setup explicitly; dependencies use the checkout's required seroval 1.7.0. Existing unchanged web artifacts were supplied from the local baseline checkout. The complete SSR suite was not run.

Size — caps unchanged

Measured with the repository's Rolldown harness against next (the preceding 4fe75321 has identical runtime sources):

Scenario Minified change Brotli change
Ordinary core / store / until+refresh / simple render 0 B 0 B
isPending/latest +32 B +5 B
Hydrating app, no stores +173 B +71 B
CSR app with boundaries +177 B +79 B

The last two scenarios exceed their existing Brotli caps by 34 B and 57 B respectively, with real minified growth. This draft leaves those gates failing for maintainer review; it does not raise caps or claim performance improvements.

@changeset-bot

changeset-bot Bot commented Nov 6, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 6e282e2

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 15 packages
Name Type
@solidjs/signals Patch
test-integration Patch
@solidjs/web Patch
@solidjs/babel-plugin Patch
@solidjs/compiler Patch
@solidjs/diagnostics Patch
@solidjs/element Patch
@solidjs/h Patch
@solidjs/html Patch
solid-js Patch
@solidjs/universal Patch
board-example Patch
canvas-example Patch
server-dbmon-example Patch
todos-server-example Patch

Not sure what this means? Click here to learn what changesets are.

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

@codspeed

codspeed Bot commented Nov 6, 2026

Copy link
Copy Markdown

Merging this PR will not alter performance

1 warning

⚠️ 1 benchmark is dominated by system calls

System calls cannot be simulated consistently and are left out of the measure. The reported value understates the real cost. Switch to the Walltime instrument to measure them.

Learn more about system calls

See affected benchmarks

✅ 201 untouched benchmarks
⏩ 5 skipped benchmarks1


Comparing GabbeV:fix/latest-error-boundary-publication (6e282e2) with next (45648f7)

Open in CodSpeed

Footnotes

  1. 5 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports. ↩

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.

1 participant