Skip to content

feat(ios): render $skill mentions as tappable pills with detail sheet - #320

Open
kingbootoshi wants to merge 1 commit into
0xSero:mainfrom
kingbootoshi:feat/skill-mention-pills
Open

feat(ios): render $skill mentions as tappable pills with detail sheet#320
kingbootoshi wants to merge 1 commit into
0xSero:mainfrom
kingbootoshi:feat/skill-mention-pills

Conversation

@kingbootoshi

@kingbootoshi kingbootoshi commented Aug 19, 2026

Copy link
Copy Markdown

Follow-up to the kitty litter feedback thread: "skill should highlight in chat too (bonus points if you can click on it and it shows the detail/prompt of the skill as a pop up)."

What

  • $skill mentions in user message bubbles render as accent pills (same visual language as the existing plugin-ref pills in FormattedText)
  • Tapping a pill opens a sheet with the skill's display name, $name, scope badge, description, default prompt, and path

How

  • SkillMentionCatalog (new): per-conversation @Observable registry injected via environment from ConversationView. It calls listSkills once per thread, and only when a rendered message actually contains a $mention token — mention-free transcripts never pay for the RPC and register no observation edges.
  • The tokenizer mirrors the composer's mention byte rules exactly ($ + [A-Za-z0-9_-]+, rejected mid-word like cost$cad). It's self-contained rather than reusing the composer's private helpers so this doesn't collide with in-flight branches that touch them — happy to DRY once those land.
  • Only names present in the loaded catalog render as pills, so dollar amounts like $200 stay plain text.
  • Catalog is rebuilt on thread change from the thread's cwd, so a reused conversation view never shows another thread's skills.

Verification

  • LitterTests: full suite on iPhone 17 Pro Max sim — 248 tests, 0 failures (includes 13 new tokenizer tests)
  • LitterUITests/SkillMentionPillUITests: drives the conversation display harness (seeded with a $cad/$mujoco message + stub catalog), asserts the pills exist, taps $cad, asserts the sheet contents, dismisses — passing; saves before/after screenshots as attachments

🤖 Generated with Claude Code

Demo

skill-mention-pills.mp4

Demo: $cad renders as a pill in the sent bubble; tapping opens the detail sheet with name, scope badge, description, and skill path.

$skill mentions autocomplete in the composer but land in the transcript
as plain text. This renders them as accent pills in user bubbles,
mirroring the existing plugin-ref pills in FormattedText, and tapping a
pill opens a sheet with the skill's display name, scope, description,
default prompt, and path.

- SkillMentionCatalog: per-conversation @observable registry injected
  via environment; loads listSkills once, and only when a rendered
  message actually contains a $mention token, so mention-free
  transcripts never pay for the RPC
- tokenizer mirrors the composer's mention byte rules exactly
  ($ + [A-Za-z0-9_-]+, rejected mid-word); kept self-contained to avoid
  colliding with in-flight branches that touch the composer helpers
- only names present in the loaded catalog render as pills, so dollar
  amounts like $200 stay plain text
- catalog rebuilt per thread from the thread's cwd
- unit tests for the tokenizer; UI test drives the display harness,
  taps the pill, and asserts the detail sheet

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.

1 participant