Repository navigation
fix(plugin-grid): import type inference requires a date shape before Date.parse (objectui#11813) - #11881
Merged
objectstack-fleet[bot] merged 4 commits intoOct 8, 2026
Conversation
…Date.parse (objectui#11813) isDateLike trusted V8's lenient Date.parse, which skips unknown words before the first number and reads any word starting with a month's three letters, so "Phase 2", "Building 7", "Room 12" and "Imported QA task 1" inferred as Date and drew a "Looks like Date" hint on the mapping step. A value now needs an explicit date shape first (numeric year-first or day/month-first, ISO-8601 date-time, ISO year-month, or an English month-name form with no other word); Date.parse then only confirms the parts are in range. Claude-Session: https://claude.ai/code/session_01DrKzdPdyLLBW3qpZ4vtk7z Co-authored-by: Claude <noreply@anthropic.com>
…atch type gate (objectui#11813) Claude-Session: https://claude.ai/code/session_01DrKzdPdyLLBW3qpZ4vtk7z Co-authored-by: Claude <noreply@anthropic.com>
…bjectui#11813) Claude-Session: https://claude.ai/code/session_01DrKzdPdyLLBW3qpZ4vtk7z Co-authored-by: Claude <noreply@anthropic.com>
…ence Claude-Session: https://claude.ai/code/session_01DrKzdPdyLLBW3qpZ4vtk7z 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-11813-import-date-inference
branch
October 8, 2026 04:36
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 #11813
Clause-②: no. An internal predicate gets stricter. No export, prop,
@object-ui/typesmember or accepted input changes;inferColumnTypekeeps its signature and returnstextwhere it wrongly returneddate.What changed
isDateLikeinpackages/plugin-grid/src/importParsers.tswas!isNumberLike(s) && !isNaN(Date.parse(s)). V8's legacyDate.parseskips unknown words before the first number and reads any word whose first three letters spell a month. Measured in Node 22.22.0:Date.parsereads it asPhase 2Building 7Room 12Imported QA task 1Marketing 2026Room 101, OctA-121.2.3A value now needs an explicit date shape before
Date.parseis asked;Date.parsethen only confirms the parts are in range. The shapes:2026-10-07,2026/10/07,2026.10.07, and ISO-8601 date-times (2026-10-07T12:00:00Z,2024-12-31 09:00,2026-10-07 12:00:00 GMT+0800).10/07/2026,7.10.2026,10/7/26, optionally with a clock time (10/07/2026 2:30 PM).2026-10.Oct 7, 2026,7 October 2026,7-Oct-2026,Wed, 07 Oct 2026 12:00:00 GMT. Words are read with\p{L}and theuflag, per the repo's i18n regex rule.Only the predicate changed, inside the claim's fence (comment 6051515735).
inferColumnType's signature,isNumberLike, the mapping-hint scoring, the record conversion andImportWizard.tsxare untouched. Changeset:.changeset/11813-import-date-inference.md,@object-ui/plugin-gridpatch.Pins
In
packages/plugin-grid/src/importParsers.test.ts, describeinferColumnType: text ending in a number is not a date (objectui#11813):Phase 2,Building 7,Room 12andImported QA task 1infer astext, singly and as a column. So doMarketing 2026,Room 101, Oct,A-12,task-1and1.2.3.suggestColumnMappings, aTask titlecolumn ofImported QA task 1andImported QA task 2carriesinferredType: 'text'and maps onto aTitletext field. Onmainit carrieddate. The type gate then halved the soft match below the auto-apply threshold, so the column was not mapped at all.2026-10-07,2026/10/07,2026-10,10/07/2026,7.10.2026,10/7/26,Oct 7, 2026,7 October 2026,7-Oct-2026andTuesday, October 7, 2026infer asdate.2026-10-07T12:00:00Z,2024-03-14T08:30:00.000Z(the ISO form the xlsx parser emits),2026-10-07 12:00:00 GMT+0800,10/07/2026 2:30 PMandWed, 07 Oct 2026 12:00:00 GMTinfer asdatetime. Both hold before and after the fix.Reverse check
The fix was committed first (
9e7eedf, thend9f6c6f). ThenimportParsers.tswas overwritten on disk with its basecef0eeeblob:hasDateShapecounted 0 and the old one-lineisDateLikecounted 1. The pins were run, and the file was restored withgit checkout HEAD -- PATH. The restore was proven by blob-hash equality withHEAD(cc0bbf0d) and an emptygit diff HEAD.Tests 11 failed | 46 passed (57). Every failure isexpected 'date' to be 'text', the predicted direction. All 16 control cases stayed green.Tests 57 passed (57).Gates
The union ran on
dfeee89, the merge oforigin/mainat6d8bf0cinto this branch.pnpm --workspace-concurrency=2 --filter '@object-ui/plugin-grid^...' buildVERDICT command-exit 0;Scope: 14 of 47 workspace projectspnpm --filter @object-ui/plugin-grid type-checktsc --noEmit && tsc -p tsconfig.test.json;--listFileson the test project listsimportParsers.test.tspnpm exec vitest run --maxWorkers=2 packages/plugin-grid/Test Files 188 passed (188),Tests 1763 passed (1763)pnpm check:control-bytescheck-control-bytes: OKpnpm check:new-line-citations0 new citation(s), enforcement report-onlypnpm check:changeset-claimsNo pending changeset names a file this change touches.pnpm check:pending-changeset-literalsNo test source names a pending changeset.pnpm check:test-path-rootscheck-test-path-roots: OKnode scripts/check-changeset-presence.mjs2 source file(s) of 1 released package(s) changed, and this change declares 1 changeset(s)node scripts/check-changeset-no-major.mjs,-fixed.mjs,-overwrite.mjspnpm exec eslint --no-inline-config --format jsonon the two touched.tsfiles*.guard.test.*matches no file inplugin-grid. The three*Guard.test.tsxfiles (importLegacyReferenceGuard,useRowColor.prototypeGuard,RowActionMenu.emptyGuard) are among the 188 files of the package run.lintscript,eslint . --no-inline-config, which CI runs. The file count, 2, is read from the--format jsonoutput. Invariance:eslint.config.jssets noparserOptions.projectorprojectService, so linting is not type-aware, and no rule undereslint-rules/reads the filesystem. This diff therefore cannot move a verdict on an untouched file.check:eager-closure. Reason: it readsapps/console/dist/eager-closure.json, which only a full console build writes; that is left to CI.plugin-gridis eager, becauseapps/console/src/register-plugins.tsimports it, and its chunk has no per-chunk ceiling. A standalone esbuild-minified gzip ofimportParsers.tsgrows from 2,977 to 3,326 bytes (+349).Acceptance notes
7 octobre 2026,7 Januar 2026,Mars 7, 2026) and never accepted others (7 juin 2026,7 März 2026).2026年10月7日isNaNtoDate.parseand stays text. Reading localized date forms would be a new capability, not this card.importParsers.tshas no locale rule. V8 reads07/10/2026month-first (July 10), and that is unchanged.2026-10-07T12:00:00Zinfers asdatetime, notdate, both onmainand after (hasTimeComponent). The pin saysdatetime.validateValueinImportWizard.tsxaccepts any valueDate.parsereads for adate/datetimefield, soPhase 2mapped onto a date field is not marked red in the preview. Reach not measured. Carrier: objectui#11814 (that file's next card, the preview check).isDateLikestays module-private per the fence.ObjectGrid.tsx's own name-basedinferColumnTyperuns aDate.parsesample check whose two branches both returndate, so the check decides nothing. Carrier: none.mainmoved after the merge:31add5fadds three commits, all inpackages/app-shelland.changeset/, disjoint from this diff. They were not merged in.Session:
https://claude.ai/code/session_01DrKzdPdyLLBW3qpZ4vtk7z(os-dev for seatdomain:ui#1, claim 6051515735).Generated by Claude Code