Skip to content

fix(shared): link file paths in over-indented lists for thread search - #43735

Merged
juliusmarminge merged 2 commits into
pingdotgg:mainfrom
saphid:hunter/c-2f9f4f02b4
Nov 26, 2026
Merged

juliusmarminge merged 2 commits into
pingdotgg:mainfrom
saphid:hunter/c-2f9f4f02b4

Conversation

@saphid

@saphid saphid commented Nov 26, 2026

Copy link
Copy Markdown
Contributor

Problem

Find in thread misses the displayed file-chip label when an assistant puts an absolute file path in an over-indented list item. Web/desktop chat already shows a clickable app.ts · L42 chip, but shared search extraction indexes the raw path.

Deterministic repro on origin/main (a066eb0935da44bbb16571638138c218bfdbf775): render the exact synthetic Markdown - /Users/me/app.ts:42 (seven spaces after the hyphen), then press Ctrl+F and search for app.ts · L42. Observed: zero matches. Expected: one match. At the parser boundary, searchableMessageSegments({ role: "assistant", text: "- /Users/me/app.ts:42", streaming: false }) returns ["/Users/me/app.ts:42"] instead of ["app.ts · L42"]. The evidence transcript includes the full Node command to run from packages/shared on either revision, and the scratch Replay scenario exercises the same Ctrl+F flow with an expanded CLI-originated user message and a free Replay turn.

Change

Run absolute-file-path linking after list indentation recovery in both shared remark configurations, so recovered paragraph nodes receive the same links as normal list text. This fixes web/desktop in-thread search without changing their existing file-chip rendering; native mobile uses a separate renderer. No provider, wire, or translation changes are needed.

Scope

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

Verification

  • On the unmodified base source, both pipeline configurations fail the link assertion ([] instead of the file URL), and search extraction fails with the raw path instead of the chip label.
  • All 47 tests in markdownPipeline.test.ts and threadFindText.test.ts pass in three consecutive full runs. Coverage retains literal inline, indented, and fenced code, raw anchors, shortened paths, and existing Windows handling.
  • vp run check:changed: exit 0 on the clean committed head, including format, lint, both knip passes, all 37 affected typechecks, and 49 tests across three affected files.
  • Before/after runtime output and reproduction command.
  • vp run scenarios:prove with the linked scratch scenario: exit 0. The expanded CLI-originated user message and free Replay turn show 0/0 on base and 1/1 with the chip highlighted on head. The exact assistant fixture is also covered by the parser transcript.

Before

After

Not shown: native mobile rendering, Electron shell/IPC, live provider output, remote/relay/tunnel connections, 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 absolute-path linking plugin now runs after other Markdown plugins in both chat configurations. Tests cover paths in list-item prose, code, HTML, and paths with line-and-column suffixes. A file-chip test covers a padded list-item path.

Changes: Absolute-path Markdown linking

Layer / File(s) Summary
Plugin ordering and path coverage
packages/shared/src/markdownPipeline.ts, packages/shared/src/markdownPipeline.test.ts, packages/shared/src/threadFindText.test.ts
Both plugin lists place absolute-path linking after the Windows-path, GitHub-alert, ordered-list-number, and list-indentation plugins. Tests cover supported and unsupported path contexts and a padded list-item file-chip label.

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

Change: Bug fix

Suggested reviewers: matthewcosier, juliusmarminge

Merge Risk: Minimal · previous review d3cbf

Thread search now matches file-chip labels for paths in over-indented list items. The change is small, easy to revert, and covered by tests. No merge-blocking risk was identified.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title names the main change: absolute file paths in over-indented list items are now linked, which restores the file-chip label in thread search. It follows the conventional commit form and avoids…
Description check Passed The description covers the problem, the change, scope, and verification, and follows the template sections. It gives a concrete repro, states why no issue is needed for a small fix, and lists the test…
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: absolute file paths in over-indented list items are now linked, which restores the file-chip label in thread search. It follows the conventional commit form and avoids vague terms. The raw summary's changes (plugin ordering in markdownPipeline.ts and related tests) match the title's scope.

Full details: Description check

Explanation

The description covers the problem, the change, scope, and verification, and follows the template sections. It gives a concrete repro, states why no issue is needed for a small fix, and lists the test and check results. It also names the model and harness that did the work, as the template asks. The Scope section cites an obvious bug and gives a reason for no issue, which meets the template. Verification relies on linked runtime output and screenshots, and the 'Not shown' list is explicit about what was not checked.

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 a066eb0 and d3cbf31.

Files selected for processing: 3

  • packages/shared/src/markdownPipeline.test.ts
  • packages/shared/src/markdownPipeline.ts
  • packages/shared/src/threadFindText.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
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@juliusmarminge

Copy link
Copy Markdown
Member

Evidence

Real web app, fresh synthetic databases, Replay (dev), dark theme, 1280×800 viewport on both commits. Seeded the reported Markdown with seven spaces after the first hyphen, opened the completed thread, pressed Ctrl+F, checked the normally indented control, then searched app.ts · L42.

Proven: the scenario fails on base and passes on head. Base shows 0/0 despite the visible chip; head shows 1/1 and highlights its displayed label.

Before After
Commit a066eb0935 d9941eb711
Result Failed: expected 1/1, observed 0/0 Passed: 1/1 and active highlight
Normal indentation control Before: normal indentation control After: normal indentation control
Displayed file chip search Before: displayed chip returns zero matches After: displayed chip matches and is highlighted
Failure capture Before: assertion failure state
Recording Before interaction After interaction

Scenario source

Not shown:

  • The supplemental hidden raw-path search was not included in the final paired scenario; the displayed-label failure and fix were directly captured.
  • Desktop and mobile were not exercised; this proof covers the reported web-client interaction.

@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 8e8e15a 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
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