Skip to content

Upgrade yorkie-js-sdk to 0.7.6#150

Merged
hackerwins merged 2 commits into
mainfrom
upgrade-yorkie-0.7.6
Apr 22, 2026
Merged

Upgrade yorkie-js-sdk to 0.7.6#150
hackerwins merged 2 commits into
mainfrom
upgrade-yorkie-0.7.6

Conversation

@hackerwins

@hackerwins hackerwins commented Apr 22, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Upgrade @yorkie-js/sdk and @yorkie-js/react from 0.7.5 to 0.7.6
  • Fix peer-side inline style loss after block split (Enter key)
  • Bump frontend chunk budget from 700 KB to 710 KB

Bug fixed

In 0.7.5, cloneElement passed undefined for attributes when splitting a Tree element node. This caused inline styles (bold, italic, fontSize, etc.) to be lost on the peer side after a block split:

  • Local user: saw correct styles because the in-memory cache masked the Tree-level issue
  • Remote peer: re-parsed from the Yorkie Tree on remote-change, saw unstyled text

Reproduced on wafflebase.io (0.7.5) — after bold "abcd" is split at "ab|cd", the peer's Tree shows bold: "true" on "ab" but no attributes on "cd".

In 0.7.6, cloneElement copies attributes via this.attrs?.deepcopy().

Other improvements from 0.7.6

  • Prevent race conditions between sync loop and detach/deactivate (#1228)
  • Unify presence event emission with reconcilePresence (#1229)
  • LWW conflict GC and array-move convergence fixes (#1226, #1227)

Test plan

  • pnpm verify:fast — 101 frontend tests pass (5 new split-style tests added)
  • pnpm verify:self — all builds + chunk gate pass
  • Manual verification on wafflebase.io: confirmed bug on 0.7.5, confirmed fix on 0.7.6

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Chores
    • Updated Yorkie SDK dependencies to version 0.7.6
    • Optimized frontend build configuration
    • Enhanced test coverage for document styling and splitting behavior

hackerwins and others added 2 commits April 23, 2026 03:48
Fixes a bug where inline styles (bold, italic, etc.) were lost on the
peer side after a block split. In 0.7.5, cloneElement passed undefined
for attributes, so the split-created inline node had no styles. The
local user saw correct rendering because the cache masked the issue,
but peers re-parsing from the Yorkie Tree saw unstyled text.

Key changes in 0.7.6:
- cloneElement now copies attributes via deepcopy (PR #1224)
- Prevent race conditions between sync loop and detach (PR #1228)
- Unify presence event emission with reconcilePresence (PR #1229)

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
The yorkie-js-sdk 0.7.6 upgrade increased the vendor-yorkie chunk
from ~697 KB to ~701 KB, exceeding the previous 700 KB limit.

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
@coderabbitai

coderabbitai Bot commented Apr 22, 2026

Copy link
Copy Markdown

Caution

Review failed

Pull request was closed or merged during review

📝 Walkthrough

Walkthrough

This PR bumps Yorkie dependencies (@yorkie-js/sdk to 0.7.6, @yorkie-js/react to 0.7.6), increases frontend build chunk budget by 10 KB, and adds comprehensive test coverage for splitBlock functionality with inline style preservation across various scenarios.

Changes

Cohort / File(s) Summary
Build Configuration
harness.config.json
Increased frontend chunk budget maxChunkKb from 700 to 710.
Dependency Updates
packages/backend/package.json, packages/frontend/package.json
Bumped @yorkie-js/sdk and @yorkie-js/react from 0.7.5 to 0.7.6 across backend and frontend packages.
Test Coverage for Block Splitting
packages/frontend/tests/app/docs/yorkie-doc-store.test.ts
Enhanced test cases for splitBlock functionality: renamed boundary split test for clarity; added tests for splitting inside single/multiple-style inlines (bold, italic, fontSize) validating style preservation; added remote-change scenario testing via cache invalidation and tree reparse verification.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~15 minutes

Possibly related PRs

Poem

🐰 A hop, a skip through Yorkie's trees,
Chunks grow from 700 to 710 with ease,
Styles persist when blocks take flight,
Splitting inlines, keeping format tight! ✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately reflects the main change: upgrading @yorkie-js/sdk to 0.7.6. While the PR also includes a chunk budget increase and test additions, the primary focus is the dependency upgrade, which the title captures clearly and concisely.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

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

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch upgrade-yorkie-0.7.6

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.

@hackerwins
hackerwins merged commit c46652e into main Apr 22, 2026
1 check passed
@hackerwins
hackerwins deleted the upgrade-yorkie-0.7.6 branch April 22, 2026 18:54
@github-actions

github-actions Bot commented Apr 22, 2026

Copy link
Copy Markdown
Contributor

Verification: verify:self

Result: ✅ PASS in 117.8s

Lane Status Duration
sheets:build ✅ pass 12.7s
docs:build ✅ pass 7.9s
verify:fast ✅ pass 58.9s
frontend:build ✅ pass 16.0s
verify:frontend:chunks ✅ pass 0.3s
backend:build ✅ pass 4.8s
cli:build ✅ pass 1.8s
verify:entropy ✅ pass 15.5s

Verification: verify:integration

Result: ✅ PASS

@codecov

codecov Bot commented Apr 22, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

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