You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug]: Pasting markdown-like filepaths causes the file picker to fail #16413
Typing @ and then pasting src/__test__.tsx goes through paste handling in ComposerPromptEditorTiptap, which parses the clipboard with parseInlineMarkdown. In src/__test__.tsx the __ pair is flanked by / and ., so the parser treats it as bold and the document is stored as @src/**test**.tsx.
The editor then renders test in bold, and the file picker searches for src/**test**.tsx. Path search is a subsequence match and * never matches _, so src/__test__.tsx is dropped and the menu shows "No matching files or folders."
The same rewrite affects other dunder paths such as __tests__/, __init__.py, and __main__.py. snake_case names are unaffected, and typing the path by hand usually is too, because the bold input rule only fires when __…__ is at the start of the text or after whitespace.
Workaround: turning off Rich text composer under Settings → General keeps pasted paths literal, so the picker can match them.
Likely fix area
Some options in ComposerPromptEditorTiptap paste handling:
Skip inline-markdown parsing for the text being pasted into an active @ mention query, so it's inserted literally.
Alternatively, tighten parseInlineMarkdown so __…__ only becomes bold when flanked by whitespace or punctuation boundaries that don't occur inside paths (e.g. not between / and .).
Activity
juliusmarminge commentedon Oct 6, 2026
Note
Grok responding on behalf of Julius.
Triage
Thanks @tyteen4a03 for the clear repro, that made this easy to trace.
What I found
mainwith the rich-text composer, which is on by default. It doesn't look like a duplicate of the other composer formatting reports (including [Bug]: @ mention search closes on spaces in file, folder, and thread names #15156).@and then pastingsrc/__test__.tsxgoes through paste handling inComposerPromptEditorTiptap, which parses the clipboard withparseInlineMarkdown. Insrc/__test__.tsxthe__pair is flanked by/and., so the parser treats it as bold and the document is stored as@src/**test**.tsx.src/**test**.tsx. Path search is a subsequence match and*never matches_, sosrc/__test__.tsxis dropped and the menu shows "No matching files or folders."__tests__/,__init__.py, and__main__.py.snake_casenames are unaffected, and typing the path by hand usually is too, because the bold input rule only fires when__…__is at the start of the text or after whitespace.Workaround: turning off Rich text composer under Settings → General keeps pasted paths literal, so the picker can match them.
Likely fix area
Some options in
ComposerPromptEditorTiptappaste handling:@mention query, so it's inserted literally.parseInlineMarkdownso__…__only becomes bold when flanked by whitespace or punctuation boundaries that don't occur inside paths (e.g. not between/and.).A maintainer will decide on the fix direction.