feat(inbox-ui): Settings → Inbox → Mailboxes, My mailbox, mailbox → Ever Works agent (G-P4-1, G-P4-6)

Merged
EV
9d ago
+3935-23

What

G-P4-1 (UI): Settings → Inbox → Mailboxes and "My mailbox", plus the G-P4-6 mailbox → Ever Works agent picker — plan 06-gauzy-implementation-plan.md G-P4-1 / G-P4-6, 04-inbox-and-email.md §5.1 / §6 (Gauzy ↔ Ever Works integration, ever-co/homelab docs/superpowers/specs/2026-10-15-gauzy-ever-works-integration/). Part 2 of 2, stacked on #10873 (Providers + the additive plugin-inbox routes it uses); the base moves to develop once #10873 is merged.

@gauzy/plugin-inbox-ui

  • /pages/settings/inbox-mailboxes (settings-sections, INBOX_MAILBOX_MANAGE): the organization's shared (organization, team) and personal (employee) mailboxes.
    • Platform addresses are allocated by the API on the server's platform domain, read from the API (GET /mailboxes/settings → platformDomain, from GAUZY_INBOX_DOMAIN) — no domain in the UI; without one only custom-domain mailboxes can be added.
    • Custom domain: add (local part + domain + receiving provider account), the DNS TXT record to create (GET /mailboxes/:id/verification, no lookup) and its status, "Check DNS now" (POST /verify; "not found yet" is a warning, not an error), an MX hint naming the receiving account.
    • Forwarding mode: what to forward where. Members of shared mailboxes (READER / MANAGER, users of the organization). Default mailbox per owner, active / inactive, a new relay secret (shown once, closes only on acknowledgement), opt-in auto-provisioning + "create the missing employee mailboxes / the default organization mailbox now".
    • Ever Works agent (G-P4-6 part 1, #10846): the edit dialog sets settings.everWorksAgentId via PATCH /mailboxes/:id, merged into the mailbox's other settings (the API replaces settings whole). Agents listed = the organization's agent employees (GET /employee?kind=agent) whose GET /employee/:id/agent-profile source is ever_works; the stored value is the agent employee's Gauzy id, which the integration resolves; a stored value the list lacks stays selectable. The agent-mail mirror (G-P4-6 part 2, #10848) is the per-mapping agentEmail direction, already on the Ever Works Entities and directions tab — the dialog points there rather than duplicating that state.
  • /pages/inbox/mailbox ("My mailbox", INBOX_VIEW): my mailboxes (personal and shared) with the API's forwarding instructions; linked from the Inbox page header only where the email features are served.
  • Dialogs save by themselves (refusals shown, input kept) and close on neither Escape nor the backdrop. OnPush + signals, plugin-owned i18n (INBOX.SETTINGS.MAILBOXES.*, INBOX.MY_MAILBOX.*), the nav entry behind the same email-availability check as #10873. tools/egress-audit/ui-routes.json: the two manual routes.

Checks (no local test runs, per the overnight rules — specs written, not run)

  • inbox-ui tsc (sources + specs, workspace path map) 0 errors in the plugin; ngc with strictTemplates over the plugin's sources: 0 template errors in the new components (the only ones are pre-existing: ui-core menu-item [icon], inbox-item-detail notice.routed, both only under strictTemplates, which the project does not enable).
  • prettier, cspell (17 files, 0 issues), tools/egress-audit/static-hostnames.mjs ok; the diff names no Ever host.

🤖 Generated with Claude Code


Summary by cubic

Adds Settings → Inbox → Mailboxes and the "My mailbox" page to the inbox UI plugin, plus the Ever Works agent picker for mailboxes. The settings page requires INBOX_MAILBOX_MANAGE; My mailbox requires INBOX_VIEW.

Mailbox management

  • The mailboxes page reads the server's platform domain from the API, manages custom-domain mailboxes (DNS TXT record, status, "Check DNS now", receiving provider account, MX hint), forwarding rules, shared-mailbox members (READER / MANAGER), default mailbox per owner, relay secrets shown once, and opt-in auto-provisioning. Actions, DNS reads and agent names apply only while the organization they were made for is still selected; a relay secret still shows, since it exists only in that answer.
  • The edit dialog sets a mailbox's Ever Works agent from the organization's agent employees whose profile source is ever_works; every agent profile is read (six at a time, with no cut-off), and a stored value the list lacks stays selectable. The per-mapping agent-mail mirror stays on the Ever Works Entities and directions tab.
  • Dialogs save by themselves, keep input on refusals, and close on neither Escape nor the backdrop.
  • My mailbox lists personal and shared addresses with the API's forwarding instructions, linked from the Inbox page header where email features are served.