Skip to content

Preserve inline code when copying generated file links - #6377

Merged
ymichael merged 1 commit into
mainfrom
slopcop/issue-6376
Oct 27, 2026
Merged

ymichael merged 1 commit into
mainfrom
slopcop/issue-6376

Conversation

@bb-slop-cop

@bb-slop-cop bb-slop-cop Bot commented Oct 27, 2026

Copy link
Copy Markdown
Contributor

🚨 SLOP COP 🚨 · new-issue-autopilot

Human comments

What was wrong

The Markdown renderer turns inline-code file references into anchors without retaining their code provenance. The clipboard serializer then emits relative references as Markdown links, or matching absolute references as bare text, rather than restoring inline code.

Report: https://get-bb.github.io/reports/issues/6376.html

What changed

Mark anchors synthesized from inline code and serialize only those anchors with the existing code-span formatter. Authored Markdown links and rich HTML file URLs retain their behavior. Add four clipboard regression cases covering relative paths, Unicode filenames, absolute POSIX paths, and Windows paths, including selection of just the generated link.

Scope: three files, 44 total changed text lines (44 additions, zero deletions); three production lines and 41 test lines. No dependency, protocol, schema, stored-data, SDK, or CLI changes.

How you verified

  • On trusted main b6743a36bd9eae1408c35cfc2c7ab1d2419dc79d, the focused clipboard suite fails in two separate clean checkouts: four new regression failures, 35 existing passes. Both runs use unchanged production code.
  • After the fix, five relevant suites pass all 131 tests: clipboard, timeline selection menu, regular Markdown, cold HTML, and incremental Markdown.
  • pnpm exec turbo run test --filter=@bb/app -- src/components/thread/timeline/SelectableMessageProse.clipboard.test.tsx src/components/thread/timeline/TimelineSelectionMenu.test.tsx src/components/ui/markdown-preview.test.tsx src/components/ui/markdown-preview.cold-html.test.tsx src/components/ui/markdown-preview.incremental.test.tsx
  • pnpm exec turbo run lint typecheck --filter=@bb/app passes, with existing lint warnings and zero errors.
  • Formatting, git diff --check, and text-only git diff --numstat origin/main pass. The trusted baseline full build passes all 72 tasks after building existing SDK types/runtime prerequisites.
  • Reproduction exercises the real renderer and document copy handler in jsdom; a live browser/OS clipboard was not tested.

Fixes #6376

AGENT GENERATED

@ymichael
ymichael merged commit 52c332f into main Oct 27, 2026
30 checks passed
@ymichael
ymichael deleted the slopcop/issue-6376 branch October 27, 2026 23:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Copying timeline text turns auto-linked file paths into [path](file:///…) Markdown links

2 participants