Skip to content
This repository was archived by the owner on Nov 4, 2026. It is now read-only.

feat(core,fields): a number field's authored useGrouping decides its thousands separator, relayed to every cell (objectui#11026) - #11089

Merged
objectstack-fleet[bot] merged 2 commits into
mainfrom
claude/issue-11026-number-use-grouping
Sep 29, 2026
Merged

objectstack-fleet[bot] merged 2 commits into
mainfrom
claude/issue-11026-number-use-grouping

Conversation

@objectstack-fleet

Copy link
Copy Markdown
Contributor

Fixes #11026
Clause-②: yes

The renderer half of FieldSchema.useGrouping, the digit-grouping hint @objectstack/spec declares on a field. A number field's authored useGrouping now decides its thousands separator, and every site that hand-copies scale into a cell's field relays it beside scale. This is the objectui end of objectstack-ai/objectstack#20313; that parent keeps the ledger flip.

What changed

  • @object-ui/core number-display.ts: DisplayNumberFormatOptions gains useGrouping?: boolean. shouldGroupDisplayNumber(scale, currency, useGrouping) is still the one decision point: an authored boolean answers first, in either direction (money included), and when it is unset the existing scale/currency heuristic decides, unchanged. There is no second heuristic.
  • The Intl note the card asked to mind. The renderer still never writes useGrouping: true on its own behalf. The heuristic's "group" answer omits the key, so the locale's "auto" applies. The only true written is the author's own: the spec's docblock says the key "maps 1:1 onto Intl.NumberFormat's useGrouping option", and its true means "the author pins grouping ON". So an authored true is "always". The difference only shows where a locale leaves a four-digit number alone under "auto": es-ES renders 1234 with the key unset and 1.234 with an authored true, and pl-PL renders 1 234. This is pinned, with the premise asserted in the same test.
  • @object-ui/types NumberFieldMetadata declares useGrouping?: SpecField['useGrouping'], derived by reference from the spec's type, as dependsOn already is. This is a file-surface addition beyond the claim's list. The dispatch said to read the key as the spec's type and not to cast around a missing key. The cell receives FieldMetadata, and without the declaration the only read would be through the existing as any.
  • @object-ui/fields NumberCellRenderer reads field.useGrouping off the typed field. It narrows with 'useGrouping' in field, so there is no cast, and it takes booleans only. It passes the value to formatDisplayNumber.
  • Relays, each placed exactly where scale is copied (see the census below).
  • Docs: content/docs/fields/number.mdx (the key in the schema snippet, plus a grouping table under Cell Renderer). Changeset: .changeset/11026-number-use-grouping.md.

Relay census (re-derived, not copied from the card)

Instrument: git grep -nE "\bscale\b" -- 'packages/*/src/**' ':!**/*.test.*' ':!**/__tests__/**', dropping comment lines and CSS/transform scale, then reading each hit. I also checked every consumer of getCellRenderer / CellRenderer under packages/*/src for how it builds the cell's field.

Site Verdict Pin
plugin-grid ObjectGrid.tsx, path A (ListColumn objects, objectDefField.scale) relayed gridUseGrouping-11026.test.tsx, "ListColumn objects" rows
plugin-grid ObjectGrid.tsx, path B (string columns) relayed same file, "string columns" rows
plugin-grid ObjectGrid.tsx, path C (inline rows + fields projection) relayed same file, "inline rows + fields projection" rows
plugin-detail fieldEnrichment.ts ENRICHED_FIELD_METADATA_KEYS (DetailSection, HeaderHighlight, summary chips) relayed: added to that list, no second list useGroupingRelay-11026.test.tsx, "DetailSection"
plugin-detail RecordDetailPanel.tsx buildRecordDetailFields relayed same file, "RecordDetailPanel" (no data source, so the panel's own copy is the only road)
plugin-detail RelatedList.tsx makeCell bag relayed same file, "RelatedList"
plugin-list ObjectGallery.tsx buildEnrichedField relayed ObjectGallery.useGrouping-11026.test.tsx
plugin-grid useColumnSummary.ts not a copy: footer aggregate; scale only sets the percent footer width, and number sums format through toLocaleString none
plugin-form sectionFields.ts not a copy: scale feeds the form input's step; the read-only NumberField renders the raw value none
plugin-form deriveMasterDetail.ts (two) not a copy: rounding width for a GridField computed column; GridField renders numbers through toLocaleString, outside the policy none
plugin-form ObjectForm.tsx, plugin-detail DetailView.tsx (percent chip), fields percent/number/grid widgets, percent-scale.ts not a copy: readers of scale as a width or step none
app-shell ObjectFieldInspector.tsx / form-spec.ts not a copy: the designer's scale control none
types field-types.ts, core number-display.ts / dataset-format.ts not a copy: declaration / policy none
timeline, gantt, ListView timeline, charts, mobile, react animation, designer minimap, image cropper not a copy: a different scale (time axis, zoom, CSS) none
ObjectGrid auto-generated columns and expand panel, ObjectKanban cards, ReportViewer whole def handed to the cell, so it relays with no edit the grid pin's "auto-generated columns" row is the reference face
plugin-dashboard recordFields.tsx buildFieldMeta copies neither scale nor useGrouping none (see Acceptance notes)

Verification (all on 0d24f3624)

  • Type-check, rebuilding the dependency closure first (pnpm --filter '@object-ui/plugin-grid^...' --filter '@object-ui/plugin-detail^...' --filter '@object-ui/plugin-list^...' build, exit 0): @object-ui/core, @object-ui/types, @object-ui/fields all printed type-check: Done, exit 0. So did @object-ui/plugin-grid, @object-ui/plugin-detail and @object-ui/plugin-list (exit 0). Each chain includes tsc -p tsconfig.test.json, so the types pin's Equal assertions and its @ts-expect-error on a string useGrouping were compiled.

  • New pins: 6 files, 32 tests passed.

  • Suites (pnpm exec vitest run --maxWorkers=2 DIR from the worktree root):

    • packages/core/src/utils/: 98 files, 1813 tests passed;
    • packages/fields/src/: 219 passed and 1 skipped (220 files), 3497 tests passed and 7 skipped;
    • packages/plugin-list/src/: 107 files, 1182 tests passed;
    • packages/plugin-detail/src/: 219 passed and 1 skipped (220 files), 2152 tests passed and 8 skipped;
    • packages/plugin-grid/src/: 166 files, 1550 tests passed;
    • packages/types/src/: 280 files, 6434 tests passed;
    • the i18n re-export pins (number-display.test.ts, number-display.reexport-identity.test.ts): 2 files, 18 tests passed. The i18n source is unchanged, but it re-exports the widened names.

    Each run printed VERDICT command-exit 0. The CLI tier split does not apply: no packages/cli file is touched.

  • Ablations, each through ablation-replace.mjs (the anchor must hit, the blob change is checked on disk, and the restore is proven by blob == HEAD and an empty git diff HEAD). Vitest aliases @object-ui/* to src, so no dist rebuild sits between a mutation and its reading.

    • Delete the grid path A relay: 2 red (both path A hint rows), 8 green.
    • Delete the path B and C relays (anchor declared twice): 4 red (the B and C hint rows), 6 green. The controls and the auto-generated reference stay green on both legs, as predicted in the file header.
    • Delete 'useGrouping' from ENRICHED_FIELD_METADATA_KEYS: DetailSection red, RecordDetailPanel and RelatedList green.
    • Delete the RecordDetailPanel copy: only RecordDetailPanel red.
    • Delete the RelatedList copy: only RelatedList red.
    • Delete the gallery copy: the gallery pin red.
    • Delete useGrouping from NumberCellRenderer's formatter call: 13 red across the cell, grid, detail and gallery pins, including the grid's auto-generated reference; the 4 controls stay green.
    • Delete the authored-boolean line in shouldGroupDisplayNumber: 6 red.
    • Delete the authored-true spelling branch: only the es-ES and pl-PL "always" rows red.
  • eslint on the 14 changed .ts/.tsx files: 0 errors. The warning count on each of the 8 touched source files equals its count on the base, linted from git show (for example ObjectGrid.tsx has 209 on both). The two new no-explicit-any warnings are the as any fixture casts in two new test files. This is a narrowed run, not pnpm lint. The 14 files are the whole diff's TS population (git diff --name-only), and eslint's --format json output lists all 14, none of them ignored by the config. eslint.config.js sets no parserOptions.project/projectService, so linting is not type-aware and this diff cannot move a verdict on an untouched file.

  • Gates, all exit 0: check-changeset-presence ("14 source file(s) of 6 released package(s) changed, and this change declares 1 changeset(s)"), check-changeset-no-major, check-control-bytes, check:new-line-citations (0 new), check:test-path-roots, check:vi-mock-specifiers / -inherit / -override-shape, check:changeset-claims, check:pending-changeset-literals, check:spec-symbols, check:doc-types, check:doc-fences, check:doc-example-ids. check:changeset-claims listed 10 pending changesets that name a file this diff touches. I read each named paragraph, and none makes a claim this diff falsifies.

  • NOT MEASURED: check:doc-snippets. It exited 2 with PRECONDITION NOT MET: 22 of the 34 packages its program resolves against are unbuilt here, and that scoped build was not run locally. The one snippet this diff edits is a NumberFieldMetadata literal with useGrouping: true. The same annotated-literal shape compiles in the types pin (under tsconfig.test.json). CI runs the full gate.

  • Dist pins: the dispatch lead named plugin-grid's dist pins. The dist project's glob is packages/*/src/**/*.dist.spec.tsx, which matches two files, in components and types, and plugin-grid has none. The types one reads the zod subpath modules, which this diff does not touch (the new member is type-only). Not run locally; CI runs it.

Acceptance notes

  • plugin-dashboard recordFields.tsx buildFieldMeta copies neither scale nor useGrouping. So a number cell in the dashboard's object table and record drawer gets neither the scale-0 heuristic nor the author's hint. This is a read-only reading, not measured at a running door, so it is not filed. It is outside the card's "copies scale" census, so it is not relayed here. Carrier: none.
  • GridField (the master-detail line grid) formats number cells with toLocaleString. It ignores the scale-0 heuristic and the hint alike. This is a read-only reading, not filed. Carrier: none.
  • The spec's FieldSchema.useGrouping docblock describes today's interim heuristic as bound-sensitive ("scale: 0 + no upper bound reads as a plain count and keeps grouping"). The renderer's heuristic is scale === 0 alone, bounds unread. That is doc drift on the objectstack side. Carrier: the parent fields: number rendering honours the authored useGrouping (1 key) objectstack#20313 if it touches that docblock, otherwise none.
  • The designer's field inspector offers no useGrouping control, so authoring it today means writing metadata by hand. This is an observation, not filed.

Generated by Claude Code

…elayed to every cell

formatDisplayNumber / shouldGroupDisplayNumber take the field's authored
useGrouping; an authored boolean overrides the scale-0 heuristic in either
direction, unset keeps the heuristic. NumberFieldMetadata declares the key
(derived from FieldSchema), NumberCellRenderer reads it, and every site that
hand-copies scale into a cell's field relays it beside scale: ObjectGrid's
three column paths, plugin-detail's enrichment key list, RecordDetailPanel,
RelatedList and ObjectGallery.

Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011p7ikEivgXefNDaE5S5Uec
…d each relay site

One pin per scale-copy site (the grid's three column paths, detail
enrichment, the quick-look panel, related tables, gallery cards), the
formatter rows the card's acceptance lists, the NumberFieldMetadata
declaration, the number field docs, and the changeset.

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

Copy link
Copy Markdown
Contributor

changeset-claim-re-read

⚠️ 10 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/4730-retire-dead-locale-key-batch.md

  • names ObjectGrid.tsx → packages/plugin-grid/src/ObjectGrid.tsx — edited by this change

    • Superseded twin vocabularies. cellRender.* and rowAction.* duplicated a grid.* vocabulary that won. RowActionMenu.tsx is fully i18n-wired and reads grid.openMenu / grid.edit / grid.delete; ObjectGrid.tsx reads grid.empty / grid.yes / grid.no / grid.systemFields. The twins had no reader on either side. - Labels that outlived their control. calendar.agenda labelled a view mode b55a34647 retired from CalendarViewMode (now 'month' | 'week' | 'day'). home.quickActions.createApp*, layout.systemNav.createApp, actionDialog.defaultActionTitle / .ok and grid.bulk.selectPlaceholder sit in namespaces whose consumers are live and wired but demonstrably read other siblings. - Surfaces that left the product. map.* is the strongest form: @object-ui/plugin-map declares no @object-ui/i18n dependency and contains no t() call at all, so it cannot consume a locale string. home.stats.* and recordDetail.viewersTooltip name surfaces nothing renders.

.changeset/6597-retire-fieldmeta-referenceto.md

  • names plugin-grid/src/ObjectGrid.tsx → packages/plugin-grid/src/ObjectGrid.tsx — edited by this change

    No authoring story survived the search either. ObjectGrid's own relational-meta pass-through (applyRelationalMeta, plugin-grid/src/ObjectGrid.tsx) copies reference_to / reference / display_field / etc. from the SCHEMA field def only, at all three of its call sites — never from an authored column override. No doc, example, or fixture in this repo shows a table column pinning a lookup's target away from what its schema field already says. Under the maintainer's standing startup-stage rule (2026-08-27: deprecated/alias spellings retire immediately, no transition windows), no measured demand selects withdraw.

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

  • names fields/src/index.tsx → packages/fields/src/index.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/6694-dashboard-lookup-reference-meta.md

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

    ⚠️ The copy set is three keys where ObjectGrid's RELATIONAL_META_KEYS is nine, and the difference is measured per key, not preferred. The grid's cells are EDITABLE, so its extra keys drive the inline picker's query (LookupField / UserField read id_field, description_field, lookup_filters, lookupFilters); these two widgets are read-only and their render path ends at a cell renderer. packages/fields/src/index.tsx reads exactly reference_to, reference and display_field off a cell's field prop; titleFormat is never read off a field meta at all (its readers take it off the object schema, which arrives here through useRefObjectSchema(reference_to)), and reference_to_field has zero member reads anywhere in the repo. Copying the other six would mint six members written on every call and read by nothing — precisely what objectui#6625 (decimals) and objectui#6597 (referenceTo) retired from this same file.

.changeset/6837-reference-to-arm-deletion.md

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

    Three readers were deliberately left alone. LookupCellRenderer (fields/src/index.tsx), LookupField and UserField read FieldMetadata — ObjectUI's OWN contract, whose LookupFieldMetadata declares reference_to and never declares reference. They are fed by the emitters above and by published example schemas (examples/schema-catalog/src/schemas/fields-lookup/*.json), so narrowing them would break in-repo producers, and plugin-grid's relationalMetaCopySet.derivation.test.ts re-derives its read set from exactly those three sources — where reference_to is recorded with verdict adapter-stamped. DetailViewFieldSchema is likewise untouched.

.changeset/7166-retire-inert-fieldmeta-copies.md

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

    applyRelationalMeta writes the copy set onto the fieldMeta that generateColumns hands to ANGLE-BRACKETS(CellRenderer) as the field prop — six JSX passes across the three column-building paths, and nowhere else. For a relational column that resolves to LookupCellRenderer, which reads exactly reference_to, reference, display_field, displayField, reference_field and options; a user column resolves to UserCellRenderer, which destructures { value } and reads no field meta at all. Measured by receiver rather than by count: packages/fields/src/index.tsx, the file holding every cell renderer, contains zero occurrences of the three retired keys, against a control of 22 occurrences of the display_field / displayField / reference_to spellings the cell does read.

.changeset/7762-object-grid-export-options-bare-array-refusal.md

  • names ObjectGrid.tsx → packages/plugin-grid/src/ObjectGrid.tsx — edited by this change

    What was measured, on this branch's base. The mirror declared NO exportOptions member at all, and BaseSchema is .passthrough(), so ObjectGridSchema.safeParse({ type: 'object-grid', objectName: 'accounts', exportOptions: ['csv', 'xlsx'] }) returned success: true with the array back VERBATIM — as did { formats: ['csv', 'pdf'], compression: 'gzip' }. Nothing on the render path parses, and ObjectGrid.tsx reads schema.exportOptions?.formats and only that, so the authored array then lost SILENTLY to the ['csv', 'json'] default: the useEffect that warns about dropped formats reads .formats too and returns early when it is absent, while !!schema.exportOptions kept the export button on screen. An author declared ['csv', 'xlsx'] and got csv/json with no error, no warning and no console line. The two authoring faces disagreed in the direction opposite to objectui#6956's: the TypeScript interface already declared the object form only, so TS refused what zod admitted.

.changeset/9722-bulk-executor-datasource-face.md

  • names ObjectGrid.tsx → packages/plugin-grid/src/ObjectGrid.tsx — edited by this change

    • ObjectGrid.tsx → RecordDetailPanel: removing it type-checks GREEN. It was paying for nothing — both sides already declare the same DataSource | undefined from @object-ui/types. Removed outright. - ObjectGrid.tsx → BulkActionDialog: removing it reddens, and it was paying for TWO things at once — the optional-vs-required arm (the grid declares dataSource?: DataSource, the dialog demands one) AND the bulk-door contravariance. Only the first still needs erasing, so it is now a non-null assertion: today's runtime behaviour is preserved exactly, and any future drift of the face reddens at that site instead of passing silently.

.changeset/9853-grid-non-positive-page-size.md

  • names ObjectGrid.tsx → packages/plugin-grid/src/ObjectGrid.tsx — edited by this change

    Refuse a non-positive pageSize at all three of ObjectGrid.tsx's read points, instead of giving two different answers for one authored value (objectui#9853).

.changeset/plugin-detail-8937-parent-scope-residue.md

  • names RelatedList.tsx → packages/plugin-detail/src/RelatedList.tsx — edited by this change

    • packages/plugin-detail/README.md (it is in files[], so it ships). It said the node's filter is AND-combined with { [relationshipField]: parentId }, full stop. Since objectui#7299 the parent condition is compiled to match the relationship field's arity, so a multi-valued relationship gets { [relationshipField]: { $contains: parentId } } instead. The paragraph now states both spellings and names the arbiter (@objectstack/spec/data's isMultiValueField). - The claim that the SQL driver decides arity on that same predicate. It does not: driver-sql gates the equality family on its own storage question, which reads multiple as truthy on ANY type. The two rules therefore disagree for a type outside MULTI_CAPABLE_TYPES carrying multiple: true. objectui#9184 moved the arity compiler into @object-ui/core's parent-scope seam and carried the claim with it, so the correction is recorded there — the seam now states the driver's measured rule, records the divergence as a divergence, and points at the upstream card that owns which of the two rules is right (objectstack#17469). RelatedList.tsx's pointer comment and the objectui#7299 test header carried the same sentence and are corrected to match.

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.

Angle-bracketed names in the quoted prose above are rewritten as ANGLE-BRACKETS(name): GitHub deletes tag-shaped fragments from a stored body, and a quote that silently loses the identifier it is about is worse than a visible repair.

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

@github-actions

Copy link
Copy Markdown
Contributor

✅ Console Performance Budget

Metric Value Budget
Eager closure (gzip, 330 chunks) 3108.8 KB 3149.4 KB
Main entry chunk (gzip) 149.3 KB 350 KB
Entry file index-Bh_lIR_-.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.88KB 6.25KB
app-shell (runtime-config.js) 20.68KB 7.36KB
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.17KB 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) 40.70KB 10.94KB
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.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) 558.78KB 133.92KB
core (index.js) 9.94KB 3.94KB
create-plugin (index.js) 27.94KB 9.51KB
data-objectstack (index.js) 227.99KB 63.22KB
fields (index.js) 261.11KB 66.33KB
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 (translateFn.js) 0.20KB 0.18KB
i18n (useDisplayLocale.js) 3.52KB 1.76KB
i18n (useObjectLabel.js) 34.35KB 9.18KB
i18n (useSafeTranslation.js) 5.60KB 2.33KB
layout (index.js) 39.32KB 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.58KB 4.90KB
permissions (PermissionContext.js) 0.31KB 0.25KB
permissions (PermissionGuard.js) 0.89KB 0.45KB
permissions (PermissionProvider.js) 6.25KB 2.17KB
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) 52.33KB 15.01KB
plugin-charts (index.js) 84.09KB 22.93KB
plugin-chatbot (index.js) 198.22KB 46.97KB
plugin-dashboard (index.js) 137.68KB 36.71KB
plugin-designer (index.js) 215.78KB 44.42KB
plugin-detail (index.js) 233.64KB 61.85KB
plugin-editor (index.js) 2.23KB 1.05KB
plugin-form (index.js) 169.60KB 43.32KB
plugin-gantt (index.js) 171.88KB 42.61KB
plugin-grid (index.js) 228.51KB 62.64KB
plugin-kanban (index.js) 48.43KB 15.11KB
plugin-list (index.js) 115.92KB 28.65KB
plugin-map (index.js) 22.90KB 7.62KB
plugin-markdown (index.js) 13.88KB 4.80KB
plugin-report (index.js) 44.04KB 12.21KB
plugin-timeline (index.js) 31.07KB 9.15KB
plugin-tree (index.js) 11.21KB 3.89KB
plugin-view (index.js) 90.43KB 22.76KB
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.81KB 3.58KB
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) 119.55KB 39.23KB
react (data-invalidation.js) 5.05KB 2.08KB
react (index.js) 4.50KB 2.06KB
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) 8.61KB 3.45KB
sdui-parser (dashboard-widget-options.js) 3.08KB 1.30KB
sdui-parser (index.js) 6.17KB 2.73KB
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.84KB 1.90KB
sdui-parser (types.js) 0.28KB 0.23KB
sdui-parser (validate.js) 22.61KB 7.40KB
types (ai.js) 4.39KB 2.17KB
types (api-types.js) 0.20KB 0.18KB
types (app.js) 3.83KB 1.49KB
types (base.js) 0.20KB 0.18KB
types (blocks.js) 0.20KB 0.18KB
types (complex.js) 3.19KB 1.62KB
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.26KB
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) 19.30KB 6.99KB
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

Copy link
Copy Markdown
Contributor Author

Contract review

Served-tier: CONTRACT_REVIEW_TIER
Head-sha: 0d24f3624f3407d44bfbc99753ad002726e49e22
Local-runs: none

Inputs: card #11026 (body; triage 5881550084; claim 5887772675; os-dev-report 5889768118), PR #11089 (body, the 16-file list, the net diff +743/−23 against main at a5841be3), and the check-runs on the head read with filter=latest. Context reads at the head through contents/PATH?ref=SHA: plugin-dashboard/src/recordFields.tsx, fields/src/widgets/GridField.tsx, fields/src/widgets/NumberField.tsx, plugin-grid/src/useColumnSummary.ts, plugin-form/src/sectionFields.ts, types/src/field-types.ts. The spec docblock: @objectstack/spec 17.4.0, the version objectui's lockfile pins; the published tarball's .d.ts strips JSDoc, so the docblock is read from packages/spec/src/data/field.zod.ts at that same 17.4.0 in the objectstack checkout, and the published dist JS carries the identical .describe() string. Nothing built, run or re-run.

Check-runs on the head (43 with filter=latest, every one completed at judgment after a foreground wait of about 12 minutes): 40 success, 3 skipped, 0 failure, 0 in progress. Named among the successes: Type Check, Lint, Test (rollup), Test shards 1 to 8, Test (dist pins), Doc Snippet Type Check, Spec Main Shape Gate, Changeset Bump Policy, Changeset Declaration, Changeset Fixed Group Check, Changeset Claim Re-read, Changeset Overwrite Report, Build and E2E, Build Docs, Bundle Analysis, Line Citation Gate, Inert vi.mock Specifier Check, Control Byte Scan, Governed Surface Queue Guard, README Export Check, Internal Docs Link Check, Live E2E (informational). The three skipped are dependabot and the two coverage matrix placeholders.

Binding direction: triage 5881550084 over the card body — an authored boolean wins over the scale-0 heuristic, unset keeps today's heuristic, the Intl note (useGrouping: true is not the same as omitting the key), and the relay census is part of the fix with one pin per copy site.

① Derived judgments

  1. @object-ui/core number-display.ts — DisplayNumberFormatOptions.useGrouping?: boolean and shouldGroupDisplayNumber(scale?, currency?, useGrouping?). Accept-set change: typeof useGrouping === 'boolean' returns it before the money rule and the scale rule; undefined falls through to the unchanged heuristic. The new if is the only edit to the decision, and the CONTROL rows pin (0, undefined, undefined) ⇒ false and (undefined, undefined, undefined) ⇒ true, so the card's "unset ⇒ today's heuristic, unchanged" holds. The decision point stays the one function. RIGHT.

  2. (a) Authored true spelled to Intl as useGrouping: true ("always"). The 17.4.0 docblock says, in its own words, "Maps 1:1 onto Intl.NumberFormat's useGrouping option; the console number renderers are expected to pass it straight through", and reads true as "the author pins grouping ON, overriding the heuristic the other way (a large monetary-like count that should always read with separators…)". So "1:1" is what the docblock says, not a gloss, and "always" is the only spelling under which "should always read with separators" stays true in es-ES / pl-PL. The Intl note is honoured where it applies: the unset path's "group" answer still omits the key — formatDisplayNumber writes true only under useGrouping === true, after shouldGroupDisplayNumber decided — and the es-ES / pl-PL rows assert the premise auto differs from always in the same test, with a CONTROL that the heuristic's own answer equals auto. RIGHT.

    (b) An authored boolean also overrides the money-always-groups rule. The docblock's false clause is "never grouped regardless of what the renderer's heuristic would have guessed"; the money rule is one line of that heuristic (a guess made only when the author declared nothing), so false beating it is what the docblock says, and true on money is a no-op. The .describe() scopes the hint to number fields, and the diff keeps that scope at the cell: CurrencyCellRenderer never passes the key, so the combination is reachable only by direct formatDisplayNumber callers. SUPPORTED, RIGHT.

    (c) Census. Discovery grep over the objectui checkout on disk (0eb9f36a, read only), every candidate then read at the head. Assignment-shaped scale copies into a cell's field under packages/*/src (tests excluded): ObjectGrid.tsx :3333 / :3560 / :3733, RecordDetailPanel.tsx :168, RelatedList.tsx :1559, ObjectGallery.tsx :373; key-list copies: fieldEnrichment.ts:205 'scale'. That is the dev's seven, each relayed in the diff on the line after scale, in the site's own presence-conditional shape, and each with a pin (grid 3 paths × 3 rows plus the auto-generated reference; detail DetailSection / RecordDetailPanel / RelatedList; gallery). Every other scale hit, read at the head, is not a copy into a cell's field: GridField.tsx:576 renders non-currency numbers through n.toLocaleString(locale) (so deriveMasterDetail's col.scale feeds toFixed rounding, outside the policy); NumberField.tsx:16 read-only renders the raw value in a span and plugin-form uses no cell renderer at all (so sectionFields.ts:409 feeds the input's step); useColumnSummary.ts:502 is the footer's columnHints, whose number sums go through toLocaleString; ObjectForm.tsx:984 is step; timeline / charts / mobile / react animation are a different scale; the field inspector is the designer control. plugin-dashboard/src/recordFields.tsx buildFieldMeta at the head: FieldMeta declares no scale member and the builder copies neither key (its own note reads "A future reader reads scale"). "Outside the scale-copy census" is accurate: there is no scale for useGrouping to ride beside, and adding both would be new scope through a governed type (its emit tombstones and refusal bands). Not relayed — RIGHT under the direction; carried to ③ as a follow-up candidate, not a finding.

  3. @object-ui/types NumberFieldMetadata.useGrouping?: SpecField['useGrouping'] — an additive optional member derived by reference (the SpecField import is at field-types.ts:19, as FieldDependsOn already uses it). Beyond the claim's file list, but required by the claim's own instruction (booleans only, read as the spec's type): without it the cell's read goes through the existing as any. Pinned at type level (Equal to the spec's type; @ts-expect-error on a string) and at runtime against the installed spec's door. RIGHT.

  4. @object-ui/fields NumberCellRenderer reads 'useGrouping' in field && typeof field.useGrouping === 'boolean' — booleans only, no cast, a string 'true' is not a declaration (pinned). No export change. RIGHT.

  5. Relays — each is a presence-conditional copy (!== undefined) in the shape its site already uses for scale, so an absent key stays absent and never lands as useGrouping: undefined. RIGHT.

  6. Docs content/docs/fields/number.mdx — the grouping table is the four accept rows; the annotated literal compiles under Doc Snippet Type Check. RIGHT.

  7. No spec change, no objectstack change, no new heuristic: the claim's ⛔ lines hold (16 objectui files, one decision function). RIGHT.

② Semver level

.changeset/11026-number-use-grouping.md: @object-ui/core minor, @object-ui/types minor, @object-ui/fields patch, @object-ui/plugin-grid / plugin-detail / plugin-list patch. Against the diff: core publishes a new optional option and a new optional third parameter on an exported function, re-exported wholesale by packages/core/src/index.ts:110 and by @object-ui/i18n — additive API ⇒ minor, RIGHT. types publishes a new optional interface member ⇒ minor, RIGHT (beyond the claim's surface, declared in the changeset and the PR body). fields changes NumberCellRenderer's behaviour for a key that was inert before, with no export change ⇒ patch, RIGHT under objectui AGENTS.md (minor and patch evolve independently, never major; check-changeset-no-major green). The three plugins relay a key ⇒ patch, RIGHT. @object-ui/i18n has no source change and the fixed group carries it; check-changeset-presence counted 6 released packages changed against 1 changeset, and Changeset Bump Policy, Declaration, Fixed Group Check and Claim Re-read are all success on the head. The changeset prose matches what the diff does (the four rows, the es-ES / pl-PL "always" note, the form and dashboard exclusion). Clause-②: yes — present in the claim and the PR body, and correct: DisplayNumberFormatOptions is a published type and it widens.

③ Boundary flags

open_questions: none declared. Every dev flag in report 5889768118 (nine deviations, four out-of-scope findings), answered:

  1. types file surface beyond the claim — accepted, see ①.3; declared minor. Answered.
  2. Docs page beyond the claim — accepted (objectui AGENTS.md docs-driven rule); Build Docs, Internal Docs Link Check and Doc Snippet Type Check are success. Answered.
  3. Authored true ⇒ Intl true — right per the spec docblock, see ①.2(a). Answered.
  4. Money rule overridden by an authored boolean — supported by the docblock, see ①.2(b). Answered.
  5. Suite loop stopped and resumed — a process note; every family it names has a check-run on the head, and the check-runs are the verdicts. Answered.
  6. eslint narrowed to 14 files — Lint is success on the head. Answered.
  7. check:doc-snippets not measured locally — Doc Snippet Type Check is success on the head. Answered.
  8. The plugin-grid dist-pins lead did not hold — Test (dist pins) is success; the glob matches components and types only; no finding. Answered.
  9. Path labels applied by the labeler, zero label writes — consistent with the PR's six labels. Answered.
  10. plugin-dashboard buildFieldMeta copies neither scale nor useGrouping — verified at the head (①.2(c)); outside this card's direction. ESCALATED to the seat as a follow-up candidate: dashboard object-table and record-drawer number cells follow neither the scale-0 heuristic nor the author's hint, a gap that predates this diff (since objectui#4033), not a regression of it. Not blocking.
  11. GridField formats numbers with toLocaleString — verified at the head (:576); pre-existing and outside the policy. ESCALATED as an observation for the same follow-up; not blocking. Reviewer's own addition of the same class: useColumnSummary's footer sums also go through toLocaleString, so a useGrouping: false column's footer still groups.
  12. Spec docblock drift — the 17.4.0 docblock describes the interim heuristic as bound-sensitive ("scale: 0 + no upper bound reads as a plain count and keeps grouping") while the renderer's heuristic is scale === 0 alone. Confirmed in the docblock text; it is illustrative prose about the absent case ("Neither contract lives here"), so it binds nothing in this diff. ESCALATED to the parent fields: number rendering honours the authored useGrouping (1 key) objectstack#20313 through the seat, as the dev proposed. Not blocking.
  13. No designer control for useGrouping — an observation outside area:records. Answered; the seat may file it under the metadata-admin area.

Implemented-by: claude/issue-11026-number-use-grouping
Reviewed-by: session_011p7ikEivgXefNDaE5S5Uec

VERDICT: PASS


Generated by Claude Code

@objectstack-fleet
objectstack-fleet Bot marked this pull request as ready for review September 29, 2026 12:11
@objectstack-fleet
objectstack-fleet Bot added this pull request to the merge queue Sep 29, 2026
Merged via the queue into main with commit ae582b7 Sep 29, 2026
45 checks passed
@objectstack-fleet
objectstack-fleet Bot deleted the claude/issue-11026-number-use-grouping branch September 29, 2026 12:26
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

2 participants