Skip to content

fix: render Codex file citations as file cards - #1706

Merged
lodystage[bot] merged 4 commits into
mainfrom
fix/codex-file-cards
Oct 19, 2026
Merged

lodystage[bot] merged 4 commits into
mainfrom
fix/codex-file-cards

Conversation

@Leeeon233

@Leeeon233 Leeeon233 commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

Related issue

No linked issue; same-repository fix.

Problem / pressure

Codex output references such as :codex-file-citation{path="/tmp/report.xlsx" purpose="output" artifact_kind="workbook"} appear as raw directive text instead of usable file cards.

Summary

  • Convert complete citations in Markdown prose into the existing file-card layout, including paths surrounded by newlines.
  • Reuse session file-link opening and context-menu permissions; copy the original path when no opener is available. No uploaded attachment or new filesystem authority is introduced.
  • Preserve Windows drive-qualified absolute targets and leave non-container Markdown nodes (including math) untouched.
  • Keep code examples and invalid/incomplete citations as non-card content. Add rendering tests, Storybook states, and bilingual implementation notes.

The CI repair also removes a duplicate fixture key already present on main and runs
CLI and desktop builds in separate smoke-workflow steps, preserving each build's
existing memory budget.

Visual explanation

flowchart LR
  A[Markdown prose] --> B[Parse complete Codex citation]
  B --> C[Encode file path as Markdown link]
  C --> D[Existing file-card layout]
  D --> E[Session file-link open and menu boundary]
  D --> F[Copy path when no opener exists]
Loading

Before / after

Before After
Raw Codex citation attributes appear in the answer. A named file card opens through the existing session file-link path.
A newline-wrapped output path remains directive text. Leading/trailing path whitespace is removed before rendering the card.

Test plan

  • Passed in a standalone checkout with frozen-lockfile dependencies: 106 tests across markdown-agent-file-link, markdown-streaming-reparse, and session-file-card, including Windows paths, card clicks, and inline/display math.
  • Passed: pnpm check:quick (type-aware lint and repository boundary checks).
  • Passed: CLI build and staging with NODE_OPTIONS=--max-old-space-size=2048; desktop build:app with its existing renderer heap budget. Both builds include their type checks.
  • Passed: pnpm run docs check with initialized submodules (zero errors), targeted Oxfmt, and git diff --check.
  • Main CI passed on 33015d132; desktop smoke execution is tracked in the PR Checks tab. Local evidence and remote results are distinct.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 19, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-19T01:32:28.745464Z 3c81917 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 3c81917225

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread packages/components/src/lib/remark-codex-file-citations.ts Outdated
@github-actions

Copy link
Copy Markdown
Contributor

Desktop PR smoke regression failed on commit 046822cfea4f280a9c85f8774441be4958dd02d4.

Recordings not attached

  • Run evidence: failure-index.json is missing

The Actions artifact retains the complete trace, screenshots, logs, and runtime evidence.

Address citation review and CI failures; pin smoke builds to the CLI heap budget.

Model: gpt-6
@lodystage
lodystage Bot merged commit cf102d5 into main Oct 19, 2026
17 checks passed
@lodystage
lodystage Bot deleted the fix/codex-file-cards branch October 19, 2026 01:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant