Conversation
On Solid's dev and observe builds the match publish inside startTransition is wrapped in OBSERVE.attribution.withOrigin: the ref names the destination route (fullPath, params, to/from pathnames) and dates from the history change that started the load, so the record spans the loader wait even though the publish comes after it. The pending offer, the initial load and same-location reloads are published undeclared. Production is unchanged (OBSERVE is undefined). Co-authored-by: Claude via Cursor <noreply@cursor.com> Co-authored-by: Cursor <cursoragent@cursor.com>
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
View your CI Pipeline Execution ↗ for commit 8f46655
☁️ Nx Cloud last updated this comment at |
Hooray! CodSpeed harness just leveled up!The base and head of this comparison were measured with different runner settings, so their benchmark values are not directly comparable. What changed between base and head:
Re-run the base with the same settings to get a valid performance comparison. Comparing Footnotes |
What
On Solid's dev and observe builds (
OBSERVEis defined; it isundefinedin production, so this folds out there), the Solid adapter declares each navigation to Solid's attribution engine.The rule Solid asks of every router is the same: wrap the write whose landing is the destination showing, and pass
atwhen the request predates that write. For TanStack that write is the match publish insidestartTransition— router-core has already awaited the loaders — soTransitionerwrapsfninOBSERVE.attribution.withOrigin(ref, fn)with:name: the leaf expected match'sfullPath(/users/$id),params: its paramsto:router.latestLocation.pathname,from:router.stores.resolvedLocation.get().pathnameat:performance.now()captured in thehistory.subscribecallback the first time the history changes since the last declared publish — the moment the user asked, which is where the wait startsNot declared: the pending offer (
offerPending, any expected match withstatus: 'pending'— not the destination), the initial load (nothing shown yet), and same-location reloads (resolvedLocation.href === latestLocation.href).Why
Solid 2.0.0-rc.8 froze the observe record shape (solidjs/solid#3349). With this, an APM adapter subscribed to
attribution.subscribe("navigation")gets one record per TanStack navigation with the route pattern as its name,settledMscovering the loader wait, and the holds/re-runs the publish caused attributed to it — the same facts@solidjs/routerproduces (solidjs/solid-router#601). No new public API on either side.Known gaps, by design of the two-phase pipeline (documented in Solid's
08-dev-diagnostics.md, Navigations): the record carries nointeractionlink because the publish runs in a later task than the click — consumers join by time containment (nav.atinside the click's handler window); a navigation superseded before it published leaves no record of its own (the destination that showed is dated from the first request). Moving the loader wait inside the transition would close both; that is the longer-term roadmap, not this PR.Tests
tests/observe-navigation.test.tsx: one record per navigation withname /users/$id,to /users/42,from /,params {id: '42'},atbefore the 30ms loader andsettledMs >= 30; the initial load produces no record; a navigation superseded before it published leaves one record for the destination that showed, dated from the first request. Full solid-router suite: 62 files, 872 passed.