Repository navigation
fix(console): a session answered "not shown" sends no first-run checklist reads on later opens - #37184
Conversation
Adds the changeset. The checklist provider sits above every app route and, after the first paint, listed settings manifests for every session holding any capability, only to learn it may not write localization. A session the server answered "not shown" now asks nothing again on that device for one day, keyed on organization, user and capability set. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JQwxbZaRxCTLgg8LsLBuFb
|
repo:objectstack#1 · os-warren · session_01JQwxbZeHNsF3RWcWpj7rGj 维护者速读看不到「开始使用」清单的会话(普通成员,以及控制面上的普通组织所有者),第一次被服务端告知「不显示」后,这台设备记住这个答案 24 小时,之后打开控制台不再多读一次设置。管理员照旧每次都读。 席位核对 — ACCEPT (L1) · repo:objectstack#1 · head
|
⛔ merge queue 构建失败 — 先分诊,再决定要不要重排队列构建 45535558304 红了。队列跑的是全量套件(PR 侧 CI 只跑 affected 子集), 分类: 失败的 job(日志抽取,best effort):
跨 PR 相同签名(24h,按失败测试文件聚合):
历史信号:
分诊清单:
Generated by Claude Code · merge-queue-triage workflow (#4859) |
Requested by Warren · project thread
Fixes #37182
Clause-②: no
Metadata-protocol: none
维护者速读
GET /api/settings。What changes
firstRunChecklistLogic.ts: a device record of the server's "not shown" answer,os:first-run-checklist-not-shown:<orgId>:<userId>, holding the capability list it was read for and when (notShownRecordKey,wasAnsweredNotShown,markAnsweredNotShown,NOT_SHOWN_RECORD_TTL_MS= one day). It fails toward reading again: unreadable storage, a record that does not parse, a different capability set, an expired record, or one dated in the future all read.firstRunChecklistState.tsx: the provider checks the record before scheduling its reads and asks nothing while it stands; whenreadChecklistSettingsanswersnull(the server's answer that this session may not writelocalization), it writes the record. A read that throws writes nothing. An administrator's path is untouched.Why
Since #36791 the provider is mounted above every app route and, after the first paint, sends
GET /api/settingsfor every session whosesystemPermissionsis non-empty. For a session never shown the checklist that request buys nothing, on every console open. The cloud pin round cloud#4982 (PR cloud#4983) measured it as the 26th call of the control plane'spage/pricingwarm open, budget 25.Why a remembered answer and not a capability check before the request: the session that red the budget, an ordinary organization owner on the control plane, holds
setup.write; that plane re-registerslocalizationwithwritePermission: manage_platform_settings(cloudcontrol-plane-settings.ts). Which permission a deployment's manifest asks is known only once the list answers, and naming one in the console would be a second copy of the manifest's declaration that drifts on the next deployment that changes it. The first open on a device still pays the one read; every later open within the day does not.Verification
pnpm exec vitest run apps/console/src/pages/settings/__tests__/firstRunChecklistLogic.test.ts apps/console/src/pages/settings/__tests__/FirstRunChecklist.test.tsx(fromui/): 119 passed.a session answered "not shown" asks nothing again on this device): a member reads once then never; an owner holdingsetup.writewherelocalizationasksmanage_platform_settingsreads once across three opens; an administrator reads and is shown it on every open; a member made administrator reads again at once; a failed list read records nothing; another user in the same browser reads for themself. New logic pins cover the key, capability-set match, the one-day bound, a future-dated record, unreadable storage and unparseable records.firstRunChecklistState.tsxreverted tomain, the member and control-plane-owner pins fail (2 failed, 88 passed in that file); the other four pass on both, as preservation pins.eslinton the four touched files: 0 errors (2 pre-existingreact-refresh/only-export-componentswarnings onfirstRunChecklistState.tsx).console-bootsbudget. The next cloud pin round reads it and movespage/pricingmaxCallsback to 25, with the reading recorded on cloud#2914.Human Minimum
packages/specholds no runtime logic. (not touched)pnpm lintpasses.main, one pull request.packages/spectouched: its generated artifacts are regenerated and committed. (not touched)content/docs/references/,packages/*/CHANGELOG.mdorcontent/docs/releases/.🤖 Generated with Claude Code
https://claude.ai/code/session_01JQwxbZaRxCTLgg8LsLBuFb