Skip to content

Commit 244ec21

Browse files
aXenDeveloperclaude
andcommitted
feat(mentions): ✨ Add @mentions to the rich-text editor with notifications
- @mentions in the rich-text editor, enabled by default, delivered right away - Mention notifications, new notification toasts and a mark-all-read confirmation dialog - Simplified notification fanout/inbox processing and type handling - Mentions implementation plan and docs Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 parent d8c4b53 commit 244ec21

111 files changed

Lines changed: 5112 additions & 579 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎AGENTS.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ import { Activity } from "react";
2828
```
2929

3030
- Always use skeletons for loading feedback. Use `<Loader />` only if its necessary.
31-
- Add a breadcrumb with the route's `staticData.breadcrumb`; a crumb that renders strings needs its own `RouteMessages`.
31+
- Breadcrumbs are optional on every page. Add one with the route's `staticData.breadcrumb` (or a plugin page's `route.breadcrumb`) only when the trail helps; leaving it out adds no crumb, and with no crumbs the breadcrumb bar is not rendered. A crumb that renders strings needs its own `RouteMessages`.
3232
- Route files are topology only - `validateSearch`, `loaderDeps`, `loader`, `head`, `staticData`. The query, the permissions, the namespaces and the screen live in `@vitnode/core/tanstack/*`.
3333
- Write `head` **after** `loader` in the same object literal: `loaderData` is inferred from `loader`, and TypeScript reads members in order.
3434
- Name files `x.server.ts` when they must never reach the browser bundle.
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
CREATE TABLE "core_mentions" (
2+
"id" serial PRIMARY KEY,
3+
"pluginId" varchar(100) NOT NULL,
4+
"targetType" varchar(100) NOT NULL,
5+
"targetId" varchar(100) NOT NULL,
6+
"userId" integer NOT NULL,
7+
"actorId" integer,
8+
"eventId" bigint,
9+
"notified" boolean DEFAULT false NOT NULL,
10+
"createdAt" timestamp DEFAULT now() NOT NULL
11+
);
12+
--> statement-breakpoint
13+
ALTER TABLE "core_mentions" ENABLE ROW LEVEL SECURITY;--> statement-breakpoint
14+
ALTER TABLE "core_roles" ADD COLUMN "allowMentions" boolean DEFAULT true NOT NULL;--> statement-breakpoint
15+
ALTER TABLE "core_roles" ADD COLUMN "maxMentionsPerItem" integer DEFAULT 25;--> statement-breakpoint
16+
UPDATE "core_roles" SET "allowMentions" = false WHERE "guest" = true;--> statement-breakpoint
17+
CREATE UNIQUE INDEX "core_mentions_target_user_idx" ON "core_mentions" ("pluginId","targetType","targetId","userId");--> statement-breakpoint
18+
CREATE INDEX "core_mentions_user_id_idx" ON "core_mentions" ("userId","createdAt");--> statement-breakpoint
19+
CREATE INDEX "core_mentions_event_id_idx" ON "core_mentions" ("eventId");--> statement-breakpoint
20+
ALTER TABLE "core_mentions" ADD CONSTRAINT "core_mentions_userId_core_users_id_fkey" FOREIGN KEY ("userId") REFERENCES "core_users"("id") ON DELETE CASCADE;--> statement-breakpoint
21+
ALTER TABLE "core_mentions" ADD CONSTRAINT "core_mentions_actorId_core_users_id_fkey" FOREIGN KEY ("actorId") REFERENCES "core_users"("id") ON DELETE SET NULL;--> statement-breakpoint
22+
ALTER TABLE "core_mentions" ADD CONSTRAINT "core_mentions_eventId_core_notification_events_id_fkey" FOREIGN KEY ("eventId") REFERENCES "core_notification_events"("id") ON DELETE SET NULL;

0 commit comments

Comments
 (0)