Skip to content

release: 2.1.1 - #117

Merged
alessandrobellesia merged 4 commits into
mainfrom
develop
Oct 1, 2026
Merged

alessandrobellesia merged 4 commits into
mainfrom
develop

Conversation

@alessandrobellesia

Copy link
Copy Markdown
Member

Release 2.1.1

Fixes #111 and a submit() params bug (#116).

Changed

  • A read() that moves to params already cached or already loading now aborts its own previous request too, as it does when it sends a new one (unless another query still waits on that request).
  • The hash of a submit() or remove() in flight now holds the promise of its request, as the one of a read() does.

Fix

  • Re-executing a query with other params aborts only its own previous request. Before, it could abort the request of another query with the same params, which then ended idle with no data and no error (Re-executing a query can abort a request that belongs to another query #111).
  • A read() that joins a request in flight keeps it running when the query that sent it moves on, and gets its data. While it waits it shows the request as loading, and it no longer switches back to old params, or enables again a query cleaned up meanwhile.
  • Two read() calls sharing a name follow the params of the last execution.
  • Overlapping requests on the same hash (a persistence shorter than a request, or a repository that hands back the request in flight) no longer abort a request that a query still waits on, and no longer leave the hash loading for ever.
  • A read() with the params of a request that was just aborted, before that request ends, sends a new request instead of resolving as aborted.
  • An aborted request no longer resets to idle the result of another query with the same params.
  • submit() no longer writes the payload key into the caller's params. A later execute() with the payload of another item updated the first one, and with reactive params and autoExecute the same update was sent twice.

Notes

Patch bump: bug fixes only, no API change (the emitted index.d.ts is identical to 2.1.0). The two "Changed" items affect a request that no query waits on any more, and the hash state.

Dependencies unchanged: typescript 7 is still held back, and vitest 5.0.3 was under the one-day minimum release age when #116 was prepared.

After the merge, pushing the v2.1.1 tag creates the GitHub release, which publishes to npm. #111 closes when this lands on main.

See CHANGELOG.md for the full [2.1.1] entry.

🤖 Generated with Claude Code

Alessandro Bellesia and others added 4 commits October 1, 2026 12:07
Re-executing a query with other params aborted the `abort` stored on its
old hash, and a hash is shared by every query with the same params: the
request of another query could be the one aborted, and that query ended
idle with no data and no error.

Each action now keeps a lease on the request it waits on and releases
only its own. A read() that joins a request in flight takes a lease too,
so a shared request is aborted only when no query waits on it any more;
a clean up still never aborts a request.

In the read() join:
- the query joins the hash before awaiting, so it shows the request as
  loading, and no longer registers again once the request ends: that
  re-registration enabled again a query cleaned up meanwhile, sent a
  query shared by name back to the old params, and cleared the handles
  of a newer request on the hash, which could then stay loading for ever;
- with a persistence shorter than a request, a query releases its older
  request on the same hash and waits on the newer one with its own lease.

An aborted request sets its hash back to idle only while the hash still
holds that request, identified by its response promise: the hashes of
submit() and remove() now hold it while loading too.

Fixes #111

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
submit() set the key of a single payload on the params object it got,
the caller's own one on the execution started by the call and on the
ones of autoExecute. A later execute() with the payload of another item
kept the first key and updated the first item, and with reactive params
and autoExecute the write triggered the watcher again, so the same update
was sent twice. execute() now works on a copy of the params.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ted one

Follow-up to the CodeRabbit review of #116.

A repository may hand back the request already in flight for the same
key, with the same response promise. A read() that asked for it again
created a second pending request for that promise and released its
older lease before taking the new one, so it could abort the request it
was about to wait on. The leases of a response promise are now counted
on one pending request, and a query takes its new lease before it
releases the older ones.

A read() with the params of a request that was just aborted, before it
settled, joined it and resolved as aborted. It now sends a new request
instead, without the repository key: RepositoryHttp deduplicates reads
by key and would hand back the aborting request until it settles.

A pending request is marked aborted only when it had an `abort` to call.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
fix: abort only the query's own request on re-execution, and stop submit() from mutating params
@coderabbitai

coderabbitai Bot commented Oct 1, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Advanced

Run ID: f405da7e-b13e-4972-851e-90b8aa46cc98

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Autopilot is currently an internal CodeRabbit preview.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@sonarqubecloud

sonarqubecloud Bot commented Oct 1, 2026

Copy link
Copy Markdown

@alessandrobellesia
alessandrobellesia merged commit 1e7340e into main Oct 1, 2026
9 checks passed
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