Skip to content

Conversation

@pmachapman
Copy link
Collaborator

@pmachapman pmachapman commented Feb 2, 2026

This PR fixes an issue where a { blank: true } operation is not created for a verse that is not in a para, where that verse is followed by a blank para, resulting in operations subsequent ops being incorrectly offset by 1 by the TextViewModel, which requires a blank operation to be present for the first verse.

Although this bug only manifests in the frontend editor (not in conversion from Delta to USX), I have added tests to ensure that behavior is not broken in future, and fixed this bug in the backend as that was the least complicated and most compatible fix (note that I did not have to change the logic in ToUsx(), only ToChapterDeltas()).

I've also run this PR with the roundtrip tool, and can confirm that additional blank segments were only added where they should have been (a very small number of projects I had access to locally were affected by this).


This change is Reviewable

@codecov
Copy link

codecov bot commented Feb 2, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 81.91%. Comparing base (5688f65) to head (562e32c).
⚠️ Report is 1 commits behind head on master.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #3665   +/-   ##
=======================================
  Coverage   81.91%   81.91%           
=======================================
  Files         618      618           
  Lines       38542    38543    +1     
  Branches     6304     6309    +5     
=======================================
+ Hits        31570    31571    +1     
  Misses       5999     5999           
  Partials      973      973           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@pmachapman pmachapman marked this pull request as ready for review February 3, 2026 01:04
@pmachapman pmachapman added the will require testing PR should not be merged until testers confirm testing is complete label Feb 3, 2026
Copy link
Collaborator

@RaymondLuong3 RaymondLuong3 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the tests and the improvement. Code looks good

@RaymondLuong3 reviewed 2 files and all commit messages, and made 1 comment.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @pmachapman).

@RaymondLuong3 RaymondLuong3 added ready to test and removed will require testing PR should not be merged until testers confirm testing is complete labels Feb 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants