Skip to content

Conversation

@zxch3n
Copy link
Member

@zxch3n zxch3n commented Nov 27, 2025

Fix the issue mentioned in loro-dev/loro-prosemirror#58

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

if let Some(attributes) = attributes {
if !attributes.is_empty() {
let attrs = Object::new();
for (k, v) in attributes {
Reflect::set(&attrs, &k.into(), &convert(v)?)?;

P1 Badge Null attributes still serialized for insert deltas

text_delta_to_js_value now skips null-valued attributes only for retain ops, but toDelta/sliceDelta feed it Insert segments from handler.get_delta(); this branch still copies every attribute value, including LoroValue::Null, straight into the JS object. If a delta applies {attributes: {bold: null}} to drop a style, the resulting toDelta output will still include attributes: { bold: null } on the affected inserts, so consumers cannot tell the style was removed. The Insert branch needs the same null filtering as the Retain branch to satisfy the commit goal.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@github-actions
Copy link
Contributor

github-actions bot commented Nov 27, 2025

WASM Size Report

  • Original size: 3183.93 KB
  • Gzipped size: 1008.57 KB
  • Brotli size: 700.21 KB

@zxch3n zxch3n merged commit 53635dd into main Nov 27, 2025
1 check passed
@zxch3n zxch3n deleted the fix-richtext branch November 27, 2025 08:54
@github-actions github-actions bot mentioned this pull request Nov 27, 2025
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.

2 participants