Repository navigation
[Bug]: $ commands with spaces #10957
Description
Activity
- addedbugSomething is broken or behaving incorrectly.Something is broken or behaving incorrectly.needs-triageIssue needs maintainer review and initial categorization.Issue needs maintainer review and initial categorization.
on Sep 9, 2026 Apologies it appears someone reported this right before I did. Pinky promise I searched.
Triage
Confirmed as a real composer token bug. When a skill name contains a space,
$//insert$<name>and the shared tokenizer cuts the chip at the first space. Reported on Android 17; the split is in shared parsing, not Android-only drawing.Not a duplicate of #10956 (focus-loss after skill select). No open PR fixes this. #9235 / PR #9244 fixed digit-leading names (
$2spec) in the same regex family and still forbids spaces. PR #8982 tried quoted$"name"tokens and was closed unmerged (wrong repo).What’s going on
Insert (mobile + web)
- Mobile:
resolveComposerCommandSelectioninapps/mobile/src/features/threads/use-composer-command-menu.tswrites`$${item.skill.name} `. - Web:
apps/web/src/components/chat/ChatComposer.tsxdoes the same. /skill rows use that same$nameinsert (#7737 path).
Tokenize
SKILL_TOKEN_REGEXinpackages/shared/src/composerInlineTokens.tsonly allows[a-zA-Z0-9:_-]*, then a space.- So
$Create Hookbecomes skill"Create"+ leftover"Hook ". Chip label is looked up by fullname, sodisplayNameis lost too. - The same pattern is copied in mobile markdown (
nativeMarkdownText.ts), web timeline (SkillInlineText.tsx), Claude dispatch, and Cursor rewrite — first-word chips and first-word invocation. $//triggers inpackages/shared/src/composerTrigger.tsalso stop at whitespace (file mentions already support@"quoted path"; skills do not).
Why names have spaces
ServerProviderSkill.nameis an unrestricted trimmed string.- Cursor uses the skill directory basename; Claude uses the directory entry. Folders / titles like
Create Hookorland itare valid catalog names.
Android
T3ComposerEditorView.ktpaints whatever JS token ranges it is given. Truncation will look like a malformed chip on Android even though the bug is shared.
Suggested fix
- Add
serializeComposerSkillToken(quote + escape names with spaces), same idea asserializeComposerFileLink/@"…". - Extend
SKILL_TOKEN_REGEX(and every dispatch/timeline copy) to accept$"quoted name"the wayMENTION_TOKEN_REGEXalready accepts quoted paths. - Insert the serialized token from both
$and/skill picks (mobile + web). - Optional: slugify discovery
nameand keep the title ondisplayNameso$create-hookstays the token. - Test
$Create Hook→ one chip / one dispatch; keep$kebab-caseand$2spec/$20kbehavior from fix(skills): support names beginning with digits #9244.
Severity: minor (broken chip + first-word dispatch when a name has spaces). Accepting — small, localized follow-up to the #9244 tokenizer work.
- Mobile:
- addedacceptedfeature request acceptedfeature request acceptedvia-triageFiled through npx t3 triageFiled through npx t3 triageand removedneeds-triageIssue needs maintainer review and initial categorization.Issue needs maintainer review and initial categorization.
on Sep 9, 2026
Before submitting
Area
apps/mobile
Steps to reproduce
Please note that when using $ or / commands in the chat window, skills with spaces in their names may not display correctly, being truncated after the space. This issue is reproducible, at least on Android 17.
Expected behavior
The skill should be fully displayed properly.
Actual behavior
Using a skill with a space causes malformation of the skill
Impact
Minor bug or occasional failure
Version or commit
No response
Environment
No response
Logs or stack traces
Screenshots, recordings, or supporting files
No response
Workaround
No response