Repository navigation
feat: name data-layer and location primitives in dev; #687 regression tests - #693
Merged
Merged
Conversation
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
🦋 Changeset detectedLatest commit: c3cfc0a The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 aSILENT_HOLDover severalliveQuerychannels couldn't say which one was connecting. Dev builds now name:query:<key>liveQuery.status:<key>router.location,router.url,router.submissionsEvery name sits behind
...(DEV && { name })inside an options object the primitive already had, the existing pattern forroutingPendingandlazyRoutes. That spread folds away completely in production. The previously unguardedname: "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 0in 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 tonavigate-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 thenavigateFromRoutevariant the issue mentions. The 1.x fix stays with #689 againstmain.How did you test this change?
query.spec.tsandlive-query.spec.tscollect node names viaDEV.hooks.onGraphand assert the keyed names. Two newnavigate-commitspecs 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.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