Repository navigation
refactor(plugin-list,plugin-dashboard,app-shell): one authority each for ViewSwitcherProps, RecordDetailDrawerProps and PageHeaderComponentProps (objectui#6349, batch 8) - #12074
Conversation
…for ViewSwitcherProps, RecordDetailDrawerProps and PageHeaderComponentProps (objectui#6349, batch 8) Each of the three names was declared in two published packages for two different components, so the side with the narrower meaning takes a specific name and the row leaves KNOWN_COLLISIONS (16 to 13 rows). - ViewSwitcherProps: plugin-list's visualization switcher props are now ListViewSwitcherProps, and the plugin-list root publishes that name instead. plugin-view keeps ViewSwitcherProps for the view-switcher renderer. Neither package depends on the other. - RecordDetailDrawerProps: plugin-dashboard's read-only drill drawer props are now DashboardRecordDetailDrawerProps (no entry reached them). plugin-detail keeps the name for its published record drawer. - PageHeaderComponentProps: app-shell's console header props are now ConsolePageHeaderProps (no entry reached them). layout keeps the name for its page:header renderer; re-pointing app-shell at it does not compile. Types and comments only. Also: the ViewSwitcher icon comment says "visualization" instead of ViewType (batch 7 rider), and batch 7's pending plugin-list changeset points at the new props name. Claude-Session: https://claude.ai/code/session_01CGZy1BGCjdN5cXqL9cnvB8 Co-authored-by: Claude <noreply@anthropic.com>
…(objectui#6349, batch 8) The batch 8 commit described @object-ui/layout's PageHeader as "the renderer of the authored page:header node" in three places: the ConsolePageHeaderProps JSDoc, the app-shell changeset and the ledger comment that replaces the PageHeaderComponentProps row. That is not so. @object-ui/components registers the page:header node type; layout's PageHeader is a published React component whose own registration (the kebab page-header key) was retired, and layout's registerLayout() says so. The three texts now describe layout's PageHeader by its props (string title and subtitle with record tokens, action definitions, showBack, schema, every DOM attribute) and say which package renders page:header. Comments and a changeset body only; no type, export or runtime change. Claude-Session: https://claude.ai/code/session_01CGZy1BGCjdN5cXqL9cnvB8 Co-authored-by: Claude <noreply@anthropic.com>
✅ 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: Inputs read: card objectui#6349, its body and all 34 comments (the batch 8 claim ① Derived judgmentsThe ledger
Gate verdicts, from the 43 check-runs on the head: 40 success, 3 skipped ( PR shape: draft against ② Semver level
③ Boundary flags
Deviations, each answered:
Implemented-by: VERDICT: PASS |
Refs #6349 (batch 8)
Clause-②: yes
Batch 8 of the one-authority burn-down, on claim
6090897330(seatdomain:ui#3, sessionhttps://claude.ai/code/session_01CGZy1BGCjdN5cXqL9cnvB8). Three component-props rows ofKNOWN_COLLISIONSconverge, so the ledger goes from 16 rows to 13. None of the three has an@object-ui/typesside. Each row was two components behind one props name, so in each row the side with the narrower meaning takes a specific name. Types, comments and changeset prose only: no runtime behaviour changes, and no emitted JavaScript changes.This PR has no closing keyword. The card stays open for later batches.
This is a resumed run. A dev run on this claim was killed by a container restart after it pushed
cc75cab8dand before it opened a PR or reported. This run reviewed that commit as its own draft against the brief and the claim, kept all of it, and added5dd334645, which corrects one wrong statement the first commit made in three places (see "What the second commit corrects").What each row was (measured on base
20c6d351)The member lists come from one TypeScript program over each package's BUILT root entry (
exports["."].types), with dist rebuilt for the base tree.ViewSwitcherProps: two switchers, so plugin-list's side is renamed.packages/plugin-view/src/ViewSwitcher.tsxschema(aViewSwitcherSchema),className?,onViewChange?,onCreateView?,onViewAction?,createViewLabel?, and a string index signature. Views are typed on@object-ui/types'ViewTypeview-switcherrendererpackages/plugin-list/src/ViewSwitcher.tsxcurrentView,availableViews?,onViewChange,className?,animated?. Views are typed on@object-ui/core'sListViewVisualizationViewSwitcherandViewSwitcherDropdown)@objectstack/spec17.7.0The two share
classNameandonViewChange, andonViewChangediffers in both optionality and parameter type. Neither package depends on the other, so batch 3's rule rules out a re-point in either direction. plugin-list's switcher is the narrower meaning. Its declaration becomesListViewSwitcherProps, and the plugin-list root publishes that name in place ofViewSwitcherProps. This is the shape batch 7's amendment6089430007accepted forGroupAggregationConfig. The members are unchanged, and theViewSwitcherandViewSwitcherDropdowncomponents keep their names.RecordDetailDrawerProps: two drawers, so plugin-dashboard's side is renamed.packages/plugin-detail/src/RecordDetailDrawer.tsxopen,onClose,title,record,objectName,recordId,dataSource?,objectSchema?,width?,columns?,systemFields?,onFieldSave?,onDelete?,resizable?,fullPageHref?packages/plugin-dashboard/src/RecordDetailDrawer.tsxrecord(may benull),objectName?,objectSchema?,fields?,title?,target?(drawerordialog),onClose,objectTypesPending?RecordDetailDrawer.d.tsis not one of themFive member names are shared, and four of those differ in optionality or type. Neither package depends on the other. The dashboard's declaration becomes
DashboardRecordDetailDrawerProps. No entry reached it, so no published name moves.PageHeaderComponentProps: two headers, so app-shell's side is renamed.packages/layout/src/PageHeader.tsxtitle: stringandsubtitle?: string(both resolve record tokens),icon?(a name or a node),action?,showBack?,actions?(action definitions handed torecord:quick_actions),schema?, and everydivattributePageHeadercomponentpackages/app-shell/src/layout/PageHeader.tsxtitle,subtitle?,icon?andactions?as rendered nodes,accentColor?,sticky?,className?,data-testid?ObjectViewandObjectDataPagelayout/index, and theexportsmap has no subpath that reaches itapp-shell depends on layout, so here a re-point is dependency-legal. This run measured it on base: with app-shell's name re-exported from
@object-ui/layout(its own declaration set aside), app-shell'stsc --noEmitexits 2 with 8 errors. Three are TS2339 (accentColor,stickyanddata-testidare not layout members), one is TS2322 inside the header, and four are in the two console callers (a rendered element is not astringtitle, and a rendered element is not anunknown[]of actions). The unmutated control exits 0 with 0 errors. So this is two meanings, not drift. The console's declaration becomesConsolePageHeaderProps, and layout is the one authority for the name. Neither header is thepage:headerrenderer:@object-ui/componentsregisters that node type.Published surface, base vs head
One TypeScript program per tree over the six packages' built root entries. Dist was rebuilt for each tree, and every head marker was read in dist before measuring.
Exported name sets:
ViewSwitcherPropsout,ListViewSwitcherPropsin, with identical members.Unchanged shapes: plugin-view's
ViewSwitcherProps, plugin-detail'sRecordDetailDrawerPropsand layout'sPageHeaderComponentProps. Each member list is identical on base and head.Files each entry loads: the set of the package's own declaration files is identical on base and head in all six packages.
An external consumer, probed as a virtual file that resolves the packages through
node_modules:import type { ViewSwitcherProps } from '@object-ui/plugin-list'fails loudly with TS2724, which names the replacement: "Did you mean 'ListViewSwitcherProps'?".ListViewSwitcherPropscompiles with 0 diagnostics;@object-ui/plugin-dashboard, and the old and new console names from@object-ui/app-shell, read TS2305 on BOTH trees. Neither name was ever importable from those entries;ViewSwitcherPropsfrom plugin-view,RecordDetailDrawerPropsfrom plugin-detail,PageHeaderComponentPropsfrom layout, and theViewSwitcherandViewSwitcherDropdowncomponents from plugin-list. It reads 0 diagnostics on base and on head.Emitted output: base and head dist differ only in declaration files:
ViewSwitcherandindex(with their maps);RecordDetailDrawer(with its map);layout/PageHeaderandlayout/index;PageHeader(JSDoc only).No
.jsor.cssfile differs in any of the six packages, and plugin-view and plugin-detail dist are byte-identical. So no first-load bytes move.Changesets
6349-batch8-plugin-list.mdminorViewSwitcherProps) and its replacement arrives (ListViewSwitcherProps). Breaking-change note with the migration and the TS2724 hint.6349-batch8-plugin-dashboard.mdpatch6349-batch8-app-shell.mdpatch6349-batch8-layout.mdpatchPageHeaderComponentProps: it no longer says app-shell shares the name.plugin-view and plugin-detail are not touched, so they get no changeset. The grades follow the claim's per-package criterion. ⛔ No
major.Batch 7's pending changeset is edited too.
.changeset/6349-batch7-plugin-list.mdis not released yet. It said "ViewSwitcherPropskeeps its members, andViewSwitcherProps['currentView']names the same union". This PR makes that sentence false in the same release, so it now namesListViewSwitcherPropsand says the props were renamed in batch 8. Its declaration (@object-ui/plugin-list: minor) is unchanged.check-changeset-overwritereports the touch as report-only, with the declaration unchanged on both sides.What the second commit corrects
cc75cab8dcalled layout'sPageHeader"the renderer of the authoredpage:headernode" in three places: theConsolePageHeaderPropsJSDoc, the app-shell changeset and the ledger comment that replaces thePageHeaderComponentPropsrow. That is not so.@object-ui/componentsregisterspage:header, and layout's ownregisterLayoutrecords that its header's registration (under the kebabpage-headerkey) was retired.5dd334645describes layout's header by its props instead, and says which package renderspage:header. It changes comments and changeset prose only.Rider
From batch 7's ACCEPT: the plugin-list switcher's icon-map comment said "the same glyph for the same
ViewType". Inside plugin-list that bare name now means@object-ui/types' wider vocabulary, so the comment now says "the same glyph for the same visualization".Gates
Heavy runs went through
os-verify-lock. Everything below is at head5dd334645unless it sayscc75cab8d. The second commit changed only the app-shell header JSDoc, one changeset body and comment lines in the gate file, so the runs atcc75cab8dcover the same plugin-list, plugin-dashboard and layout sources as head.pnpm exec vitest run scripts/__tests__/one-authority-per-exported-name-6273.test.ts: exit 0,Tests 11 passed (11). The ledger has 13 rows.cc75cab8d:pnpm exec vitest run --maxWorkers=2overpackages/plugin-list/,packages/layout/,packages/app-shell/src/layout/, app-shell'sspec-symbol-parity.test.tsand 18 test files elsewhere that read a touched file's text or path: exit 0,Test Files 239 passed (239),Tests 2735 passed (2735);cc75cab8d:packages/plugin-dashboard/: exit 0,Test Files 174 passed (174),Tests 1725 passed, 6 skipped (1731). The 6 skips are the twodescribe.runIf(DRIVEN)time-zone suites in the date-only-zone filter-bar test;packages/app-shell/src/layout/, the parity test,packages/layout/src/__tests__/and the 18 readers again: exit 0,Test Files 114 passed (114),Tests 1351 passed (1351).cc75cab8d:pnpm --filter @object-ui/PKG type-checkfor plugin-list, plugin-view, plugin-dashboard, plugin-detail and layout, chained: exit 0, 0error TSlines;type-checkandpnpm type-check:scripts, chained: exit 0, 0error TSlines;tsconfig.test.jsonlists both touched app-shell tests, layout's lists its touched test, andtsconfig.scripts.jsonlists the gate.check:doc-snippets: 785 of 785 blocks judged, 0 failed, after its own scoped build.check:readme-exports: OK, 582 of 582 self-imports real.check:control-bytes,check:test-path-roots,check:changeset-claims,check:pending-changeset-literals,check:icon-record-names(it reads the plugin-list switcher's icon map),check:spec-symbols,check:handler-key-reads,check:new-line-citations(0 new),check-changeset-no-major,check-changeset-fixed, andcheck-changeset-presence(9 source files of 4 released packages, 4 changesets).pnpm exec eslinton the 10 touched TS files: 0 errors. The 10 warnings sit on unchanged lines in layout'sPageHeader.tsx, the dashboard drawer and the plugin-list barrel, and those three files carry the same counts at base (4, 3 and 3).git merge-treeagainstmain20c6d351is clean.mainhas not moved since the base.Not run locally:
Reverse verification
Every leg went through
ablation-replacein wrap mode, with predictions written before any leg ran. The gate is a source scan, so no dist leg applies. Each leg landed on disk (anchor count 1 to 0, blob changed) and was restored with blob equal to HEAD and an emptygit diff HEAD, which the tool checked and the driver checked again. All legs below were re-run at head5dd334645with the same results.ViewSwitcherPropsrow put backTests 1 failed, 10 passed;no longer collides at:lists bothViewSwitcher.tsxfilesRecordDetailDrawerPropsrow put backRecordDetailDrawer.tsxPageHeaderComponentPropsrow put backPageHeader.tsxListViewSwitcherProps as ViewSwitcherProps(the tempting back-compat shim)ViewSwitcherProps — a NEW colliding name: the plugin-list barrel (aliasing re-export) and plugin-view'sViewSwitcher.tsx(type declaration)RecordDetailDrawerProps — a NEW colliding name: bothRecordDetailDrawer.tsx(interface declaration each)PageHeaderComponentProps — a NEW colliding name: bothPageHeader.tsx(interface declaration each)Tests 11 passed (11)The failing test in every leg is "declares no name twice outside the named, shrinking baseline". The first attempt at S1 to S3 was a no-op: each replacement kept its neighbouring ledger row verbatim, so it contained its own anchor.
ablation-replacesaw the anchor count stay at 1, refused the write and restored the file without running the gate. Those three readings were voided, the anchors were moved onto each row's own comment line, and the legs above are the second attempt.Acceptance notes
ListViewSwitcherPropsis new on the plugin-list root, replacingViewSwitcherProps. It is the rename target that the dispatch's rule implies for a published site ("a rename of a published site publishes the specific name at the same entry"), so this PR does not treat it as an extra export.PageHeaderPropstoPageHeaderComponentProps"(app-shell)":ObjectCalendar.tsx,ObjectForm.tsx,ObjectGrid.tsx,ObjectKanban.tsx, and thespec-symbol-4650.test.tsbeside each. The precedent stays true as history (app-shell made that rename in objectui#3169, and layout carries the name today), but the "(app-shell)" pointer now lands onConsolePageHeaderProps, whose JSDoc records the rename. The four source comments ship in each package's declaration JSDoc. Changing them here would add four packages and four changesets for prose alone, so they are left for the seat to carry as a rider if it wants one.PageHeaderComponentPropsJSDoc still describe layout's header as the rendered layer of thepage:headernode, although objectui#10859 retired its registration. That text predates this PR and this PR does not make it falser. It is noted here only.Generated by Claude Code