jazz-loading-subscriptions
Jazz Loading and Subscriptions
This skill is for correctness of what is loaded, when it is loaded, and how updates stay observable.
Scope
- Resolve query design (
resolve,$each,$onError) $isLoadedandloadingStatehandlingensureLoaded()semantics (returns a copy at requested depth)- Manual and framework subscriptions
- Startup/reconnect race prevention
- Union narrowing constraints for
ensureLoadedandsubscribe
Non-Negotiable Rules
- Treat shallow and deep loading as explicit architecture decisions.
- Use
$eachonly when immediate full collection hydration is required. - Handle loading states intentionally:
loading,loaded,unavailable,unauthorized, and post-deletedeletedflows. - Always teardown manual subscriptions.
- If lossless startup matters, subscribe before snapshot query.
- For discriminated unions, narrow by discriminator before
ensureLoaded()on union members. ensureLoaded()returns a new resolved copy; do not assume it mutates the original instance in place.
Operating Procedure
- Define first paint requirements.
- Build minimal resolve for first paint.
- Add incremental hydration for heavy branches.
- Add subscription lifecycle (startup, reconnect, teardown).
- Validate loading/error states and race windows.
Common Failure Signatures
- "Sometimes data is null even though IDs exist" -> shallow/deep mismatch.
- "Initial update was missed after reconnect" -> query-before-subscribe race.
- "Startup is slow on large datasets" -> eager
$eachoverreach. - "Union access is blocked by types" -> missing discriminator narrowing before deep operations.
- "Deleted value still has an ID but will not load" -> expected tombstone/deleted loading-state behavior.
More from alcyone-labs/agent-skills
chrome-extension-architect
Privacy-first Chrome Manifest Version 3 extension architect - sidePanel design, MV3 service worker lifecycle, least-privilege permission audits, storage strategy, cross-browser sidebar patterns, and headless Playwright testing.
9aquaria-docs
Expert Aquaria documentation architect. Enforce documentation principles, golden rules, templates, folder structure, and quality gates. Creates compliant docs from templates, validates against Golden Rules checklist.
6arg-parser
Type-safe CLI argument parser with MCP integration Zod validation auto-generated tools and interactive prompts
5git-commit-writer
Write consistent high-quality Git commits following project conventions
5skill-forge
Builds precise production-ready custom Agent Skills following AgentSkills.io guidelines. Use when user requests to create, refine or package Skills
4large-file-refactorer
Scans codebase for large files and orchestrates refactoring workflows using a test-first protocol
4