Repository navigation
fix(plugin-list): date condition chips read as dates; showcase zh-CN region labels - #37154
Conversation
…r's locale Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QSeKYnagJvGbCtNg2PhvgW
…les region fields Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QSeKYnagJvGbCtNg2PhvgW
Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QSeKYnagJvGbCtNg2PhvgW
Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QSeKYnagJvGbCtNg2PhvgW
|
repo:objectstack#4 · os-justin · session_01QSeKYnagJvGbCtNg2PhvgW Final green head for L1 (2026-11-24T23:22Z):
|
|
repo:objectstack#4 · os-justin · session_01QSeKYpEsWWE9Y5YtSsDgqZ 席位核对 — REWORK · L1 · head
|
…cale; pin the datetime sighting Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QSeKYnagJvGbCtNg2PhvgW
|
repo:objectstack#4 · os-justin · session_01QSeKYnagJvGbCtNg2PhvgW Final green head for delta L1 (2026-11-25T00:32Z):
|
|
repo:objectstack#4 · os-justin · session_01QSeKYpEsWWE9Y5YtSsDgqZ 席位核对 — ACCEPT · L1 · head
|
|
repo:objectstack#4 · os-justin · session_01QSeKYnagJvGbCtNg2PhvgW Landing (2026-11-25T00:55Z) — head
State change: ready for review + auto-merge armed; the merge queue lands it. On MERGED, #37034 closes by |
repo:objectstack#4 · os-justin · session_01QSeKYnagJvGbCtNg2PhvgW
Fixes #37034
Clause-②: no
Metadata-protocol: none
维护者速读
What changes
Sightings 1 and 2 of the card are fixed here. Sightings 3 and 4 are closed as by design under ruling record 7145739965 (the maintainer: 「同意」), and this PR does not touch them: the in-page edit state's filter bar shows the stored text, and a new widget's default 「New TYPE」 title is English author data (objectui#10678 / objectui#10651).
@object-ui/plugin-list).describeConditionValueprinted a date-family condition value withString(). It now formats the value with the newformatConditionDate(conditions/conditionDates.ts), on every condition row: the reader's chips, the view's locked chips, related-field view chips, and the phone filter sheet's rows.formatConditionDateis a thin selector over the console's one date display path,formatDate/formatDateTimefrom@object-ui/core; no second formatter is written. The locale comes fromuseDisplayLocale(), anddescribeConditionValue'slocaleis now required, so no caller can fall back to the runtime's default locale by leaving it out.datefield's bound is written on the wire asYYYY-MM-DDand shows that day with its year. An instant at UTC midnight on a date field shows the same calendar day in every zone.datetimefield's bound is an ISO instant and shows the date and time in the display zone.timefield, or a value the display path cannot read, is shown as written.phone/PhoneListPanels.tsx). Its condition rows now passuseDisplayLocale(). Before this, a zh-CN session on an English browser would have read 「Oct 1, 2026」 there.plugin-dashboarddrillConditions.ts) already writes a bucket's{ $gte, $lt }as two rows,greater_than_or_equalandbefore. Both now read as dates: on the card'screated_atthey read 「创建时间:≥ 2026年10月1日 00:00」 and 「创建时间:早于 2026年11月1日 00:00」 (display zone UTC). The writer is unchanged, and a new test pins its two rows. No date-family operator means "on or after", andafter(>) would drop the records at the bound, so the lower bound keeps>=(L1 accepted). A month bucket shows as its date range, not as 「2026-10」, because the row carries no granularity (ruling item 1).examples/app-showcase/src/system/translations/index.tszh-CN gainsfields.showcase_invoice.region(区域, with option labels 美洲 / 欧洲、中东和非洲 / 亚太, matching the dashboard filter's own translation) andfields.showcase_account.sales_region(销售区域, same options). The drill chip already reads the translated field label. It does not read the dashboard filter's name (ruling item 2).scripts/i18n-coverage-baseline.jsonlowers app-showcase's ceiling from 449 to 441, a one-line hand edit with no--update.Tests
listConditions.test.tsxgains a top-leveldescribefor objectstack#37034. It mounts the realConditionChipRowandPhoneFilterSheetunder the real zh-CNI18nProvider, with the display zone pinned bysetDisplayTimeZone('UTC'), and checks:created_atdatetime month bucket shows ≥ / 早于 chips reading 2026年10月1日 00:00 and 2026年11月1日 00:00;YYYY-MM-DDbounds read as days;betweenreads both ends as dates;timevalue and an unreadable date are shown as written.drillConditions-36256.test.tspins the month bucket's two rows (operator and exact value).dist/is involved): readings are in the block below.Ablations and readings at head a582829 (worktree; overlap-check against origin/main 49c8e0f and PR 37059: clean)
scripts/ablation-replace.mjsonListConditionControls.tsx):(v: unknown) => formatConditionDate(v, field?.type, locale) : StringbecameString : String. Result: 6 failed and 1 passed (the control). The sighting case received exactly 「创建时间:≥ 2026-10-01T00:00:00.000Z」, the card's sighting. The other failures received 「开具日期:≥ 2026-10-01」, 「开具日期:≥ 2026-10-01T00:00:00.000Z」, 「开具日期:介于 2026-10-01 – 2026-10-31」 and, on the phone row, 「≥ 2026-10-01」. Restore: blob 50a651817635 after restore equals HEAD, andgit diff HEADwas empty.PhoneListPanels.tsx, the row'slocalereplaced withundefined): the phone case failed with 「≥ Oct 1, 2026」, the mixed-language row L1 predicted. Restore: blob 0b70cd730ed8 equals HEAD, andgit diff HEADwas empty.String. It was invalid and was discarded.cd ui && pnpm exec vitest run --maxWorkers=2 packages/plugin-list/ packages/plugin-dashboard/: Test Files 404 passed (404), Tests 4167 passed and 6 skipped; lock VERDICT command-exit 0.@object-ui/plugin-listand@object-ui/plugin-dashboard: exit 0.pnpm check:i18n: exit 0.pnpm check:i18n-coverage: exit 0 ("OK (14 config(s), 577 baselined untranslated string(s), none new)"), with the app-showcase ceiling at 441.check:dual-build-cjs-loadsexited 3 (PREREQUISITE NOT MET: no fullpnpm buildhere); CI runs it.--ranreconciliation: 66 derived, 65 run, 1 NOT-MEASURED, 0 UNRUN.playwright test --project=chromium --list: exit 0, 202 tests in 35 files. No spec reads the changed text.test:repo, the full turbo suite and the browser check.Acceptance notes
datetime-localvalue (no offset, such as2026-10-01T09:00, which the advanced panel's datetime input writes) parses in the browser's zone but is shown in the display zone. When a host declares a display zone that differs from the browser's, such a chip can read a different hour than was typed. This is the existing behaviour of the shared date display path, not a change here.>=for a bucket's lower bound (see What changes).Verification
Two-minute check: in a zh-CN session, open the showcase's 营收概览(带筛选) dashboard and click a month bar on 「Invoices by Month」. The drill dialog's chips should read 「区域:欧洲、中东和非洲」-style (with a region picked) and 「开具日期:≥ 2026年…月1日」 / 「开具日期:早于 …」, with no ISO string. On a datetime field such as
created_at, the chips show the date and time.Read first:
ui/packages/plugin-list/src/conditions/conditionDates.ts(the type-to-face rule, and the UTC-midnight day rule) and thedescribeConditionValuehunk inListConditionControls.tsx(localeis now required).Generated by Claude Code