Skip to content

fix(shared): render Codex directives in over-indented lists - #43726

Merged
juliusmarminge merged 3 commits into
pingdotgg:mainfrom
saphid:hunter/c-4e257aee13
Nov 26, 2026
Merged

juliusmarminge merged 3 commits into
pingdotgg:mainfrom
saphid:hunter/c-4e257aee13

Conversation

@saphid

@saphid saphid commented Nov 26, 2026

Copy link
Copy Markdown
Contributor

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: an a.ts link to src/a.ts / the Run tests label, matching the same directives after a normally spaced list marker. The linked runtime transcript includes the complete Node command fixture; run it from packages/shared on 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

  • Added three focused regression cases in the existing normalizer test files. All three fail on the unmodified base source with raw directive text in place of anchors/spans.
  • 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:prove with 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.
  • Real before/after parser runtime output, scenario fixture, and captures.

Before

After

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).

@github-actions github-actions Bot added vouch:trusted Author is trusted by repo permissions or the VOUCHED list. size:XS 0-9 changed lines (additions + deletions). labels Nov 26, 2026
@coderabbitai

coderabbitai Bot commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The inline parse prefixes now end with a space instead of a colon. Tests cover file-citation and follow-up directives in over-indented list content.

Changes: Markdown directive parsing

Layer / File(s) Summary
Update inline prefixes and test list directives
apps/web/src/markdown/wordsHast.ts, apps/web/src/markdown/wordsHast.test.ts, packages/shared/src/markdownListIndentation.ts, packages/shared/src/markdownListIndentation.test.ts
Both inline prefixes now end with a space. The shared test processor applies Codex directive parsing after list indentation normalization. Tests check rendered file-citation links and follow-up spans in over-indented list content.

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix

Suggested labels: bugfix

Suggested reviewers: juliusmarminge, macroscopeapp

Merge Risk: Minimal · up to 3810c

This change makes file citations and follow-up directives render correctly in over-indented list items instead of showing raw directive text. The change is small and covered by regression tests, so merge risk is minimal.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title names the main change: Codex directives in over-indented lists are now rendered. It uses a conventional commit prefix, is specific, and matches the objectives and summary, which describe the…
Description check Passed The description follows the template. It has Problem, Change, Scope, and Verification sections. The Problem section gives the bug, the reproduction steps, and expected behavior. The Change section exp…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title names the main change: Codex directives in over-indented lists are now rendered. It uses a conventional commit prefix, is specific, and matches the objectives and summary, which describe the inline prefix change that fixes this case.

Full details: Description check

Explanation

The description follows the template. It has Problem, Change, Scope, and Verification sections. The Problem section gives the bug, the reproduction steps, and expected behavior. The Change section explains the trailing-space fix in both normalizers. Scope explains why no issue is linked. Verification lists focused tests, the check run, and the scenario run, with observed results and before/after images. The template's agent-model line is present ("Authored by GPT-6.1 Sol (Codex); reviewed by Gemini 4 Neon"). The gaps are minor: the Scope section gives a reason for no issue but does not link one, and the template's 'Read CONTRIBUTING.md' comment is not an output requirement.

Finishing Touches

Generate unit tests (beta)

  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Recent review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between bb04dd0 and 3810c62.

Files selected for processing: 1

  • packages/shared/src/markdownListIndentation.test.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 0 remain after this review.

@juliusmarminge juliusmarminge added the takeover:in-progress A takeover lead is working on this PR label Nov 26, 2026
@juliusmarminge

Copy link
Copy Markdown
Member

Evidence

Created 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.

Before After
Before: literal directives in over-indented list After: a.ts file link and Run tests label
a066eb0935 3810c621c9

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:

  • Desktop was not launched; this proof covers the shared renderer through the web client.
  • Shared Markdown text extraction was not exercised through an app flow.

@juliusmarminge juliusmarminge added takeover:ready Takeover done; auto-lands when gates pass and removed takeover:in-progress A takeover lead is working on this PR labels Nov 26, 2026
@juliusmarminge
juliusmarminge merged commit 5aa81ac into pingdotgg:main Nov 26, 2026
60 checks passed
@juliusmarminge juliusmarminge removed the takeover:ready Takeover done; auto-lands when gates pass label Nov 26, 2026
github-actions Bot pushed a commit to Ryoku-dev/hyakki that referenced this pull request Nov 27, 2026
…g#43726)

Co-authored-by: SAPHID <saphid@users.noreply.github.com>
Co-authored-by: Julius Marminge <julius0216@outlook.com>
(cherry picked from commit 5aa81ac)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XS 0-9 changed lines (additions + deletions). vouch:trusted Author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants