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): preserve literal ampersands in composer file links by armancharan · Pull Request #41342 · pingdotgg/t3code

Conversation

@armancharan

@armancharan armancharan commented Nov 23, 2026

Copy link
Copy Markdown
Contributor

Problem

Mentioning docs/R©.md in the composer produces a sent-message link to docs/R©.md. Markdown decodes the entity in both the visible filename and the destination, so clicking the link can open a different file.

Change

Escape ampersands in the Markdown label and encode them as %26 in the destination. The rendered chip then shows the literal filename and resolves to the selected workspace path.

Scope

This fixes newly inserted composer file mentions. I found the case while testing #41270 and reported the reproduction on that PR.

Verification

The regression test serializes the mention, parses it with the project's Markdown parser, and checks both the text node and the resolved workspace path. Before the fix the label was R©.md. After the fix the label is R©.md and the target is /workspace/docs/R©.md.

All 205 tests across the composer trigger, inline token, and Markdown link suites passed locally. The repository's check:changed checks passed, including typechecks across 37 packages.

Model and harness: GPT-6 via Codex.

Sorry, something went wrong.

Uh oh!

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

All reactions
@armancharan
fix(shared): preserve literal ampersands in composer file links
b692724
@github-actions github-actions Bot added vouch:unvouched Author is not yet trusted in the VOUCHED list. size:XS 0-9 changed lines (additions + deletions). labels Nov 23, 2026
@armancharan
armancharan marked this pull request as ready for review November 23, 2026 21:25
@coderabbitai

coderabbitai Bot commented Nov 23, 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: 844d9ed
  • Layers: Repository TS config
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: a079bbe6-ec8c-404a-82e7-ff33ba963d26
Commits

Reviewing files that changed from the base of the PR and between b692724 and 84f3372.

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

Composer file-link serialization now escapes ampersands in Markdown labels and percent-encodes them in link destinations. A test checks parsing and destination resolution for a path containing ©.

Changes: Composer file-link ampersand handling

Layer / File(s) Summary
Escape and encode ampersands in file links
packages/shared/src/composerTrigger.ts, packages/shared/src/composerTrigger.test.ts
Label escaping now handles ampersands, and destination encoding converts them to %26. The test checks that a parsed label retains © and that its destination resolves under /workspace.

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

Change: Bug fix

Possibly related PRs

  • pingdotgg/t3code#41270: This PR also changes composer file-link handling for names with special characters, including ampersands.
  • pingdotgg/t3code#31593: This PR changes the same Markdown link-label escaping function for other special characters.

Suggested labels: bugfix

Suggested reviewers: matyasrathonyi, macroscopeapp, amv146

Merge Risk: Minimal · previous review b6927

Composer file mentions for paths containing a literal ampersand, such as docs/R©.md, now keep the literal name and resolve to the selected file. No merge-blocking risk remains.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title "fix(shared): preserve literal ampersands in composer file links" matches the main change: the raw summary and PR objectives say Markdown labels and destinations now escape or encode ampersa…
Description check Passed The description follows the template sections. Problem describes the bug (composer mention of docs/R©.md decodes to R©.md and can open a different file). Change explains the escaping of amper…
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 "fix(shared): preserve literal ampersands in composer file links" matches the main change: the raw summary and PR objectives say Markdown labels and destinations now escape or encode ampersands so composer file links keep literal filenames such as docs/R©.md. It follows the conventional commit style and is specific enough for a teammate to identify the primary change.

Full details: Description check

Explanation

The description follows the template sections. Problem describes the bug (composer mention of docs/R©.md decodes to R©.md and can open a different file). Change explains the escaping of ampersands in the label and %26 encoding in the destination. Scope states this fixes newly inserted composer mentions and links the reproduction on PR #41270, though it does not link a dedicated bug issue or explain why no issue exists. Verification gives focused regression test results with before and after values and test counts. The model and harness are named at the end, as the template asks. The only gap is the Scope section, which does not explicitly state why no issue is linked, so the check passes with a minor note.

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

  • Source mode: Auto
  • Repository: pingdotgg/t3code
  • Branch: main
  • File: .coderabbit.config.ts
  • Commit: 76de50b
  • Layers: Repository TS config
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 14f01b2b-4deb-48fa-aa52-0463fa5c3502
Commits

Reviewing files that changed from the base of the PR and between 76de50b and b692724.

Files selected for processing: 2

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

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 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 23, 2026
@juliusmarminge
Merge remote-tracking branch 'origin/main' into fix/composer-literal-…
84f3372
…ampersands
@juliusmarminge

juliusmarminge commented Nov 23, 2026

Copy link
Copy Markdown
Member

Evidence

Real web app, Replay (dev), fresh synthetic data, 1280×800, light theme on both sides. Type @R, select R©.md, append please read this file, send, then click the sent file link.

Proven: base changes the label to R©.md and opens the wrong file; head preserves R©.md and opens the selected file.

Before After
844d9ed354 84f3372782
Before: decoded filename opens WRONG TARGET After: literal filename opens selected file
Before recording After recording

Scenario source. scenarios:prove exited 0: failed on base and passed on head.

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 23, 2026
@juliusmarminge
juliusmarminge merged commit b718326 into pingdotgg:main Nov 23, 2026
18 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 23, 2026
@patroza patroza mentioned this pull request Nov 24, 2026
Merge upstream main through 2fe7febc8d73 patroza/t3code#671
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:unvouched Author is not yet trusted in 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

@armancharan @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.