feat: @mention system with inline highlighting#20
Merged
GraysonCAdams merged 10 commits intomainfrom Mar 1, 2026
Merged
Conversation
- Create mentions.ts utility with extractMentions() and notifyMentions() - Accept message field in POST /api/clips, auto-post as first comment - Add @mention dispatch to comments API with duplicate prevention - Update notification preferences API to include mentions toggle
- Two-field compose: Link (top) + Message (bottom) with @mention support - Tab from URL field focuses message field - Message auto-posted as first comment on clip - Hide clipboard suggestion when URL input matches clipboard content
- Replace plain input with MentionInput in CommentInput - Render @mentions with MentionText highlighting in comments/replies - Pass group members from store to CommentsSheet via ReelItem
- Add 'mention' to Notification type union with "mentioned you" text - Show comment preview for mention notifications in activity feed - Add mentions toggle to notification preferences UI - Include mentions in NotificationPrefs type and default state
Replace plain input/textarea in MentionInput with an overlay pattern where a highlight mirror renders colored @mentions behind a transparent input. Syncs scroll position and tracks focus state for border styling. Update parent component styles (AddVideo, CommentInput) to target new class names.
Only highlight @mentions that match actual group member usernames. Pass member usernames from CommentsSheet to MentionText for validation. Bump mention font-weight from 600 to 700 for consistency with input.
When a migration file is regenerated after being applied (e.g. after schema change + drizzle-kit generate), drizzle sees a new timestamp and tries to re-run it, hitting duplicate column errors. Add recovery logic that runs each pending statement idempotently and records the migration in the journal.
|
|
||
| /* eslint-disable security/detect-non-literal-fs-filename */ | ||
| function recoverPendingMigrations(folder: string) { | ||
| const journalPath = resolve(folder, 'meta/_journal.json'); |
Check warning
Code scanning / Semgrep OSS
Semgrep Finding: javascript.lang.security.audit.path-traversal.path-join-resolve-traversal.path-join-resolve-traversal Warning
| for (const entry of journal.entries) { | ||
| if (entry.when <= lastAppliedAt) continue; | ||
|
|
||
| const sqlFile = readFileSync(resolve(folder, `${entry.tag}.sql`), 'utf-8'); |
Check warning
Code scanning / Semgrep OSS
Semgrep Finding: javascript.lang.security.audit.path-traversal.path-join-resolve-traversal.path-join-resolve-traversal Warning
| for (const entry of journal.entries) { | ||
| if (entry.when <= lastAppliedAt) continue; | ||
|
|
||
| const sqlFile = readFileSync(resolve(folder, `${entry.tag}.sql`), 'utf-8'); |
Check warning
Code scanning / Semgrep OSS
Semgrep Finding: javascript.lang.security.audit.path-traversal.path-join-resolve-traversal.path-join-resolve-traversal Warning
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.
Summary
Changes
Test plan