You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 6aa95dc
Browse filesBrowse the repository at this point in the historyBrowse files
fix(console): email delivery is an optional first-run checklist row, and the deployment notice no longer says mail is unset (#32797)
Fixes#32643
Clause-②: yes (widening)
Metadata-protocol: none
## 维护者速读
-
改了什么:首页新手清单里的「邮件发送」一行标为「可选」,不再计入进度;其余必需的行都完成后,清单就收起。首页和系统概览的部署提示不再显示「没有设置邮件服务」。
-
为什么改:维护者裁定「环境的新手清单中要求设置邮箱。我觉得这个不应该是必须的设置」。以前不发邮件的管理员和所有托管租户会一直看到清单和这条提示。
- 风险与回滚:只改前端展示,不动服务端和数据。回滚即还原本 PR。服务端仍会返回
`email_not_configured`,只是控制台不再显示它。
-
先看:`ui/apps/console/src/pages/settings/FirstRunChecklist.tsx`(完成判断与「可选」标记);`ui/packages/app-shell/src/console/deployment-notice/deploymentNotice.ts`(不再识别邮件这一项);`ui/apps/console/src/pages/settings/firstRunChecklistLogic.ts`(`checklistCompletion`)。
- 两分钟验证:`cd ui && npx vitest run --root . --project @object-ui/console
apps/console/src/pages/settings/__tests__/FirstRunChecklist.test.tsx`,预期全绿,其中「every
required row done and mail never set up: the checklist draws
nothing」一条通过。
- 需要你做的:无,席位落地。
## What changes
**The mail row is optional** (ruling item 2, coordinator comment
6819876581). `firstRunChecklistLogic.ts` gains `OPTIONAL_ROWS` (`mail`)
and `checklistCompletion(rows)`. The checklist draws nothing once every
required row it shows is done, whatever the mail row says. The progress
line counts required rows only. The mail row carries an "Optional" mark
(`console.firstRunChecklist.optional`, added to all 11 packs). A mail
setup that delivers still reads done through `isMailConfigured`,
unchanged. A done mail row folds with the other done rows, so "Show
completed (N)" counts it while the progress line does not.
**The notice no longer says mail is unset** (ruling item 3). The
server's `email_not_configured` finding
(`packages/services/service-settings/src/deployment-notice.ts`,
`readDeploymentNotice`) is raised whenever
`IEmailService.isConfigured()` is not `true`. That is "mail is unset",
not "something needs mail and cannot send it", and the server states
nothing narrower. Per the dispatch, no signal is guessed. The console
leaves that finding out the way it already leaves out any finding it has
no words for. The id is removed from `DeploymentFindingId` /
`KNOWN_FINDINGS` and from `findingText`, on Home and System Overview
alike. A production deployment whose only finding is the unset email
service now shows no notice. Hiding still sends the fingerprint the
server served, which still names the finding.
**The `mail` Home-item claim is gone.** Only the notice's email line
claimed it, and the checklist row stood aside for it. `HomeItem` is now
`'connect_assistant'` alone, and the checklist no longer reads
`useHomeItemClaimed('mail')`.
**Ruling item 1 (the hosted platform channel) is left out, measured.**
`GET /api/settings/mail` serves no `live` field on `main`. The mail
namespace's live-status provider
(`packages/plugins/plugin-email/src/email-plugin.ts` registers
`describeLiveMailTransport`, `live-transport-status.ts`) answers `label`
/ `bannerSeverity` / `bannerText` only and no `values`, so there is no
`live.provider` with a `source` to read as `aiProviderState` does.
Nothing is invented. The seat routes this to the cloud lane.
Landing spot vs the producer: the unset-mail line is produced
server-side, at `deployment-notice.ts` line 161. The dispatch bars
server changes, so this PR does the console half. The server half
(retire `email_not_configured` or narrow it to a real "needs mail and
cannot send" signal) is reported to the seat as a finding.
## Tests
- `FirstRunChecklist.test.tsx`: new top-level `describe` "email delivery
is optional…": the optional mark is on mail only and the count excludes
it; every required row done with mail unset draws nothing (and the mail
namespace was read); CONTROL with one required row left keeps the
checklist with an undone mail row; a delivering setup reads done and
moves no required count; the zh mark. The two pins of the retired `mail`
claim are removed, and every progress pin's total drops by one (the mail
row no longer counts).
- `firstRunChecklistLogic.test.ts`: `checklistCompletion` pins,
including the CONTROL that a required row keeps it open with mail done.
- `DeploymentNotice.test.tsx`: the "owns the email line" describe is
replaced by "says nothing about an unset email service": not drawn
beside other findings; email-only draws nothing on Home and System
Overview; CONTROL that a lone `file_storage_local` still draws. The hide
pin still asserts the server's full fingerprint is posted.
## Acceptance notes
- `deploymentNotice.finding.emailNotConfigured` is now unreferenced in
all 11 packs (`check:i18n-dead-keys`, report-only: `[confirmed]`). It is
kept because this lane's surface adds keys only. carrier: the
server-side follow-up on `email_not_configured`. That follow-up either
reuses the key or deletes it.
- The fingerprint still names `email_not_configured`. An administrator
who hid a notice with another finding and later configures mail sees the
notice again, because the server's fingerprint changed. carrier: the
same server-side follow-up.
- Observation, not filed: in this tree no package registers a
live-status provider for `ai` (`git grep registerLiveStatus` finds only
`localization` and `mail`), so `aiProviderState` sees no `live.provider`
and the AI row is left out unless a producer elsewhere (e.g. the hosted
runtime) states it. carrier: none.
## Verification
All readings are on `objectstack` at head `8ed49b217` unless a line
names another commit.
<details><summary>Tests (scoped, one locked call): 185 files, 2539
passed</summary>
- `packages/app-shell/src/console/deployment-notice/` and
`packages/app-shell/src/console/home/`: Test Files 40 passed, Tests 255
passed.
- `packages/i18n/` (the whole package, including
`zh-hant-generated.test.ts`): Test Files 102 passed, Tests 1894 passed,
13 skipped.
- `@object-ui/console`, `apps/console/src/pages/settings/` plus the
three App/FormPage suites that mount the checklist: Test Files 43
passed, Tests 390 passed.
- Lock verdict: `command-exit 0`. Declared narrowing: the full app-shell
package was started and stopped at the coordinator's direction, after it
had held the shared lock for 83 minutes. The full console package was
not run either. CI's Test UI shards run both packages in full.
</details>
<details><summary>Type-check: i18n, app-shell, console all exit
0</summary>
`pnpm --filter @object-ui/i18n type-check && pnpm --filter
@object-ui/app-shell type-check && pnpm --filter @object-ui/console
type-check` under the lock: `command-exit 0`, no `error TS`. Run at
`520b020ee`; the only later commit changes one zh-Hant string value.
</details>
<details><summary>Ablations: both go red, both restored to
HEAD</summary>
- `OPTIONAL_ROWS` emptied (`new Set(['mail'])` changed to `new Set([])`,
landed: anchor 1 to 0, blob 5970cf6 to b05f7337): 16 failed and 38
passed across the two checklist files, including every optional-mail pin
and every `checklistCompletion` pin. Restored: blob equals HEAD, `git
diff HEAD` empty.
- `email_not_configured` re-admitted to `KNOWN_FINDINGS` (blob 1d69f58
to 7f8909ab): 4 failed and 11 passed in `DeploymentNotice.test.tsx` (the
drawn-findings pin, both new "says nothing about mail" pins, and the
parse pin). The CONTROL pin stayed green. Restored: blob equals HEAD,
`git diff HEAD` empty.
</details>
<details><summary>Gates</summary>
- `node scripts/pm/dispatch-gates.mjs --commands` at `8ed49b217`: 38
commands, the same list as at `520b020ee`. 36 re-run at `8ed49b217`, all
exit 0.
- `pnpm check:type-check-debt`: exit 0 at `520b020ee` (re-measure OK, 0
raw tsc errors). At `8ed49b217` it is NOT MEASURED: lock queue-timeout
(exit 99) behind another lane's run.
- `pnpm --dir ui exec vitest run scripts/`: exit 0 at `520b020ee` (171
passed and 2 skipped files, 5062 tests). Not re-run at `8ed49b217`.
- `--ran` reconciliation: 38 derived, 38 run, 0 UNRUN.
- i18n families (`ui/`): `check:i18n-keys` exit 0, `check:i18n-drift`
exit 0 (1 key added, 0 en values changed), `check:i18n-dead-keys` exit 0
(report-only; lists `deploymentNotice.finding.emailNotConfigured` as
confirmed dead, see Acceptance notes).
</details>
---
_Generated by [Claude
Code](https://claude.ai/code/session_012MmDsRT6hvZsQH9dTzn4CA)_
---------
Co-authored-by: Claude <noreply@anthropic.com>
fix(console): email delivery is an optional row on the first-run checklist, and Home's deployment notice no longer says that no email service is set up
7
+
8
+
Clause-②: yes (widening)
9
+
Metadata-protocol: none
10
+
11
+
The first-run checklist on Home stayed until every row was done, so an administrator whose applications send no mail, and every hosted tenant, kept it for good because of the Email delivery row. That row is now marked Optional and is not counted: the progress line counts the other rows, and the checklist disappears once they are done, whether mail is set up or not. A mail setup that delivers still reads done, and the row still links to Setup → Mail Delivery.
12
+
13
+
The deployment notice no longer draws the server's `email_not_configured` finding ("No email service is set up…"), on Home or on System Overview. The notice should speak about mail only when something needs mail and cannot send it, and the server does not state that today. A production deployment whose only finding is the unset email service now shows no notice. Hiding the notice still sends the fingerprint the server served.
14
+
15
+
`@object-ui/i18n` adds one locale key in every pack: `console.firstRunChecklist.optional`.
0 commit comments