Skip to content

tui: restore visible line numbers for hidden file links#12870

Merged
pash-openai merged 9 commits intomainfrom
codex/tui-file-link-line-numbers
Feb 26, 2026
Merged

tui: restore visible line numbers for hidden file links#12870
pash-openai merged 9 commits intomainfrom
codex/tui-file-link-line-numbers

Conversation

@pash-openai
Copy link
Contributor

@pash-openai pash-openai commented Feb 26, 2026

we recently changed file linking so the model uses markdown links when it wants something to be clickable.

This works well across the GUI surfaces because they can render markdown cleanly and use the full absolute path in the anchor target.

A previous pass hid the absolute path in the TUI (and only showed the label), but that also meant we could lose useful location info when the model put the line number or range in the anchor target instead of the label.

This follow-up keeps the TUI behavior simple while making local file links feel closer to the old TUI file reference style.

key changes:

  • Local markdown file links in the TUI keep the old file-ref feel: code styling, no underline, no visible absolute path.
  • If the hidden local anchor target includes a location suffix and the label does not already include one, we append that suffix to the visible label.
  • This works for single lines, line/column references, and ranges.
  • If the label already includes the location, we leave it alone.
  • normal web links keep the old TUI markdown-link behavior

some examples:

  • [foo.rs](/abs/path/foo.rs) renders as foo.rs
  • [foo.rs](/abs/path/foo.rs:45) renders as foo.rs:45
  • [foo.rs](/abs/path/foo.rs:45:3-48:9) renders as foo.rs:45:3-48:9
  • [foo.rs:45](/abs/path/foo.rs:45) stays foo.rs:45
  • [docs](https://example.com/docs) still renders like a normal web link

how it looks:
Screenshot 2026-02-26 at 9 27 55 AM

@pash-openai pash-openai marked this pull request as ready for review February 26, 2026 08:46
Copy link
Contributor

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 8371ab742e

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@jif-oai
Copy link
Collaborator

jif-oai commented Feb 26, 2026

@codex review

Copy link
Contributor

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: a3e5363fe9

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@pash-openai pash-openai merged commit 6acede5 into main Feb 26, 2026
57 of 62 checks passed
@pash-openai pash-openai deleted the codex/tui-file-link-line-numbers branch February 26, 2026 10:29
@github-actions github-actions bot locked and limited conversation to collaborators Feb 26, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants