Skip to content

Comments

Fix invalidation#672

Merged
feruzm merged 2 commits intodevelopfrom
inv
Feb 23, 2026
Merged

Fix invalidation#672
feruzm merged 2 commits intodevelopfrom
inv

Conversation

@feruzm
Copy link
Member

@feruzm feruzm commented Feb 23, 2026

Summary by CodeRabbit

Release Notes

  • Bug Fixes
    • Fixed an issue where draft changes were not consistently reflected across different draft list views. Cache invalidation has been improved to ensure all draft displays stay synchronized after creating or updating drafts.

@feruzm feruzm added the patch Bug fixes and patches (1.0.0 → 1.0.1), add this only if any packages/ have patch changes in PR label Feb 23, 2026
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 23, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 8707c31 and f6f4942.

⛔ Files ignored due to path filters (6)
  • packages/sdk/dist/browser/index.js is excluded by !**/dist/**
  • packages/sdk/dist/browser/index.js.map is excluded by !**/dist/**, !**/*.map
  • packages/sdk/dist/node/index.cjs is excluded by !**/dist/**
  • packages/sdk/dist/node/index.cjs.map is excluded by !**/dist/**, !**/*.map
  • packages/sdk/dist/node/index.mjs is excluded by !**/dist/**
  • packages/sdk/dist/node/index.mjs.map is excluded by !**/dist/**, !**/*.map
📒 Files selected for processing (8)
  • apps/web/src/app/publish/_api/use-save-draft.ts
  • apps/web/src/app/submit/_api/save-draft.ts
  • packages/sdk/CHANGELOG.md
  • packages/sdk/package.json
  • packages/sdk/src/modules/posts/mutations/use-add-draft.ts
  • packages/sdk/src/modules/posts/mutations/use-update-draft.ts
  • packages/wallets/CHANGELOG.md
  • packages/wallets/package.json

📝 Walkthrough

Walkthrough

The pull request adds cache invalidation calls for infinite drafts queries across multiple draft mutation operations in the SDK and web application, replacing manual cache mutations with explicit invalidation in one location.

Changes

Cohort / File(s) Summary
SDK Draft Mutations
packages/sdk/src/modules/posts/mutations/use-add-draft.ts, packages/sdk/src/modules/posts/mutations/use-update-draft.ts
Adds invalidation of the infinite drafts query in onSuccess handlers to ensure cached infinite-scroll lists are refetched when drafts are created or updated.
Web App Draft Operations
apps/web/src/app/publish/_api/use-save-draft.ts, apps/web/src/app/submit/_api/save-draft.ts
Adds or replaces cache invalidation for infinite drafts queries; removes direct cache mutation in save-draft.ts in favor of invalidateQueries calls for both standard and infinite drafts.
Version & Release Documentation
packages/sdk/CHANGELOG.md, packages/sdk/package.json, packages/wallets/CHANGELOG.md, packages/wallets/package.json
Bumps SDK version to 2.0.12 with cache invalidation fix documentation, and updates wallets package to 1.5.40 with updated SDK dependency.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

  • Fix editing/draft loading #623: Introduced or modified the infinite drafts query cache behavior that is now addressed by this PR's invalidation calls in the draft save/update flows.

Suggested labels

patch:sdk

Poem

🐰 Infinite drafts now dance in perfect sync,
No more stale caches on the brink,
Invalidate, refresh, and all is well,
The rabbit's cache spell!

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'Fix invalidation' directly relates to the main changes in the PR, which involve adding cache invalidations for infinite drafts queries across multiple files.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch inv

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 and usage tips.

@feruzm feruzm merged commit 02b97bc into develop Feb 23, 2026
1 check passed
@feruzm feruzm deleted the inv branch February 23, 2026 10:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

patch Bug fixes and patches (1.0.0 → 1.0.1), add this only if any packages/ have patch changes in PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant