Conversation
|
Summary of ChangesHello, 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 significantly enhances the test coverage for various Highlights
🧠 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
Activity
Using Gemini Code AssistThe 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
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 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
|
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
solid-relay | c2a7fba | Commit Preview URL Branch Preview URL |
Mar 07 2026, 06:00 PM |
commit: |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #54 +/- ##
===========================================
+ Coverage 26.96% 90.37% +63.41%
===========================================
Files 19 19
Lines 686 686
Branches 132 132
===========================================
+ Hits 185 620 +435
+ Misses 431 57 -374
+ Partials 70 9 -61 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Code Review
This pull request adds a comprehensive set of tests for various Solid Relay primitives, including createFragment, createMutation, createPaginationFragment, and others, along with corresponding SSR tests and schema updates. The overall quality of the tests is high. My review focuses on identifying opportunities to improve test coverage for key scenarios. I've suggested adding tests for fragment read errors and for verifying the UI impact of optimistic mutation updates. These additions would make the test suite even more robust.
| expect(store?.()).toBeUndefined(); | ||
| expect(store?.latest).toBeUndefined(); | ||
| }); | ||
| }); |
There was a problem hiding this comment.
The test suite for createFragment is quite comprehensive. However, it's missing a test case for when reading the fragment from the store fails (e.g., due to data corruption or an inconsistent store state). This can happen in real applications and it's important to ensure the error is handled gracefully by the ErrorBoundary.
I suggest adding a test to cover this scenario. You can simulate this by manually manipulating a record in the mock store to be in an invalid state that observeFragment would fail to read.
|
|
||
| await expect.element(page.getByTestId("pending")).toHaveTextContent("idle"); | ||
| }); | ||
| }); |
There was a problem hiding this comment.
The tests for createMutation cover many important aspects. However, there isn't a test that verifies the UI effect of an optimisticResponse or an updater function. While the test 'becomes pending and forwards the mutation config' checks that these are passed to Relay, it doesn't assert that the optimistic update is actually rendered.
Testing the UI result of optimistic updates is crucial for mutations. I recommend adding a test case that renders data, performs a mutation with an optimistic response, and asserts that the UI updates immediately before the network request completes.
Codex with GPT-5.4 did a pretty great job at writing these tests, requiring only minor adjustments to be made 😋