Conversation
|
There was a problem hiding this comment.
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
AsyncSignalImplinternals for lower memory overhead and adjusts polling / invalidation / abort handling, with corresponding unit test updates. - Updates serdes to (a) preserve “must-serialize”
undefinedvalues 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.
built with Refined Cloudflare Pages Action⚡ Cloudflare Pages Deployment
|
- only have $jobs$[] when concurrency != 1 - make cleanup sync if possible
optimization, documentation etc