Repository navigation
Preserve inline code when copying generated file links - #6377
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
🚨 SLOP COP 🚨 ·
new-issue-autopilotHuman 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
b6743a36bd9eae1408c35cfc2c7ab1d2419dc79d, the focused clipboard suite fails in two separate clean checkouts: four new regression failures, 35 existing passes. Both runs use unchanged production code.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.tsxpnpm exec turbo run lint typecheck --filter=@bb/apppasses, with existing lint warnings and zero errors.git diff --check, and text-onlygit diff --numstat origin/mainpass. The trusted baseline full build passes all 72 tasks after building existing SDK types/runtime prerequisites.Fixes #6376