Repository navigation
refactor(app-shell)!: retire the 54 root-entry exports that nothing outside the package names - #26219
Merged
Merged
Conversation
…he package names (WIP) Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012zuvAzwT4oemWPhAR81wRm
Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012zuvAzwT4oemWPhAR81wRm
This was referenced Oct 26, 2026
…narrowing Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012zuvAzwT4oemWPhAR81wRm
Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012zuvAzwT4oemWPhAR81wRm
Contributor
Author
席位核对 · contract review + ACCEPT · seat
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Requested by Steve · project thread
Part of #25922 (step 1 only: the zero-reference exports and the architecture guide; the package split and the designer-strings migration stay with the card).
Clause-②: yes (narrowing) (removes published exports from
@object-ui/app-shell; the seat records a TIER_DEFAULT contract review before landing)Metadata-protocol: none
What changes
ui/packages/app-shell/src/index.tsstops publishing 54 names that no file in this repository outside the package names. Every defining module stays; only the root entry changes. The entry goes from 261 names to 209 (mainaddedInvitationSignUpPromptandisDefaultProductNamemeanwhile). One comment count in the entry follows (11 TYPE-ONLY re-exportsis now 9).ui/docs/app-shell-extraction-guide.mdis rewritten to describe the package that ships: directory sizes, the groups of names the entry publishes, its load-time registrations, its dependencies and peer dependencies, and its three consumers here (apps/console,examples/console-starter,examples/byo-backend-console). The six compiledtsxusage blocks are kept byte for byte.ui/packages/app-shell/src/chrome/toast-helpers.ts: its usage docblock importedtoastWithUndofrom@object-ui/app-shell, which this change makes false; it now names the module..changeset/25922-app-shell-retire-unreferenced-exports.md:patch, a BREAKING banner, a FROM → TO line for every retired name and the ADR-0087 marker (see Acceptance notes: that gate is red).How "zero references" was measured (main
fbb75998)src/index.tswith itsasaliases resolved: 261 names (the card counted 262 at7981384).git grep -l -w -F NAME -- ui packages apps ':!ui/packages/app-shell/'. Zero files means zero references. This counts every tracked file of every kind: code, tests, docs, changelogs, ADRs.SchemaRendereris named in 1,088 files outside the package.ui/scripts/check-readme-exports.mjsreds when a README imports a missing export:SignUpOffer,RuntimeBranding,studioOrgScopePath. The other 54 are retired.ui/ packages/ apps/the count is 56:AssistantEditorContextis also named indocs/adr/0037-live-canvas-draft-preview.md. It is retired, because the ADR names the module path (app-shell/src/assistant/assistantBus.ts), and that module still exports it.Removed from the root entry (54)
src/providers/ExpressionProvider:useExpressionContext,ExpressionContextValue(type)src/hooks/useUrlOverlay:UseUrlOverlayOptions(type),UrlOverlayControls(type)src/hooks/useSettleSignal:SettleSignalState(type)src/observability/settleSignal:isIdle,ObjectUiGlobal(type)src/hooks/useRecentItems:RecentItemInput(type),RecentTextItem(type)src/hooks/useRecentItemLabel:RecentItemLabelResolver(type)src/utils/index:isOverrideOnlyViewer,actionAdmittedByOverride,bypassedApproverNames,DeclaredHomeApp(type)src/hooks/useAiSurface:AiSurfaceState(type)src/layout/index:PreviewBadgeProps(type)src/chrome/index:RedirectWithSplashProps(type),toastWithUndo,ToastWithUndoOptions(type)src/runtime-config:getCloudBase,getBrandColor,isRuntimeConfigInitialised,RuntimeFeatures(type)src/views/index:RecordFormPageProps(type),DeclaredActionsBarProps(type)src/hooks/index:addNavigationItem,removeNavigationItems,renameNavigationItems,navigationEqual,generateNavIdsrc/context/index:CommandPaletteContextValue(type)src/console/auth/signUpOffer:SignUpOfferContext(type)src/hooks/useChatConversation:HydratedUIMessage(type)src/services/componentRegistry:listAppComponents,urlSegmentsToComponentRef,AppComponentRegistryEntry(type)src/views/metadata-admin/PageShell:MetadataPageShell(alias ofPageShell)src/views/metadata-admin/registry:listMetadataResourcessrc/views/metadata-admin/useMetadata:useMetadataTypes,useTypesIndex,matchesQuerysrc/views/metadata-admin/preview-registry:MetadataPreviewProps(type)src/views/metadata-admin/inspector-registry:MetadataInspectorProps(type)src/views/studio-design/StudioDesignSurface:StudioDesignSurfaceProps(type)src/views/studio-design/studio-canvas-preview:getStudioCanvasPreview,listStudioCanvasPreviewTypes,StudioObjectRecordsCanvas,StudioCanvasPreview(type),StudioCanvasPreviewProps(type)src/assistant/assistantBus:useAssistant,useRegisterAssistantEditor,requestAssistantOpen,AssistantEditorContext(type),AssistantEditorField(type)Tests
Final head
41109b83(merge ofmain46255b19, which includes the gate fix #26319; no conflicts). On it: Console build 71/71 (VERDICT command-exit 0, tree clean); the full dogfood battery, closure 67/67 then 297 files passed / 3 skipped, 2527 tests passed / 18 skipped (VERDICT command-exit 0); CITest UI1–16/16, Type Check UI, Lint UI, Build & E2E UI and Check Changeset all success. None of the 54 names gained an outside reference on the newmain(re-measured).Earlier runs, on head
5bf229f6:pnpm exec turbo run build --filter='@object-ui/app-shell^...' --concurrency=2: 64/64 tasks, lock VERDICT command-exit 0.pnpm --filter @object-ui/app-shell build && pnpm --filter @object-ui/app-shell type-check(bothtsc --noEmitandtsc -p tsconfig.test.json): VERDICT command-exit 0, 0error TS.dist/index.d.tsno longer namestoastWithUndooruseAssistant.indexspecifier and forsrc/index.ts), plusproduct-neutral-renderer.ratchet.test.ts: 14 files, 86 tests passed.spec-symbol-parity.test.tsand the console'screatedRecordPath.test.ts, which readsapp-shell/src/index: 2 files, 57 tests passed. The full app-shell suite is left to CITest UI..tsimports from the builtdist/index.d.tsand asserts that each of the 22 FROM → TO derivations in the changeset is a real type, notanyand notnever:tscexit 0. The control file importstoastWithUndoandSettleSignalStateand fails withTS2305 ... has no exported membertwice, as the changeset says an importer will.pnpm exec turbo run build --filter=@object-ui/console --concurrency=2: 71/71 tasks, VERDICT command-exit 0. The tree was clean afterwards, so the sdui record did not move (app-shell is outside the record).Gates
node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstackon41109b83: 29 commands, all exit 0, includingnode scripts/check-adr-0087-registration.mjs --base origin/main(runtime-export-retiredverified for all 54 operands, after fix(scripts): ADR-0087 registration gate reads ui workspace packages and .tsx modules #26319).--ran: 29 run, 0 NOT MEASURED.node scripts/check-platform-checklist.mjs --changed-from origin/main: exit 0 (0 anchored files in the change set).ui/scripts/check-doc-links.mjs: exit 0. The links in the rewritten guide resolve.ui/scripts/check-readme-exports.mjs: exit 1, but only on 72 self-imports of packages outside app-shell's build closure that this container did not build (cli,plugin-ai,plugin-gantt,plugin-map, …). No app-shell README line is among them. CI runs it on a full build.ui/scripts/check-doc-snippet-types.mjs: NOT MEASURED locally, because it needs nearly every ui package built. The guide's sixtsxfences are byte-identical to main (cmpover the extracted fences), and the names they import (AppShell,MinimalAppShellProps) stay exported. CI runs it.!in the title): measured on the final head41109b83, VERDICT command-exit 0 (see Tests).Acceptance notes
.tsxdeclarations). History: before that fix it was red, and it was the gate's gap, not this diff's. The disposition that fits isnot-required (runtime-export-retired @object-ui/app-shell#NAME, ...). The gate refuses all 54 operands at predicate 1 with "no workspace manifest at fbb7599 is named@object-ui/app-shell":PACKAGE_ROOTSinscripts/check-adr-0087-registration.mjsis['packages', 'apps', 'examples'], whilepnpm-workspace.yamlalso listsui/packages/*,ui/apps/*andui/examples/*. A local probe that added the threeui/roots (restored afterwards,git diff HEADempty) took predicate 1 to green for all 54, and left 16 refused at predicate 2 ("the declaration of NAME cannot be located at the merge base"): aliases (MetadataPageShell), shim re-exports (RecentItemInput,RecentTextItem) and.tsxdeclarations (PreviewBadgeProps,RecordFormPageProps,StudioDesignSurfaceProps, …). No other disposition fits honestly:no-migration-prescriptionwould hold only on a detector miss, because the body prescribes 54 rewrites. Fixing the gate is outside this card's file surface; the seat decides how to route it.toastWithUndoandToastWithUndoOptionshave no caller inside the package either, sochrome/toast-helpers.tsis now dead code. It is left in place, because the card retires exports, not modules.MetadataPreviewPropsforregisterMetadataPreviewandStudioCanvasPreviewPropsforregisterStudioCanvasPreview. They are retired because the card's rule is "no caller, retire". The changeset gives each a compiled derivation from the name that stays.docs/ARCHITECTURE.mdin the card does not exist on main underui/. The file the card quotes ("Minimal application rendering engine", five exports, "~50KB") isui/docs/app-shell-extraction-guide.md, which calls itself the architecture guide. That file is the one rewritten here, and it keeps its name becauseui/scripts/markdown-test-inputs.mjsandcheck-doc-snippet-types.test.tslist it.Generated by Claude Code
Generated by Claude Code