Repository navigation
fix(shared): render Codex directives in over-indented lists - #43726
Conversation
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
EvidenceCreated a project with src/a.ts and opened a Replay thread containing the two Codex directives in seven-space list items, followed by a one-space control list. Same fresh state, dark theme, and 1280×800 web viewport on both commits. Captured after message syncing finished.
Base showed raw directive syntax; head rendered the TypeScript file link and Run tests label, matching the control. scenarios:prove exited 0. Scenario and replay seed · Before recording · After recording Not shown:
|


Problem
Codex file citations and follow-up labels at the start of over-indented list items appear as raw directive text in web/desktop chat and shared thread-search text extraction.
Deterministic repro on
origin/main(2e830d77334715a72602d907ed7d78d8cfc430d1): render the exact synthetic Markdown- :codex-file-citation{path="src/a.ts"}(seven spaces after the hyphen), or- :codex-followup[Run tests]{prompt="Run tests"}. Observed: literal:codex-file-citation{...}/:codex-followup[...]text. Expected: ana.tslink tosrc/a.ts/ theRun testslabel, matching the same directives after a normally spaced list marker. The linked runtime transcript includes the complete Node command fixture; run it frompackages/sharedon base and head.Change
End the inline parsing prefix with a space in both the shared remark normalizer and the web Words normalizer. This prevents the prefix from joining a directive's leading colon into
::, so both parsers recognize the inline directive. Web and desktop share Words rendering; thread search uses the shared remark pipeline. Native mobile uses its separate renderer.Scope
Small fix for an obvious bug; no issue needed under CONTRIBUTING.md.
Verification
vp test run packages/shared/src/markdownListIndentation.test.ts apps/web/src/markdown/wordsHast.test.ts: 89 tests pass in each of three consecutive runs.vp run check:changed: exit 0, including format, lint, knip, affected typechecks and tests, and React Compiler coverage.vp run scenarios:provewith the linked scratch scenario: exit 0; the citation-link assertion fails on base and passes on head. Captures use an expanded CLI-originated user message and a free Replay turn.Not shown: native mobile rendering, Electron shell/IPC, live Codex provider output, remote/relay/tunnel sessions, and physical devices.
Authored by GPT-6.1 Sol (Codex); reviewed by Gemini 4 Neon (Antigravity).