Conversation
🦋 Changeset detectedLatest commit: 8db15d0 The changes in this PR will be included in the next version bump. This PR includes changesets to release 6 packages
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 |
Polling moves out of the async signal engine: usePoll(signal, expires) invalidates the signal on an interval that starts on document idle and resets whenever a new result lands. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Polling now lives in usePoll (@qwik.dev/utils). Drops the expires/poll/ interval options and accessors, the NO_POLL flag, the expires slot in the AsyncSignal wire format, and the SSR eager-resume hack for polling signals (the usePoll visible task resumes on qidle instead). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
allowStale:false made every invalidation clear the value; clear() makes that a one-shot, caller-controlled operation and drops the CLEAR_ON_INVALIDATE flag and the loader allowStale plumbing. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The browser HTTP cache becomes the single freshness authority for loader data. cacheControl accepts any cacheControl() value or a function of the request event (null return skips the header); default is no-cache. SSG writes per-loader files only for cacheControl: 'immutable' loaders. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…erender on unchanged data Every navigation invalidates every loader signal; the browser HTTP cache (driven by each loader's cacheControl) is the freshness authority. The TTL fetch cache becomes a per-navigation dedupe map shared between hover prefetch and the nav's own fetches. Loader responses keep their raw text so an unchanged payload skips deserialization and returns the previous object, firing no effects. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…utils Also refresh the core-notes agent guidance and add the utils package to the monorepo map. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
cacheControl:'immutable' data cannot change until a rebuild, so the per-navigation invalidation sweep skips those signals; their tracked URL inputs still invalidate them when the path or search changes. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Skip immutable loaders in the eager nav kick-off and in link data prefetch: if the SSR'd page never reads them client-side, their JSON is never downloaded. First read fetches once per deploy (immutable browser caching covers every fetch after that). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@qwik.dev/core
@qwik.dev/router
eslint-plugin-qwik
create-qwik
@qwik.dev/optimizer
@qwik.dev/devtools
commit: |
Contributor
built with Refined Cloudflare Pages Action⚡ Cloudflare Pages Deployment
|
maiieul
reviewed
Aug 3, 2026
| * @public | ||
| */ | ||
| export const usePoll = (signal: ComputedSignal<unknown>, expires: number) => { | ||
| useVisibleTask$( |
Member
There was a problem hiding this comment.
Can't it leverage useOnDocument instead? Are we sure we want to provide a general hook for this or could providing recipes on how to build one in the docs be more helpful to consumers?
GitHub strips embedded svg
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.
The current ComputedSignal API with
pollandexpirestakes quite a lot of core code while it's fairly rare/doesn't cover all use cases.Furthermore, there was a disconnect between the
expiresoption in routeLoaders and thecache-controlheaders that might have been set by middleware.This PR does a few things:
@qwik.dev/utilspackage, which contains non-core code that can still access internals and which is tied to the exact core versionusePollhook which can be used to poll a computed signal once it hits the client.clear()to computed signals, which clears their value, which will cause Suspense boundaries to show while recalculatingcacheControloption to routeLoaders. Set to"immutable"to make it be generated during SSG.poll,expires, andallowStalefrom ComputedSignal and thus also routeLoaderszod$into utils