Repository navigation
fix(web): preserve link labels in content diffs - #683
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
- Link labels in text extraction —
blockNoteToLinesnow delegates to a new recursiveinlineContentToText, which joins text nodes with link labels (array content recursed, legacy string content returned verbatim) and ignores other inline types, fixing the "no differences" result when a link's label is edited. InlineContentshape — widened withcontent?: InlineContent[] | stringto model current styled-text link content plus the legacy string-label form; the existingtype: "text"branch already covered thestyles.linkrepresentation, so both are now handled.- Unit coverage — new
diff-utils.test.tscases for inline ordering, nested blocks, legacy labels, label edits producing removed/added lines, URL/style-only changes stayingunchanged, and empty/non-text blocks. - Component coverage — new
content-diff.test.tsxrenders the realContentDiffin jsdom and asserts changed and deleted link labels are shown instead of the empty state.
The plain-text, line-level diff contract is preserved (URL-only and formatting-only changes stay invisible), recursion operates on acyclic serialized JSON, and content-diff.tsx remains the only consumer of the changed helpers. No actionable issues found.
deepseek-v4.1-flash (free via Pullfrog for OSS) | 𝕏
pikann
approved these changes
Nov 1, 2026
pikann
left a comment
Contributor
There was a problem hiding this comment.
LGTM! Thank you for the contribution! 🚀
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Summary
Editing the text of a link in a document or task description can show “no differences” in the version diff:
blockNoteToLinesreads only top-level text nodes and drops BlockNote link labels.I include link labels in inline order, including styled text arrays and legacy string labels, while keeping nested block traversal. The diff remains a plain-text comparison: URL-only and formatting-only changes are outside its scope. No URL is rendered as an active link.
Type of Change
Validation
ContentDifftests: 13 passed.bun --bun run lintandbun --bun run buildpassed, including TypeScript checking. Lint retains three warnings in untouched files; the build retains its large-chunk warning.No authenticated full-stack end-to-end test was run. The component checks render the actual
ContentDiffin jsdom. No dependency, API, database, or localization changes.Checklist
AI assistance: I used OpenAI Codex for implementation, tests, and automated review.