Skip to content

fix(async): various#8551

Open
wmertens wants to merge 12 commits intobuild/v2from
async-fixes
Open

fix(async): various#8551
wmertens wants to merge 12 commits intobuild/v2from
async-fixes

Conversation

@wmertens
Copy link
Copy Markdown
Member

optimization, documentation etc

@wmertens wmertens requested review from a team as code owners April 13, 2026 10:11
Copilot AI review requested due to automatic review settings April 13, 2026 10:11
@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Apr 13, 2026

⚠️ No Changeset found

Latest commit: 9af5295

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR focuses on optimizing async-signal memory/runtime behavior, tightening serialization semantics (including preserving explicit undefined and compacting object key encoding), and improving developer-facing error-code documentation and linking.

Changes:

  • Refactors AsyncSignalImpl internals for lower memory overhead and adjusts polling / invalidation / abort handling, with corresponding unit test updates.
  • Updates serdes to (a) preserve “must-serialize” undefined values via a sentinel and (b) encode short integer-like object keys as numbers; updates inflate safety rules and tests accordingly.
  • Simplifies benchmark memory baselines format and adds new async-signal benchmark scenarios; adds docs for error codes and updates Vite source-file detection to include MD/MDX.

Reviewed changes

Copilot reviewed 21 out of 21 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
scripts/validate-benchmark-memory.ts Simplifies stored baseline format to a flat id -> bytes/instance map and updates validation logic accordingly.
packages/qwik/src/core/bench/bench-memory-results.json Updates baseline JSON to the new flattened format and adds async-signal scenarios.
packages/qwik/src/core/bench/memory-scenarios.ts Adds async-signal memory benchmark scenarios (default + concurrency).
packages/qwik/src/core/shared/serdes/constants.ts Introduces explicitUndefined sentinel for serialization.
packages/qwik/src/core/shared/serdes/serialize.ts Preserves required undefined values and encodes short integer-like plain-object keys as numbers.
packages/qwik/src/core/shared/serdes/inflate.ts Allows numeric object keys during inflation and makes AsyncSignal inflation more optional/compact.
packages/qwik/src/core/shared/serdes/inflate.unit.ts Updates unsafe-key handling tests to allow numeric keys.
packages/qwik/src/core/shared/serdes/serdes.unit.ts Adds coverage for numeric key serialization and explicit-undefined async-signal serialization.
packages/qwik/src/core/shared/error/error.ts Adds new error code (Q35) and changes production error-code links to point to docs.
packages/qwik/src/core/tests/use-async.spec.tsx Updates expected error text for clientOnly async-signal .value access during SSR.
packages/qwik/src/core/reactive-primitives/types.ts Adjusts AsyncCtx.info to optional and updates async-signal option docs.
packages/qwik/src/core/reactive-primitives/signal.public.ts Adds untrackedLoading / untrackedError to the public AsyncSignal surface.
packages/qwik/src/core/reactive-primitives/impl/async-signal-impl.ts Major internal refactor for memory savings + polling/invalidations + abort/error handling changes.
packages/qwik/src/core/reactive-primitives/impl/async-signal.unit.tsx Updates and adds tests for polling semantics and AbortError behavior.
packages/qwik/src/core/qwik.core.api.md Updates API surface to include untrackedLoading / untrackedError and removes deprecated option docs.
packages/qwik-vite/src/plugins/vite.ts Treats .md/.mdx as source-like URLs for module selection logic.
packages/docs/src/routes/docs/menu.md Adds “Error Codes” entry in docs navigation.
packages/docs/src/routes/docs/errors/index.mdx Adds new error-codes reference page (Q0–Q35).
packages/docs/src/routes/docs/(qwik)/core/state/index.mdx Expands useAsync$() documentation and documents new signal properties/options.
packages/docs/src/routes/api/qwik/index.mdx Updates generated API docs to include untrackedLoading / untrackedError and clarifies option semantics.
packages/docs/src/routes/api/qwik/api.json Updates generated API JSON content for the same AsyncSignal/Options doc changes.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 13, 2026

built with Refined Cloudflare Pages Action

⚡ Cloudflare Pages Deployment

Name Status Preview Last Commit
qwik-docs ❌ Failed (View Log) b094476

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Waiting For Review

Development

Successfully merging this pull request may close these issues.

3 participants