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

fix(components): a half-typed between range shows itself as incomplete (objectui#10061) - #10189

Merged
os-elon-musk merged 1 commit into
mainfrom
claude/issue-10061-filter-builder-incomplete-range
Sep 21, 2026
Merged

os-elon-musk merged 1 commit into
mainfrom
claude/issue-10061-filter-builder-incomplete-range

Conversation

@os-elon-musk

Copy link
Copy Markdown
Collaborator

Fixes #10061

Clause-②: no — an accessibility diagnostic on an input this component already
accepts. No new exported prop, no new published key, no widening of any accepted set.

Ruling batch #146 item 5 letter A (objectstack#18012, maintainer 「146 同意」) declares a
between pair with one blank bound incomplete: not emitted, AND shown as incomplete.

What was already true, measured before writing anything

The 「not emitted」 half has held since objectui#5025. Every write path reachable from this
builder folds the row through the builder's own arity-aware isFilterValueComplete, and
each one has its own pin — all five files below are green on this branch, unchanged:

write path what it feeds its pin
foldFilterGroupToSpecRules (app-shell/src/views/viewFilterFold.ts) saved / shared view rules, and metadata-admin's FilterBuilderField, which folds through it viewFilterFold.pairValue.test.ts, viewFilterFold.builderSetOperators.test.tsx
sanitizeViewOverride (app-shell/src/views/ObjectView.tsx) the personalization overlay ObjectView.overlayPairValue.test.ts
convertFilterGroupToAST (plugin-list/src/ListView.tsx) the live grid query convertFilterGroupToAST.test.ts, convertFilterGroupToAST.canonicalSpelling.test.ts
groupToCondition (app-shell/.../inspectors/datasetFilterCondition.ts) a dataset's stored filter datasetFilterCondition.unmappedInert-9372.test.ts

The fourth is the dataset-filter bridge, which drops between wholesale — mapped by
nothing, inert by objectui#9372, and its own card. Firing control for that census: a tree
grep for the predicate also lands on packages/fields' FilterConditionField, which only
mentions it in prose while keeping a second rule of its own (objectui#9914, landed).

So the deliverable here is the other half only, and it was entirely unbuilt: the file
carried zero aria-invalid (control: four aria-label hits in the same file). An author
who typed one bound saw their value sitting on screen while every write path discarded the
whole row, with nothing anywhere saying so.

What this adds

The blank bound of a half-filled pair now carries aria-invalid, an aria-describedby
description naming the missing side (「To is required」), and a destructive border — the
shadcn Input this file renders carries no aria-invalid styling of its own, so the
attribute alone would show a sighted author nothing.

⛔ A diagnostic, never a refusal. The completeness rule is untouched, reshapeFilterValue
and toPairBounds are untouched (the render-side padding is inert draft state and stays),
nothing gates on the marker — the only non-test reader of aria-invalid in this tree is a
CSS has-[] selector in plugin-chatbot — and the group's other rows keep applying.

Only the asymmetric state is marked. Both bounds blank is the untouched row Add filter
draws, and is no more half-written than an equals row with no value yet; both filled is a
complete range; a non-pair operator never renders it.

⚠️ A blank bound is not a zero bound. isValueUnset, never !bound (objectui#4873):
[0, ''] is marked on its upper bound and [0, 10] is complete and marked nowhere. A
truthiness reading would mark the 0 the author had just typed and leave the blank side
clean — exactly backwards, and the way this fix goes wrong.

Why aria-invalid and not a new spelling

Asked, not assumed. This tree has one structural spelling for 「the editor will not take
what is in this control」 — aria-invalid, pinned that way in CelPredicateField,
ConditionWidget, ConditionalFormattingEditor and ConditionBuilder — and no separate
「not finished yet」 idiom exists to use instead. LocationField is the precedent for a
widget computing its own, rather than receiving a host's error slot.

The one caveat found while checking: celAuthoring.ts ties aria-invalid to a severity the
save gates count, so the attribute reads as 「refused」 in that region. It is defensible here
because the gate half does not exist on this surface — nothing reads the attribute — and
because the marked value genuinely fails validation: objectstack#18012's spec half, merged,
now refuses {$between: [1, '']} at parse. Firing only on the asymmetric state is what
keeps it off the 「invalid while the user is still typing」 anti-pattern.

i18n

No locale pack moves. The description reuses the shared validation.required key
({{field}} is required, already in all ten packs) with the bound's own label filled into
the hole, mirrored verbatim in this file's createSafeTranslation defaults table exactly as
this package's form.tsx already mirrors that same row. Declaring a private
filterBuilder.* sentence would have been a new string for ten translators and a second
authority on the wording.

Ablation — two legs, each discriminating

The two halves are pinned in two files on purpose, so a single mutation cannot red both and
prove neither. Both legs: anchor matched exactly once, the write verified on disk in both
directions, restore by git checkout HEAD -- path verified by blob hash.

  • Leg A — delete the marker (missingBound forced to null): the new affordance file
    goes 7 failed, filter-builder-pair-completeness.test.tsx stays green.
    Test Files 1 failed | 1 passed (2).
  • Leg B — delete the completeness rule (the pair arm back to the shape-blind length
    reading): filter-builder-pair-completeness.test.tsx goes 5 failed, the new affordance
    file stays green. Test Files 1 failed | 1 passed (2).

Verification

  • pnpm exec vitest run packages/components/src/__tests__/ — Test Files 169 passed,
    Tests 1656 passed (run from the repo root, with the two viewFilterFold fold tests).
  • The five write-path pins above, run together: Test Files 5 passed, Tests 103 passed.
  • packages/components' own type-check, both legs: tsc --noEmit exit 0 and
    tsc -p tsconfig.test.json exit 0, after building the dependency closure
    (pnpm --filter '@object-ui/components^...' build) — without it tsc cannot resolve the
    workspace .d.ts and reports a prerequisite failure, not a type error.
  • pnpm check:i18n-keys · check:i18n-drift · check:i18n-dead-keys · check:control-bytes
    · check:test-path-roots · check:changeset-claims · check:new-line-citations ·
    node scripts/check-changeset-presence.mjs — all exit 0, each captured to a file and read
    back rather than judged through a pipe.
  • Lint, narrowed to this package and declared: eslint packages/components --format json
    selected 501 files by eslint's own config resolution and reported 0 errors (962
    pre-existing warnings; this repo deliberately sets no --max-warnings). The narrowing is
    safe to state because no type-aware linting is configured — eslint.config.js declares no
    projectService and no parserOptions.project — so this diff cannot move the verdict on
    any file it did not touch. The repo-wide run is CI's.

All readings above are from the tree at d31d17177.

Acceptance notes

  • Noted, not filed — plugin-list's UserFilters is a second range surface with a
    different answer.
    An authored date-range user filter lowers a half-filled pair to a
    one-sided query in emitFilters (only the bound that is filled becomes a >= or
    <=), so nothing is dropped and no between is emitted — a different mechanism, not this
    defect, and arguably correct on its own terms. What is left is an inconsistency between two
    surfaces: half-typing a range means 「open-ended」 in one and 「nothing yet」 in the other.
    Not a reproducible defect, no declared contract broken, no trap that makes an AI author
    refused metadata ⇒ outside the three filing classes. Carrier: none named — no open PR or
    queued card touches that file.

session_01Xr7APep6jm1Zta3KUzPzZf is the seat session behind this branch.


Generated by Claude Code

…e (objectui#10061)

Ruling batch #146 item 5 letter A (objectstack#18012) declares a between pair with
one blank bound incomplete: not emitted, AND shown as incomplete. The first half
has held since objectui#5025 — every write path folds the row through the
builder's arity-aware isFilterValueComplete — but the drop was silent: the author
saw a bound they had typed while the row counted for nothing.

The blank bound now carries aria-invalid, an aria-describedby description naming
the missing side, and a destructive border. A diagnostic, never a refusal: the
completeness rule is untouched, nothing gates on the marker, and the group's other
rows keep applying.

Only the asymmetric state is marked. Both bounds blank is the untouched row
Add filter draws; both filled is a complete range; a non-pair operator never
renders it. isValueUnset, never !bound (objectui#4873): [0, ''] is marked on its
upper bound and [0, 10] is complete.

The description reuses the shared validation.required key rather than declaring a
new one, mirrored verbatim in this file's createSafeTranslation defaults table as
form.tsx already does, so no locale pack has to move.

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

Copy link
Copy Markdown
Contributor

changeset-claim-re-read

⚠️ 2 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/6939-filter-builder-mirror.md

  • names packages/components/src/custom/filter-builder.tsx → packages/components/src/custom/filter-builder.tsx — edited by this change

    1. FilterFieldSchema required name. Every read site matches an entry by value — fields.find((f) => f.value === …) in getOperatorsForField, changeField, getInputType and renderValueInput, fields[0]?.value in addCondition, and ANGLE-BRACKETS(SelectItem value={field.value}) in the field dropdown (packages/components/src/custom/filter-builder.tsx). name had zero read sites, and FilterBuilderProps.fields in that same file already declares ArrayANGLE-BRACKETS({ value, label, type? }). @object-ui/fields' deriveFilterFields, the real producer that builds this list from an object schema, emits value too, and the published doc (content/docs/components/complex/filter-builder.mdx) has declared value: string all along. 2. Its type enum was string | number | date | boolean | select. string is a phantom, and text, datetime and time — three of the six FilterValueFamily members the component folds a column into — were all refused. 3. FilterGroupSchema was { operator, conditions }. The gate is isValidGroup, which tests Array.isArray(v.conditions) and v.logic === "and" || v.logic === "or" and nothing else.

.changeset/8415-filter-builder-condition-id.md

  • names packages/components/src/custom/filter-builder.tsx → packages/components/src/custom/filter-builder.tsx — edited by this change

    Re-derived from packages/components/src/custom/filter-builder.tsx rather than inherited: id has sixteen condition-side read sites — the four MATCH sites that decide which row a mutation lands on (removeCondition's c.id !== conditionId, updateCondition's and changeOperator's c.id === conditionId, changeField's c.id !== conditionId), the React key on the row, and eleven call sites that hand condition.id to one of those four.

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 0d379f571 (merge-base with origin/main): 2 file(s) changed outside .changeset/, read against 1255 pending declaration(s) that publish a body (1821 pending in total). · run

@github-actions

Copy link
Copy Markdown
Contributor

✅ Console Performance Budget

Metric Value Budget
Eager closure (gzip, 329 chunks) 3033.4 KB 3104.5 KB
Main entry chunk (gzip) 147.1 KB 350 KB
Entry file index-Byshq4Dx.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) 25.05KB 9.16KB
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.46KB 3.43KB
auth (index.js) 3.19KB 1.44KB
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) 26.08KB 7.56KB
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.84KB 130.95KB
core (index.js) 8.94KB 3.59KB
create-plugin (index.js) 27.94KB 9.51KB
data-objectstack (index.js) 221.99KB 61.72KB
fields (index.js) 251.84KB 63.48KB
i18n (LocalizationContext.js) 1.76KB 0.96KB
i18n (builtinAggregateLabels.js) 0.86KB 0.49KB
i18n (currency.js) 1.22KB 0.64KB
i18n (fallbackInterpolation.js) 6.25KB 2.77KB
i18n (i18n.js) 8.87KB 3.64KB
i18n (index.js) 5.22KB 2.26KB
i18n (pickLocalized.js) 9.86KB 3.95KB
i18n (provider.js) 32.15KB 10.49KB
i18n (useDisplayLocale.js) 2.85KB 1.45KB
i18n (useObjectLabel.js) 34.34KB 9.17KB
i18n (useSafeTranslation.js) 5.60KB 2.33KB
layout (index.js) 39.02KB 11.00KB
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) 2.53KB 0.85KB
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.39KB 3.10KB
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) 14.81KB 3.63KB
plugin-calendar (index.js) 51.44KB 14.62KB
plugin-charts (index.js) 71.73KB 20.08KB
plugin-chatbot (index.js) 198.20KB 47.14KB
plugin-dashboard (index.js) 132.96KB 35.17KB
plugin-designer (index.js) 215.94KB 44.33KB
plugin-detail (index.js) 255.90KB 66.71KB
plugin-editor (index.js) 2.23KB 1.05KB
plugin-form (index.js) 140.25KB 35.85KB
plugin-gantt (index.js) 167.99KB 41.37KB
plugin-grid (index.js) 213.40KB 58.19KB
plugin-kanban (index.js) 48.71KB 15.17KB
plugin-list (index.js) 113.53KB 27.99KB
plugin-map (index.js) 21.74KB 7.07KB
plugin-markdown (index.js) 13.88KB 4.80KB
plugin-report (index.js) 43.49KB 11.97KB
plugin-timeline (index.js) 30.68KB 8.95KB
plugin-tree (index.js) 10.58KB 3.72KB
plugin-view (index.js) 85.18KB 21.05KB
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) 109.04KB 36.08KB
react (data-invalidation.js) 5.05KB 2.08KB
react (index.js) 4.63KB 2.18KB
react (schema-input.js) 4.25KB 2.04KB
react (spec-input.js) 0.20KB 0.18KB
sdui-parser (body-dialect.js) 4.38KB 1.98KB
sdui-parser (codegen.js) 6.58KB 2.74KB
sdui-parser (dashboard-widget-options.js) 3.08KB 1.30KB
sdui-parser (index.js) 5.74KB 2.54KB
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) 15.71KB 5.30KB
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) 0.20KB 0.18KB
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

@os-elon-musk
os-elon-musk marked this pull request as ready for review September 21, 2026 03:10
@os-elon-musk
os-elon-musk added this pull request to the merge queue Sep 21, 2026
Merged via the queue into main with commit 777fca2 Sep 21, 2026
45 checks passed
@os-elon-musk
os-elon-musk deleted the claude/issue-10061-filter-builder-incomplete-range branch September 21, 2026 03:22
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

2 participants