Skip to content

[NOTIF-003] Emit view notifications on public profile views - #82

Merged
chev0004 merged 2 commits into
developfrom
feat/notif-003
Jul 4, 2026
Merged

[NOTIF-003] Emit view notifications on public profile views#82
chev0004 merged 2 commits into
developfrom
feat/notif-003

Conversation

@chev0004

@chev0004 chev0004 commented Jul 2, 2026

Copy link
Copy Markdown
Owner

Outline

Summary

Emits a 'view' notification to the profile owner when their public profile is viewed, reusing the NOTIF-001 creation path.


Changes & Enhancements

  • Type of Change:
    • Feature
    • Bugfix
    • Refactor
    • Chore
  • Changes:
    • (db):
      • Add hasRecentViewNotification lookup that matches an existing 'view' notification for the owner by actor name (or guest flag) within a time window.
    • (notifications):
      • Add server-side notifyProfileView that skips duplicates inside a one-hour window and swallows failures so profile rendering is never blocked.
    • (public profile):
      • Emit the view notification on public profile render, distinguishing guest and authenticated viewers and skipping self-views.

Page / App Changes

Affected Next.js Routes (Local):

  • /[lang]/u/[id]
Before (Screenshot)
After (Screenshot)

Component / Storybook Changes

Affected Storybook Components (Local):

Before (Screenshot)
After (Screenshot)

Not Doing


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 Jul 4, 2026
@chev0004
chev0004 merged commit f9961be into develop Jul 4, 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