Skip to content

fix(console): a host's own mail transport ticks the setup checklist's mail row - #34867

Merged
objectstack-fleet[bot] merged 2 commits into
mainfrom
claude/issue-34749-mail-delivering-environment
Nov 17, 2026
Merged

objectstack-fleet[bot] merged 2 commits into
mainfrom
claude/issue-34749-mail-delivering-environment

Conversation

@objectstack-fleet

Copy link
Copy Markdown
Contributor

Fixes #34749

Clause-②: no
Metadata-protocol: none

维护者速读

  • 改了什么: 控制台首次设置清单按 source 判断「在用」:live.provider 为 { value: null, source: 'environment' }(宿主自带、选项表叫不出名字的投递方式)时,邮件行算完成;内置 AI 行同一规则,保留 environment 来源。types.ts 注释改成 spec 现行说法。
  • 为什么改: fix(plugin-email): a host's own mail transport reads as in use on GET /api/settings/mail #34731 已让托管平台把自带邮件通道报成 environment + null,但控制台还要求 value 非空,托管环境的邮件行一直不打勾(plugin-email: GET /api/settings/mail serves no live.provider, so the hosted platform mail channel cannot read as configured (#32643 item 1, cloud#4386) #32799 裁决 C 的 ui 半边)。
  • 风险与回滚: 低。只多认一种组合(environment + null);none、settings + 空串、没有 live 时回落到已保存值,这些读数都不变。回滚即 revert 本 PR。
  • 先看: ui/apps/console/src/pages/settings/firstRunChecklistLogic.ts(新 liveValueInUse 与 aiProviderState 的 null 分支)、FirstRunChecklist.tsx(AI 行无名字时的文案)、__tests__/firstRunChecklistLogic.test.ts 末尾新增的 describe。
  • 两分钟验证: pnpm --dir ui exec vitest run apps/console/src/pages/settings/__tests__/firstRunChecklistLogic.test.ts,预期全绿,其中「in use is read from the stated source, never from a null value」下 6 条通过。
  • 需要你做的: 无,席位落地。

What changes

  • isMailDelivering now reads in-use from the stated source, as the settings contract that fix(plugin-email): a host's own mail transport reads as in use on GET /api/settings/mail #34731 landed says (SettingsLiveValue in service-settings and the spec's live describe: "Read in-use from source, never from a null value"). One private helper, liveValueInUse, holds the rule for both rows. The only new cell is environment + null, which is in use. The other cells read as before: none is not in use, settings/environment with a non-empty string is in use, and settings/environment with an empty string is not in use. An entry that is no statement falls back to the saved values (isMailConfigured), as before.
  • N1 (addendum 6944462303). A host-own transport whose saved values pass isMailConfigured now reads done from the statement. Before this change it read not done after fix(plugin-email): a host's own mail transport reads as in use on GET /api/settings/mail #34731.
  • N2: aiProviderState takes the same rule. environment + null is now { done: true, value: null, source: 'environment' }, with the stated source kept. Before this change it was rewritten to { done: false, source: 'none' }. The optionLabel is absent, because no option names the provider.
  • What the AI row shows for environment + null. FirstRunChecklist.tsx has no provider name to put into doneEnvironment ("{{provider}}, detected from the server environment."), which would render as a sentence starting with a comma. The row uses the existing, fully translated console.settingsView.aiProviderManaged ("The AI provider, its model and credentials are managed by the platform.") instead. The Settings page already shows that sentence for a platform-managed AI provider. No new i18n key was added, so the file surface stays ui/apps/console/src/pages/settings/**. No runtime emits this AI entry today (addendum N2).
  • types.ts. The SettingsLiveValue comment now carries the spec rule: null when source is none, or when source is environment and no option names what is in use. In-use is read from source.
  • Changeset .changeset/34749-mail-delivering-environment.md: @object-ui/console patch.

Tests

The pins requested by the dispatch are in __tests__/firstRunChecklistLogic.test.ts, in a new top-level describe, "in use is read from the stated source, never from a null value (objectstack#34749)":

  • mail: environment + null is done; none is not done; settings + '' is not done.
  • mail N1: saved values that pass isMailConfigured, under environment + null, read done.
  • CONTROL mail: a payload without the statement still falls back to the saved values.
  • ai: environment + null is done with the source kept as environment; none is not done.
  • CONTROL ai: a provider named by an option keeps its value, source and label.

The render pins go into the existing harness, __tests__/FirstRunChecklist.test.tsx. That file gains a mailLive statement for the mail page.

  • "managed, the host's own transport (live provider environment, null) with nothing saved: mail is drawn, done". This is the card's Done-when, shown on the rendered checklist.
  • "handed over by the host and named by no option (environment, null): done, and says the platform manages it".
Targeted run at 772eafd: 2 files, 77/77
pnpm --dir ui exec vitest run --maxWorkers=2 apps/console/src/pages/settings/__tests__/firstRunChecklistLogic.test.ts apps/console/src/pages/settings/__tests__/FirstRunChecklist.test.tsx
 Test Files  2 passed (2)
      Tests  77 passed (77)
os-verify-lock: VERDICT command-exit 0
Whole settings directory at 772eafd: 43 files, 432/432
pnpm --dir ui exec vitest run --maxWorkers=2 apps/console/src/pages/settings/
 Test Files  43 passed (43)
      Tests  432 passed (432)
os-verify-lock: VERDICT command-exit 0
Ablations: one per source-rule change, each red, each restored to HEAD by byte comparison

Each ablation was run with scripts/ablation-replace.mjs on the committed head. The console tests resolve src/ directly, so no dist/ step is involved.

  1. Deleted if (source === 'environment' && value === null) return true; from liveValueInUse. Anchor x1 to x0, blob b179599c3f19 to 361413faa503. 5 failed / 72 passed: both mail cells, N1, the ai cell, and both render pins. Restored: blob == HEAD, git diff HEAD empty.
  2. Put the old N2 mapping back in aiProviderState: the value === null branch returns { done: false, value: null, source: 'none' }. Anchor x1 to x0, blob b179599c3f19 to 3ecd03f4e973. 2 failed / 75 passed: the ai cell and the AI render pin. Restored: blob == HEAD.
  3. Put the renderer back to doneEnvironment with an empty provider. Anchor x1 to x0, blob 0d56897ebb89 to 128c62adf365. 1 failed / 76 passed: the AI render pin. Restored: blob == HEAD.

Acceptance notes

  • Producer side. Nothing was changed upstream. The server (judgeLiveValue in service-settings) already serves environment + null, and plugin-email emits it (both from fix(plugin-email): a host's own mail transport reads as in use on GET /api/settings/mail #34731). The console was the only reader that still required a value.
  • Merge state. origin/main moved 10 commits since the base e9f65a3, and none of them touches ui/apps/console/src/pages/settings/**. scripts/pm/overlap-check.mjs reports a clean merge against origin/main 7752cac. No merge of main was made.
  • Not run locally, left to CI. The full Console suite and the repo-wide lint. ESLint was run on the five touched ui files and exited 0.

Verification

Local gate subset: dispatch-gates --commands, 37 families, all exit 0; --ran reconciliation clean

The 37 families were derived by node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstack from commit 772eafd. Each family ran and exited 0, including pnpm --dir ui exec vitest run scripts/ (171 files passed, 2 skipped; 5077 tests passed). --ran with exit codes reported: "37 derived famil(ies) accounted for — 37 run, 0 NOT-MEASURED (a DERIVED zero …)".

Other local checks:

  • pnpm --filter @object-ui/console run type-check exited 0. Both touched test files are in that program (--listFilesOnly counts 2).
  • ui/scripts/check-new-cross-file-line-citations.mjs reported 0 new citations.

The type-check lanes and the wide-population families are CI's.


Generated by Claude Code

…transport ticks the checklist

The console's isMailDelivering and aiProviderState now read
{ value: null, source: 'environment' } as in use, as the settings
contract states it: in-use is read from source, never from a null value.

Claude-Session: https://claude.ai/code/session_012MmDsS4GoHCgYwA2uv3n3C
Co-authored-by: Claude <noreply@anthropic.com>
@github-actions github-actions Bot added size/m documentation Improvements or additions to documentation tests tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface labels Nov 17, 2026
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#4 · os-lizheng · session_012MmDsS4GoHCgYwA2uv3n3C

席位核对 · L1 ACCEPT · Head-sha: 772eafd · 2026-11-17T14:12Z

Card #34749, claim 6949618531, dev report on the card. The seat read the diff itself.

Item Reading
Shape Draft, base main, first line Fixes #34749. Clause-②: no and Metadata-protocol: none are line-leading in the PR body and the changeset. Six files, all under ui/apps/console/src/pages/settings/**, plus the changeset (+147 −24).
Rule followed The private liveValueInUse reads in-use from source, word for word the producer's rule on origin/main (packages/services/service-settings/src/settings-service.types.ts:520-527: "null when source is 'none', or when source is 'environment' and no option names what is in use … Whether something is in use is read from source, never from a null value."). The only new in-use cell is environment + null. Every other cell reads as before, and an unstated payload still falls back to isMailConfigured.
Addendum N1, N2 N1: saved values that pass, under a host-own transport, read done (pinned). N2: aiProviderState keeps source: 'environment' for environment + null (it no longer rewrites it to none) and gives no optionLabel. The renderer shows the existing console.settingsView.aiProviderManaged sentence, which is present in every locale under ui/packages/i18n/src/locales/.
Assertions Pins for every cell named in the dispatch, plus two render pins. Three ablations are reported (the rule line 5 red, the AI branch 2 red, the renderer 1 red), each restored to blob == HEAD.
Gates Local: 37 derived families, all exit 0; console type-check exit 0. CI on 772eafd is read again at landing.
Accepted deviations Main was not merged before the open (10 commits behind, none under this folder, overlap clean). The AI copy for the unnamed environment provider reuses an existing translated sentence; no runtime emits that cell for ai today.
Changeset @object-ui/console patch; the package is not private. Read sentence by sentence against the diff: the mail rule, the fallback, and the AI row's source and copy all hold in the code above.
Landing Not governed. The seat lands it once every check on this head is green.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#4 · os-lizheng · session_012MmDsS4GoHCgYwA2uv3n3C

Landing · Head-sha: 772eafd · 2026-11-17T14:27Z

Probe Reading
Check-runs on 772eafd success 32 · skipped 13 · in progress 0 · failure 0. Lint & Repo Gates, TypeScript Type Check, Test UI, Type Check UI, Build & E2E UI and Lint UI all success. The skips are path-gated (the Core, Dogfood and Docs families for a ui/**-only diff), merge-group-only queue verdicts, and opt-in harnesses.
Mergeable · governed mergeable_state clean. check-governed-merges.mjs --pr 34867: not governed.

State: ready + auto-merge now (L1 ACCEPT 6950534093). #34749 closes on merge.

@objectstack-fleet
objectstack-fleet Bot marked this pull request as ready for review November 17, 2026 14:27
@objectstack-fleet
objectstack-fleet Bot added this pull request to the merge queue Nov 17, 2026
Merged via the queue into main with commit 6e9d5d6 Nov 17, 2026
46 checks passed
@objectstack-fleet
objectstack-fleet Bot deleted the claude/issue-34749-mail-delivering-environment branch November 17, 2026 15:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation size/m tests tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface

Projects

None yet

Development

Successfully merging this pull request may close these issues.

console: isMailDelivering reads source 'environment' with a null value as not delivering, so the hosted setup checklist still does not tick after #32799

2 participants