IGNORE: Critique - Markdown Renderable + Word Diff Highlights#536
Draft
remorses wants to merge 88 commits intoanomalyco:mainfrom
Draft
IGNORE: Critique - Markdown Renderable + Word Diff Highlights#536remorses wants to merge 88 commits intoanomalyco:mainfrom
remorses wants to merge 88 commits intoanomalyco:mainfrom
Conversation
- 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
- Add early return in writeOut() and writeOutMultiple() when self.testing is true - Use passed dimensions as fallback for terminalWidth/Height in non-TTY environments
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.
Combines markdown-renderable and word-highlights branches for critique feature.