Skip to content

fix: consistently handle loading states across primitives#72

Merged
XiNiHa merged 2 commits into
mainfrom
fix/loading
May 27, 2026
Merged

fix: consistently handle loading states across primitives#72
XiNiHa merged 2 commits into
mainfrom
fix/loading

Conversation

@XiNiHa
Copy link
Copy Markdown
Owner

@XiNiHa XiNiHa commented May 27, 2026

Closes #71

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented May 27, 2026

🦋 Changeset detected

Latest commit: c7b89f7

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

This PR includes changesets to release 1 package
Name Type
solid-relay 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

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new Bot commented May 27, 2026

Open in StackBlitz

npm i https://pkg.pr.new/solid-relay@72

commit: 467b8d0

@codecov
Copy link
Copy Markdown

codecov Bot commented May 27, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 91.40%. Comparing base (311ab2b) to head (c7b89f7).

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #72      +/-   ##
==========================================
+ Coverage   91.29%   91.40%   +0.10%     
==========================================
  Files          20       20              
  Lines         724      733       +9     
  Branches      138      140       +2     
==========================================
+ Hits          661      670       +9     
  Misses         55       55              
  Partials        8        8              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request aims to consistently handle loading states across primitives in solid-relay by updating createLazyLoadQueryInternal to use a switch statement handling 'ok', 'error', and 'loading' states. However, the reviewer identified that setting the initial and fallback pending states to false when data and error are both undefined violates the DataStore<T> type contract, which could lead to runtime crashes. The reviewer provided suggestions to keep pending as true in these scenarios to preserve type safety.

Comment thread src/primitives/createLazyLoadQuery.ts
Comment thread src/primitives/createLazyLoadQuery.ts
@cloudflare-workers-and-pages
Copy link
Copy Markdown

cloudflare-workers-and-pages Bot commented May 27, 2026

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
solid-relay c7b89f7 Commit Preview URL

Branch Preview URL
May 27 2026, 06:29 AM

@XiNiHa XiNiHa merged commit b86235d into main May 27, 2026
5 checks passed
@XiNiHa XiNiHa deleted the fix/loading branch May 27, 2026 06:30
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.

createFragment and createLazyLoadQuery disagree on the "loading" FragmentState

1 participant