Codex Desktop: allow selection-based comments in Markdown and HTML previews
Feature request
Markdown and HTML files opened in the Codex desktop app should be live-commentable by default.
Desired behavior
When a user opens a Markdown file in Codex's native editor or opens a local HTML file in the preview pane, they should be able to:
- Highlight a specific rendered region.
- Add a comment on that selection.
- Have that comment sent into the active Codex thread as chat input.
- Preserve enough source context for Codex to understand and act on the selected region.
This should feel similar to the Plan Review workflow, but work for Markdown and HTML files opened in Codex.
Context Codex should receive
For each submitted comment, Codex should receive:
- File path.
- Selected text or selected rendered/DOM region.
- Stable source location when possible, such as Markdown line numbers, HTML source offsets, DOM path, or element identifier.
- The user's comment.
- Nearby surrounding context when source mapping is ambiguous.
Why this matters
This would make Markdown specs, plans, generated reports, and local HTML previews much easier to review inside Codex. Today, the user has to manually describe where the issue is or copy/paste context back into chat. Selection-based comments would make document and preview review much more precise and reduce context loss.
Acceptance criteria
- Highlighting content in a Markdown preview exposes a comment action.
- Highlighting content in an HTML preview exposes a comment action.
- Submitted comments appear in the active Codex thread as actionable user input.
- Codex can respond by explaining, editing, or asking follow-up questions about the selected region.
- The comment payload preserves file/source context so the user does not need to restate where the issue is.
Additional notes
For Markdown, the ideal behavior maps rendered preview selections back to source line ranges where possible. For HTML, capturing source offsets, DOM paths, or stable element identifiers would be enough. If exact source mapping is ambiguous, selected text plus nearby rendered context would still be useful.
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗