feat(pulse): rich text editor with @mentions, media uploads, and formatting#407
Conversation
Swap the basic ComposeNote textarea for the shared ForumComposer, giving Pulse posts full rich-text editing: markdown, @mentions from the contact list, #channel links, emoji autocomplete, media uploads with imeta tags, and a formatting toolbar with visible active states. - Wire mention_pubkeys and media_tags through publishNote → Tauri → Rust - Add externalMembers param to useMentions for non-channel contexts - Remove overflow-hidden on PulseView outer div so mention popup isn't clipped - Fix duplicate Tiptap Link extension warning (disable StarterKit's built-in) - Strengthen toggle active-state styling (bg-primary/20 + ring) - Delete ComposeNote.tsx (fully replaced) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The previous 20% opacity tint was too subtle to notice. Switch to full bg-primary + text-primary-foreground so active formatting buttons (bold, italic, etc.) are unmistakable. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Replace useEditorState with a direct editor.on("transaction")
subscription to ensure active-mark state (bold, italic, etc.)
always triggers re-renders in the FormattingToolbar. The previous
approach may have had issues with React.memo preventing updates.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Replace Radix Toggle with plain <button> elements and direct conditional class toggling via cn(). Active buttons get bg-primary + text-primary-foreground directly from the className ternary — no data-state attribute, no Radix state management. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Same fix as the formatting buttons — bypass Radix Toggle for the Aa formatting-panel toggle. Uses plain <button> with cn() ternary for active state (bg-primary + text-primary-foreground). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
@codex please review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 0a2fe12a1b
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| onSubmit={(content, mentionPubkeys, mediaTags) => { | ||
| publishMutation.mutate({ content, mentionPubkeys, mediaTags }); |
There was a problem hiding this comment.
Keep Pulse draft when publish mutation errors
Switching Pulse to ForumComposer here calls publishMutation.mutate(...) fire-and-forget, while ForumComposer clears content/attachments before invoking onSubmit; if publish fails (offline, auth, relay error), the user's draft is lost and cannot be retried. This is a user-facing regression from the previous ComposeNote flow, which awaited publish and preserved the draft on error.
Useful? React with 👍 / 👎.
ForumComposer now saves draft state before clearing and restores it if onSubmit rejects. Callers switched from mutate to mutateAsync so the promise propagates, preventing silent draft loss on network/auth errors. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* origin/main: Add multi-workspace support to desktop app (#409) feat(mobile): add #channel autocomplete to compose bar (#411) fix: close race window that dropped active channel messages (#410) feat(pulse): rich text editor with @mentions, media uploads, and formatting (#407) feat(mobile): multi-workspace support (#408) feat: always notify on DM messages like Slack/Discord (#405)
Summary
ComposeNotetextarea with the sharedForumComposer, giving Pulse posts full Tiptap rich-text editing: markdown, bold/italic/strike/code, blockquotes, lists, and links@mentionautocomplete populated from the user's contact list (contacts + agents + self) through a newexternalMembersparameter onuseMentionsmention_pubkeysandmedia_tagsthrough the publish pipeline (TypeScript → Tauri → Rust) so mentions and media uploads are included in published notes@mentionpopup being clipped by removingoverflow-hiddenfrom the PulseView outer containerbg-primary/20+ ring) so formatting toolbar buttons clearly show when activeComposeNote.tsx(fully replaced, net -17 lines)Test plan
@and verify mention autocomplete popup appears above the input with contactsptags appear in the published event[tiptap warn]: Duplicate extension namesin console🤖 Generated with Claude Code