Skip to content

fix(fields): the editable date-only faces name a stored impossible day instead of blanking it silently (objectui#10567) - #10618

Merged
objectstack-fleet[bot] merged 2 commits into
mainfrom
claude/issue-10567-date-only-impossible-day
Sep 25, 2026
Merged

objectstack-fleet[bot] merged 2 commits into
mainfrom
claude/issue-10567-date-only-impossible-day

Conversation

@objectstack-fleet

Copy link
Copy Markdown
Contributor

Fixes #10567
Clause-②: no

What changed

This is the date-only half of objectui#10474 (PR objectui#10566), with the same face.

  • The editable DateField and the sub-grid's editable date cell in GridField now check a stored value with isImpossibleStoredDay, which objectui#10566 added to packages/fields/src/widgets/nativeDateValue.ts. There is no second predicate, and nativeDateValue.ts is not edited.
  • For a day that does not exist, both faces hand the control an empty value, mark it aria-invalid, and show a notice that names the stored string. The control's aria-describedby points at the notice, and a host's own aria-describedby is kept in front of the notice id. Examples: 2026-02-30, 2024-02-31, 2025-02-29, and the ISO spelling 2026-02-30T00:00:00.000Z that an API may hand back.
  • Nothing is written until the user picks a new day. Picking a real day writes it and clears the marker and the notice.
  • Real days and empty values render as before. There is no notice and no aria-describedby, and aria-invalid is unchanged (false on DateField, absent on the grid cell).
  • New i18n key fields.date.impossibleDay, in all ten packs plus FIELD_DEFAULTS: The stored value "VALUE" is not a real date. Pick a date to replace it. The existing fields.dateTime.impossibleDay asks the user to pick "a date and time", which does not fit a date-only control, so it is not reused. The grid cell picks the key by column type.
  • The de quote-pairing ratchet goes from 64 to 65 for the new German value (one more matched „…“ span), with a rationale line, the same way objectui#10566 moved it.
  • toDateInputValue is unchanged. It still returns the leading day verbatim, which the objectui#10474 pin keeps. The widget hands the control the empty value, not the adapter.

Why the control is handed an empty value explicitly

The browser would paint it empty anyway. Handing it the empty value keeps the markup honest. Before this change the rendered value attribute held 2026-02-30 while the control read back empty. That attribute-versus-property split is the one nativeDateValue.ts documents for objectui#3127. It also matches the date-time face, whose adapter already hands the control an empty value.

Measurements (the dispatch's mechanism assumptions)

  1. Chromium 141.0.7390.37 (playwright-core 1.62.1, executablePath /opt/pw-browsers/chromium), re-run by this dev because the card relayed it unrun. An input type=date set to 2026-02-30 or 2025-02-29 reads back empty, while 2026-02-28 and 2024-02-29 read back as set. A control whose value attribute is 2026-02-30 reads back empty with validity.valid true, so the browser raises no invalid state by itself.
  2. happy-dom 20.11.2 (the dom test project's environment) sanitises the same way on the property path: set to 2026-02-30, it reads back empty, while the attribute keeps the string. On the unfixed tree the pin's empty-control assertion held and the first red was the missing marker. So the pin asserts what the component renders (the marker, the notice and its link), and the empty control holds in both environments.
  3. Read-only faces, left alone. The readonly DateField renders the shared EmptyValue affordance for an impossible day, byte-identical to what it renders for not-a-date. That is objectui#10026 ruling A's marker, pinned by date-carriers.impossibleDay-10026.test.tsx (green in this run). It neither rolls the day nor shows the stored string. The grid's read-only date text shows the raw stored string (objectui#3569). Neither face changes here.

Pins (DateField.impossibleDay-10567.test.tsx, 18 tests)

  • DateField, four impossible spellings: the control is empty, aria-invalid is true, and the notice names the stored string and is linked through aria-describedby. No rolled day appears anywhere, and a blur with no edit writes nothing. A host aria-describedby is kept. Picking 2026-02-28 writes it and clears the marker and the notice.
  • The grid's date cell: the same four spellings and the same checks. Picking a real day writes it and clears the marker and the notice.
  • Controls: the real days 2026-02-28 and 2024-02-29 (a leap day), and empty values (empty string, undefined, an empty cell), give no marker, no notice and no aria-describedby.

Directions predicted before the runs: the unfixed tree gives 11 red and 7 green. The ablation gives the same, with the objectui#10474 pin fully green.

  • Unfixed tree (base 21d34d5e2): 11 failed, 7 passed. Every failure is a marker assertion.
  • Reverse verification, with the fix committed first, at head b78821cd6. objectstack's scripts/ablation-replace.mjs turned const impossible = isImpossibleStoredDay(value); into const impossible = false; in DateField.tsx. It also dropped the date arm of the grid's check ((c.type === 'date' || c.type === 'datetime') && ... became c.type === 'datetime' && ...). That restores the pre-card behaviour of both faces. On disk, the anchors went from 1 to 0, the replacements from 0 to 1, and both blobs changed. Result: 11 failed, 29 passed. Every impossible-day row went red, the 7 controls stayed green, and the 22 tests of DateTimeField.impossibleDay-10474.test.tsx stayed green. Both files were restored: each blob equals HEAD's and git diff HEAD is empty. No build was involved, because the pin imports the widgets by relative path.

Gates (head b78821cd6)

  • pnpm exec vitest run packages/fields/ packages/i18n/ from the repo root: 275 files passed, 1 skipped; 4543 tests passed, 7 skipped.
  • Built the @object-ui/fields dependency closure (pnpm --filter '@object-ui/fields^...' build, exit 0), then ran type-check for @object-ui/fields and @object-ui/i18n: both Done, exit 0. tsc -p tsconfig.test.json --listFiles includes the new pin.
  • Exit 0: check:control-bytes, check:new-line-citations (0 new), check-changeset-presence, check:changeset-claims, changeset:check, check:i18n-keys, check:i18n-drift, check:i18n-dead-keys (the new key is not listed), check:pending-changeset-literals, check:test-path-roots, check:self-import, check:phantom-deps. My own control-byte scan over the changed files found 0 hits.
  • check:changeset-claims names three pending changesets that mention a touched file: 6625 (GridField.tsx), 6661 (en.ts) and 7122 (useFieldTranslation.ts). I read all three paragraphs. None is about the lines this PR changes, and all three still hold.
  • ESLint --no-inline-config over the 15 changed .ts/.tsx files. The file count comes from eslint's own JSON output: 15 at head, 14 at base because the pin is new. Errors are 0 at base and at head. Per rule, base vs head: no-explicit-any goes from 16 to 18 (both in the new pin: the empty field fixture and the grid column fixture), and every other rule is unchanged. The config enables no type-aware linting (no parserOptions.project), so this diff cannot change the verdict on any untouched file.
  • NOT MEASURED: check:eager-locale-catalogues, reason: PREREQUISITE NOT MET (it reads a built console bundle). Left to CI.

Acceptance notes

  • Two sibling editors outside this card's file surface have the same class of defect. They are reported to the seat, not changed here:
    • @object-ui/plugin-detail InlineFieldInput: its native date branch serves both date and datetime fields and slices the stored value to its leading day. Probe (happy-dom render, not committed): a stored 2026-02-30, or 2026-02-30T10:00:00Z on a datetime field, gives an input type=date whose value reads back empty while the attribute holds 2026-02-30, with no aria-invalid and no notice. That is this card's silent blank.
    • @object-ui/components data-table inline cell editor (data-table.tsx) keeps its own private copies of the two adapters. Its datetime copy goes straight to the engine, so 2026-02-30T10:00:00Z shows as 2026-03-02T10:00 in UTC (engine probe of the same expression), which is the objectui#10474 roll. Its date copy has this card's silent blank. Read at source, not rendered.
  • The notice wording is a new sentence and is not pinned. Only the stored string it names is asserted.
  • The widget was not rendered in a real browser. The Chromium reading is on a raw control. happy-dom agrees with it on the property path.

Implemented by the domain:ui#1 seat, session session_01BA3nKVUwKQJf8DBxrSVtNC (dispatched subagent).


Generated by Claude Code

…y instead of blanking it silently (objectui#10567)

`toDateInputValue` keeps a stored `2026-02-30` verbatim, but an
`<input type="date">` sanitises a nonexistent day to an empty value, so
`DateField` and the sub-grid's editable `date` cell showed an empty
control with no marker. Both now judge the day as written with
`isImpossibleStoredDay`, hand the control an empty value, set
`aria-invalid`, and name the stored string in a notice linked through
`aria-describedby` (new date-only key `fields.date.impossibleDay` in all
ten packs plus `FIELD_DEFAULTS`). The `de` quote-pairing ratchet moves
64 to 65 for the new German value.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BA3nKVUwKQJf8DBxrSVtNC
@github-actions

Copy link
Copy Markdown
Contributor

changeset-claim-re-read

⚠️ 3 pending changeset(s) describe a file this change touches

Their bodies publish verbatim into the CHANGELOG at the next release, so this is a request to re-read them against your diff — addressed here because you are the one seat that can answer it without re-deriving anything.

⛔ Nothing here blocks, and nothing here is a verdict on your change. This gate exits 0, is not a required context, and judges name resolution, never meaning: it asked whether a pending body names a file you touched. "Is this sentence still true?" is the one question it will not answer, and the one you are being asked to answer.

.changeset/6625-retire-fieldmeta-decimals.md

  • names GridField.tsx → packages/fields/src/widgets/GridField.tsx — edited by this change

    buildFieldMeta computed decimals: overrides.decimals ?? meta?.decimals ?? meta?.scale on every call and the value reached nothing. Re-measured on this branch's base (efdc6c62): zero .decimals member reads across @object-ui/fields, @object-ui/i18n, @object-ui/components, @object-ui/core and plugin-dashboard itself — the only non-comment occurrence was the write being removed here. The positive control in the same query shape fires: .scale member reads hit NumberField.tsx, GridField.tsx and fields/src/index.tsx. So the zero is a finding, not a broken query. The overrides.decimals ?? head of that chain had already lost its only feeder when objectui#6425's ruling removed the authored read from ObjectDataTable.enrich(); RecordDetailDrawer, the only other buildFieldMeta caller, passes no overrides at all. Both halves retire together, so the key leaves in one move.

.changeset/6661-app-launcher-nav-menu-renderers.md

  • names en.ts → packages/i18n/src/locales/en.ts — edited by this change

    Three new strings — the launcher's and the menu's accessible names, and the menu's empty state — are declared under console.nav in en.ts and its nine sibling packs. An inline defaultValue alone is not a fix: it renders English at one call site and leaves the string untranslatable everywhere (objectui#3517).

.changeset/7122-capability-manage-org-presentation.md

  • names useFieldTranslation.ts → packages/fields/src/widgets/useFieldTranslation.ts — edited by this change

    The label is the spec artifact's own (Manage Organization Presentation), read off the installed build rather than invented, and it is authored everywhere the widget's docblock requires of any edit to that list: useFieldTranslation.ts and all ten locale packs. Each non-English string is composed from that pack's own established sibling vocabulary (manage_org_users, manage_platform_settings) rather than machine-translated; a native review pass is welcome on the nine, and nothing about the capability's behaviour depends on the wording.

Read the paragraph, not the line: both false halves of the objectui#8617 claim sat in one paragraph, and correcting either alone would have left it asserting the same wrong thing.

If a claim did go false, correct the body. That is precedented and prose-only, frontmatter untouched; check-changeset-overwrite.mjs will report the correction as its own case 2 ("correcting a declaration on purpose … legitimate"), which is the intended shape — one gate asks for the read, the other records the write.

Not covered, stated so nobody reads this as more: a born-false claim that spells no line address at all (objectui#9495 coordinated one by ORDINAL — "a grep finds that member first" — and deciding that means reading what the sentence means), a claim spelled as a symbol or a package rather than a backticked file name, and a file named ambiguously.

Compared the checked-out tree with c2d86599b (merge-base with origin/main): 15 file(s) changed outside .changeset/, read against 1478 pending declaration(s) that publish a body (2062 pending in total). · run

@github-actions

Copy link
Copy Markdown
Contributor

✅ Console Performance Budget

Metric Value Budget
Eager closure (gzip, 329 chunks) 3048.1 KB 3104.5 KB
Main entry chunk (gzip) 147.9 KB 350 KB
Entry file index-CirjGK7F.js —
Status PASS —

The eager closure is every chunk the entry reaches through static imports — what the browser fetches and parses before the app renders. The entry chunk on its own is a small fraction of it.


📦 Bundle Size Report

Package Size Gzipped
app-shell (consoleActionDispatch.js) 0.20KB 0.19KB
app-shell (index.js) 16.68KB 6.20KB
app-shell (runtime-config.js) 20.68KB 7.36KB
app-shell (types.js) 0.01KB 0.04KB
app-shell (urlParams.js) 10.06KB 3.86KB
auth (ActiveOrganizationStorage.js) 27.95KB 10.04KB
auth (AuthContext.js) 0.31KB 0.24KB
auth (AuthGuard.js) 2.07KB 1.00KB
auth (AuthProvider.js) 40.18KB 10.59KB
auth (AuthShell.js) 3.49KB 1.40KB
auth (ForgotPasswordForm.js) 12.21KB 3.45KB
auth (LoginForm.js) 18.15KB 5.39KB
auth (PreviewBanner.js) 0.90KB 0.50KB
auth (RegisterForm.js) 6.65KB 2.22KB
auth (SocialSignInButtons.js) 9.61KB 3.89KB
auth (UserMenu.js) 3.41KB 1.23KB
auth (auth-gate-events.js) 1.29KB 0.66KB
auth (authStyles.js) 5.04KB 1.72KB
auth (createAuthClient.js) 40.21KB 10.80KB
auth (createAuthenticatedFetch.js) 8.52KB 3.45KB
auth (index.js) 3.63KB 1.64KB
auth (invitation-status.js) 1.22KB 0.70KB
auth (org-roles.js) 6.66KB 2.78KB
auth (phone-identifier.js) 1.11KB 0.66KB
auth (types.js) 0.59KB 0.35KB
auth (useAuth.js) 5.30KB 1.02KB
auth (useWorkspaceAdminStatus.js) 11.08KB 4.58KB
collaboration (CommentThread.js) 27.13KB 7.95KB
collaboration (LiveCursors.js) 3.17KB 1.27KB
collaboration (PresenceAvatars.js) 6.49KB 2.64KB
collaboration (PresenceProvider.js) 2.79KB 1.13KB
collaboration (index.js) 1.68KB 0.73KB
collaboration (useCollaborationTranslation.js) 6.05KB 2.52KB
collaboration (useCommentSearch.js) 1.98KB 0.88KB
collaboration (useConflictResolution.js) 7.75KB 1.86KB
collaboration (useMentionNotifications.js) 1.81KB 0.68KB
collaboration (usePresence.js) 6.33KB 1.84KB
collaboration (useRealtimeSubscription.js) 7.91KB 2.01KB
components (index.js) 546.37KB 130.65KB
core (index.js) 9.22KB 3.71KB
create-plugin (index.js) 27.94KB 9.51KB
data-objectstack (index.js) 223.91KB 62.28KB
fields (index.js) 259.68KB 65.73KB
i18n (LocalizationContext.js) 1.76KB 0.96KB
i18n (builtinAggregateLabels.js) 0.86KB 0.49KB
i18n (currency.js) 2.59KB 1.22KB
i18n (fallbackInterpolation.js) 6.25KB 2.77KB
i18n (i18n.js) 8.87KB 3.64KB
i18n (index.js) 5.24KB 2.27KB
i18n (pickLocalized.js) 9.86KB 3.95KB
i18n (provider.js) 39.40KB 12.91KB
i18n (useDisplayLocale.js) 3.52KB 1.76KB
i18n (useObjectLabel.js) 34.34KB 9.17KB
i18n (useSafeTranslation.js) 5.60KB 2.33KB
layout (index.js) 39.28KB 11.09KB
mobile (MobileProvider.js) 0.92KB 0.49KB
mobile (ResponsiveContainer.js) 0.94KB 0.38KB
mobile (breakpoints.js) 1.51KB 0.70KB
mobile (createOfflineDataSource.js) 5.61KB 1.75KB
mobile (index.js) 1.99KB 0.87KB
mobile (offlineQueue.js) 3.91KB 1.35KB
mobile (pwa.js) 0.97KB 0.49KB
mobile (serviceWorker.js) 1.48KB 0.62KB
mobile (serviceWorkerSource.js) 3.41KB 1.48KB
mobile (useBreakpoint.js) 1.54KB 0.65KB
mobile (useGesture.js) 6.96KB 1.98KB
mobile (useOfflineSync.js) 1.99KB 0.72KB
mobile (usePullToRefresh.js) 6.62KB 2.45KB
mobile (useResponsive.js) 0.72KB 0.42KB
mobile (useSpecGesture.js) 5.52KB 2.10KB
mobile (useTouchTarget.js) 1.01KB 0.54KB
permissions (MePermissionsProvider.js) 13.52KB 4.88KB
permissions (PermissionContext.js) 0.31KB 0.25KB
permissions (PermissionGuard.js) 0.89KB 0.45KB
permissions (PermissionProvider.js) 6.24KB 2.16KB
permissions (discardProofCache.js) 1.04KB 0.55KB
permissions (evaluator.js) 8.33KB 3.07KB
permissions (index.js) 0.93KB 0.41KB
permissions (store.js) 0.91KB 0.42KB
permissions (useFieldPermissions.js) 1.28KB 0.53KB
permissions (usePermissions.js) 4.83KB 2.27KB
plugin-ai (index.js) 16.01KB 3.93KB
plugin-calendar (index.js) 51.40KB 14.61KB
plugin-charts (index.js) 74.94KB 20.89KB
plugin-chatbot (index.js) 198.36KB 47.20KB
plugin-dashboard (index.js) 133.50KB 35.37KB
plugin-designer (index.js) 216.25KB 44.39KB
plugin-detail (index.js) 232.96KB 61.65KB
plugin-editor (index.js) 2.23KB 1.05KB
plugin-form (index.js) 147.92KB 37.83KB
plugin-gantt (index.js) 169.62KB 41.91KB
plugin-grid (index.js) 215.37KB 58.92KB
plugin-kanban (index.js) 48.26KB 15.04KB
plugin-list (index.js) 114.60KB 28.31KB
plugin-map (index.js) 22.42KB 7.38KB
plugin-markdown (index.js) 13.88KB 4.80KB
plugin-report (index.js) 43.55KB 11.99KB
plugin-timeline (index.js) 30.67KB 8.95KB
plugin-tree (index.js) 10.52KB 3.69KB
plugin-view (index.js) 87.84KB 21.96KB
providers (DataSourceProvider.js) 0.75KB 0.39KB
providers (MetadataProvider.js) 1.37KB 0.59KB
providers (ThemeProvider.js) 1.90KB 0.85KB
providers (UploadProvider.js) 11.66KB 3.50KB
providers (index.js) 0.45KB 0.23KB
providers (types.js) 0.01KB 0.04KB
react-runtime (index.js) 5.62KB 2.34KB
react (LazyPluginLoader.js) 4.47KB 1.63KB
react (SchemaRenderer.js) 116.21KB 38.14KB
react (data-invalidation.js) 5.05KB 2.08KB
react (index.js) 4.03KB 1.86KB
react (schema-input.js) 4.25KB 2.04KB
react (spec-input.js) 0.20KB 0.18KB
sdui-parser (body-dialect.js) 4.78KB 2.09KB
sdui-parser (codegen.js) 6.58KB 2.74KB
sdui-parser (dashboard-widget-options.js) 3.08KB 1.30KB
sdui-parser (index.js) 5.78KB 2.56KB
sdui-parser (input-type.js) 2.84KB 1.40KB
sdui-parser (kanban-quick-add.js) 3.89KB 1.87KB
sdui-parser (parse.js) 25.28KB 7.80KB
sdui-parser (provenance.js) 3.66KB 1.82KB
sdui-parser (types.js) 0.28KB 0.23KB
sdui-parser (validate.js) 18.27KB 6.20KB
types (ai.js) 4.11KB 2.06KB
types (api-types.js) 0.20KB 0.18KB
types (app.js) 2.87KB 1.00KB
types (base.js) 0.20KB 0.18KB
types (blocks.js) 0.20KB 0.18KB
types (complex.js) 2.93KB 1.49KB
types (crud.js) 0.20KB 0.18KB
types (dashboard-filter-alias.js) 6.23KB 2.74KB
types (data-display.js) 3.75KB 1.85KB
types (data-protocol.js) 0.20KB 0.19KB
types (data.js) 0.20KB 0.18KB
types (designer.js) 1.85KB 0.85KB
types (disclosure.js) 0.20KB 0.18KB
types (error-code.js) 1.54KB 0.88KB
types (expression.js) 0.20KB 0.18KB
types (feedback.js) 0.20KB 0.18KB
types (field-types.js) 0.20KB 0.18KB
types (form.js) 0.20KB 0.18KB
types (http-inflight.js) 8.87KB 3.73KB
types (http-retry.js) 4.32KB 2.02KB
types (icon-key-migration.js) 4.26KB 1.63KB
types (index.js) 4.74KB 2.25KB
types (layout.js) 0.20KB 0.18KB
types (managed-by.js) 0.19KB 0.18KB
types (mobile.js) 5.00KB 2.39KB
types (navigation.js) 0.20KB 0.18KB
types (objectql.js) 0.20KB 0.18KB
types (overlay.js) 0.20KB 0.18KB
types (permissions.js) 2.52KB 1.31KB
types (plugin-scope.js) 0.20KB 0.18KB
types (record-components.js) 0.20KB 0.19KB
types (record-semantics.js) 1.28KB 0.67KB
types (registry.js) 0.20KB 0.18KB
types (reports.js) 0.20KB 0.18KB
types (select-option.js) 0.20KB 0.19KB
types (spec-report.js) 5.05KB 1.93KB
types (spec-ui-namespace.js) 0.20KB 0.19KB
types (strict-authoring-face.js) 17.15KB 6.32KB
types (system-fields.js) 3.33KB 1.54KB
types (theme.js) 6.28KB 2.87KB
types (ui-action.js) 8.11KB 3.32KB
types (views.js) 0.20KB 0.18KB
types (widget.js) 0.20KB 0.18KB

Size Limits

  • ✅ Core packages should be < 50KB gzipped
  • ✅ Component packages should be < 100KB gzipped
  • ⚠️ Plugin packages should be < 150KB gzipped

@objectstack-fleet
objectstack-fleet Bot marked this pull request as ready for review September 25, 2026 12:27
@objectstack-fleet
objectstack-fleet Bot added this pull request to the merge queue Sep 25, 2026
Merged via the queue into main with commit ac2d6f1 Sep 25, 2026
45 checks passed
@objectstack-fleet
objectstack-fleet Bot deleted the claude/issue-10567-date-only-impossible-day branch September 25, 2026 12:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

1 participant