GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fix(shared): copying a Codex citation with a pipe in its filename preserves the table row by saphid · Pull Request #43765 · pingdotgg/t3code

Conversation

@saphid

@saphid saphid commented Nov 26, 2026

Copy link
Copy Markdown
Contributor

Problem

When a Codex file citation inside a Markdown table names a file containing | (for example reports/a|b.txt encoded as | in the directive attribute), copying the message or converting inline citations to Markdown emits literal | characters in both the link label and angle-bracketed destination. Reparsing that Markdown splits the table row at those pipes, breaking the file link and dropping the adjacent cell.

Deterministic repro on origin/main (9b4943f91cf8de7f376b73d4a7299fe74b54d044):
Pass the fixture below through wordsHast before and after renderCodexDirectivesForCopy (from apps/web/src/markdown/wordsHast.ts and apps/web/src/markdown/markdownText.ts), or through renderCodexDirectivesForCopy / renderCodexInlineDirectivesAsMarkdown in packages/shared/src/codexMarkdownDirectives.ts followed by remark-parse + remark-gfm:

| File | Note |
| --- | --- |
| :codex-file-citation{path="reports/a|b.txt"} | ok |
  • Observed: wordsHast initially renders <a href="./reports/a%7Cb.txt">a|b.txt</a> and a second cell ok. Copy emits | [a|b.txt](<./reports/a|b.txt>) | ok |; reparsing with wordsHast produces cells [a and b.txt](<./reports/a, with no link and ok dropped (remark-gfm splits the row into 4 cells instead of 2).
  • Expected: Reparsing the copied row produces the same two cells, a|b.txt file link to ./reports/a%7Cb.txt, and ok cell as the original.

Change

Escape | as \| in markdownLabel and percent-encode | as %7C in markdownDestination inside packages/shared/src/codexFileCitations.ts. Because codexFileCitationMarkdown is shared across packages/shared/src/codexMarkdownDirectives.ts (mobile rendering, search, shared copy) and apps/web/src/markdown/markdownText.ts (web and desktop copy/link extraction), this single change fixes all surfaces. Added unit and GFM table copy-and-reparse regression tests in packages/shared/src/codexFileCitations.test.ts and packages/shared/src/codexMarkdownDirectives.test.ts.

Scope

Small fix for an obvious bug; no issue needed under CONTRIBUTING.md.

Verification

  • Base failure (origin/main 9b4943f91cf8de7f376b73d4a7299fe74b54d044): vp test run packages/shared/src/codexFileCitations.test.ts packages/shared/src/codexMarkdownDirectives.test.ts failed 3/39 tests (codexFileCitationMarkdown emitted unescaped | in label and destination; both renderCodexDirectivesForCopy and renderCodexInlineDirectivesAsMarkdown split the 2-column GFM table row into 4 cells).
  • Head pass (5a39c93062fe1283bd92cc7868f418ae4192dc48):
    • 3/3 consecutive runs of vp test run packages/shared/src/codexFileCitations.test.ts packages/shared/src/codexMarkdownDirectives.test.ts passed (39/39 tests each).
    • vp run check:changed exited 0 (format, lint, knip 1/2 & 2/2, typecheck across 37 packages, and 3 affected test files / 41 tests).
    • Runtime wordsHast + renderCodexDirectivesForCopy check in apps/web confirmed copied Markdown | [a\|b.txt](<./reports/a%7Cb.txt>) | ok | re-renders to the exact same HTML table as the original (origHtml === afterHtml).
    • Before/after transcript: https://gist.github.com/saphid/a806371e43fbc35770dbd1bf36b80eff
  • Not shown: Interactive browser/desktop/mobile UI click-to-copy smoke test (this change is pure Markdown serialization in packages/shared covered by wordsHast and remark-gfm round-trip verification).

Authored by Gemini 4 Neon (Antigravity); reviewed by GPT-6.1 Sol (Codex).

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@saphid
fix(shared): copying a Codex citation with a pipe in its filename pre…
5a39c93
…serves the table row
@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 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

Explain Change →

Important

Review skipped

Review was skipped as selected files did not have any reviewable changes.

Run configuration

  • Source mode: Auto
  • Repository: pingdotgg/t3code
  • Branch: main
  • File: .coderabbit.config.ts
  • Commit: eadd4e7
  • Layers: Repository TS config
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 3b9d85f9-e1cf-447a-8864-141124ee103b
Commits

Reviewing files that changed from the base of the PR and between 5a39c93 and 64159a2.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review

No actionable comments were generated in the recent review.

Walkthrough

File citations now escape vertical bars in Markdown labels and encode them as %7C in destinations. Tests cover generated Markdown and round-trip parsing in a GFM table.

Changes: File Citation Encoding

Layer / File(s) Summary
Citation encoding and GFM round-trip
packages/shared/src/codexFileCitations.ts, packages/shared/src/codexFileCitations.test.ts, packages/shared/src/codexMarkdownDirectives.test.ts
Markdown labels escape vertical bars, and link destinations encode them as %7C. Tests verify the generated citation and confirm that a pipe-containing path parses back correctly without breaking a GFM table.

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

Change: Bug fix

Merge Risk: Minimal · previous review 5a39c

Copying a file citation whose name contains a pipe should now keep the surrounding table row intact. The change is narrow and tested, and no merge-blocking risk was found.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title names the main change: copying a Codex citation whose filename contains a pipe no longer breaks the Markdown table row. It matches the raw summary (escaping | in the label, percent-encodin…
Description check Passed The description follows the template well. It has Problem, Change, Scope, and Verification sections. The Problem section gives a reproduction and expected behavior. The Change section explains the sin…
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: copying a Codex citation whose filename contains a pipe no longer breaks the Markdown table row. It matches the raw summary (escaping | in the label, percent-encoding it in the destination) and the PR objectives. It is specific and follows the conventional commit form, and it is about 89 characters, slightly longer than ideal.

Full details: Description check

Explanation

The description follows the template well. It has Problem, Change, Scope, and Verification sections. The Problem section gives a reproduction and expected behavior. The Change section explains the single shared-serialization fix. Scope explains why no issue is needed. Verification lists base and head test results, a check run, a runtime round-trip, and a transcript link, and it states what was not checked (interactive UI click-to-copy). The template's agent-attribution line is present (model and harness named). The description is mostly complete.

Finishing Touches

Generate unit tests (beta)

  • Create a new PR
Fix failing CI checks

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

Run configuration

  • Source mode: Auto
  • Repository: pingdotgg/t3code
  • Branch: main
  • File: .coderabbit.config.ts
  • Commit: 09f2741
  • Layers: Repository TS config
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 8e186628-2d8b-4e0f-9ece-3421a967fe33
Commits

Reviewing files that changed from the base of the PR and between 09f2741 and 5a39c93.

Files selected for processing: 3

  • packages/shared/src/codexFileCitations.test.ts
  • packages/shared/src/codexFileCitations.ts
  • packages/shared/src/codexMarkdownDirectives.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.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@juliusmarminge juliusmarminge added the takeover:in-progress A takeover lead is working on this PR label Nov 26, 2026
juliusmarminge and others added 2 commits November 26, 2026 21:28
@juliusmarminge
Merge remote-tracking branch 'origin/main' into hunter/c-862f215ea8
1db6558
@juliusmarminge @claude
test(shared): drop round-trip case the pipe table test already covers
64159a2
Co-Authored-By: Claude Opus 5.5 <[email protected]>
@juliusmarminge

juliusmarminge commented Nov 26, 2026

Copy link
Copy Markdown
Member

Evidence

Copy the reported assistant citation table, save its clipboard Markdown as copied.md, then open its rendered preview. Real Chromium web client, 1280×800, light theme, fresh synthetic state on each commit. scenarios:prove exited 0.

Before After
eadd4e7ddc 64159a233c
Before: copied table loses the link and ok cell After: copied table preserves the file link and ok cell
Before recording After recording

After: clicking the copied link opens the correct file

Scenario and synthetic replay seed

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@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 8214922 into pingdotgg:main Nov 26, 2026
60 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@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
@saphid @juliusmarminge @github-actions
fix(shared): copying a Codex citation with a pipe in its filename pre…
943f86b
…serves the table row (pingdotgg#43765)

Co-authored-by: SAPHID <[email protected]>
Co-authored-by: Julius Marminge <[email protected]>
(cherry picked from commit 8214922)
@github-actions github-actions Bot mentioned this pull request Nov 27, 2026
Upstream fixes (2026-11-27) Ryoku-dev/hyakki#11
Merged
github-actions Bot pushed a commit to Ryoku-dev/hyakki that referenced this pull request Nov 27, 2026
@saphid @juliusmarminge @github-actions
fix(shared): copying a Codex citation with a pipe in its filename pre…
d5656c4
…serves the table row (pingdotgg#43765)

Co-authored-by: SAPHID <[email protected]>
Co-authored-by: Julius Marminge <[email protected]>
(cherry picked from commit 8214922)
@omegent-app omegent-app Bot mentioned this pull request Nov 27, 2026
Merge upstream main through 1f63e7f385e3 patroza/t3code#679
Merged
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

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

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@saphid @juliusmarminge
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.