[Design review] Rework Mail server, envelope, credential, and policy structure #10

Closed
opened 2026-07-11 03:46:50 +02:00 by zemion · 10 comments
Owner

Context

The mail backend now separates server configuration from credentials, but the profile creation/editing UI still behaves as if every edit button opens the same combined dialog.

Requested behavior

Change the mail profile creation and editing flow to reflect the server/credential split.

Acceptance criteria

  • Editing an IMAP server, SMTP server, and credentials opens the appropriate focused dialog.
  • The UI makes it clear that IMAP and SMTP can be different servers and server types.
  • Credentials are visibly attached to the server/profile they belong to.
  • Creation flow guides the user through server selection/creation and credential assignment without duplicating fields.
  • Existing profile policies remain compatible.
  • WebUI tests cover the new dialog routing and at least one create/edit path.

Folded Scope From #12: Mail Profile / Transport Complexity

The structural debt from govoplan-mail#12 is part of this redesign work and must not be lost while implementing the server/credential split.

Additional acceptance notes:

  • Extract mail profile policy merge and validation into smaller focused helpers with fixture-style tests.
  • Keep server configuration, credential inheritance, and policy enforcement visibly separate in the UI and backend service boundaries.
  • Split transport request preparation from execution/response handling where SMTP/IMAP behavior is touched.
  • Preserve existing policy compatibility while simplifying _merge_policy, update_mail_server_profile, _validate_policy_against_parent, list_imap_messages, and _send_smtp_payload over follow-up slices.

Source: folded from govoplan-mail#12 (source/security-audit, audit complexity baseline codex-audit-full-2026-07-11:mail-complexity-baseline).

## Context The mail backend now separates server configuration from credentials, but the profile creation/editing UI still behaves as if every edit button opens the same combined dialog. ## Requested behavior Change the mail profile creation and editing flow to reflect the server/credential split. ## Acceptance criteria - Editing an IMAP server, SMTP server, and credentials opens the appropriate focused dialog. - The UI makes it clear that IMAP and SMTP can be different servers and server types. - Credentials are visibly attached to the server/profile they belong to. - Creation flow guides the user through server selection/creation and credential assignment without duplicating fields. - Existing profile policies remain compatible. - WebUI tests cover the new dialog routing and at least one create/edit path. ## Folded Scope From #12: Mail Profile / Transport Complexity The structural debt from `govoplan-mail#12` is part of this redesign work and must not be lost while implementing the server/credential split. Additional acceptance notes: - Extract mail profile policy merge and validation into smaller focused helpers with fixture-style tests. - Keep server configuration, credential inheritance, and policy enforcement visibly separate in the UI and backend service boundaries. - Split transport request preparation from execution/response handling where SMTP/IMAP behavior is touched. - Preserve existing policy compatibility while simplifying `_merge_policy`, `update_mail_server_profile`, `_validate_policy_against_parent`, `list_imap_messages`, and `_send_smtp_payload` over follow-up slices. Source: folded from `govoplan-mail#12` (`source/security-audit`, audit complexity baseline `codex-audit-full-2026-07-11:mail-complexity-baseline`).
Author
Owner

Codex State: progress

Summary

  • Split the mail profile tree so SMTP/IMAP server settings and SMTP/IMAP credentials are visible as separate child rows, with edit actions opening the corresponding MailServerSettingsPanel section.
  • Added a WebUI package lock so the module-local test script can install and run TypeScript consistently.

Changed Files

  • webui/src/features/mail/MailProfileManagement.tsx
  • webui/package-lock.json

Verification

  • /home/zemion/.nvm/versions/node/v22.22.3/bin/npm run test:mail-ui
  • /home/zemion/.nvm/versions/node/v22.22.3/bin/npm run build in govoplan-core/webui

Next / Blocked

  • Keep this open for full guided creation/edit UX and any backend schema split work that is still intended for this issue.

Suggested status label: status/in-progress

## Codex State: progress ### Summary - Split the mail profile tree so SMTP/IMAP server settings and SMTP/IMAP credentials are visible as separate child rows, with edit actions opening the corresponding MailServerSettingsPanel section. - Added a WebUI package lock so the module-local test script can install and run TypeScript consistently. ### Changed Files - `webui/src/features/mail/MailProfileManagement.tsx` - `webui/package-lock.json` ### Verification - `/home/zemion/.nvm/versions/node/v22.22.3/bin/npm run test:mail-ui` - `/home/zemion/.nvm/versions/node/v22.22.3/bin/npm run build in govoplan-core/webui` ### Next / Blocked - Keep this open for full guided creation/edit UX and any backend schema split work that is still intended for this issue. Suggested status label: `status/in-progress`
Author
Owner

Codex State: done

Summary

  • Mail profile UI now separates profile metadata, SMTP/IMAP server settings, and SMTP/IMAP credentials into focused edit targets.
  • The shared core MailServerSettingsPanel supports full, server-only, and credentials-only modes without duplicating fields.
  • Existing policy handling remains compatible; IMAP add/edit no longer treats credentials-only input as a configured IMAP server.

Changed Files

  • govoplan-core/webui/src/components/mail/MailServerSettingsPanel.tsx
  • govoplan-mail/webui/src/features/mail/MailProfileManagement.tsx
  • govoplan-mail/webui/src/features/mail/mailProfileEditorModel.ts

Verification

  • npm run test:mail-components (core WebUI)
  • npm run test:mail-ui (mail WebUI)
  • python -m unittest discover -s tests (govoplan-mail)
## Codex State: done ### Summary - Mail profile UI now separates profile metadata, SMTP/IMAP server settings, and SMTP/IMAP credentials into focused edit targets. - The shared core MailServerSettingsPanel supports full, server-only, and credentials-only modes without duplicating fields. - Existing policy handling remains compatible; IMAP add/edit no longer treats credentials-only input as a configured IMAP server. ### Changed Files - `govoplan-core/webui/src/components/mail/MailServerSettingsPanel.tsx` - `govoplan-mail/webui/src/features/mail/MailProfileManagement.tsx` - `govoplan-mail/webui/src/features/mail/mailProfileEditorModel.ts` ### Verification - `npm run test:mail-components (core WebUI)` - `npm run test:mail-ui (mail WebUI)` - `python -m unittest discover -s tests (govoplan-mail)`
zemion changed title from Mail: redesign profile UI around server and credential split to [Design review] Rework Mail server, envelope, credential, and policy structure 2026-07-28 00:58:11 +02:00
zemion reopened this issue 2026-07-28 00:58:11 +02:00
Author
Owner

Reopened as a design-review placeholder by product decision on 2026-07-28.

The current UI and backing hierarchy are not accepted as the final structure. In particular, server envelopes, concrete servers, reusable credential envelopes, attached credentials, visibility/inheritance, policies, and module-specific selections need a coherent model rather than another local UI adjustment.

Implementation is intentionally paused until the product owner adds the detailed structural notes. Existing code remains provisional; this issue should not be closed based only on the previously implemented split.

Reopened as a design-review placeholder by product decision on 2026-07-28. The current UI and backing hierarchy are not accepted as the final structure. In particular, server envelopes, concrete servers, reusable credential envelopes, attached credentials, visibility/inheritance, policies, and module-specific selections need a coherent model rather than another local UI adjustment. Implementation is intentionally paused until the product owner adds the detailed structural notes. Existing code remains provisional; this issue should not be closed based only on the previously implemented split. <!-- codex-mail-structure-pin-2026-07-28 -->
Author
Owner

Selector audit follow-up: the current credential editor still asks for comma-separated module IDs and server references. This should be addressed as part of the envelope/server/credential redesign using typed multi-select providers, while retaining unavailable and optional cross-module references. Cross-module tracking: GovOPlaN/govoplan-core#272.

Selector audit follow-up: the current credential editor still asks for comma-separated module IDs and server references. This should be addressed as part of the envelope/server/credential redesign using typed multi-select providers, while retaining unavailable and optional cross-module references. Cross-module tracking: GovOPlaN/govoplan-core#272.
Author
Owner

Codex State: progress

Summary

  • Completed the govoplan-core#272 reference slice: credential module restrictions are registry-backed and server restrictions use typed selectors.
  • Mail now announces accessible SMTP/IMAP servers through an optional Core UI capability, including inactive state and scope/profile provenance.

Changed Files

  • webui/src/features/mail/MailProfileManagement.tsx
  • webui/src/features/mail/mailReferenceProviders.ts
  • webui/src/module.ts

Verification

  • npm run test:mail-ui (passed)
  • full-product and mail-only module builds (passed)

Next / Blocked

  • Keep this issue open for the broader server/envelope/credential/policy redesign and complexity work already captured in its acceptance criteria.

Suggested status label: status/in-progress

## Codex State: progress ### Summary - Completed the govoplan-core#272 reference slice: credential module restrictions are registry-backed and server restrictions use typed selectors. - Mail now announces accessible SMTP/IMAP servers through an optional Core UI capability, including inactive state and scope/profile provenance. ### Changed Files - `webui/src/features/mail/MailProfileManagement.tsx` - `webui/src/features/mail/mailReferenceProviders.ts` - `webui/src/module.ts` ### Verification - `npm run test:mail-ui (passed)` - `full-product and mail-only module builds (passed)` ### Next / Blocked - Keep this issue open for the broader server/envelope/credential/policy redesign and complexity work already captured in its acceptance criteria. Suggested status label: `status/in-progress`
Author
Owner

Codex State: progress

The audit reinforces this design review: update_profile (D/23), _profile_response (D/21), and update_bound_mail_credential (D/27) still combine envelope/server/credential policy, visibility, secret updates, and response shaping. Treat their decomposition as acceptance work for the new server-envelope -> server -> reusable credential model rather than opening a parallel refactor ticket.

## Codex State: progress The audit reinforces this design review: `update_profile` (D/23), `_profile_response` (D/21), and `update_bound_mail_credential` (D/27) still combine envelope/server/credential policy, visibility, secret updates, and response shaping. Treat their decomposition as acceptance work for the new server-envelope -> server -> reusable credential model rather than opening a parallel refactor ticket.
Author
Owner

Product decision: intentionally postponed

This redesign remains important, but the current envelope -> server -> reusable credential hierarchy and inheritance model is not accepted as final and will not be extended piecemeal now. Keep the existing implementation operational and preserve the decomposition findings. Resume only when the complete visibility, inheritance, credential reuse, policy, and module-selection model is specified.

## Product decision: intentionally postponed This redesign remains important, but the current envelope -> server -> reusable credential hierarchy and inheritance model is not accepted as final and will not be extended piecemeal now. Keep the existing implementation operational and preserve the decomposition findings. Resume only when the complete visibility, inheritance, credential reuse, policy, and module-selection model is specified.
Author
Owner

Codex State: ready

Summary

  • The current envelope/server/reusable-credential split is accepted for now.
  • Remaining work is the creation/editing workflow and UI presentation: make server and credential bindings explicit and understandable without another data-model redesign.

Suggested status label: status/ready

## Codex State: ready ### Summary - The current envelope/server/reusable-credential split is accepted for now. - Remaining work is the creation/editing workflow and UI presentation: make server and credential bindings explicit and understandable without another data-model redesign. Suggested status label: `status/ready`
Author
Owner

Codex State: ready

Summary

  • The current envelope/server/reusable-credential split is accepted for now. Remaining work is the creation/editing workflow and UI presentation: make server and credential bindings explicit and understandable without another data-model redesign.

Suggested status label: status/ready

## Codex State: ready ### Summary - The current envelope/server/reusable-credential split is accepted for now. Remaining work is the creation/editing workflow and UI presentation: make server and credential bindings explicit and understandable without another data-model redesign. Suggested status label: `status/ready`
Author
Owner

Codex State: done

Summary

  • Kept the accepted profile -> protocol server -> reusable credential hierarchy unchanged.
  • Editing profile metadata, SMTP/IMAP servers, and attached credentials uses separate focused dialogs and isolated update payloads.
  • Replaced the combined first-create form with a five-stage flow: profile, SMTP server, SMTP credential, optional IMAP server, and optional IMAP credential. The final create remains one atomic request.
  • The tree makes each credential's server binding explicit and supports creating or linking reusable credentials.

Verification

  • npm run test:mail-ui passed, including create-stage and focused-editor model tests.
  • Core full linked-module WebUI build and bundle-budget check passed.
## Codex State: done ### Summary - Kept the accepted profile -> protocol server -> reusable credential hierarchy unchanged. - Editing profile metadata, SMTP/IMAP servers, and attached credentials uses separate focused dialogs and isolated update payloads. - Replaced the combined first-create form with a five-stage flow: profile, SMTP server, SMTP credential, optional IMAP server, and optional IMAP credential. The final create remains one atomic request. - The tree makes each credential's server binding explicit and supports creating or linking reusable credentials. ### Verification - `npm run test:mail-ui` passed, including create-stage and focused-editor model tests. - Core full linked-module WebUI build and bundle-budget check passed.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: GovOPlaN/govoplan-mail#10