Skip to content

Render inline visualization links in the TUI#33925

Merged
copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/a666b4ebc82bb5798ad45bd137fd815d538e1de2
Jul 17, 2026
Merged

Render inline visualization links in the TUI#33925
copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/a666b4ebc82bb5798ad45bd137fd815d538e1de2

Conversation

@copyberry

@copyberry copyberry Bot commented Jul 17, 2026

Copy link
Copy Markdown

Render inline visualization links in the TUI

Why

Assistant-authored inline visualizations need a terminal fallback that lets users open generated artifacts in a browser.

What changed

  • Recognize ::codex-inline-vis{file="..."} directives in assistant Markdown and replace them with browser links during streaming, finalized history rendering, and local transcript previews.
  • Materialize visualization fragments in sandboxed viewer documents with a content security policy, while restricting artifacts to HTML files within the thread's visualization directory and limiting their size.
  • Show an explicit unavailable message for invalid or missing artifacts, hide incomplete streaming directives, and preserve directive text in code blocks and user Markdown.
  • Add a trusted file-link path for generated viewers without enabling arbitrary file: links in Markdown.

Testing

Add coverage for directive rewriting, streaming and replay, artifact validation, sandboxed viewer generation, trusted terminal hyperlinks, and literal preservation.

## Why

Assistant-authored inline visualizations need a terminal fallback that lets users open generated artifacts in a browser.

## What changed

- Recognize `::codex-inline-vis{file="..."}` directives in assistant Markdown and replace them with browser links during streaming, finalized history rendering, and local transcript previews.
- Materialize visualization fragments in sandboxed viewer documents with a content security policy, while restricting artifacts to HTML files within the thread's visualization directory and limiting their size.
- Show an explicit unavailable message for invalid or missing artifacts, hide incomplete streaming directives, and preserve directive text in code blocks and user Markdown.
- Add a trusted file-link path for generated viewers without enabling arbitrary `file:` links in Markdown.

## Testing

Add coverage for directive rewriting, streaming and replay, artifact validation, sandboxed viewer generation, trusted terminal hyperlinks, and literal preservation.

GitOrigin-RevId: a666b4ebc82bb5798ad45bd137fd815d538e1de2
@copyberry
copyberry Bot force-pushed the copyberry/codex-internal-to-codex-oss/a666b4ebc82bb5798ad45bd137fd815d538e1de2 branch from 11f7694 to f896ab9 Compare July 17, 2026 23:20
@copyberry
copyberry Bot merged commit f896ab9 into main Jul 17, 2026
14 of 32 checks passed
@copyberry
copyberry Bot deleted the copyberry/codex-internal-to-codex-oss/a666b4ebc82bb5798ad45bd137fd815d538e1de2 branch July 17, 2026 23:21
@github-actions github-actions Bot locked and limited conversation to collaborators Jul 17, 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.

1 participant