Skip to content

feat!: support Solid 2 - #21

Draft
kecan0406 wants to merge 4 commits into
mainfrom
next
Draft

kecan0406 wants to merge 4 commits into
mainfrom
next

Conversation

@kecan0406

Copy link
Copy Markdown
Owner

What changes

Ports the library to the Solid 2 release candidate (solid-js and @solidjs/web 2.0.0-rc.16, @solidjs/router 2.0.0-next.41). This stays a draft until Solid 2 ships. Merging it is the 2.0.0 major, and main gets a v1 branch for Solid 1 fixes first.

  • Engine: state lives in plain variables, and each move reaches the signals on a microtask. The engine never reads back a write Solid has not committed yet. A bar started inside an action() shows while the action runs, instead of once its transition commits.
  • Router: <RouteProgress> reads the in-flight target from useIsRouting() and latest(location), so it no longer needs useBeforeLeave() or its microtask flag. Router 2.0 flips isRouting after that microtask, which broke the flag. shallow and filter now also apply to back/forward.
  • Hydration: client-only memos and effects are transparent. Without it, the client looked for ids the server never sent, and the bar and everything after it hydrated detached.
  • Tests: a new hydration project renders pages with Vite's SSR build and hydrates them with hydratable client code. A no-bar control page keeps the harness honest.
  • Docs site: www/ stays on Solid 1 and the published 1.x package until the site moves to Solid 2. README, the agent skill and CONTRIBUTING describe 2.x.

The changeset lists the user-facing changes. In short: Solid 2 peers, ProgressContext is Context<ProgressController | null>, class takes array and object values, and filter/shallow cover back/forward.

Checklist

  • pnpm format:check and pnpm check pass (locally, and the full CI gate in the Playwright Docker image, Firefox included)
  • Tests cover the changed behavior
  • README.md and the matching page under www/src/routes/docs/ are updated: the README is; the docs pages wait for the site's move to Solid 2, and dist/docs is built from them
  • A changeset (pnpm changeset) if the published package changes

🤖 Generated with Claude Code

https://claude.ai/code/session_016vK1cfoUAbKghdSJTmgoPC

kecan0406 and others added 2 commits October 22, 2026 03:55
Port the library to the solid-js 2.0 release candidate, @solidjs/web and
@solidjs/router 2.0, on a branch that stays unpublished until Solid 2 ships.

- The engine keeps its state in plain variables and publishes each move to
  the signals on a microtask. Its own logic never reads back a write Solid has
  not committed yet, and a bar started inside an action() shows while the
  action is in flight instead of when its transition commits.
- <RouteProgress> takes the in-flight target from useIsRouting() and the
  location's latest value. The useBeforeLeave() flag cleared on a microtask
  no longer worked: router 2.0 flips isRouting after that microtask.
- Client-only memos and effects are transparent to hydration ids, so the
  nodes after the bar still hydrate against the server's ids.
- Tests, the dev playground and the build move to the Solid 2 toolchain. The
  docs site keeps building on Solid 1 against the published 1.x package
  until it moves to Solid 2.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016vK1cfoUAbKghdSJTmgoPC
A Vitest global setup renders pages with Vite's SSR build, the same plugin
an app's server build uses, and hands the HTML to a jsdom project compiled
as hydratable client code. Each page hydrates in its own file, as one
hydration per page load. The pages put data and elements after the bar
that hydration finds by id, and each side answers the data differently,
so a page shows whether the server's answer was adopted.

A control page with no bar pins the harness. Without the transparent
option on the client-only memos and effects, the client looked for keys
the server never sent ("400" against "000"), so the bar and the data
after it were created detached. With it, every element is claimed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016vK1cfoUAbKghdSJTmgoPC
@vercel

vercel Bot commented Oct 21, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
solid-route-progress Ready Ready Preview Oct 21, 2026 7:18pm UTC

Comment thread test/hydration/page.ts Fixed
kecan0406 and others added 2 commits October 22, 2026 04:17
# Conflicts:
#	package.json
#	pnpm-lock.yaml
#	www/package.json
CodeQL flagged the `<script>` regex (js/bad-tag-filter): it misses
`<SCRIPT>` and other spellings an HTML parser accepts. Parse the markup
with a template and run each script element's text in document order, as
the browser does.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016vK1cfoUAbKghdSJTmgoPC

This branch was successfully deployed

1 active deployment
Preview — f304ce11 Deployed Oct 21, 2026 by vercel[bot]
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