Skip to content

refactor: move smtp to dedicated section#910

Merged
LeadcodeDev merged 2 commits into
mainfrom
feat/move-smtp-to-dedicated-section
Mar 30, 2026
Merged

refactor: move smtp to dedicated section#910
LeadcodeDev merged 2 commits into
mainfrom
feat/move-smtp-to-dedicated-section

Conversation

@LeadcodeDev

@LeadcodeDev LeadcodeDev commented Mar 30, 2026

Copy link
Copy Markdown
Contributor

Summary by CodeRabbit

  • New Features

    • Added dedicated SMTP settings page within realm settings with configuration management capabilities.
    • Extended organization management with new APIs for attributes and member handling.
  • Bug Fixes & Improvements

    • Separated SMTP configuration from email template settings for clearer organization and improved user experience.
  • Documentation & Navigation

    • Updated email template workflow navigation and realm settings layout to include new SMTP tab and improved organization structure.

@NathaelB

Copy link
Copy Markdown
Member

Can you share screen ?

@LeadcodeDev

Copy link
Copy Markdown
Contributor Author

btw I will fix tab highlight

Capture d’écran 2026-03-30 à 22 34 41 Capture d’écran 2026-03-30 à 22 35 05

@coderabbitai

coderabbitai Bot commented Mar 30, 2026

Copy link
Copy Markdown

Caution

Review failed

Pull request was closed or merged during review

📝 Walkthrough

Walkthrough

This PR extends the API client with organization attribute and member management schemas/endpoints, introduces a new dedicated SMTP settings feature page, removes SMTP configuration from the email settings page, and reorganizes email template routing to point to realm settings instead of an email-templates overview route.

Changes

Cohort / File(s) Summary
API Schema Extensions
front/src/api/api.client.ts
Added new types (OrganizationAttribute, OrganizationMember, AddMemberValidator, UpsertAttributeValidator) and seven new endpoints for organization/user organization management. Extended RealmSetting and UpdateRealmSettingValidator with three optional email template ID fields.
Email Template Cache & Navigation
front/src/api/email-template.api.ts, front/src/pages/email-template/feature/page-email-template-builder-feature.tsx, front/src/pages/email-template/page-email-template.tsx
Updated mutation cache invalidation to use specific query keys. Changed builder post-success and back navigation to point to realm settings email page instead of email-templates overview. Removed /overview route from email template page routing.
SMTP Settings Feature (New)
front/src/pages/realm/feature/page-realm-settings-smtp-feature.tsx, front/src/pages/realm/ui/page-realm-settings-smtp.tsx
Implemented new dedicated SMTP configuration feature with Zod-based form validation, React Hook Form integration, and conditional display/edit UI. Handles fetch, upsert, and delete SMTP config operations.
Realm Settings Integration
front/src/pages/realm/feature/page-realm-settings-email-feature.tsx, front/src/pages/realm/ui/page-realm-settings-email.tsx, front/src/pages/realm/layouts/realm-settings-layout.tsx, front/src/pages/realm/page-realm.tsx, front/src/pages/realm/ui/page-realm-settings.tsx
Removed SMTP configuration hooks and form logic from email settings feature/UI. Added SMTP tab to realm settings tabs. Registered new /smtp route under realm settings layout. Updated tab validation whitelist.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

Suggested labels

type:feature

Suggested reviewers

  • NathaelB
  • jorisvilardell

Poem

🐰 A rabbit hops through settings new,
With SMTP split off in view,
Organization members hop,
Templates dance to realms on top, 🎉
Configuration flows just right, so true!

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main refactoring: moving SMTP configuration from being embedded in the email settings page to a dedicated, separate section with its own route and feature component.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/move-smtp-to-dedicated-section

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@LeadcodeDev LeadcodeDev merged commit df00492 into main Mar 30, 2026
8 of 9 checks passed
@LeadcodeDev LeadcodeDev deleted the feat/move-smtp-to-dedicated-section branch March 30, 2026 20:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants