Skip to content

fix(plugin-detail): an inline edit of a date-only field saves the picked day, not local midnight as a UTC instant (objectui#12206) - #12216

Merged
objectstack-fleet[bot] merged 2 commits into
mainfrom
claude/issue-12206-inline-date-only-day
Oct 12, 2026
Merged

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

Conversation

@objectstack-fleet

Copy link
Copy Markdown
Contributor

Fixes #12206
Clause-②: no

What changed

InlineFieldInput (@object-ui/plugin-detail) is the inline editor that the record highlights strip and the details body share. Its date branch routes date and datetime fields to DateField, whose control hands back YYYY-MM-DD. The branch re-emitted that as new Date(day + 'T00:00:00').toISOString(), which is local midnight as a UTC instant. The server keeps a date-only field's UTC calendar day, so every user east of UTC saved the day before.

  • date arm: the picked YYYY-MM-DD is now passed through unchanged. That is the shape the Edit form writes (its date widget is the same DateField) and the shape @object-ui/core's native-date adapters keep for date.
  • datetime arm: unchanged, as the claim requires. A one-line comment says why the two arms differ.
  • Changed: the onChange of the DateField in the date branch, plus its comment. No export, prop or type change. The read side (toDateInputValue / DateField) is not touched.

The fix is in the producer, the date branch of packages/plugin-detail/src/InlineFieldInput.tsx, where the claim expected it. The details body (DetailSection) renders the same InlineFieldInput, so its inline date edit had the same defect and is fixed by the same line.

Measured before the fix (the new pins, run against 9646e2e's editor)

These are the PATCH bodies (dataSource.update patch) for picking 2026-10-16 in the highlights strip, through HeaderHighlight and InlineEditSaveBar:

zone old patch new patch
Asia/Taipei (UTC+8) {"due_date":"2026-10-15T16:00:00.000Z"} (the card's row, exactly) {"due_date":"2026-10-16"}
America/Bogota (UTC-5) {"due_date":"2026-10-16T05:00:00.000Z"} {"due_date":"2026-10-16"}
UTC (suite zone) {"due_date":"2026-10-16T00:00:00.000Z"} {"due_date":"2026-10-16"}

Zone 2 readings

  • H1 (holds). The defect is the single onChange line named in the claim. The save path passes the value through unchanged: HeaderHighlight / DetailSection call inline.setField(name, v). InlineEditContext.setField spreads the value into draft as is. InlineEditSaveBar hands that draft to dataSource.update(object, id, draft, { ifMatch }). The Edit form's date widget (getLazyFieldWidget('date'), from the loaders the form registers) emits the plain day at both offsets. That is the control in the pin file.
  • H2, datetime (measured; left unchanged, as ruled). A datetime field edited inline also gets the day-only input type=date, and this is a defect. Measured with a throwaway probe (forked child, not committed) on the current datetime arm:
    • The control shows the stored instant's UTC date. In Asia/Taipei, 2026-10-15T20:00:00.000Z (local 16 Oct, 04:00) shows 2026-10-15.
    • Picking a day replaces the stored time of day with local midnight. A stored 2026-02-14T14:46:20.862Z, set to 1 March, writes 2026-03-01T00:00:00.000Z (UTC), 2026-02-28T16:00:00.000Z (UTC+8) and 2026-03-01T05:00:00.000Z (UTC-5). The 14:46 is lost in every zone.
    • For comparison, the Edit form's DateTimeField (datetime-local) keeps the time: it writes 2026-03-01T14:46:00.000Z in all three zones.
    • The sub-grid already handles this class for its own cells (objectui#3569, per GridField's header comment).
    • Reported for the seat to file. See Acceptance notes.
  • H3 (holds). The repo pins date behaviour under a real offset with the forks-pool driver scripts/__tests__/date-only-zone-pins-10183.test.ts. In the normal threads run, process.env.TZ does not move the zone. Each pin file therefore gates its zone cases on OBJECTUI_DATE_ZONE_CHILD=1, and each zone opens with a rig case: the resolved Intl zone, and the local hour of a fixed instant. The new pin uses that mechanism and is registered in the driver's PINS. Without the registration the zone cases are skipped everywhere. That one line is outside the claim's listed file surface. See Deviations.
  • H4 (no other inline writer shares the line). Searched source for T00:00:00 / local-midnight re-emits. InlineFieldInput is the only hit, and the following were read:
    • The grid's inline cell editor (ObjectGrid renderCellEditor) goes through FieldEditWidget to DateField. onChange is forwarded unchanged and the plain day is staged.
    • FieldEditWidget's date path, also used by the kanban required-fields dialog, is the same widget with the same forwarding.
    • data-table's built-in date editor stores e.target.value for date and fromDateTimeInputValue for datetime.
    • The sub-grid (GridField) stores the raw YYYY-MM-DD for date.
    • The highlights compact layout renders InlineFieldInput, so it shares the line and is fixed here.

Tests

  • New file packages/plugin-detail/src/__tests__/InlineFieldInput.dateOnlyWriteZone-12206.test.tsx drives the record-page write: HeaderHighlight, then the shared draft, then InlineEditSaveBar, then dataSource.update. It asserts the patch is exactly { due_date: '2026-10-16' }.
    • A suite-zone case runs in the normal run.
    • Under OBJECTUI_DATE_ZONE_CHILD=1, each zone has a rig, the pin and the Edit-form control: Asia/Taipei (UTC+8) and America/Bogota (UTC-5, no DST).
  • InlineFieldInput.test.tsx: the old case asserted that a date field re-emits an ISO timestamp, which was the defect. It now asserts the plain day. The ISO-shape assertion moved to a datetime case, where it still holds.
  • Ablation, run after the fix was committed (080bfdc) with ablation-replace.mjs and an EXIT/INT/TERM restore trap:
    • The mutation onChange(isDateTime && v ? new Date became onChange(v ? new Date. On disk the anchor count went 1 to 0 and the blob changed.
    • The forks-pool run then went red as expected, with 4 failed and 13 passed. The failures were the suite-zone save, the UTC+8 save (received 2026-10-15T16:00:00.000Z), the UTC-5 save (received 2026-10-16T05:00:00.000Z) and the InlineFieldInput.test.tsx date case. The rigs, the Edit-form controls and the datetime case stayed green.
    • The restore was proven: the blob equals HEAD and git diff HEAD is empty.
    • A first attempt was refused by the tool before anything ran, because the replacement was a substring of the anchor. Nothing was measured on that attempt.

Gates (all at b27e508, the final commit)

gate result
turbo run build --filter='@object-ui/plugin-detail^...' --concurrency=2 (verify lock) 11/11 successful (cache hits)
pnpm --filter @object-ui/plugin-detail type-check (script echoed: tsc --noEmit && tsc -p tsconfig.test.json; --listFilesOnly confirms both test files are in the test project) exit 0
targeted vitest: 23 files (InlineFieldInput*, HeaderHighlight*, InlineEditSaveBar*, DetailSection.inlineEdit / multiValueInlineEdit, inlineEditType*, inlineCredentialGate, the new pin) 23 files passed; 322 passed, 6 skipped (the 6 zone-gated cases)
scripts/__tests__/date-only-zone-pins-10183.test.ts (forks child over every registered pin, now 27) 28 passed
new pin file, forks pool, OBJECTUI_DATE_ZONE_CHILD=1 7 passed
check:vi-mock-specifiers, check:test-path-roots, check:changeset-claims, check:pending-changeset-literals, check:control-bytes exit 0 each
check:new-line-citations 0 new citation(s), exit 0
node scripts/check-changeset-presence.mjs exit 0, declares .changeset/12206-inline-date-only-day.md
eslint on the 4 touched files (--no-inline-config) 0 errors; 42 warnings, all in InlineFieldInput.tsx, the same count as at base

NOT MEASURED: the repo-wide pnpm lint and the full pnpm test (both CI-owned), and a live-browser rerun on HotCRM.

Deviations

  • File surface: one line added to the PINS list in scripts/__tests__/date-only-zone-pins-10183.test.ts. It registers the new pin, which is how the H3 mechanism runs the zone cases at all. Nothing else in that file changed.

Acceptance notes

  • Finding, class (a): datetime inline edit on the record page. The highlights strip and the details body use a day-only control for datetime fields. It shows the instant's UTC date, and any pick replaces the stored time of day with local midnight (see H2). Not changed here, per the ruling.

Generated by Claude Code

…ked day, not local midnight as a UTC instant

The record page's inline editor (`InlineFieldInput`, shared by the
highlights strip and the details body) re-emitted a `date` field's picked
`YYYY-MM-DD` as `new Date(day + 'T00:00:00').toISOString()`. The server keeps
a date-only field's UTC calendar day, so east of UTC that stored the day
before (UTC+8: 2026-10-16 -> `2026-10-15T16:00:00.000Z`). A `date` field now
writes the plain day, as the Edit form does; the `datetime` arm is unchanged.

Pinned at UTC+8 (`Asia/Taipei`) and UTC-5 (`America/Bogota`) on the forks
pool via the date-only zone pin driver, with the Edit form's own `date`
widget as the control.

Claude-Session: https://claude.ai/code/session_016djJF12Qt14ejKR5Vjt4sK
Co-authored-by: Claude <noreply@anthropic.com>
…n the objectui#12206 zone pin

Claude-Session: https://claude.ai/code/session_016djJF12Qt14ejKR5Vjt4sK
Co-authored-by: Claude <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown
Contributor

✅ Console Performance Budget

Metric Value Budget
Eager closure (gzip, 291 chunks) 3179.1 KB 3204.6 KB
Main entry chunk (gzip) 74.1 KB 350 KB
Entry file index-DLizf2zw.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) 20.05KB 7.41KB
app-shell (runtime-config.js) 22.59KB 7.89KB
app-shell (types.js) 0.01KB 0.04KB
app-shell (urlParams.js) 10.11KB 3.87KB
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.22KB 10.61KB
auth (AuthShell.js) 3.49KB 1.40KB
auth (ForgotPasswordForm.js) 12.21KB 3.45KB
auth (LoginForm.js) 18.15KB 5.40KB
auth (PreviewBanner.js) 0.90KB 0.50KB
auth (RegisterForm.js) 6.72KB 2.24KB
auth (SocialSignInButtons.js) 9.70KB 3.93KB
auth (UserMenu.js) 3.39KB 1.21KB
auth (auth-gate-events.js) 1.29KB 0.66KB
auth (authStyles.js) 5.04KB 1.72KB
auth (createAuthClient.js) 41.19KB 11.12KB
auth (createAuthenticatedFetch.js) 8.54KB 3.46KB
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.11KB 7.97KB
collaboration (LiveCursors.js) 3.17KB 1.27KB
collaboration (PresenceAvatars.js) 6.28KB 2.60KB
collaboration (PresenceProvider.js) 2.79KB 1.13KB
collaboration (index.js) 1.68KB 0.73KB
collaboration (useCollaborationTranslation.js) 6.50KB 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) 588.51KB 141.71KB
core (index.js) 10.18KB 4.04KB
create-plugin (index.js) 27.94KB 9.51KB
data-objectstack (index.js) 243.13KB 67.92KB
fields (index.js) 279.78KB 71.29KB
i18n (LocalizationContext.js) 2.92KB 1.42KB
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.52KB 2.39KB
i18n (pickLocalized.js) 9.86KB 3.95KB
i18n (provider.js) 39.35KB 12.88KB
i18n (translateFn.js) 0.20KB 0.18KB
i18n (useDisplayLocale.js) 3.52KB 1.76KB
i18n (useObjectLabel.js) 36.87KB 9.88KB
i18n (useSafeTranslation.js) 7.14KB 2.92KB
layout (index.js) 40.26KB 11.71KB
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) 15.35KB 5.51KB
permissions (PermissionContext.js) 0.31KB 0.25KB
permissions (PermissionGuard.js) 0.89KB 0.45KB
permissions (PermissionProvider.js) 6.82KB 2.38KB
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.04KB 3.92KB
plugin-calendar (index.js) 54.31KB 15.86KB
plugin-charts (index.js) 84.72KB 23.27KB
plugin-chatbot (index.js) 201.72KB 48.07KB
plugin-dashboard (index.js) 144.20KB 38.95KB
plugin-designer (index.js) 233.77KB 50.02KB
plugin-detail (index.js) 250.98KB 66.26KB
plugin-editor (index.js) 2.23KB 1.05KB
plugin-form (index.js) 177.74KB 46.01KB
plugin-gantt (index.js) 178.63KB 45.19KB
plugin-grid (index.js) 255.50KB 71.02KB
plugin-kanban (index.js) 53.23KB 16.71KB
plugin-list (index.js) 123.03KB 31.28KB
plugin-map (index.js) 27.24KB 9.03KB
plugin-markdown (index.js) 13.88KB 4.80KB
plugin-report (index.js) 44.12KB 12.29KB
plugin-timeline (index.js) 39.21KB 11.85KB
plugin-tree (index.js) 15.07KB 5.33KB
plugin-view (index.js) 92.11KB 23.27KB
providers (DataSourceProvider.js) 0.75KB 0.39KB
providers (MetadataProvider.js) 1.37KB 0.59KB
providers (ThemeProvider.js) 1.90KB 0.85KB
providers (UploadProvider.js) 12.07KB 3.68KB
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) 120.63KB 39.56KB
react (data-invalidation.js) 5.05KB 2.08KB
react (index.js) 4.50KB 2.06KB
react (schema-input.js) 4.31KB 2.07KB
react (spec-input.js) 0.20KB 0.18KB
sdui-parser (body-dialect.js) 4.50KB 1.99KB
sdui-parser (codegen.js) 9.45KB 3.76KB
sdui-parser (dashboard-widget-options.js) 3.07KB 1.30KB
sdui-parser (index.js) 7.30KB 3.12KB
sdui-parser (input-type.js) 2.84KB 1.40KB
sdui-parser (parse.js) 25.28KB 7.81KB
sdui-parser (provenance.js) 3.84KB 1.90KB
sdui-parser (types.js) 0.29KB 0.24KB
sdui-parser (validate.js) 23.87KB 7.83KB
types (ai.js) 4.39KB 2.17KB
types (api-types.js) 0.20KB 0.18KB
types (app.js) 4.12KB 1.61KB
types (authoring-nodes.js) 0.20KB 0.19KB
types (base.js) 0.20KB 0.18KB
types (blocks.js) 0.20KB 0.18KB
types (cloud.js) 0.20KB 0.18KB
types (complex.js) 4.44KB 2.07KB
types (crud.js) 0.20KB 0.18KB
types (dashboard-filter-alias.js) 6.23KB 2.74KB
types (dashboard-widget-layout.js) 2.06KB 0.96KB
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) 1.13KB 0.65KB
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) 5.78KB 2.70KB
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 (node-slots.js) 7.18KB 2.34KB
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) 4.99KB 1.96KB
types (spec-ui-namespace.js) 0.20KB 0.19KB
types (strict-authoring-face.js) 19.93KB 7.26KB
types (system-fields.js) 3.33KB 1.54KB
types (theme.js) 6.28KB 2.87KB
types (ui-action.js) 8.48KB 3.50KB
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 October 12, 2026 09:38
@objectstack-fleet
objectstack-fleet Bot added this pull request to the merge queue Oct 12, 2026
Merged via the queue into main with commit 803f678 Oct 12, 2026
44 checks passed
@objectstack-fleet
objectstack-fleet Bot deleted the claude/issue-12206-inline-date-only-day branch October 12, 2026 09:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

2 participants