Skip to content

render local file links from target paths#13857

Merged
pash-openai merged 4 commits intomainfrom
codex/render-local-file-link-targets
Mar 11, 2026
Merged

render local file links from target paths#13857
pash-openai merged 4 commits intomainfrom
codex/render-local-file-link-targets

Conversation

@pash-openai
Copy link
Copy Markdown
Collaborator

@pash-openai pash-openai commented Mar 7, 2026

No description provided.

@pash-openai pash-openai force-pushed the codex/render-local-file-link-targets branch from a77c4c5 to 8515ef2 Compare March 7, 2026 15:52
@pash-openai pash-openai force-pushed the codex/render-local-file-link-targets branch from 78be429 to e7d342b Compare March 10, 2026 18:50
@pash-openai pash-openai changed the title Render local file links from target paths render local file links from target paths Mar 10, 2026
@pash-openai
Copy link
Copy Markdown
Collaborator Author

@codex review

Copy link
Copy Markdown
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: f333d14a9b

ℹ️ 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".

│
~  Render local file links from their destination paths instead of the
   markdown label so transcript output shows the real target path,
   location suffix, and cwd-relative shortening consistently across full
   renders, streaming output, plans, reasoning summaries, and tooltips.

   Carry the session cwd through the markdown render path where deferred
   rendering needs stable context, but keep the path types tighter while
   doing it. The renderer still accepts `Option<&Path>` at the boundary
   where cwd lookup can genuinely fail. The TUI state above that now owns
   `PathBuf` values and passes `&Path` instead of threading
   `Option<PathBuf>` through the rest of the code, which added noise
   without representing a real optional state.

   Remove `_with_cwd` from constructors whose parameters already made the
   cwd requirement obvious, and plumb the session cwd into the last
   remaining call site that had been falling back to process cwd. The
   tooltip history cell already had access to `Config`, so this keeps its
   local file-link rendering aligned with the rest of the session without
   extra plumbing.

   Add rustdoc and focused comments around the local link parsing helpers
   to document what each helper returns, how normalization works, and the
   edge cases around `file://` URLs, hash and colon location suffixes,
   UNC paths, and cwd-relative shortening. Keep those helpers below the
   Writer methods that use them so the calling context is visible first.

   Use `temp_dir()` in tests where the code only needs a stable absolute
   cwd, which avoids baking Unix- or Windows-specific root semantics into
   portable fixtures.

   Co-authored-by: Codex <noreply@openai.com>
@joshka-oai joshka-oai force-pushed the codex/render-local-file-link-targets branch from ed4a5b4 to e867c43 Compare March 11, 2026 00:18
@pash-openai pash-openai merged commit cec211c into main Mar 11, 2026
31 checks passed
@pash-openai pash-openai deleted the codex/render-local-file-link-targets branch March 11, 2026 01:00
@github-actions github-actions bot locked and limited conversation to collaborators Mar 11, 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