Repository navigation
fix(app-shell): flow screen date, datetime and boolean fields use the platform controls - #26685
Conversation
… platform controls Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QsR2jTWL2QojsqgqvgPRkw
… row Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QsR2jTWL2QojsqgqvgPRkw
… control Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QsR2jTWL2QojsqgqvgPRkw
… control Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QsR2jTWL2QojsqgqvgPRkw
席位核对ACCEPT · seat
Landing: no contract review is owed (no published schema, no governed text, Generated by Claude Code |
⛔ merge queue 构建失败 — 先分诊,再决定要不要重排队列构建 40516635516 红了。队列跑的是全量套件(PR 侧 CI 只跑 affected 子集), 分类: 失败的 job(日志抽取,best effort):
跨 PR 相同签名(24h,按失败测试文件聚合):
历史信号:
分诊清单:
Generated by Claude Code · merge-queue-triage workflow (#4859) |
Requested by Steedos · project thread
Fixes #26579
Clause-②: no
Metadata-protocol: none
维护者速读
date/datetime字段改用记录表单同一个平台日期选择器(按界面语言显示格式、日历弹层、清除按钮);boolean字段改用 ActionParamDialog 同款的行内勾选行(勾选框在左、标签在右、帮助文字在下)。mm/dd/yyyy;布尔字段是标签下面孤零零一个圆形勾选框,看起来像空的单选按钮。hotclm 的「发起合同」向导第一屏就是这样。YYYY-MM-DD,日期时间为 ISO 时间戳,清空为空串);只有datetime从前是自由文本框,现在写 ISO 时间戳。三个控件都经懒加载,首次出现有一帧占位。回滚即 revert 本 PR。ui/packages/app-shell/src/views/ScreenView.tsx中ScreenFieldInput新增的 date/datetime 与 boolean 两段,以及ScreenView里isBooleanScreenField的行内行布局。ui/下运行pnpm exec vitest run packages/app-shell/src/views/ScreenView.platformControls-26579.test.tsx,应见 13 个测试全部通过。What changes
ScreenFieldInput(ui/packages/app-shell/src/views/ScreenView.tsx) drew a flow screen'sdatefield as the browser's nativetype="date"input, adatetimefield as a bare text box, and aboolean/checkboxfield as a loneCheckboxunder the generic label. It now reuses the platform controls, with no third widget:date/datetimerender the record form's picker,DatePickerField/DateTimePickerField(objectui#12622), reached throughgetLazyFieldWidget('date' | 'datetime')exactly asActionParamDialog's date params reach it. The text box is in the display locale's format, with the calendar popover, clear and today / tomorrow shortcuts. The value handed to the runner is the stored shape:YYYY-MM-DDfordate(as the native input wrote), an ISO instant fordatetime, and''when cleared.boolean/checkboxrenderActionParamDialog's inline row: the form'sBooleanFieldin its checkbox face (getLazyFieldWidget('boolean')withwidget: 'checkbox', the fieldparamToFieldhands the dialog), the label beside the control and the help text under the row. The host passes the id, so the widget draws no secondsr-onlylabel. A boolean field that declaresoptionsis still a select with its label above.aria-requiredandaria-describedby(theinlineHelpTextlink) ride the state channel to the new controls as before.min/maxcomment drops the date-input clause: no arm draws a native date input any more.The real producer is the one the card names,
ScreenFieldInput; nothing outsideScreenView.tsxchanges in source.FlowRunner.tsxis untouched.Why
Record forms moved to the platform date picker (objectui#12622) and action dialogs, list filters and inline editors followed. Flow screens did not, so a screen flow (the hotclm 发起合同 wizard was the measured case) showed
mm/dd/yyyyunder zh-CN and a boolean that read like an empty radio button.Tests
ScreenView.platformControls-26579.test.tsx(13 tests): the date picker replacesinput[type=date], shows10/16/2026in en and2026/10/16with theYYYY/MM/DDplaceholder in zh, writes the ISO day for typed text and''on clear, and keepsaria-requiredand the help description; the date-time picker writes an ISO instant; the boolean row puts the label beside the checkbox (control first), acheckboxhint draws the same row, ticking answerstrueand clicking the label unticks tofalse, only a realtrueis checked, the required marker and help text sit where they should, one label per control, and a boolean withoptionsstays a select (control).ScreenView.boundHelpReference-9248.test.tsx(the date bound test now reads the picker's text box) and four tests acrossScreenView.requiredMarker-10367.test.tsx,ScreenPreview.test.tsx,ScreenPreview.debugRunScope-10743.test.tsxand__tests__/FlowRunner.recordLink-25872.test.tsxthat clicked the checkbox synchronously now wait for the lazy control withfindByRole. Each file imports@object-ui/fieldsat module scope per ui/AGENTS.md's 测试纪律, so the lazy factory resolves before thefindBybudget.Acceptance notes
datetimewas a free text box before, so whatever was typed went to the flow as a string. It now writes an ISO instant, the shape the record form writes for adatetimefield. No in-tree example declares adatetimescreen field; the card's Expected names it.role="checkbox"every existing flow-screen test and the runner'srequiredcheck (an untickedfalseis an answer) already read.Verification
All readings at head
ac55d85eunless stated.Package tests (ui, under os-verify-lock)
cd ui && pnpm exec vitest run --maxWorkers=1on the three ScreenView files (platformControls-26579,boundHelpReference-9248,requiredMarker-10367):Test Files 3 passed (3),Tests 30 passed (30), lock VERDICT command-exit 0.cd ui && pnpm exec vitest run --maxWorkers=2on every ui test file that namesFlowRunner,ScreenView,ScreenPrevieworScreenFieldInput(git grep -loverpackages/**andapps/**test files: 114 files):Test Files 114 passed (114),Tests 1054 passed (1054), lock VERDICT command-exit 0 (held 6m19s).packages/app-shell/run (1757 test files) was stopped after about an hour, with three failures reported by then, all the synchronous checkbox clicks fixed above and green in the narrowed run. The full package is CI'sTest UI.Ablation (ScreenView.tsx, mutation proven on disk and restored by blob hash)
if (isBooleanScreenField(f)) {replaced (anchor 1 to 0, blob6e3f3192eb18to554245174c0a):Tests 2 failed | 11 passed (13), the "label BESIDE the checkbox" and "required state and marker, help text under the row" pins. Restored: blob == HEAD andgit diff HEADempty.if (kind === 'date' || kind === 'datetime') {replaced (anchor 1 to 0, blob6e3f3192eb18to1b5142458047):Tests 5 failed | 8 passed (13), every picker pin. The required-state and help pin stays green there, as it should: the native input carried both too. Restored the same way.dist/leg: vitest resolves@object-ui/app-shelltosrcthrough the ui alias map.Type check and lint
pnpm exec turbo run type-check --filter=@object-ui/app-shell --concurrency=2under the lock:Tasks: 64 successful, 64 total; app-shell's script runstsc --noEmitandtsc -p tsconfig.test.json, so the test files are compiled.cd ui && pnpm exec eslint --no-inline-configon the touched ui files: 0 errors;ScreenView.tsxcarries the same 15 warningsmain's copy does (pre-existingreact-refreshandno-explicit-any).Derived gates (dispatch-gates --commands, reconciled with --ran)
node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstack: 34 commands, each run once with its exit code captured before any pipe (the two lock-bound ones underos-verify-lock.sh); all 34exit 0. The PR-body gates read this body throughGITHUB_EVENT_PATH.dispatch-gates --ran:34 derived famil(ies) accounted for — 34 run, 0 NOT-MEASURED.check-partof-closing-keyword.mjswithPR_BODY: exit 0.check-single-claim-paths.mjsneeds a PR number: left to CI's PR-body guards.Human Minimum
packages/specholds no runtime logic. (Nopackages/specchange.)pnpm lintpasses. (eslint on the touched files: 0 errors, warning count unchanged frommain.)main, one pull request.packages/spectouched: its generated artifacts are regenerated and committed. (Not touched.)content/docs/references/,packages/*/CHANGELOG.mdorcontent/docs/releases/.Generated by Claude Code