Repository navigation
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 intoOct 12, 2026
Conversation
…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>
Contributor
✅ Console Performance Budget
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
Size Limits
|
objectstack-fleet
Bot
deleted the
claude/issue-12206-inline-date-only-day
branch
October 12, 2026 09:57
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 routesdateanddatetimefields toDateField, whose control hands backYYYY-MM-DD. The branch re-emitted that asnew 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.datearm: the pickedYYYY-MM-DDis now passed through unchanged. That is the shape the Edit form writes (itsdatewidget is the sameDateField) and the shape@object-ui/core's native-date adapters keep fordate.datetimearm: unchanged, as the claim requires. A one-line comment says why the two arms differ.onChangeof theDateFieldin 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 sameInlineFieldInput, 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.updatepatch) for picking 2026-10-16 in the highlights strip, throughHeaderHighlightandInlineEditSaveBar: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"}{"due_date":"2026-10-16T00:00:00.000Z"}{"due_date":"2026-10-16"}Zone 2 readings
onChangeline named in the claim. The save path passes the value through unchanged:HeaderHighlight/DetailSectioncallinline.setField(name, v).InlineEditContext.setFieldspreads the value intodraftas is.InlineEditSaveBarhands thatdrafttodataSource.update(object, id, draft, { ifMatch }). The Edit form'sdatewidget (getLazyFieldWidget('date'), from the loaders the form registers) emits the plain day at both offsets. That is the control in the pin file.datetime(measured; left unchanged, as ruled). Adatetimefield edited inline also gets the day-onlyinput type=date, and this is a defect. Measured with a throwaway probe (forked child, not committed) on the currentdatetimearm:Asia/Taipei,2026-10-15T20:00:00.000Z(local 16 Oct, 04:00) shows2026-10-15.2026-02-14T14:46:20.862Z, set to 1 March, writes2026-03-01T00:00:00.000Z(UTC),2026-02-28T16:00:00.000Z(UTC+8) and2026-03-01T05:00:00.000Z(UTC-5). The 14:46 is lost in every zone.DateTimeField(datetime-local) keeps the time: it writes2026-03-01T14:46:00.000Zin all three zones.GridField's header comment).scripts/__tests__/date-only-zone-pins-10183.test.ts. In the normalthreadsrun,process.env.TZdoes not move the zone. Each pin file therefore gates its zone cases onOBJECTUI_DATE_ZONE_CHILD=1, and each zone opens with a rig case: the resolvedIntlzone, and the local hour of a fixed instant. The new pin uses that mechanism and is registered in the driver'sPINS. Without the registration the zone cases are skipped everywhere. That one line is outside the claim's listed file surface. See Deviations.T00:00:00/ local-midnight re-emits.InlineFieldInputis the only hit, and the following were read:ObjectGridrenderCellEditor) goes throughFieldEditWidgettoDateField.onChangeis forwarded unchanged and the plain day is staged.FieldEditWidget'sdatepath, also used by the kanban required-fields dialog, is the same widget with the same forwarding.data-table's built-in date editor storese.target.valuefordateandfromDateTimeInputValuefordatetime.GridField) stores the rawYYYY-MM-DDfordate.InlineFieldInput, so it shares the line and is fixed here.Tests
packages/plugin-detail/src/__tests__/InlineFieldInput.dateOnlyWriteZone-12206.test.tsxdrives the record-page write:HeaderHighlight, then the shared draft, thenInlineEditSaveBar, thendataSource.update. It asserts the patch is exactly{ due_date: '2026-10-16' }.OBJECTUI_DATE_ZONE_CHILD=1, each zone has a rig, the pin and the Edit-form control:Asia/Taipei(UTC+8) andAmerica/Bogota(UTC-5, no DST).InlineFieldInput.test.tsx: the old case asserted that adatefield re-emits an ISO timestamp, which was the defect. It now asserts the plain day. The ISO-shape assertion moved to adatetimecase, where it still holds.080bfdc) withablation-replace.mjsand an EXIT/INT/TERM restore trap:onChange(isDateTime && v ? new DatebecameonChange(v ? new Date. On disk the anchor count went 1 to 0 and the blob changed.2026-10-15T16:00:00.000Z), the UTC-5 save (received2026-10-16T05:00:00.000Z) and theInlineFieldInput.test.tsxdate case. The rigs, the Edit-form controls and thedatetimecase stayed green.git diff HEADis empty.Gates (all at
b27e508, the final commit)turbo run build --filter='@object-ui/plugin-detail^...' --concurrency=2(verify lock)pnpm --filter @object-ui/plugin-detail type-check(script echoed:tsc --noEmit && tsc -p tsconfig.test.json;--listFilesOnlyconfirms both test files are in the test project)InlineFieldInput*,HeaderHighlight*,InlineEditSaveBar*,DetailSection.inlineEdit/multiValueInlineEdit,inlineEditType*,inlineCredentialGate, the new pin)scripts/__tests__/date-only-zone-pins-10183.test.ts(forks child over every registered pin, now 27)OBJECTUI_DATE_ZONE_CHILD=1check:vi-mock-specifiers,check:test-path-roots,check:changeset-claims,check:pending-changeset-literals,check:control-bytescheck:new-line-citations0 new citation(s), exit 0node scripts/check-changeset-presence.mjs.changeset/12206-inline-date-only-day.md--no-inline-config)InlineFieldInput.tsx, the same count as at baseNOT MEASURED: the repo-wide
pnpm lintand the fullpnpm test(both CI-owned), and a live-browser rerun on HotCRM.Deviations
PINSlist inscripts/__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
datetimeinline edit on the record page. The highlights strip and the details body use a day-only control fordatetimefields. 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