Skip to content

Notifications graceful handling + user/file comment-resource links - #605

Merged
ddon merged 5 commits into
BeamLabEU:mainfrom
alexdont:main
Jun 24, 2026
Merged

Notifications graceful handling + user/file comment-resource links#605
ddon merged 5 commits into
BeamLabEU:mainfrom
alexdont:main

Conversation

@alexdont

@alexdontalexdont commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

Reconciled with latest upstream (merged upstream/main, including the user.email_unconfirmed notification fix — preserved and folded into the account-actions whitelist). Code only — no version/CHANGELOG changes (maintainer owns those).

Notifications — graceful no-link handling

  • Link-less notifications read as informational (default cursor); clicking still clears unread.
  • notification_default_link setting — catch-all, defaults to /dashboard (authenticated-only; guarded to no-op when the dashboard is disabled). Built via Routes.path/1. Clear it to disable.
  • Dev nudge config :phoenix_kit, warn_unlinked_notifications: true — off by default.

Comments — user resource links + path fix

  • user comment-resource handler (PhoenixKit.Users.CommentResources) → comments on a user resolve to /admin/users/view/:uuid + avatar, joining file/post. (Companion: comments Add a method to work with urls and paths #26, hello_world updated the changelog with version 1.2.1 #19.)
  • Fix double-prefix: comment resource handlers must return a raw path (comments applies Routes.path/1 once). The file handler pre-applied it → double-prefix under a non-root url_prefix. Both file and the new user handler now return raw paths, matching post.

Verification

mix quality green (format, credo 0 issues, dialyzer); notification + comment-resource tests 12/12.

🤖 Generated with Claude Code

Alexander Donand others added 3 commits June 24, 2026 16:34
When a notification has no link of its own, it now reads as informational
(default cursor, not pointer) and the click still clears its unread state —
no dead-looking click, and never a developer error shown to end users.
Adds an optional notification_default_link setting (Settings → Notifications)
as a catch-all destination (e.g. /dashboard), run through Routes.path so it
carries the URL prefix + recipient locale; blank keeps such notifications
non-navigating. And a dev-only nudge (config :phoenix_kit,
warn_unlinked_notifications: true) that logs how to wire a link when neither
a notification_link nor a default is present — off by default, no prod noise.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Make /dashboard the out-of-the-box catch-all for link-less notifications
instead of blank. The user dashboard is authenticated-only (every
notification recipient can reach it), unlike role-gated /admin — so the
permission concern doesn't apply. Guard it on user_dashboard_enabled? so a
disabled dashboard falls back to no-op rather than a dead /dashboard route.
The settings field pre-fills /dashboard (unset → default) while preserving a
deliberately-cleared blank (disable). When there's no link and no reachable
default, the click just marks the notification seen and does nothing.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
PhoenixKit.Users.CommentResources resolves comments attached to a user
(resource_type "user") to the user's display name + /admin/users/view/:uuid
with their avatar as the chip thumbnail, mirroring the file handler. The
comments module registers it automatically. Bump 1.7.165.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@alexdontalexdont changed the title Graceful handling for notifications with no click-through linkNotification graceful handling + user comment-resource handlerJun 24, 2026
# Conflicts:
#	CHANGELOG.md
#	mix.exs
@alexdontalexdont changed the title Notification graceful handling + user comment-resource handlerNotifications graceful handling + user/file comment-resource linksJun 24, 2026
Per maintainer policy: PRs are code-only; @Version, version/0, and
CHANGELOG.md are managed centrally. Restores those to upstream.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@ddon
ddon merged commit aaea9a6 into BeamLabEU:mainJun 24, 2026
ddon pushed a commit that referenced this pull request Jun 24, 2026
… review)
Post-merge review of PR #605:
- notifications_bell: default_link/1 read the *uncached* Settings.get_setting/2
on a hot path (refresh/1 runs twice on mount and on every notification PubSub
event). Switch to get_setting_cached/2 (ETS-backed, DB fallback, invalidated
on save) — same semantics, no per-event DB hit.
- Remove skills-lock.json (a Claude Code skills artifact committed at the repo
root; .claude/ is already gitignored) and add /skills-lock.json to .gitignore.
- Add post-merge review doc for #605.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
ddon pushed a commit that referenced this pull request Jun 24, 2026
Releases the unpublished work on main since 1.7.164:
- #603 sitemap_sources/0 auto-registration (+ enabled-module gating fix)
- #604 V137 email event dedup indexes + aws_message_id backfill
- #605 notifications graceful handling + user/file comment-resource links
(+ cached default-link lookup)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Sign up for freeto 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.

2 participants

@alexdont@ddon