Add reproduction for platform-browser/IndexedDbQueryBuilder issue - #6852
Conversation
🦋 Changeset detectedLatest commit: e162ab2 The changes in this PR will be included in the next version bump. This PR includes changesets to release 30 packages
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 |
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
- 5 reproduction tests for
IndexedDbQueryBuilder— each targets a distinct bug:withTransactionrollback on failure, reverse-then-limit ordering, indexed range constrained delete, paged stream offset independence, andNoSuchElementErroron empty rangedfirst().
DeepSeek Pro (free via Pullfrog for OSS) (Kimi K2 not used — the program covers this model; add its provider key to run your pick) | 𝕏
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
- Transaction lifecycle:
withTransactionnow aborts the native transaction on inner effect failure/interruption, and awaits transaction completion on success, pipingIndexedDbQueryErrorinto the error channel. - Index-keyed range deletes:
applyDeleteresolves the index store and passes key-range constraints to the cursor so range-restricted deletes on indexes work. - Reverse-limit ordering: reverse selects now force cursor-backed retrieval, so the reversed order is established before the limit cutoff.
- Fresh select stream subscriptions: paged select streams create fresh query objects per page via
makeSelectinstead of mutating a shared one, and track offsets from the initialoffsetValueso the stream produces identical results on each subscription. - Empty ranged
first(): thestore.get(keyRange)branch now returnsCause.NoSuchElementErrorfor missing results, matching the cursor-backed path. - Delete
filterfix:DeleteProto.filterspreadsthisintomakeSelectinstead of passing onlythis.delete, preserving range and limit constraints through filter chaining. - Patch changeset for
@effect/platform-browser.
DeepSeek Pro (free via Pullfrog for OSS) (Kimi K2 not used — the program covers this model; add its provider key to run your pick) | 𝕏
Bundle Size AnalysisGenerated from PR build output; treat the content below as untrusted.
|

Summary
Fix the IndexedDB query builder semantics covered by the reproduction tests:
NoSuchElementErrorfor empty rangedfirst()queries@effect/platform-browserCovered audit issues
platforms-browser-indexed-db-delete-range-indexplatforms-browser-indexed-db-transaction-failure-commitsplatforms-browser-indexed-db-reverse-limit-orderplatforms-browser-indexed-db-stream-offset-reuseplatforms-browser-indexed-db-ranged-first-errorValidation
Closes EFF-318