Skip to content

feat: add createSubscriptionToInvalidationState - #85

Merged
XiNiHa merged 1 commit into
mainfrom
create-subscription-to-invalidation-state
Aug 26, 2026
Merged

feat: add createSubscriptionToInvalidationState#85
XiNiHa merged 1 commit into
mainfrom
create-subscription-to-invalidation-state

Conversation

@XiNiHa

@XiNiHa XiNiHa commented Aug 26, 2026

Copy link
Copy Markdown
Owner

No description provided.

Solid counterpart of React Relay's useSubscribeToInvalidationState.
Subscribes a callback to the invalidation state of a set of data IDs,
re-establishing the subscription when the IDs change and disposing it
on cleanup. Both the data IDs and the callback accept a MaybeAccessor.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@changeset-bot

changeset-bot Bot commented Aug 26, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 012e77b

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

@XiNiHa

XiNiHa commented Aug 26, 2026

Copy link
Copy Markdown
Owner Author

@codex review

@pkg-pr-new

pkg-pr-new Bot commented Aug 26, 2026

Copy link
Copy Markdown

Open in StackBlitz

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

commit: f0d8825

@codecov

codecov Bot commented Aug 26, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 91.19%. Comparing base (26ed142) to head (012e77b).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #85      +/-   ##
==========================================
+ Coverage   90.95%   91.19%   +0.23%     
==========================================
  Files          20       21       +1     
  Lines         741      761      +20     
  Branches      143      146       +3     
==========================================
+ Hits          674      694      +20     
  Misses         57       57              
  Partials       10       10              

☔ View full report in Codecov by Harness.
📢 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.

@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 012e77b Commit Preview URL

Branch Preview URL
Aug 26 2026, 03:46 AM

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 012e77b610

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +54 to +56
dispose: () => {
disposable?.dispose();
disposable = null;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Keep disposal latched across effect executions

If dispose() is called before the effect's initial execution, or if the dataIDs/environment changes afterward, this only disposes the current handle and leaves the effect active, so it subsequently installs a new subscription and invokes callbacks despite the caller having stopped listening. Track a permanently disposed state and prevent later effect executions from subscribing.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

Makes sense, but I'd accept the hole

@XiNiHa
XiNiHa merged commit 012e77b into main Aug 26, 2026
4 checks passed
@XiNiHa
XiNiHa deleted the create-subscription-to-invalidation-state branch August 26, 2026 03:48
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