Render markdown links as OSC-8 hyperlinks in the TUI#17074
Closed
starr-openai wants to merge 1 commit intomainfrom
Closed
Render markdown links as OSC-8 hyperlinks in the TUI#17074starr-openai wants to merge 1 commit intomainfrom
starr-openai wants to merge 1 commit intomainfrom
Conversation
Render remote markdown links as visible labels with visible destinations while attaching OSC-8 wrappers to the cells and scrollback bytes that represent the link. Share terminal-wrapper parsing between width measurement, onboarding links, and history insertion, and cover wrapped links, wide glyph cells, blockquotes, /mcp docs, and control-character sanitization. Co-authored-by: Codex <noreply@openai.com>
dc2a0e1 to
25ef372
Compare
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
Render remote markdown links as visible labels plus visible destinations while attaching OSC-8 hyperlinks to the rendered label/destination cells and to terminal scrollback replay.
This also centralizes OSC-8 generation/sanitization, teaches terminal width measurement to ignore balanced OSC-8 wrappers, migrates onboarding fixed links to the shared ST-terminated helper, preserves the
/mcpdocs hyperlink, and records raw VT100 backend writes so history-insertion tests can assert emitted escape bytes.Coverage
The tests cover:
/mcpempty-state docs link remains a clickable OSC-8 labelValidation
just fmtCARGO_TARGET_DIR=/tmp/codex-osc8-test-target just fix -p codex-tuiCARGO_TARGET_DIR=/tmp/codex-osc8-test-target cargo test -p codex-tui --libpassed: 1513 passed, 0 failed, 1 ignoredorigin/main:CARGO_TARGET_DIR=/tmp/codex-osc8-test-target cargo test -p codex-tui link -- --nocapturepassed: 49/49Draft while CI and reviewer-facing screenshots/checks run.