Repository navigation
feat(plugin-kanban)!: retire the unwired useColumnWidths hook and its storage key (objectui#8522) - #10549
Conversation
…e package entry (objectui#8522) Executes ruling 5810224713 (remove): the hook kept per-column widths under the localStorage key objectui:kanban-column-widths and no board read them; lane width comes from KanbanImpl's columnInlineStyle. - delete useColumnWidths.ts and its three entry exports (useColumnWidths, UseColumnWidthsOptions, UseColumnWidthsReturn); - the ComplexSchema retirement docblock, the ObjectKanbanSchema lane-member docblock and the 7664 dialect test comment stop naming the hook; - pin: the entry no longer exports the hook (runtime) or its two types (compile time), with live sibling exports as firing controls; - changeset: minor, BREAKING body in migration terms. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014mXUNuFomfj24w7s1pZzhN
|
changeset-claim-re-read
|
✅ 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
|
…idths retirement (objectui#8522) The pending batch #70 changeset named a useColumnWidths hook option as the widths channel and said the hook still consumes ColumnWidthConfig; both go false with this branch. Its sentences are scoped to "at this change" and a dated note records the retirement. Frontmatter is byte-identical (md5 of the block unchanged). The 8522 changeset now names objectui#7742. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014mXUNuFomfj24w7s1pZzhN
✅ 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
|
Contract reviewServed-tier: ① Derived judgments
② Semver level
③ Boundary flags
Implemented-by: VERDICT: PASS Generated by Claude Code |
Fixes #8522
Clause-②: yes — a published export (
useColumnWidthsand its two types) is removed.Executes ruling
5810224713(remove: reading 2 of the card, superseded and left behind). Dispatched by thedomain:uiseat 2 PM; implemented by itsos-devin sessionhttps://claude.ai/code/session_014mXUNuFomfj24w7s1pZzhN.What changed
packages/plugin-kanban/src/useColumnWidths.tsdeleted: the hook,UseColumnWidthsOptions,UseColumnWidthsReturn, and its storage keyobjectui:kanban-column-widths.packages/plugin-kanban/src/index.tsx: the three entry exports removed (theuseColumnWidthsvalue export and the two-typeexport typeline).@object-ui/typesdocblocks, comment-only hunks:complex.ts, the bare-kanbanretirement docblock: the "NOT retired" sentence no longer names the hook as a consumer.KanbanCard/KanbanColumn/CardTemplatekeep the renderer andCardTemplatesas consumers, andColumnWidthConfigis recorded as having lost its oneplugin-kanbanreader to this card, which did not rule on the type.objectql.ts, theObjectKanbanSchemalane "member set is the READ set" paragraph: the hook is dropped from the list of read sites. The hook destructuredcolumnsas_columnsand read no lane member, so the counted member set does not move.kanban-plugin-dialect-authoritative-7664.test.ts: the pin-1 comment stops naming the hook. No assertion changed.packages/plugin-kanban/src/__tests__/useColumnWidthsRetired-8522.test.ts, following theplugin-formentrySurface-6059barrel-pin pattern (import * as entry+Object.keys(entry)) and thespec-symbol-4650compile-timeimport('..').X+@ts-expect-errorpattern..changeset/8522-retire-use-column-widths.md:'@object-ui/plugin-kanban': minor, with a BREAKING body in migration terms. There is no@object-ui/typesentry:check-changeset-presenceasks for presence only, and the types hunks are comment-only. Its last migration bullet names objectui#7742..changeset/7742-kanban-arm-batch70.md, a pending changeset that this change falsifies, is reconciled here in prose only:useColumnWidthswidths channel, and saying the prop and the hook consume the types, are scoped to "at this change".ColumnWidthConfighas noplugin-kanbanreader, and thatCardTemplateis still consumed by theCardTemplatescomponent'stemplatesprop.b62313df8fb2af929fbe2c21c5ae3873before and after.No tests were deleted. No test existed only to test the hook: the tracked tree had zero test importers of it.
Premise, measured on
origin/maind461b0de8git grepoverpackages apps examples content skillsfounduseColumnWidths7 hits in 5 files,UseColumnWidths4 hits in 2 files, andkanban-column-widths1 hit in 1 file. Every hit was the hook's own file, the entry, the two docblocks, or the 7664 comment. On the same instrument, the controluseCrossSwimlaneMovefired with 5 hits in 3 files. Zero readers holds.@object-ui/plugin-kanban@17.6.0from the npm registry exports the hook in itsdist/index.jsexport list asUe as useColumnWidths, anddist/index.d.tsre-exports it and both types. The storage-key literal is present indist/index.jsanddist/index.umd.cjs. That is why the changeset is written as a migration..changeset/7742-kanban-arm-batch70.md. It names "auseColumnWidthshook option for widths" and says "the prop and the hook still consume the types". Both go false when this merges, and both would publish into the same release, so this PR reconciles it (see above)..changeset/*.mdforuseColumnWidths,UseColumnWidthsandkanban-column-widthshits only 7742 and this PR's own changeset.CardTemplatehits 3 files on the same instrument.7664-*changesets that nameColumnWidthConfigclaim only that it is declared and re-exported, which remains true.Verification
The code legs below ran on
e62e390f4. The only later commit,8be30d7fc, edits changeset prose only; the changeset gates were re-run on it.pnpm --workspace-concurrency=2 --filter '@object-ui/plugin-kanban...' buildprintedVERDICT command-exit 0. The rebuiltplugin-kanban/disthasuseColumnWidths0 andkanban-column-widths0 inindex.js,index.d.tsandindex.umd.cjs, and nouseColumnWidths.d.ts. The controluseCrossSwimlaneMoveis 2 / 2 / 1.pnpm --filter @object-ui/plugin-kanban type-check(tsc --noEmit && tsc -p tsconfig.test.json) exits 0.tsc -p tsconfig.test.json --listFilesOnlylists the new pin, so the compile-time half is compiled.pnpm --filter @object-ui/types type-check(includingtsconfig.examples.jsonandtsconfig.test.json) exits 0.pnpm exec vitest run --maxWorkers=2 packages/plugin-kanban/reportsTest Files 61 passed (61)andTests 412 passed (412). That is 61 tracked test files: 60 on base plus the new pin.pnpm exec vitest run --maxWorkers=2 packages/types/reportsTest Files 233 passed (233)andTests 5184 passed (5184).index.tsxanduseColumnWidths.tswere written back onto disk. The landing was checked on disk: the entry haduseColumnWidthstwice and the hook file was present with its key. Under atraprestore:Tests 1 failed | 1 passed (2), withAssertionError: expected [ 'KANBAN_UNCOLUMNED_ID', …(10) ] to not include 'useColumnWidths'. The failure is the runtime pin; the type-only test is erased at runtime.tsc -p tsconfig.test.jsonexits 2 witherror TS2578: Unused '@ts-expect-error' directive.twice, once on each retired type query.index.tsxblob matches HEAD7e09f2d92, the hook file is absent, andgit diff HEADandgit status --porcelainare both empty.8be30d7fc:node scripts/check-changeset-presence.mjsprinted✅ 6 source file(s) of 2 released package(s) changed, and this change declares 1 changeset(s).node scripts/check-changeset-overwrite.mjsexited 0 (report-only). It printed1 changeset(s) added, 1 modified, 0 deleted. For 7742 it printeddeclared at base: @object-ui/types: minor, @object-ui/plugin-kanban: minoranddeclares now: @object-ui/types: minor, @object-ui/plugin-kanban: minor.node scripts/check-changeset-claims.mjsexited 0 (report-only), readingCorpus: 2 changeset(s) this change adds or modifieswith no self-contradiction. It listed 27 pending changesets that namecomplex.tsorobjectql.ts; none of them names the hook.node scripts/check-pending-changeset-literals.mjsprinted✅ No test source names a pending changeset.node scripts/check-changeset-no-major.mjsprinted✅ No changeset declares a major bump.node scripts/check-new-cross-file-line-citations.mjsprintedVERDICT new-cross-file-line-citations: 0 new citation(s).node scripts/check-control-bytes.mjspassed.e62e390f4. These exited 0:check:unreferenced-sources,check:self-import,check:side-effects-array,check:handler-key-reads,check:entry-guard,check:phantom-deps,check:unused-deps,check:test-path-roots,check:vi-mock-specifiers,check:spec-symbolsandcheck:esm-specifiers.check:readme-exportspassed after the build. No README names any of the three removed exports.--no-inline-config --format json): 0 errors. The 66 warnings are pre-existingno-explicit-any/react-refreshwarnings in untouched lines, and there are none in the new pin.check:sdui-registration-pins: it needs anapps/consolebuild and exits 2 without one. No registration changed here.check:published-dist: its turbo build of the whole workspace,apps/consoleincluded, was killed by my 300s timeout (exit 124). It was run outside the verify lock by mistake. That is declared to CI.Overlap
The one
types/src/objectql.tshunk here is the one-line docblock edit in theObjectKanbanSchemalane paragraph. objectui#10533 and #10522, which also edited that file while this PR was being written, have since merged, and this hunk still applies onmain. At landing, the open PRs that editobjectql.tsare objectui#10550, #10546 and #8941, and all three are hunk-disjoint from this edit.Acceptance notes
ColumnWidthConfig(in@object-ui/types, re-exported byplugin-kanban, and mirrored byColumnWidthConfigSchema) has no reader inplugin-kanban. The ruling named the hook, its exports and its key, not the type, so the type stays. Recorded here only: there is no reproducible defect, and nobody is known to own it next.KanbanColumn/KanbanCardare consumed byCardTemplates. TheCardTemplatescomponent consumesCardTemplate, not those two. That wording predates this change and is kept, because the dispatch limits this file to removing the hook's name.Generated by Claude Code