Skip to content

feat: name data-layer and location primitives in dev; #687 regression tests - #693

Merged
ryansolid merged 2 commits into
nextfrom
claude/project-thread-8ayzle
Oct 22, 2026
Merged

ryansolid merged 2 commits into
nextfrom
claude/project-thread-8ayzle

Conversation

@ryansolid

@ryansolid ryansolid commented Oct 22, 2026 •

Copy link
Copy Markdown
Member

Requested by Ryan · project thread

Addresses #691. Adds regression tests for #687 on next.

Summary

#691: primitive names. With attribution on, router-owned sources showed up as "signal" / "computed", so a SILENT_HOLD over several liveQuery channels couldn't say which one was connecting. Dev builds now name:

  • query version signals: query:<key>
  • liveQuery status signals: liveQuery.status:<key>
  • the router's location signal, url memo and submissions memo: router.location, router.url, router.submissions

Every name sits behind ...(DEV && { name }) inside an options object the primitive already had, the existing pattern for routingPending and lazyRoutes. That spread folds away completely in production. The previously unguarded name: "location" is now guarded too, so the prod bundle shrinks by 16 B minified.

The issue also lists option-less internal memos (pathname, search, matches, link state, routeStates, …). I left those out on purpose. createMemo(fn, DEV && { name }) leaves ,void 0 in production, about 7 B minified per site, so naming them would cost real bytes.

#687: Forward during a held Back. I can't reproduce it on next. The 2.0 commit path already keeps the last write. I added two regression tests to navigate-commit.spec.tsx. In the first, Back is held on /slow's data, Forward is pressed, then the data resolves, and the router ends on /fast. In the second, a navigation made while another one is held lands on the newer target, which is the navigateFromRoute variant the issue mentions. The 1.x fix stays with #689 against main.

How did you test this change?

  • New specs in query.spec.ts and live-query.spec.ts collect node names via DEV.hooks.onGraph and assert the keyed names. Two new navigate-commit specs cover Forward pressed while a Back navigation is still loading is dropped; the URL and the rendered route get out of sync #687; both assert that the hold actually happened before Forward.
  • pnpm test: 717 client, 96 server, types green.
  • Prod bundle (vite 8 / rolldown, minified, createRouter + query + liveQuery + useLocation + useLinkState + useSubmissions + formAction + useIsRouting): 82,955 → 82,939 B minified; none of the new names appear in the output.

🤖 Generated with Claude Code

https://claude.ai/code/session_01Fmb4aQtDJWoA8CUktR9QoZ

query version signals, liveQuery status signals, and the router's
location/url/submissions nodes carry names behind DEV, so attribution
diagnostics identify them. Zero production bytes (the previously
unguarded "location" name now folds out too).

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Fmb4aQtDJWoA8CUktR9QoZ
@ryansolid ryansolid self-assigned this Oct 22, 2026
@changeset-bot

changeset-bot Bot commented Oct 22, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: c3cfc0a

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

This PR includes changesets to release 1 package
Name Type
@solidjs/router 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

… land on the newer target (#687)

Both pass on next: the 2.0 commit path already keeps the last write.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Fmb4aQtDJWoA8CUktR9QoZ
@ryansolid ryansolid changed the title feat: name data-layer and location primitives in dev feat: name data-layer and location primitives in dev; #687 regression tests Oct 22, 2026
@ryansolid
ryansolid merged commit 22c6306 into next Oct 22, 2026
4 checks passed
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