Skip to content

[NOTIF-001] Connect notification inbox to stored notifications - #79

Merged
chev0004 merged 7 commits into
developfrom
feat/notif-001
Jun 30, 2026
Merged

[NOTIF-001] Connect notification inbox to stored notifications#79
chev0004 merged 7 commits into
developfrom
feat/notif-001

Conversation

@chev0004

Copy link
Copy Markdown
Owner

Outline

Summary

Connects the notification inbox to per-user stored notifications, so a logged-in user sees their real notifications instead of an empty placeholder, with read, delete, and clear actions persisted server-side.


Changes & Enhancements

  • Type of Change:
    • Feature
    • Bugfix
    • Refactor
    • Chore
  • Changes:
    • (database):
      • Add a notifications table with a notification_kind enum, per-user indexes, and migration 0008.
    • (data layer):
      • Add notification queries: list, create, mark read, mark all read, delete, and clear.
    • (api):
      • Add /api/notifications for fetching the current user's notifications and persisting read, delete, and clear actions.
    • (inbox):
      • Load notifications from storage on open and persist every action, deriving relative timestamps and the unread count from server state.
    • (discovery, public profile):
      • Create a notification for a profile owner when a logged-in user copies their username.

Page / App Changes

Affected Next.js Routes (Local):

  • /[lang], /[lang]/profile, /[lang]/saved, /[lang]/u/[id] (navbar inbox now loads stored notifications)
  • /api/notifications (new route handler for fetch, mutate, and create)
Before (Screenshot)
After (Screenshot)

Component / Storybook Changes

Affected Storybook Components (Local):

Before (Screenshot)
After (Screenshot)

Inbox populated with stored notifications

Inbox empty state


Not Doing

  • Only the username-copy action emits notifications; other triggers such as profile views can reuse the same creation path later.

Other (Remarks)


Checklists

  • Code is well-documented (comments, JSDoc, etc.).
  • Existing comments were updated as needed.
  • No out-of-scope changes are included.
  • Write TODO comments where future work is required.
  • Removed unnecessary debug code (e.g., console.log, debugger).
  • Self-reviewed and tested locally.

@chev0004 chev0004 self-assigned this Jun 27, 2026
# Conflicts:
#	drizzle/meta/0008_snapshot.json
#	drizzle/meta/_journal.json
#	src/db/schema.ts
@chev0004
chev0004 merged commit 76e7b30 into develop Jun 30, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant