feat: add archived column to notifications and implement archiving functionality

- Introduced an archived boolean column in the notifications table to allow users to archive inbox items without deletion.
- Updated Notification model to include the archived field with default value.
- Added ArchiveRequest and ArchiveResponse models for handling archive/unarchive operations.
- Implemented API endpoint to archive or unarchive notifications, ensuring real-time updates with Electric SQL.
- Enhanced InboxSidebar to filter and display archived notifications appropriately.
This commit is contained in:
Anish Sarkar 2026-01-21 20:34:58 +05:30
parent 93aa1dcf3c
commit 22b2d6e400
8 changed files with 178 additions and 39 deletions

View file

@ -110,6 +110,7 @@ export const inboxItem = z.object({
title: z.string(),
message: z.string(),
read: z.boolean(),
archived: z.boolean().default(false),
metadata: z.record(z.string(), z.unknown()),
created_at: z.string(),
updated_at: z.string().nullable(),