Skip to content

feat: suggest and highlight @claude mentions, and quote a comment to ask claude - #12

Merged
kpal81xd merged 2 commits into
mainfrom
feat/claude-mentions
Nov 11, 2026
Merged

kpal81xd merged 2 commits into
mainfrom
feat/claude-mentions

Conversation

@kpal81xd

Copy link
Copy Markdown
Owner

Mentioning Claude in a comment now works like mentioning a person in a doc, matching the hosted Artifacts comments:

  • Suggestions. Typing @ (or @cl) in a new comment or a reply opens a People menu with Claude at the caret. Enter, Tab or a click inserts @Claude. Esc closes only the menu, and Enter picks the suggestion instead of sending.
  • Highlight. @Claude shows as a chip while typing and in posted comments. It uses the daemon's own rule (a whole word after a space or the line start), so foo@claude and @claudette stay plain. Text a page wrote is never chipped, because it doesn't reach Claude.
  • Sent to Claude. A comment containing @Claude goes to Claude whichever control is used, as the daemon already did. The reply button now says "Reply & send to Claude", and the new-comment box hides its plain Comment button, so the UI matches what happens.
  • Ask Claude about a message. A hover action on every comment, yours or Claude's, quotes it into the thread's reply box with @Claude and keeps anything already typed. Leading > lines render as a quote block.

The editor highlight is drawn by a mirror behind a transparent textarea, so the caret, selection, IME input and image drops are unchanged. There are no server changes.

Smoke test

  1. Open an artifact and press C. Click an element and type @. A menu listing Claude appears at the caret. Press Enter: @Claude is inserted as a blue chip and nothing is sent.
  2. Note that only Send to Claude is offered. Send it. The comment shows the chip and "Sent to Claude", and the thread shows Claude as queued or working.
  3. Open a reply, untick Send to Claude, and type @cl, then press Tab. The button still reads "Reply & send to Claude". Post it: the thread is sent to Claude.
  4. Type foo@claude @claudette. Neither is highlighted.
  5. Hover a comment and click Ask Claude. The reply box gets > <that comment> and @Claude, with the caret at the end. Type and post: the reply shows the quote block and the chip.
  6. Type a long reply with a chip mid-line, then select a word after the chip. The highlight sits exactly on that word.

@kpal81xd kpal81xd added the enhancement New feature or request label Nov 11, 2026
@kpal81xd kpal81xd self-assigned this Nov 11, 2026
@kpal81xd
kpal81xd merged commit 0e70b8f into main Nov 11, 2026
3 checks passed
@kpal81xd
kpal81xd deleted the feat/claude-mentions branch November 11, 2026 00:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant