feat: add character-level diff mode - #4373
Open
ryanchou1994 wants to merge 2 commits into
Open
ryanchou1994 wants to merge 2 commits into
ryanchou1994 wants to merge 2 commits into
Conversation
ryanchou1994
force-pushed
the
fix/char-level-diff
branch
3 times, most recently
from
September 9, 2026 15:36
8271dbd to
ca7f0e5
Compare
ryanchou1994
force-pushed
the
fix/char-level-diff
branch
from
September 17, 2026 08:42
ca7f0e5 to
8808d67
Compare
Add a Characters option to the diff UI and history-diff API, using an HTML-aware code-point tokenizer that preserves markup and raw-text boundaries. Handle incomplete markup, including a trailing less-than sign. Update the API reference and all language catalogs. Verified on macOS and Linux: 34 notification-diff tests with 3 boundary subtests, and 3 API/source tests including history deletion. Translation catalogs, OpenAPI, generated docs, and hard lint checks also pass. Resolves dgtlmoon#4194
ryanchou1994
force-pushed
the
fix/char-level-diff
branch
from
September 19, 2026 03:55
8808d67 to
ddde62b
Compare
This branch has not been deployed
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
Resolves #4194.
Add a Characters diff option alongside Lines and Words in the web UI and history-diff API (
type=diffChars). The HTML-aware tokenizer keeps tags, comments, declarations, and raw-text boundaries intact while isolating changed text characters. It treats Unicode code points as characters and preserves the input when reassembled, including quoted>attributes and literal or trailing<characters.The API reference and translation catalogs include the new option. This update rebases the change onto
9c4c95ddwhile preserving the new diff header and filter controls.Verification
Passed on macOS (Python 3.13) and Linux (Python 3.11):
E9,F63,F7,F82,INT.Also passed:
msgfmt --checkon macOS.git diff --checkfor the PR diff.Linux test containers had external networking disabled. The full application suite and browser automation were not run.