Skip to content

fix: properly reset data store on param change#52

Merged
XiNiHa merged 1 commit into
mainfrom
fix/store-reset
Mar 7, 2026
Merged

fix: properly reset data store on param change#52
XiNiHa merged 1 commit into
mainfrom
fix/store-reset

Conversation

@XiNiHa
Copy link
Copy Markdown
Owner

@XiNiHa XiNiHa commented Mar 7, 2026

No description provided.

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Mar 7, 2026

🦋 Changeset detected

Latest commit: 1df00d9

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

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

@gemini-code-assist
Copy link
Copy Markdown
Contributor

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request resolves an issue where the reactive data fetching primitives, createLazyLoadQuery and createFragment, failed to clear their internal data stores when their input parameters were updated. The change ensures that these components correctly reset their state, providing a consistent and predictable user experience by always reflecting the most current data based on the active parameters.

Highlights

  • Data Store Reset Fix: Addressed a bug where the data store for createLazyLoadQuery and createFragment was not properly resetting when their parameters changed, leading to stale data being displayed.
  • Explicit State Resetting: Modified the internal logic to explicitly set data, error, and pending states to their initial undefined/false/true values upon parameter changes, ensuring a clean state.
  • Code Refactoring: Removed the initialResult variable and integrated its values directly into the createDataStore calls or explicit setResult calls, improving clarity and reducing redundancy.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Changelog
  • .changeset/five-games-burn.md
    • Added a new changeset file documenting the fix for data store resetting.
  • src/primitives/createFragment.ts
    • Removed the initialResult variable declaration.
    • Updated the parameter change handling to explicitly reset data, error, and pending properties of the result store using individual setResult calls within a batch.
    • Moved the initial state object literal directly into the createDataStore function call.
  • src/primitives/createLazyLoadQuery.ts
    • Removed the initialResult variable declaration.
    • Modified the createComputed block to explicitly reset data, error, and pending properties of the result store within a batch when parameters change.
    • Moved the initial state object literal directly into the createDataStore function call.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new Bot commented Mar 7, 2026

Open in StackBlitz

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

commit: 12b14b3

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 addresses a bug where the data store was not being properly reset when parameters for createLazyLoadQuery and createFragment change. The fix correctly resets the store by updating each field individually, ensuring reactivity is triggered as expected. The changes are consistent across both primitives and look solid. The addition of batch in createLazyLoadQuery is also a good performance consideration.

@cloudflare-workers-and-pages
Copy link
Copy Markdown

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 1df00d9 Commit Preview URL

Branch Preview URL
Mar 07 2026, 04:16 PM

@codecov
Copy link
Copy Markdown

codecov Bot commented Mar 7, 2026

Codecov Report

❌ Patch coverage is 44.44444% with 5 lines in your changes missing coverage. Please review.
✅ Project coverage is 26.96%. Comparing base (0c65018) to head (1df00d9).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
src/primitives/createFragment.ts 0.00% 5 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #52      +/-   ##
==========================================
+ Coverage   26.83%   26.96%   +0.13%     
==========================================
  Files          19       19              
  Lines         682      686       +4     
  Branches      132      132              
==========================================
+ Hits          183      185       +2     
- Misses        429      431       +2     
  Partials       70       70              

☔ 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.

@XiNiHa XiNiHa merged commit 84ff641 into main Mar 7, 2026
5 checks passed
@XiNiHa XiNiHa deleted the fix/store-reset branch March 7, 2026 16:20
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