Skip to content

fix(tui): render file links with literal spaces#4

Draft
middleDuckAi wants to merge 1 commit intoupstream-main-20260324from
middleDuck/codex-14688-file-links-with-spaces
Draft

fix(tui): render file links with literal spaces#4
middleDuckAi wants to merge 1 commit intoupstream-main-20260324from
middleDuck/codex-14688-file-links-with-spaces

Conversation

@middleDuckAi
Copy link
Copy Markdown
Owner

@middleDuckAi middleDuckAi commented Mar 24, 2026

Summary

  • tolerate literal spaces in file:// local link targets
  • keep local file links styled and rendered in both TUI markdown renderers
  • add matching regression coverage in both codex-tui and codex-tui-app-server

Why

Issue openai#14688 reports that local file:// links with literal spaces degrade to plain text because Url::parse rejects the raw target. That makes valid local references render inconsistently compared with already-encoded file links.

This change adds a narrow space-encoding fallback for file:// parsing only, so the local-link renderer still shows the styled target path.

Testing

  • cargo fmt --all
  • cargo test -p codex-tui file_link_with_literal_spaces_uses_target_path
  • cargo test -p codex-tui-app-server file_link_with_literal_spaces_uses_target_path

Notes

  • The fix is intentionally narrow: only file:// parsing gets a space-encoding fallback.
  • Plain path-like links and already-valid URLs keep the existing behavior.

@middleDuckAi middleDuckAi force-pushed the middleDuck/codex-14688-file-links-with-spaces branch from b3adef7 to 9dd069e Compare March 24, 2026 12:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant