feat(dashboard): accept [[chip: Text]] chip shorthand - #111
Merged
Conversation
The chip parser only matched [[chip: Label | prefill]]. A marker written without the "|" separator failed to match and was rendered as raw literal text in the bubble — a silent failure. Add a second pass that accepts the shorthand form, using the text as both label and prefill. The two-part form still runs first, so its behaviour is unchanged. Co-Authored-By: Claude <noreply@anthropic.com>
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.
Problem
The click-to-fill chip parser in
webapp/components/markdown.jsonly matched the two-part form[[chip: Label | prefill]]. A chip written without the|separator ([[chip: Text]]) did not match any rule and was rendered as raw literal[[chip: …]]text in the conversation bubble — a silent failure that is easy to hit and gives no hint at the cause.Change
Add a second replacement pass for the shorthand form
[[chip: Text]](no|), using the text as both the label and the prefill. It runs after the existing two-part pass, so any[[chip: …]]reaching it provably has no separator; the two-part form's behaviour is unchanged and fully backward-compatible.This covers the common case where label and prefill are identical, and removes the raw-text footgun.
Notes
webapp/) — reaches the running dashboard after merge +self-update.py.md-chipoutput and stash mechanism, so styling and the bold/italic-protection are unaffected.🤖 Generated with Claude Code