Skip to content

fix(shared): inline code paths like docker/Dockerfile become file chips - #32402

Open
felixlaga wants to merge 2 commits into
pingdotgg:mainfrom
felixlaga:fix/inline-code-extensionless-file-chips
Open

felixlaga wants to merge 2 commits into
pingdotgg:mainfrom
felixlaga:fix/inline-code-extensionless-file-chips

Conversation

@felixlaga

Copy link
Copy Markdown
Contributor

Problem

In a chat message, inline code that names a relative path ending in a well-known extensionless file stays plain code. Examples: docker/Dockerfile, src/Makefile, docs/README. The same file does become a file chip as ./docker/Dockerfile, as an absolute path, as docker/Dockerfile:3, or as a Markdown link.

inlineCodeFilePathCandidate requires a file extension when there is no line number. It does not check EXTENSIONLESS_FILE_NAMES, the list the Markdown link checks in the same module already use.

Change

The inline-code check now also accepts a basename that is in EXTENSIONLESS_FILE_NAMES. Branch names and model ids such as origin/main and z-ai/glm-5.3 stay plain code.

Scope and approval

This is a very small fix for an obvious inconsistency inside one function: the module already treats these names as files everywhere else. It affects every client that renders file chips from inline code: web and desktop (apps/web/src/markdown-links.ts), mobile (apps/mobile/src/lib/markdownLinks.ts) and thread find (packages/shared/src/threadFindText.ts). I searched issues and PRs for "Dockerfile chip", "Makefile chip", "extensionless", "EXTENSIONLESS_FILE_NAMES" and "file chip without extension". #23203 and #22181 touch the nearby line, but they cover extensionless names with a line number, which is a different case.

Verification

  • New row ["docker/Dockerfile", "docker/Dockerfile"] in the existing table distinguishes file paths from code and hostnames in %s in packages/shared/src/markdownLinks.test.ts.
  • vp test run packages/shared/src/markdownLinks.test.ts with the fix: 55 passed.
  • With only markdownLinks.ts reverted to main: AssertionError: expected null to be 'docker/Dockerfile'.
  • The web and mobile link tests and the thread-find tests pass. vp run check:changed passes.

Not checked: before/after screenshots in a running client.

Written by Claude Opus 5.5 (claude-opus-5-5) in the Claude Code harness, run from T3 Code.

🤖 Generated with Claude Code

…hips

Inline code naming a relative path that ends in a well-known extensionless
file, such as `docker/Dockerfile` or `src/Makefile`, stayed plain code. The
same file did become a chip as an absolute path, with `./`, with a line
number, or as a Markdown link.

The extension check for inline code now also accepts the extensionless
file names the Markdown link checks already recognize.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions github-actions Bot added vouch:unvouched PR author is not yet trusted in the VOUCHED list. size:XS 0-9 changed lines (additions + deletions). labels Nov 7, 2026
@macroscopeapp

macroscopeapp Bot commented Nov 7, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Approved at 95db8f4

Macroscope's review found this PR approvable — Inline paths such as docker/Dockerfile now render as file chips using the existing recognized-filename list. The change is limited to path recognition and associated presentation/search behavior, with existing link-resolution safeguards unchanged.

You can add or adjust custom eligibility rules. Learn more.

@coderabbitai

coderabbitai Bot commented Nov 7, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The inline-code file-path candidate check now accepts known extensionless basenames when no position suffix is present. A test covers docker/Dockerfile.

Changes: Markdown path candidate recognition

Layer / File(s) Summary
Recognize known extensionless filenames
packages/shared/src/markdownLinks.ts, packages/shared/src/markdownLinks.test.ts
When a candidate has no position suffix, the check accepts it if its basename is in EXTENSIONLESS_FILE_NAMES. A test expects docker/Dockerfile to be accepted.

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

Change: Bug fix

Possibly related PRs

  • pingdotgg/t3code#30762: Both changes define acceptance rules for inlineCodeFilePathCandidate.
  • pingdotgg/t3code#30768: Mobile inline-code link processing uses the helper whose result this change modifies.
  • pingdotgg/t3code#16990: This PR defines position-suffix parsing for the helper; this change adds behavior for candidates without a position suffix.

Suggested reviewers: t3dotgg

Merge Risk: Minimal · up to df6ed

Inline code paths such as docker/Dockerfile will now be recognized as file links. Branch names and model IDs stay plain code. No actionable merge risk remains.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title clearly and concisely describes the primary change: recognizing extensionless inline-code paths such as docker/Dockerfile as file chips.
Description check Passed The description includes all required sections and clearly explains the problem, change, scope rationale, affected consumers, verification results, and unverified screenshot status.
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.
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 95db8f4 and df6ede2.

Files selected for processing: 2

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

…sionless-file-chips

# Conflicts:
#	packages/shared/src/markdownLinks.ts
@maria-rcks

Copy link
Copy Markdown
Collaborator

Note

Written by claude-opus-5-5 on behalf of Maria

Merged current main (no rebase) to clear the conflict in packages/shared/src/markdownLinks.ts. Main (#32403) restructured the no-extension branch to handle :line suffixes, so the extensionless-name check now sits inside it: with no position suffix, a basename like Dockerfile returns the candidate, anything else stays plain code. The :line path is unchanged. vp run check:changed passes, including the 74 markdownLinks tests with the docker/Dockerfile row.

This branch has not been deployed

No deployments
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:unvouched PR author is not yet trusted in the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants