feat: add support for public seerr logo in email#3036
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughThe PR adds optional public logo URL support to email notifications. A new ChangesPublic Logo Email Configuration
Sequence Diagram(s)sequenceDiagram
participant EmailAgent
participant LogoComputation
participant TemplateRenderer
participant EmailOutput
EmailAgent->>LogoComputation: usePublicLogo setting
LogoComputation->>LogoComputation: select PUBLIC_LOGO_URL or fallback
LogoComputation->>TemplateRenderer: pass computed logoUrl
TemplateRenderer->>TemplateRenderer: render if logoUrl exists
TemplateRenderer->>TemplateRenderer: wrap in link if applicationUrl present
TemplateRenderer->>EmailOutput: final email with logo
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Poem
🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Tip 💬 Introducing Slack Agent: The best way for teams to turn conversations into code.Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.
Built for teams:
One agent for your entire SDLC. Right inside Slack. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
M0NsTeRRR
left a comment
There was a problem hiding this comment.
search for "/logo_full.png" in the codebase you are missing 2 templates (generatedpassword and resetpassword)
c0fe5aa to
2264b5c
Compare
Fixed in 2264b5c |
There was a problem hiding this comment.
🧹 Nitpick comments (3)
server/templates/email/media-issue/html.pug (1)
22-27: ⚡ Quick winAdd alt text to logo images for accessibility.
The
imgtags on lines 25 and 27 are missingaltattributes. Adding descriptive alt text improves accessibility for screen readers and provides fallback text when images fail to load.♿ Proposed fix to add alt attributes
if logoUrl if applicationUrl a(href=applicationUrl style='margin: 0 1rem;') - img(src=logoUrl style='width: 26rem; image-rendering: crisp-edges; image-rendering: -webkit-optimize-contrast;') + img(src=logoUrl alt=applicationTitle style='width: 26rem; image-rendering: crisp-edges; image-rendering: -webkit-optimize-contrast;') else - img(src=logoUrl style='margin: 0 1rem; width: 26rem; image-rendering: crisp-edges; image-rendering: -webkit-optimize-contrast;') + img(src=logoUrl alt=applicationTitle style='margin: 0 1rem; width: 26rem; image-rendering: crisp-edges; image-rendering: -webkit-optimize-contrast;')🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@server/templates/email/media-issue/html.pug` around lines 22 - 27, The img elements rendering the logo (conditional on logoUrl and applicationUrl) lack alt attributes; update both img tags in the media-issue html.pug template to include descriptive alt text (e.g., alt="Application logo" or a contextual value) so screen readers and image fallback are supported, ensuring the alt is present whether the img is wrapped in an anchor (applicationUrl) or not.server/templates/email/generatedpassword/html.pug (1)
22-27: ⚡ Quick winAdd alt text to logo images for accessibility.
The
imgtags on lines 25 and 27 are missingaltattributes. Adding descriptive alt text improves accessibility for screen readers and provides fallback text when images fail to load.♿ Proposed fix to add alt attributes
if logoUrl if applicationUrl a(href=applicationUrl style='margin: 0 1rem;') - img(src=logoUrl style='width: 26rem; image-rendering: crisp-edges; image-rendering: -webkit-optimize-contrast;') + img(src=logoUrl alt=applicationTitle style='width: 26rem; image-rendering: crisp-edges; image-rendering: -webkit-optimize-contrast;') else - img(src=logoUrl style='margin: 0 1rem; width: 26rem; image-rendering: crisp-edges; image-rendering: -webkit-optimize-contrast;') + img(src=logoUrl alt=applicationTitle style='margin: 0 1rem; width: 26rem; image-rendering: crisp-edges; image-rendering: -webkit-optimize-contrast;')🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@server/templates/email/generatedpassword/html.pug` around lines 22 - 27, The two img elements that render the logo (conditionals using logoUrl and applicationUrl) lack alt attributes; update both img tags in the generatedpassword template to include a descriptive alt (e.g., using a variable like applicationName or a default "Logo") so screen readers and image-fallback scenarios have meaningful text, ensuring you add the same alt to the img inside the anchor (when applicationUrl is present) and the standalone img (when applicationUrl is absent).server/templates/email/resetpassword/html.pug (1)
22-27: ⚡ Quick winAdd alt text to logo images for accessibility.
The
imgtags on lines 25 and 27 are missingaltattributes. Adding descriptive alt text improves accessibility for screen readers and provides fallback text when images fail to load.♿ Proposed fix to add alt attributes
if logoUrl if applicationUrl a(href=applicationUrl style='margin: 0 1rem;') - img(src=logoUrl style='width: 26rem; image-rendering: crisp-edges; image-rendering: -webkit-optimize-contrast;') + img(src=logoUrl alt=applicationTitle style='width: 26rem; image-rendering: crisp-edges; image-rendering: -webkit-optimize-contrast;') else - img(src=logoUrl style='margin: 0 1rem; width: 26rem; image-rendering: crisp-edges; image-rendering: -webkit-optimize-contrast;') + img(src=logoUrl alt=applicationTitle style='margin: 0 1rem; width: 26rem; image-rendering: crisp-edges; image-rendering: -webkit-optimize-contrast;')🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@server/templates/email/resetpassword/html.pug` around lines 22 - 27, The img elements rendering the logo (conditionals using logoUrl and applicationUrl in the resetpassword/html.pug template) are missing alt attributes; update both img tags to include a descriptive alt attribute (e.g., alt=applicationName ? `${applicationName} logo` : 'Application logo' or a fixed descriptive string) so screen readers and image-fallbacks are supported; ensure you add the alt to the img inside the a(...) and the standalone img(...) branches so both code paths have equivalent accessibility text.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@server/templates/email/generatedpassword/html.pug`:
- Around line 22-27: The two img elements that render the logo (conditionals
using logoUrl and applicationUrl) lack alt attributes; update both img tags in
the generatedpassword template to include a descriptive alt (e.g., using a
variable like applicationName or a default "Logo") so screen readers and
image-fallback scenarios have meaningful text, ensuring you add the same alt to
the img inside the anchor (when applicationUrl is present) and the standalone
img (when applicationUrl is absent).
In `@server/templates/email/media-issue/html.pug`:
- Around line 22-27: The img elements rendering the logo (conditional on logoUrl
and applicationUrl) lack alt attributes; update both img tags in the media-issue
html.pug template to include descriptive alt text (e.g., alt="Application logo"
or a contextual value) so screen readers and image fallback are supported,
ensuring the alt is present whether the img is wrapped in an anchor
(applicationUrl) or not.
In `@server/templates/email/resetpassword/html.pug`:
- Around line 22-27: The img elements rendering the logo (conditionals using
logoUrl and applicationUrl in the resetpassword/html.pug template) are missing
alt attributes; update both img tags to include a descriptive alt attribute
(e.g., alt=applicationName ? `${applicationName} logo` : 'Application logo' or a
fixed descriptive string) so screen readers and image-fallbacks are supported;
ensure you add the alt to the img inside the a(...) and the standalone img(...)
branches so both code paths have equivalent accessibility text.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: d08fe3de-8cbc-4615-ade4-59a2a2230e29
📒 Files selected for processing (9)
server/lib/notifications/agents/email.tsserver/lib/settings/index.tsserver/templates/email/generatedpassword/html.pugserver/templates/email/media-issue/html.pugserver/templates/email/media-request/html.pugserver/templates/email/resetpassword/html.pugserver/templates/email/test-email/html.pugsrc/components/Settings/Notifications/NotificationsEmail.tsxsrc/i18n/locale/en.json
✅ Files skipped from review due to trivial changes (1)
- src/i18n/locale/en.json
🚧 Files skipped from review as they are similar to previous changes (5)
- server/lib/settings/index.ts
- server/templates/email/test-email/html.pug
- src/components/Settings/Notifications/NotificationsEmail.tsx
- server/lib/notifications/agents/email.ts
- server/templates/email/media-request/html.pug
|
Should be ready now |
Description
The user now can enable the seerr instance to pull the seerr logo from github instead of the seerr instance itself. This is necessary to view emails in gmail as gmail uses a proxy from google which is not able to pull the image from the seerr instance if the seerr instance is not public accessible.
How Has This Been Tested?
pnpm buildandpnpm i18n:extractandpnpm testsucceed.Screenshots / Logs (if applicable)
Checklist:
pnpm buildpnpm i18n:extractSummary by CodeRabbit