Repository navigation
refactor(types,collaboration,data-objectstack,plugin-designer,providers): one authority each for ConnectionState, VersionEntry and ThemeProviderProps (objectui#6349, batch 10) - #12083
Conversation
…try and ThemeProviderProps (objectui#6349, batch 10) Two of batch 10's three ledger rows, each two meanings behind one name: - VersionEntry: collaboration's is a version useConflictResolution records (id plus a per-field changes diff); the designer's is a row the VersionHistory timeline displays (description, isCurrent). The designer's entry never exported the name, so its declaration now spells VersionHistoryEntry. - ThemeProviderProps: react's is its theme-system ThemeProvider (Theme documents, a theme-name defaultTheme, defaultMode); providers' is a mode-only provider whose defaultTheme is the mode. providers' declaration now spells ThemePreferenceProviderProps and its root publishes that name instead; react keeps the general name. Both rows leave KNOWN_COLLISIONS. ConnectionState stays: the two sites are one identical union, and neither package depends on the other. Claude-Session: https://claude.ai/code/session_01CGZy1BGCjdN5cXqL9cnvB8 Co-authored-by: Claude <noreply@anthropic.com>
…ally gets (objectui#6349, batch 10) Measured against the rebuilt providers entry: the old import fails with TS2724, whose suggestion names the ThemeProvider component rather than the replacement, and following that suggestion fails with TS2749. The changeset said TS2305. 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
|
…nectionState (objectui#6349, batch 10) Round 2, on the seat's amendment to the batch 10 claim (option A). collaboration's and data-objectstack's ConnectionState were the same five-state union, type-equal on both built entries, and neither package depends on the other. Both depend on @object-ui/types, so the one declaration moves down into types' data.ts beside DataSource, the types root publishes it, and both former sites re-export it. Both package roots keep the name and the shape. The row leaves KNOWN_COLLISIONS. 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: Isolated, read-only review of PR objectui#12083 (card objectui#6349, batch 10): base ① Derived judgmentsCheck-runs on Each accept-set and public-surface change the diff implies, judged:
② Semver level
③ Boundary flags
Implemented-by: VERDICT: PASS |
Refs #6349 (batch 10)
Clause-②: yes
Batch 10 of the one-authority burn-down, on the claim
6093179763. It covers threeKNOWN_COLLISIONSrows from the collaboration and providers packages, none with an@object-ui/typesside. Two rows converge here. The third,ConnectionState, stopped with measured options in round 1 and converges in round 2 (above), because the rules this card has applied do not settle it (see "The stop" below).(Round 1.) Implemented in session
https://claude.ai/code/session_01CGZy1BGCjdN5cXqL9cnvB8(the seat's session; this was a subagent dispatch).Round 2 (head
65da7a995): all three rows convergeBrought up to round 2 by the seat (
domain:uiseat 3). The round-1 text below is kept and marked where round 2 supersedes it.ConnectionState: ruled A by the seat's claim amendment6093405166on objectui#6349, under batch 3's rule and batch 4'sUndoableOperationprecedent, with the maintainer's veto window open.@object-ui/types(data.ts, besideDataSource) and is published from the types barrel.useRealtimeSubscription.tsand data-objectstack'sindex.tsare plain re-exports of it.KNOWN_COLLISIONS: 10 → 7 rows.ConnectionStatejoins). collaboration 39 = 39 and data-objectstack 104 = 104, with each copy type-equal to the types declaration. plugin-designer, providers and react are unchanged by round 2..jsfile differs.@object-ui/typesminor(a new name), and@object-ui/collaborationand@object-ui/data-objectstackpatch. ⛔ Nomajor.65da7a995:type-check:scriptsexit 0;check:doc-snippets: 785 of 785 blocks judged, 0 failed.check:readme-exportsis OK;What converged:
KNOWN_COLLISIONSgoes from 10 to 8 rows (round 1; 7 after round 2)VersionEntry: two meanings. The designer's side becomesVersionHistoryEntryversion,timestamp,userIdanduserName;userNameis optional in collaboration and required in the designer. Only collaboration's hasid,changes(a per-field before/after diff thatrevertToVersionandcompareVersionsreplay) andmessage. Only the designer's hasdescriptionandisCurrent. Collaboration's is a version itsuseConflictResolutionhook records. The designer's is a row itsVersionHistorytimeline displays.i18nandtypes, and plugin-designer's dependency list has no collaboration.VersionEntry. The plugin-designer root does not. Its entry exports theVersionHistorycomponent, but neitherVersionEntrynorVersionHistoryProps, and thecomponents/index.tsbarrel that re-exported it has no importer. So the rename removes no published name: the plugin-designer root has 38 names before and 38 after. Batch 6'sDesignerConfirmDialogStaterow had the same shape.@objectstack/spec17.7.0 (control:RealtimeConfigandThemeModehit there).ThemeProviderProps: two providers. providers' side becomesThemePreferenceProviderPropsdefaultTheme?: ThemePreference,storageKey?andchildren. react's hasthemes?,defaultTheme?: string,defaultMode?: ThemeMode,persist?,storageKey?,target?andchildren. The shared keydefaultThememeans two things: a MODE on providers' side ('dark') and a theme NAME on react's ('my-theme'). Neither provider wraps the other. providers' provider stores one mode and toggles thelight/darkclass. react's registersThemedocuments and writes CSS variables.types; react depends oncore,data-objectstack,i18n,typesand the spec.ThemePreferenceProviderPropsinstead, with identical members (23 names before and 23 after). The react root is unchanged (300 = 300). react's theme system is the general one:@object-ui/types' theme module names react'sThemeProvideras the one that applies aTheme. So react keeps the general name.@objectstack/spec17.7.0. This is therefore the zero-reader rename of a published name that the card's rules already settle (batch 7'sGroupAggregationConfig, batch 8'sListViewSwitcherProps), and it is not a stop.ThemeProvidercomponent, not the replacement. Following the suggestion fails too (TS2749, a value used as a type). Nothing compiles silently wrong, and the changeset says this.ThemeProvidercomponents (anduseTheme) keep their names. They are outside the gate's type-level bound, in the same way batch 9 kept the twoAppShellcomponents.The stop:
ConnectionState(round 1; ruled A in6093405166and implemented in round 2)ConnectionStateare type-equal: a mutual-equality probe exits 0, the same assertion flipped exits 2 (TS2322), and a control that drops one member is not equal.i18nandtypes; data-objectstack hascore,types,clientand the spec. Both already depend on@object-ui/types.AppContent,AppHeader,ConnectionStatusandConsoleLayout, and the console'sdataSource.tsre-export. collaboration's has 0 named readers, but it is the published state type ofuseRealtimeSubscription, which app-shell'sObjectViewmounts. 0 hits in@objectstack/spec17.7.0.@object-ui/types, which both packages already depend on. collaboration and data-objectstack each re-export it.typessource file (besideDataSourceindata.tsis natural) and thetypesbarreltypesminor (one new name); collaboration and data-objectstack patch (shape and name sets unchanged)RealtimeConnectionState, published at its root in place of the old name (0 readers)Why A, along the four axes:
UndoableOperation, objectui#8261'sTranslateFnand objectui#7664's Kanban trio.typesand removes a duplicate. No capability is added.Changeset grades
@object-ui/providersminor with a breaking note: a name leaves the root, and the note names the migration and the measured TS2724 / TS2749.@object-ui/plugin-designerminor with a nothing-breaks note: only the type name in the published declaration ofVersionHistory'sversionsprop changes. This is the same grading batch 6 gaveuseConfirmDialog'sDesignerConfirmDialogState.@object-ui/typesminor(ConnectionStatejoins), and@object-ui/collaborationand@object-ui/data-objectstackpatch(each site becomes a re-export).Verification (head
48285b125, base1b2d0160)ThemeProviderPropsleaves,ThemePreferenceProviderPropsjoins) and react 300 = 300..d.ts/.d.ts.mapfiles differ, so no first-load byte moves.one-authority-per-exported-name-6273) passes 11 of 11.VersionHistorylocale test and the gate ran at the final head: 5 files and 26 tests passed. The plugin-designer package suite ran atef2e5845b, whose code is identical to the head (the later commit changes one changeset only): 46 files and 449 tests passed.type-check:scriptsall exit 0. app-shell's first attempt exited 2 with TS2307 on unbuilt dependencies. That was an unmet prerequisite, not a measurement, and it exited 0 once its dependency closure was built.check:control-bytesOK,check:test-path-rootsOK,check:changeset-claimsOK,check:pending-changeset-literalsOK,check:readme-exportsOK (582 of 582 self-imports judged, after building the 7 packages its first run reported unbuilt),check:doc-snippets(785 of 785 blocks judged, 0 failed),check:new-line-citations(0 new), changeset presence OK and no-major OK. eslint on the touched files reports 0 errors and 3 warnings, all on lines this diff does not touch.ablation-replace, with predictions written first. Control: 11 passed. All four legs went red as predicted, each with 1 failed and 10 passed in "declares no name twice outside the named, shrinking baseline":VersionEntryrow restored): stale, both files listed;VersionEntryagain): fresh, "a NEW colliding name";ThemeProviderPropsrow restored): stale, both files;ThemeProviderPropsagain): fresh.Acceptance notes (observations, not filed)
ThemeProvider: providers', react's and app-shell's chrome one, which the app-shell root exports. This is outside the gate's type-level bound, like theAppShellpair.CollaborationProviderspells a fourth, unnamed connection-state union inline: four members, noreconnecting. It is not a collision under the gate. If option A lands, it has a name to point at.components/index.tsbarrel has no importer, like thehooks/index.tsbarrel batch 6 noted.Generated by Claude Code