fix(tui): reuse stable native hyperlink identities - #230
Merged
Merged
Conversation
danielkov
approved these changes
Sep 16, 2026
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
Why
VS Code freeze samples after closing a Kit terminal showed xterm spending time in
clearAllMarkers/ marker disposal. Anonymous OSC-8 openings allocate new markers when linked cells are repainted. Stable IDs allow xterm to reuse those link records instead of accumulating them on repeated diffs.This complements the single-pass renderer from #228: unchanged frames already avoid output, but content/style changes within existing links still emit OSC-8 opens.
Review and validation
mise run test -- --lib tui:: -- --test-threads=1passed after the final review changes.mise run lintpassed (format plus all-targets Clippy with all features and no default features).Existing validation limitations
The earlier full library run had 1,462 passes, 7 failures, and 5 ignored tests. Four failures passed on targeted retry. Two shell-output failures reproduce on the clean baseline because a local shell profile emits a missing-file warning into stderr. A Git credential/askpass test can stall on both baseline and patched builds; bounded retries were terminated. Parallel TUI signal-test interference also reproduces on the baseline, so the TUI suite was validated serially.
No claim of globally bounded marker storage for endlessly changing destinations or spans; this fixes repeated reuse of the same link. The separate Crossterm disconnect-loop issue is outside this PR.