Skip to content

fix: preserve null Convex query results#264

Merged
zbeyens merged 1 commit into
mainfrom
codex/convex-query-null-cache
May 20, 2026
Merged

fix: preserve null Convex query results#264
zbeyens merged 1 commit into
mainfrom
codex/convex-query-null-cache

Conversation

@zbeyens
Copy link
Copy Markdown
Member

@zbeyens zbeyens commented May 20, 2026

  • Auto release

🐛 Fixes ConvexQueryClient dropping valid null subscription results
🟢 95-100% confidence

Phase 🧪 Tests 🌐 Browser
Reproduced 🔴 React/Solid cache regressions ➖ N/A
Verified 🟢 bun check ➖ N/A

✅ Outcome

  • null subscription results now replace existing React and Solid TanStack Query data.
  • undefined still preserves existing hydrated data while the subscription has no server value yet.

⚠️ Caveat

  • No browser surface; package cache behavior only.

🏗️ Design

  • Chosen boundary: ConvexQueryClient.onUpdateQueryKeyHash in React and Solid.
  • Why not quick patch: callers cannot distinguish valid null from cache-stale behavior after the bridge drops it.
  • Why not broader change: upstream adapter already treats null as data; only kitcn's nullish guard diverged.

🧪 Verified

  • bun test packages/kitcn/src/react/client.lifecycle.test.ts
  • bun run test:vitest -- packages/kitcn/src/solid/client.lifecycle.vitest.ts
  • bun lint:fix
  • bun --cwd packages/kitcn build
  • bun typecheck
  • bun check

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented May 20, 2026

🦋 Changeset detected

Latest commit: 724bdc4

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
kitcn Patch
@kitcn/resend Patch

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

@vercel
Copy link
Copy Markdown

vercel Bot commented May 20, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
better-convex Ready Ready Preview, Comment May 20, 2026 3:53pm

Request Review

@zbeyens zbeyens merged commit 21760cb into main May 20, 2026
5 checks passed
@zbeyens zbeyens deleted the codex/convex-query-null-cache branch May 20, 2026 16:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant