-
Notifications
You must be signed in to change notification settings - Fork 321
IGNORE: Critique - Markdown Renderable + Word Diff Highlights #536
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
remorses
wants to merge
86
commits into
anomalyco:main
Choose a base branch
from
remorses:critique
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+681
−84
Conversation
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
- Added scrollX offset to inline highlight positions in LineNumberRenderable - Added tests for word highlights with horizontal scrolling in unified and split views
When text wraps to multiple visual lines, highlights now only appear on the correct wrapped line(s) by using lineWraps offset to calculate visibility.
lineWraps contains wrap INDEX (0,1,2...), not column offset. Now properly computes column offset by summing widths of previous wrapped segments belonging to the same logical line.
…into word-highlights
Instead of immediately rebuilding all blocks when syntaxStyle or conceal changes, mark dirty and defer work to renderSelf(). This follows the same pattern as CodeRenderable and avoids redundant work. Key improvements measured via CPU profiling: - textBufferSetStyledText: 113ms → 67ms (↓41%) - updateLayout: 99ms → 17ms (↓83%) - render: 160ms → 63ms (↓61%) - Total profile time: 3091ms → 2886ms (↓7%)
Resolved conflicts in Diff.ts and Diff.test.ts, preserving word-level highlighting feature while incorporating upstream changes.
Two issues fixed: 1. Use --all flag to enable Zig cross-compilation for all platforms (darwin, linux, windows) instead of only building for the CI runner's platform (linux) 2. Fix the native package paths - packages are scoped under @opentui/ (e.g., @opentui/core-darwin-arm64) not flat opentui-* directories Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@opentui/core
@opentui/react
@opentui/solid
@opentui/core-darwin-arm64
@opentui/core-darwin-x64
@opentui/core-linux-arm64
@opentui/core-linux-x64
@opentui/core-win32-arm64
@opentui/core-win32-x64
commit: |
- Replace diffWordsWithSpace with prefix/suffix elimination algorithm - Only highlight when adds.length === removes.length (matching GitHub.com) - Add MaxIntraLineDiffStringLength (1024 chars) limit - Remove lineSimilarityThreshold option (not used by GitHub Desktop) - Update tests for new behavior
…ntui into markdown-renderable
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.
Combines markdown-renderable and word-highlights branches for critique feature.