Skip to content

Fix fragments and sdk#697

Merged
feruzm merged 3 commits into
developfrom
fragments
Mar 9, 2026
Merged

Fix fragments and sdk#697
feruzm merged 3 commits into
developfrom
fragments

Conversation

@feruzm
Copy link
Copy Markdown
Member

@feruzm feruzm commented Mar 9, 2026

Summary by CodeRabbit

  • Bug Fixes

    • Fixed draft detection to prevent duplicate or stale load/invalidation triggers.
  • Chores

    • Updated @hiveio/dhive to v1.3.5 across apps and packages; bumped SDK and wallets package versions and changelogs.
  • Refactor

    • Adjusted fragment edit/delete mutation usage for more consistent payload handling and UI behavior.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Mar 9, 2026

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: fb073cb2-a8d6-491f-846f-83c2393a6e18

📥 Commits

Reviewing files that changed from the base of the PR and between 263f197 and 5ed3c8e.

📒 Files selected for processing (4)
  • packages/sdk/CHANGELOG.md
  • packages/sdk/package.json
  • packages/wallets/CHANGELOG.md
  • packages/wallets/package.json

📝 Walkthrough

Walkthrough

Bumps @hiveio/dhive from ^1.3.4 to ^1.3.5 across multiple manifests, refactors fragment mutation calls to use payload objects (adds fragmentId to mutation payloads and updates hook signatures), and adds a per-draft-load guard to draft detection to avoid duplicate/stale triggers.

Changes

Cohort / File(s) Summary
Dependency Updates
apps/self-hosted/hosting/api/package.json, apps/self-hosted/package.json, apps/web/package.json, packages/sdk/package.json, packages/wallets/package.json
Bumped @hiveio/dhive entries from ^1.3.4^1.3.5; bumped package versions in packages/sdk and packages/wallets.
Draft Detection Logic
apps/web/src/app/submit/_hooks/api-draft-detector.ts
Added hasLoadedRef per-draft load guard: call onDraftLoaded only once per draft, prevent onInvalidDraft after load, and reset on draftId/path changes.
Fragment Mutation APIs
apps/web/src/features/shared/fragments/edit-fragment.tsx, apps/web/src/features/shared/fragments/fragments-list-item.tsx
Removed positional fragmentId usage from hooks; mutations now accept payload objects (e.g., updateFragment({ fragmentId, title, body }), deleteFragment({ fragmentId })); updated hook call args and dependency arrays accordingly.
Changelogs
packages/sdk/CHANGELOG.md, packages/wallets/CHANGELOG.md
Added entries for new package versions and patch notes referencing fixes to fragments and SDK.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Poem

🐰 I hopped through package trees with a cheerful twitch,
Bumped dhive a notch and calmed a draft's twitch,
Fragments tote their id now in a tidy sack,
I nibble tiny fixes and give a happy smack,
Hooray — soft hops, tidy code, and a carrot snack! 🥕✨

🚥 Pre-merge checks | ✅ 1 | ❌ 2

❌ Failed checks (1 warning, 1 inconclusive)

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.
Title check ❓ Inconclusive The title 'Fix fragments and sdk' is vague and does not clearly convey the specific changes made. It mentions two general areas but lacks details about what was actually fixed. Provide a more specific title that describes the actual fixes, such as 'Update @hiveio/dhive to 1.3.5 and refactor fragment mutation APIs' to clarify the changes.
✅ Passed checks (1 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fragments

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.

coderabbitai[bot]

This comment was marked as resolved.

@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 Mar 9, 2026
@feruzm feruzm merged commit 0239656 into develop Mar 9, 2026
@feruzm feruzm deleted the fragments branch March 9, 2026 09:59
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