-
Notifications
You must be signed in to change notification settings - Fork 416
Make transactional email footer settings links clickable #2619
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
87ee6f8
6708ff9
e72792e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| --- | ||
| "@agent-native/core": minor | ||
| --- | ||
|
|
||
| `renderEmail` accepts a `footerLink`, so a footer can point at a real | ||
| destination. A `{link}` token in `footer` becomes an anchor in the HTML part and | ||
| `label (url)` in the plain-text part. | ||
|
|
||
| Notification emails now render through `renderEmail` instead of a bare | ||
| paragraph pair, so they carry the same branding as the rest of the framework's | ||
| mail. A sender can name the surface that controls the notification with | ||
| `metadata.emailFooter`, `emailFooterLinkLabel`, and `emailFooterLinkUrl`; | ||
| notifications that name none get no footer, so env-configured ops recipients | ||
| are never told to turn off a toggle they do not have. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| --- | ||
| type: improved | ||
| date: 2026-08-04 | ||
| --- | ||
|
|
||
| Error, alert, monitor, and scheduled-report emails are now branded and link to the exact setting that sent them. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| import { getAppProductionUrl } from "@agent-native/core/server"; | ||
|
|
||
| /** Absolute URL for an in-app path, for use in emails and notifications. */ | ||
| export function analyticsUrl(path: string): string { | ||
| const base = getAppProductionUrl().replace(/\/+$/, ""); | ||
| return `${base}${path.startsWith("/") ? path : `/${path}`}`; | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| --- | ||
| type: improved | ||
| date: 2026-08-04 | ||
| --- | ||
|
|
||
| Generation finished and failed emails are now branded and link to your Assets settings. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -7,6 +7,7 @@ | |
| * there would mail a user who is already looking at the image. | ||
| */ | ||
| import { notifyWithDelivery } from "@agent-native/core/notifications"; | ||
| import { getAppProductionUrl } from "@agent-native/core/server"; | ||
| import { getUserSetting } from "@agent-native/core/settings"; | ||
|
|
||
| import { | ||
|
|
@@ -71,7 +72,16 @@ export async function notifyGenerationRunFinished( | |
| libraryId: run.libraryId, | ||
| outcome, | ||
| // The email channel is a no-op without explicit recipients. | ||
| ...(emailed ? { emailRecipients: [owner], emailSubject: title } : {}), | ||
| ...(emailed | ||
| ? { | ||
| emailRecipients: [owner], | ||
| emailSubject: title, | ||
| emailFooter: | ||
| "You received this because email notifications are on in your {link}.", | ||
| emailFooterLinkLabel: "Assets settings", | ||
| emailFooterLinkUrl: `${getAppProductionUrl().replace(/\/+$/, "")}/settings`, | ||
|
Comment on lines
+79
to
+82
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🟡 Use the Assets base-path-aware URL builderThis direct concatenation bypasses Assets' existing Additional Info |
||
| } | ||
| : {}), | ||
| }, | ||
| }, | ||
| { owner }, | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| --- | ||
| type: improved | ||
| date: 2026-08-04 | ||
| --- | ||
|
|
||
| Clip activity emails now name the viewer and the Clip in the subject heading, and link straight to your Clips settings. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🟡 Preserve Analytics base paths in notification URLs
analyticsUrlappends paths directly to the production origin, but Analytics routes strip a configuredAPP_BASE_PATH/VITE_APP_BASE_PATH. In a deployment mounted at/analytics, new alert, monitor, error, and report links point to/settingsor/monitoringat the host root instead of the Analytics app. Use the configured base-path-aware URL helper and cover a mounted-path case.Additional Info