…one resolver (objectui#8308)
`ObjectKanban` resolved the same authoring choice — which record field titles a
card, spelled `cardTitle` with `titleField` as its legacy alias — in two places
with two different operators: `schema.cardTitle || schema.titleField` in the
card list's `effectiveData` memo, and `schema.cardTitle ?? schema.titleField` in
the record-detail drawer's heading. The two differ on exactly the
falsy-but-present values, and on a string key that value is `''`, so a board
authored `{ cardTitle: '', titleField: 'name' }` titled its CARDS from `name`
while its DRAWER heading fell through to the `Record #<id>` floor.
Both sites now call the new exported `resolveKanbanTitleField`, so the pair is
read once and cannot answer one authored document two ways. Making the two
operators agree would have repaired today's two sites and left the property that
produced them — the pair is readable ad hoc, anywhere — fully intact, so a third
read site would invent a third precedence.
`''` is UNSET on either key: `cardTitle` names a record field and `''` can name
none, so it falls through exactly as an absent key does and `cardTitle` wins when
NON-EMPTY. That extends the precedence `index.tsx` already publishes in prose
("`cardTitle` wins when both are authored") to the one case that prose never
covered — nothing in the tree had said what `''` meant here, which is what let
the two operators drift. The resolver's docblock now says it.
Tests: the subject (both surfaces resolve `name` from `{ cardTitle: '',
titleField: 'name' }`), two controls that are green on both sides of the fix
(a non-empty `cardTitle` wins; an absent one falls through), and a source census
over this package's shipped source that reddens on a property read of either
spelling outside the resolver — the half a "make both operators `||`" fix would
not have produced.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01611D6ZaRaMmwTNQmSbk8MH
Fixes #8308
ObjectKanbanresolved the same authoring choice — which record field titles a card, spelledcardTitlewithtitleFieldas its legacy alias — in two places with two different operators:schema.cardTitle || schema.titleFieldin the card list'seffectiveDatamemo, andschema.cardTitle ?? schema.titleFieldin the record-detail drawer's heading. Those differ on exactly the falsy-but-present values, and on a string key that value is'', so a board authored{ cardTitle: '', titleField: 'name' }titled its cards fromnamewhile its drawer heading fell through to the object-label floor. One authored document, two answers.What changed
The pair is now read once, through the new exported
resolveKanbanTitleField, and both sites call it — the shaperesolveKanbanCardFieldsalready givescardFieldsin the same file.⛔ Deliberately not fixed by making the drawer say
||. That repairs today's two sites and leaves the property that produced them — the pair is readable ad hoc, anywhere — fully intact, so a third read site invents a third precedence. The census below is the half that reddens on that third site, and a two-operator fix would not have produced it.The ruling this carries, and where it is now written down
''means UNSET on either key;cardTitlewins when NON-EMPTY.cardTitlenames a record field, and''can name none, so an empty string has no meaningful reading here — it can only be the residue of an empty input. It therefore falls through exactly as an absent key does.That extends the precedence
index.tsxalready publishes in prose ("cardTitlewins when both are authored") to the single case that prose never covered. Nothing in the tree said what''meant here, which is the condition that let the two operators drift apart;resolveKanbanTitleField's docblock now says it.Falsification checked, none found. The ruling was to be voided by any site in the tree that parses
''as a meaningful field name. Swept: everycardTitle/titleFieldread inpackages/andapps/. The collectors filtertypeof f === 'string' && f; the two view adapters floor an emptytitleFieldwith|| 'name'. The nearest thing to a counterexample isObjectGallery.tsx'stitleField != null && item[titleField] != null— a different component and a different key, anditem['']isundefined, so it does not resolve''to a field either.Discriminating power — measured, both legs restored
Both legs mutate
ObjectKanban.tsxon disk, prove the mutation landed (grep -con the injected and deleted text plus a blob-hash comparison againstHEAD), run, then restore withgit checkout HEAD -- PATHand prove the restore by blob hash and an emptygit diff HEAD. No build is involved: the spec imports the component relatively (../ObjectKanban) and the census reads the file off disk, so nothing here resolves throughdist/.Leg 1 — put both operators back (
resolveKanbanTitleField(schema)call count in the component: 2 → 0).Tests 3 failed | 8 passed (11):{ cardTitle: '', titleField: 'name' }titles BOTH surfaces fromnameContacts Detail{ cardTitle: 'subject', titleField: 'name' }→subjecton both{ titleField: 'name' }→nameon bothundefinedcall sites, expected 2The two controls are green on both sides of the fix, which is what makes them controls.
Leg 2 — add a third ad-hoc read (
const ablationThirdReadSite = schema.cardTitle ?? schema.titleField;).Tests 1 failed | 10 passed (11)— only the census reddened, naming the new read. That is the structural pin doing the job the fence asked for.Verification
Run from the repo root (
pnpm exec vitest run PATH, never the package-filtered form the objectui#3378 guard silently redirects), serialised on the container's shared heavy-verify lock; each verdict below is the runner's ownVERDICT command-exitline.pnpm exec turbo run build --filter=...@object-ui/plugin-kanban --concurrency=2— 40/40 tasks, exit 0.pnpm --filter @object-ui/plugin-kanban run type-check— echoedtsc --noEmit && tsc -p tsconfig.test.json, exit 0.pnpm exec vitest run packages/plugin-kanban/— 43 files, 271 tests, all passing, re-run at final241b39f1f.object-kanban-record-source-7780,object-kanban-group-by-limit-7322,kanban-calendar-filter-sort-8174,base-bind-declared,kanban-arm-batch70-7742,kanban-plugin-dialect-authoritative-7664: 6 files, 95 tests, exit 0.check:control-bytes,check:handler-key-reads,check:element-data-source-declaration,check:sdui-registration-pins,check:entry-guard,check:unreferenced-sources,check:vi-mock-specifiers,check:comment-mask-corpus,check:changeset-presence— all exit 0.pnpm --filter @object-ui/plugin-kanban run lintexit 0 (181 pre-existing warnings, 0 errors).check:readme-exportsexits 1 as NOT MEASURED, not as a finding: its eight remaining rows are@object-ui/cliand@object-ui/plugin-ai, two packages outside this diff and outside the dependency closure built here, each printing "runpnpm buildfirst".@object-ui/plugin-kanbanIS among the 35 judged packages and is clean.pnpm lint, the full suite, the doc-type gates that need a whole-tree build) are declared to CI.Position and content axes
scripts/check-doc-example-types.mjs'sUNGATED_EXAMPLESholds noplugin-kanbanentry; no.mjsor.jsonin the tree stores aObjectKanban.tsx:NNNaddress. The line citations that exist are prose in comments, were already stale before this change (they name:350/:1024for reads that were at:552/:1303), andcensus:cross-file-line-citationsis report-only by objectui#8875's own ruling — noted, not churned here.packages/plugin-kanban/src/ObjectKanban.tsxoff disk; all six are run above.packages/sdui-parser/'s census is scoped toplugin-dashboardand does not see this file.验收备注
scripts/js-comment-mask.mjs) rather than a hand-rolled stripper, followingObjectView.relayRungCensus-7559.test.ts's precedent — this file's own prose quotes(schema as any).titleFieldverbatim, which a naive regex would either count as a read or blank the code around.resolveKanbanTitleFieldreachesdist/ObjectKanban.d.tsbut notdist/index.d.ts, and the package'sexportsmap routes only.and./style.css— so it is not consumer-reachable, exactly likeresolveKanbanCardFields. No README row is owed.ObjectKanbanComponentProps's docblock still cites:350/:1024for thetitleFieldread — the substantive claim (both union arms are load-bearing) is still true, only the addresses are stale, and they were stale before this change.Clause-②: yes
Generated by Claude Code