GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Warn and confirm unusual tenant SMTP port and TLS settings by Storypapst · Pull Request #1094 · OpenResilienceInitiative/ORISO-Admin

Conversation

@Storypapst

@Storypapst Storypapst commented Sep 26, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Collaborator

What happened

A Träger can choose its own mail server, but the Admin form did not point out when the port and TLS mode are an unusual pair. A saved setting can therefore look complete while mail cannot leave. This change explains the usual pairs and asks for an explicit choice before saving anything else.

What we need to do

Review this Admin UI slice against dev after Admin #1076, whose mode form this branch includes, is reviewed. The server check is now in TenantService draft #290, stacked on #278. A real Träger test mail remains open in issue #1061. This PR sends the server acknowledgement only after the administrator confirms.

Current state — 2 October 2026

Everything in this branch is already on dev: Admin #1076 merged the warning and the confirmation dialog on 1 October. GitHub shows no remaining file change (dev...fix/1061-tenant-smtp-port-confirm: 0 files). The server-side check is still open in TenantService #290; until it is deployed, TenantService on Dev ignores the confirmation flag.

How to test it quickly

  • Select OWN with port 587 and STARTTLS (secure=false), then save. The form saves without an extra confirmation.
  • Select OWN with port 465 and STARTTLS, port 587 and implicit TLS, or another port. A visible warning explains the usual pairs, and Save asks for explicit confirmation before sending the update.
  • Cancel that confirmation. No update is sent and the form stays editable with the entered values.
  • Confirm it. The existing settings update receives the chosen port, TLS mode and one-use acknowledgement. In PLATFORM mode, no tenant SMTP host or password is sent.

What else I found

TenantService uses implicit TLS for secure=true and requires STARTTLS for secure=false. TenantService #290 now proposes a write-only acknowledgement and rejects an unacknowledged changed pair. The dedicated Träger test-mail path remains absent under #1061; no Dev or Stage delivery is claimed.

For developers — branch and local checks:

Base: origin/dev
Stacked dependency: Admin #1076 @ d03584c4 (must be merged/rebased before this PR)
New slice: b4444598; acknowledgement wiring: 4832d6fd
Red-green: three unusual-pair cases failed before implementation, then 17/17 focused tests passed; all 17 passed again after acknowledgement wiring.
TypeScript noEmit: passed
ESLint and Prettier on changed files: passed
Production build and forbidden-host validation: passed
Environment: local only; no deployed browser or mailbox acceptance.

Refs #1061

Conflict repair — 1 October 2026

This older parallel branch is now conflict-free and contains exactly the same source as the canonical SMTP mode PR1076. It adds no separate feature. Review and integrate PR1076 as the canonical package; retain this branch as delivery history.

For developers — conflict repair and local evidence:

Commit: 6fd824cd1d25f3ec9b83babd1fa5ea5ec4fabb86
Parents: 4832d6fd25dbba6b4ae1a63fdf8a5d4018c161cf + 63bdb5d034e24571f57b5ade35c68cd63a6c5389
Tested/reviewed tree: 3cb816bcf8c0aa5b81cb282600962998fdbe2520
Node22.12.0: 177 relevant tests in8files passed; the previous-timeout test passed separately unchanged (1passed,53deliberatelyfiltered).
Final format, exact CI ESLint, stylelint, Storybook types, build/postbuild and diff checks: exit0.
Earlier full suite: EXIT1 despite3663passed assertions (worker termination). One full retry STOPPED_NONPASS after inherited AccountInvites fixture timeout; no complete new full-suite PASS claimed.
Final18incoming files exactcurrentdev03eb; checkpoint locale values and newlanguageError keys retained.
Independent source and all gate/log/result/source hashes verified. Historical branches have exact whole-tree identity to tested1076; no redundant suites.
Independent source review: PASS. Normal push; no force-push or GitHub merge.
Fresh CI, human review, merge, deployment and received mail are separate gates.

Summary by CodeRabbit

  • New Features
    • Added explicit SMTP options for using the platform mail server or a tenant-owned server, with warnings when no option is selected.
    • Added test-email controls for saved, complete tenant-owned SMTP settings, with delivery status and error messages.
    • Added confirmation when saving nonstandard SMTP port and security combinations.
  • Bug Fixes
    • Prevented platform SMTP credentials from being carried into tenant settings when platform mail is selected.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Storypapst added 4 commits September 26, 2026 07:05
@Storypapst
fix(admin): make tenant SMTP mode explicit
d6f6211
@Storypapst
feat: bind tenant SMTP selector to persisted mode
ef56455
@Storypapst
Align tenant SMTP mode with Dev admin components
d03584c
@Storypapst
feat(admin): confirm unusual tenant SMTP transport settings
b444459
@Storypapst
Storypapst requested review from Shirloin, nikunjdecyb and shanzaeimran September 26, 2026 14:16
@coderabbitai

coderabbitai Bot commented Sep 26, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository: OpenResilienceInitiative/ORISO-Admin/.coderabbit.yaml

Review profile: ASSERTIVE

Plan: Team

Run ID: 534eee7f-0280-409c-bd57-fb99c1052257

📥 Commits

Reviewing files that changed from the base of the PR and between 03ebcfd and 6fd824c.

📒 Files selected for processing (11)
  • src/api/tenant/sendTenantSmtpTestEmail.test.ts
  • src/api/tenant/sendTenantSmtpTestEmail.ts
  • src/components/Tenants/AppSettings/SmtpSettings/SmtpSettings.smtp-wire.test.tsx
  • src/components/Tenants/AppSettings/SmtpSettings/SmtpSettings.stories.tsx
  • src/components/Tenants/AppSettings/SmtpSettings/SmtpSettings.test.tsx
  • src/components/Tenants/AppSettings/SmtpSettings/index.tsx
  • src/hooks/useTenantAdminDataMutation.smtp-wire.test.tsx
  • src/locales/de/translation.json
  • src/locales/en/translation.json
  • src/types/tenant.d.ts
  • src/utils/mergeTenantAdminData.ts

Included review availability: This review used your included allowance. 0 included reviews remain after this review. Your included PR review attempts over the past 7 days set your current allowance at 1 review per hour.

📜 Recent review details
🧰 Additional context used
📓 Path-based instructions (6)
Tests should prove the failing/admin-visible behavior and relevant edge cases.

⚙️ CodeRabbit configuration file

Files:

  • src/api/tenant/sendTenantSmtpTestEmail.test.ts
  • src/components/Tenants/AppSettings/SmtpSettings/SmtpSettings.smtp-wire.test.tsx
  • src/hooks/useTenantAdminDataMutation.smtp-wire.test.tsx
  • src/components/Tenants/AppSettings/SmtpSettings/SmtpSettings.test.tsx
Check admin behavior against the surrounding ORISO workflow, not only types.

⚙️ CodeRabbit configuration file

Files:

  • src/utils/mergeTenantAdminData.ts
  • src/types/tenant.d.ts
  • src/api/tenant/sendTenantSmtpTestEmail.test.ts
  • src/api/tenant/sendTenantSmtpTestEmail.ts
  • src/components/Tenants/AppSettings/SmtpSettings/SmtpSettings.smtp-wire.test.tsx
  • src/hooks/useTenantAdminDataMutation.smtp-wire.test.tsx
  • src/components/Tenants/AppSettings/SmtpSettings/SmtpSettings.test.tsx
  • src/components/Tenants/AppSettings/SmtpSettings/SmtpSettings.stories.tsx
  • src/components/Tenants/AppSettings/SmtpSettings/index.tsx
Domain API modules should be thin endpoint-specific helpers and use endpoint constants from `src/appConfig.ts` while keeping transport behavior in `src/api/fetchData.ts`.

📄 CodeRabbit inference engine (.understand-anything/ARCHITECTURE.md)

Files:

  • src/api/tenant/sendTenantSmtpTestEmail.test.ts
  • src/api/tenant/sendTenantSmtpTestEmail.ts
Reuse existing design tokens and components; avoid hardcoded styling for repeated controls, table states, or responsive layout.

📄 CodeRabbit inference engine (AGENTS.md)

Files:

  • src/utils/mergeTenantAdminData.ts
  • src/types/tenant.d.ts
  • src/api/tenant/sendTenantSmtpTestEmail.test.ts
  • src/api/tenant/sendTenantSmtpTestEmail.ts
  • src/components/Tenants/AppSettings/SmtpSettings/SmtpSettings.smtp-wire.test.tsx
  • src/hooks/useTenantAdminDataMutation.smtp-wire.test.tsx
  • src/components/Tenants/AppSettings/SmtpSettings/SmtpSettings.test.tsx
  • src/components/Tenants/AppSettings/SmtpSettings/SmtpSettings.stories.tsx
  • src/components/Tenants/AppSettings/SmtpSettings/index.tsx
Shared UI modules under `src/components/**` should contain page shells, listing tables, resizable tables, segmented tabs, search input, forms, tenant setting components, legal-text editors, language selector, layout/nav icons, and related r...

📄 CodeRabbit inference engine (.understand-anything/ARCHITECTURE.md)

Files:

  • src/components/Tenants/AppSettings/SmtpSettings/SmtpSettings.smtp-wire.test.tsx
  • src/components/Tenants/AppSettings/SmtpSettings/SmtpSettings.test.tsx
  • src/components/Tenants/AppSettings/SmtpSettings/SmtpSettings.stories.tsx
  • src/components/Tenants/AppSettings/SmtpSettings/index.tsx
Reuse existing table, form, query, mutation, role, and validation patterns instead of adding local one-off flows.

📄 CodeRabbit inference engine (AGENTS.md)

Files:

  • src/utils/mergeTenantAdminData.ts
  • src/types/tenant.d.ts
  • src/api/tenant/sendTenantSmtpTestEmail.test.ts
  • src/api/tenant/sendTenantSmtpTestEmail.ts
  • src/components/Tenants/AppSettings/SmtpSettings/SmtpSettings.smtp-wire.test.tsx
  • src/hooks/useTenantAdminDataMutation.smtp-wire.test.tsx
  • src/components/Tenants/AppSettings/SmtpSettings/SmtpSettings.test.tsx
  • src/components/Tenants/AppSettings/SmtpSettings/SmtpSettings.stories.tsx
  • src/components/Tenants/AppSettings/SmtpSettings/index.tsx
🧠 Learnings (1)
📓 Common learnings
Learnt from: CR
Repo: OpenResilienceInitiative/ORISO-Admin

Timestamp: 2026-10-01T22:42:48.910Z
Learning: Source excerpt:
# GIT.md — Git & GitHub workflow (ORISO)

## 4. Pull requests

-   Run the repo's validation gates before pushing (this repo: `npm run test`, `npx eslint . --max-warnings=0`, `npx prettier . --check`, `npm run build` — see `AGENTS.md`).
🪛 Betterleaks (1.8.1)
src/hooks/useTenantAdminDataMutation.smtp-wire.test.tsx

[high] 133-133: Detected a potential hardcoded password literal, which may expose account credentials.

(generic-password)


[high] 139-139: Detected a potential hardcoded password literal, which may expose account credentials.

(generic-password)

🔇 Additional comments (12)
src/types/tenant.d.ts (1)

52-53: LGTM!

src/utils/mergeTenantAdminData.ts (1)

62-67: LGTM!

src/hooks/useTenantAdminDataMutation.smtp-wire.test.tsx (1)

1-158: LGTM!

src/components/Tenants/AppSettings/SmtpSettings/index.tsx (2)

210-233: LGTM!


76-79: 🗄️ Data Integrity & Integration

The concern is unsubstantiated. The frontend does send password: '', but no repository evidence shows that TenantService treats an empty password as a replacement. The local contract explicitly documents blank as “keep stored password,” so the proposed omission is not supported by the inspected source.

src/components/Tenants/AppSettings/SmtpSettings/SmtpSettings.test.tsx (1)

136-353: LGTM!

src/components/Tenants/AppSettings/SmtpSettings/SmtpSettings.smtp-wire.test.tsx (1)

1-179: LGTM!

src/components/Tenants/AppSettings/SmtpSettings/SmtpSettings.stories.tsx (1)

1-120: LGTM!

src/locales/de/translation.json (1)

1461-1482: LGTM!

src/locales/en/translation.json (1)

1355-1371: LGTM!

src/api/tenant/sendTenantSmtpTestEmail.ts (1)

1-9: LGTM!

src/api/tenant/sendTenantSmtpTestEmail.test.ts (1)

1-22: LGTM!


📝 Walkthrough

Walkthrough

Tenant SMTP settings now use an explicit platform or own-server mode. The form validates and saves own-server settings, confirms nonstandard transport combinations, and can send a test email using saved configuration.

Changes

Tenant SMTP settings

Layer / File(s) Summary
SMTP mode contract and serialization
src/types/tenant.d.ts, src/utils/mergeTenantAdminData.ts, src/hooks/useTenantAdminDataMutation.smtp-wire.test.tsx
Adds the optional smtpMode setting and adjusts serialization when a PLATFORM-mode update includes SMTP data. HTTP tests cover PLATFORM and OWN updates, plus unrelated and mode-only updates.
Mode-aware SMTP editing and saving
src/components/Tenants/AppSettings/SmtpSettings/index.tsx, src/components/Tenants/AppSettings/SmtpSettings/SmtpSettings.test.tsx, src/components/Tenants/AppSettings/SmtpSettings/SmtpSettings.smtp-wire.test.tsx, src/components/Tenants/AppSettings/SmtpSettings/SmtpSettings.stories.tsx, src/locales/{en,de}/translation.json
The form offers PLATFORM and OWN modes, validates own-server settings, and asks for confirmation before saving nonstandard transport combinations. Tests and translations cover mode selection, validation, and confirmation.
SMTP test-email delivery
src/api/tenant/sendTenantSmtpTestEmail.ts, src/api/tenant/sendTenantSmtpTestEmail.test.ts, src/components/Tenants/AppSettings/SmtpSettings/index.tsx, src/components/Tenants/AppSettings/SmtpSettings/SmtpSettings.test.tsx, src/components/Tenants/AppSettings/SmtpSettings/SmtpSettings.smtp-wire.test.tsx, src/components/Tenants/AppSettings/SmtpSettings/SmtpSettings.stories.tsx, src/locales/{en,de}/translation.json
Adds a test-email request for eligible saved own-server settings. The form maps selected response statuses to messages. Tests check request contents and disabled states. Translations describe recipient, eligibility, cooldown, and failures.

Priority: ➖ Normal

Estimated code review effort: 3 (Moderate) | ~25 minutes

Change: Feature

Sequence Diagram(s)

sequenceDiagram
  participant SmtpSettings
  participant sendTenantSmtpTestEmail
  participant fetchData
  SmtpSettings->>sendTenantSmtpTestEmail: Submit test for tenant ID
  sendTenantSmtpTestEmail->>fetchData: POST to tenant SMTP test-deliveries endpoint
Loading

Merge Risk: ⚪ Minimal · up to 6fd82

No actionable merge-blocking issue is established for the SMTP mode, confirmation, or stored-settings test changes. Normal checks and coordinated backend compatibility remain necessary.

🚥 Pre-merge checks | ✅ 6 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Shared Admin Patterns ⚠️ Warning The PR reuses the existing CardEditable, tenant mutation, fetchData, and SMTP test-card patterns. It also adds a second confirmation-dialog implementation: SmtpSettings/index.tsx calls antd `M… Replace antd Modal.confirm with the shared components/Modal and its standard dialog actions (or a small reusable wrapper). Keep the existing confirm and cancel callbacks so cancellation reopens the editable card without sending the mu…
✅ Passed checks (6 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 9…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Validation Evidence ✅ Passed The PR changes product behavior and includes relevant automated tests. The diff adds component tests for SMTP modes, validation, transport confirmation, cancellation, and stored-server testing; HTTP-l…
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly describes the main change: warnings and confirmation for unusual tenant SMTP port and TLS settings. It is concise and identifies the affected tenant SMTP area.
Full details: Shared Admin Patterns

Explanation

The PR reuses the existing CardEditable, tenant mutation, fetchData, and SMTP test-card patterns. It also adds a second confirmation-dialog implementation: SmtpSettings/index.tsx calls antd Modal.confirm (the only such call in the head). The base already provides src/components/Modal, which is used across Admin confirmation flows and defines the shared ORISO dialog and button pattern.

Resolution

Replace antd Modal.confirm with the shared components/Modal and its standard dialog actions (or a small reusable wrapper). Keep the existing confirm and cancel callbacks so cancellation reopens the editable card without sending the mutation.

  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
🛠️ Fix failing CI checks 💡
  • Commit to this branch
  • Create a new PR
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Autopilot is currently an internal CodeRabbit preview.


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

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

This was referenced Sep 26, 2026
Träger mail settings: check that port and SSL fit, and offer a test mail #1061
Closed
EPIC: transactional e-mails — one design system across every sending path OpenResilienceInitiative/ORISO-Frontend#828
Open
@Storypapst
Send tenant SMTP transport confirmation to API
4832d6f
@Storypapst Storypapst mentioned this pull request Sep 26, 2026
Require explicit confirmation for unusual tenant SMTP transport OpenResilienceInitiative/ORISO-TenantService#290
Merged
3 of 4 tasks
@Storypapst
Add stored tenant SMTP test action to Admin
8bf961e
@Storypapst Storypapst mentioned this pull request Sep 26, 2026
Add saved tenant SMTP test action in Admin #1095
Merged
3 of 4 tasks
Storypapst added 4 commits September 27, 2026 07:39
@Storypapst
fix: keep tenant SMTP test authorization errors in form
dcb42ff
@Storypapst
fix(smtp): preserve explicit platform payload on save
071a4ec
@Storypapst
fix(smtp): validate tenant ports only for own delivery
e5186fc
@Storypapst
Use accessible SMTP password query in tests
b8d4eb1
This was referenced Sep 30, 2026
Persist explicit tenant mail-server choice without copying platform SMTP #1076
Merged
Decide: does a Träger without its own mail server send through the platform server? OpenResilienceInitiative/ORISO-Frontend#1562
Closed
@Storypapst
Merge OWN SMTP confirmation and stored-server test into tenant mode e…
a966a10
…ditor
@Storypapst Storypapst added this to ORISO Roadmap Oct 1, 2026
Storypapst added 3 commits October 1, 2026 12:30
@Storypapst
Merge reviewed dev source into tenant SMTP settings
10f2030
Source-reviewed checkpoint of the translation union. Four quality gates passed; the earlier full run exited1 at worker termination and a repeat was stopped after an inherited30s fixture timeout. No full-suite PASS, publication or runtime acceptance is claimed. Latest dev integration and relevant final gates follow.
@Storypapst
Merge current dev into tenant SMTP mode fixes
63bdb5d
Preserve the SMTP mode projection, OWN confirmation and PLATFORM port validation, plus all current dev preview/onboarding fixes. Final relevant tests and quality/build gates passed on this exact tree. Historical full-unit nonpassing receipts remain separately disclosed; CI, human review and runtime acceptance remain open.
@Storypapst
Merge tested canonical SMTP integration into historical PR1094
6fd824c
This historical branch is fully contained in PR1076. Retain its history while using the exact tested current-dev-compatible canonical tree; do not revive the old OWN/PLATFORM validation. This is provenance, not an independent feature delivery or new human approval.
@Storypapst Storypapst moved this to In progress in ORISO Roadmap Oct 1, 2026
@Storypapst
Storypapst marked this pull request as ready for review October 1, 2026 22:42
@Storypapst
Storypapst requested a review from shazia-k October 1, 2026 22:42
@Storypapst Storypapst self-assigned this Oct 1, 2026
@Storypapst Storypapst moved this from In progress to In review in ORISO Roadmap Oct 1, 2026
coderabbitai[bot]
coderabbitai Bot previously approved these changes Oct 1, 2026
View reviewed changes
@Storypapst
Storypapst dismissed coderabbitai[bot]’s stale review October 1, 2026 22:46

The merge-base changed after approval.

@Storypapst

Storypapst commented Oct 1, 2026

Copy link
Copy Markdown
Collaborator Author

Closing: this branch adds no net change against dev (GitHub compare: 0 files). The work already reached dev through #1076. Closed on Frank's decision, 2026-10-02.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@Storypapst Storypapst closed this Oct 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@coderabbitai coderabbitai[bot] coderabbitai[bot] left review comments
@shanzaeimran shanzaeimran Awaiting requested review from shanzaeimran
@Shirloin Shirloin Awaiting requested review from Shirloin
@nikunjdecyb nikunjdecyb Awaiting requested review from nikunjdecyb
@shazia-k shazia-k Awaiting requested review from shazia-k

Uh oh!

There was an error while loading. Please reload this page.

Assignees

@Storypapst Storypapst

Labels

None yet

Projects

ORISO Roadmap
Status: Done

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

1 participant

@Storypapst
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.