Repository navigation
fix(qwik): defer context access until visible lifecycle - #389
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
@askable-ui/angular
@askable-ui/context
@askable-ui/core
@askable-ui/create-app
@askable-ui/mcp
@askable-ui/qwik
@askable-ui/react
@askable-ui/react-native
@askable-ui/solid
@askable-ui/svelte
@askable-ui/vue
@askable-ui/web-component
commit: |
This branch was successfully deployed
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.
Summary
NoSerializecontext signal populated by the visible lifecycleCloses #372.
Why
Qwik component setup runs before
useVisibleTask$. The adapter previously destructured a getter backed by a local context variable during setup, permanently capturing the unavailable value. Optimizer-backed rendering also demonstrated that mutating that captured local is incompatible with Qwik's transformed lifecycle.The new
ctxRefsignal keeps the render-time reference stable while the browser-only context remainsNoSerialize. Dependent hooks read it only when a visible task or action actually needs the context.Validation
npm run build -w @askable-ui/qwiknpm test -w @askable-ui/qwik— 29 tests, including 5 optimizer-backed rendered lifecycle testsnpm audit --omit=dev --audit-level=highnpm run buildnpm test— 1,162 testsnpm ci && npm run buildinsite/docsgit diff --checkFollow-up
Optimizer-backed investigation also found the broader pre-existing Qwik action-QRL limitation tracked separately in #388. This PR stays focused on context readiness and does not introduce a breaking action/callback API migration.