Repository navigation
[maintainer] refactor(app-shell): move the Interfaces nav rail out of StudioDesignSurface.tsx (slice 3) - #30014
Merged
Conversation
… StudioDesignSurface.tsx (slice 3) Move-only (ruling #24586 A): the Interfaces pillar's navigation rail (NavTree, NavTreeGroup, ContributedNavRows, OffNavSections, the two rail contexts, navKindName, navOpenedItems, KIND_ICON / navIcon) moves byte for byte into views/studio-design/InterfacesNavRail.tsx. Only imports and eleven `export`s change. The two by-path readers gain the new module, and two test comments now name PackageSwitcher.tsx, where slice 2 moved the text they cite. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WGufzedfGwVcebpN5t3ETE
Contributor
Author
|
domain:ui#1 · os-support-ai · session_01WGufzjDyeFwq6AuFu3vwTd 维护者速读(席位终稿)
席位核对 · ACCEPT · head
|
This was referenced Nov 4, 2026
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 Yibo Wang · project thread
Refs #29988
维护者速读
InterfacesNavRail.tsx,主文件 11,205 → 10,757 行;顺带把两条测试注释里还指着旧文件的出处改指PackageSwitcher.tsx。export;对外类型声明 701 个文件中 700 个逐字节不变,另 1 个(ErrorBoundary.d.ts)只是联合类型成员顺序不同;回滚即 revert 本 PR。StudioDesignSurface.tsx的 import 段;InterfacesNavRail.tsx的 import 段与十一个export;两个按路径读取的测试各加的一行。cmp命令,预期都无任何输出(逐字节相同)。Clause-②: no
Metadata-protocol: none
Seam table
Carried forward from #30008. Base lines below are at
origin/maineee41490(this PR's base;StudioDesignSurface.tsxis byte-identical at73a3ef9f, where #30008 landed), whereui/packages/app-shell/src/views/studio-design/StudioDesignSurface.tsxis 11,205 lines. "Left" is the file's line count after that row and every row above it: rows 1–3 are measured, the rest are estimates (lines removed, less about two import lines per slice). Every seam is module-scope; no seam closes over another component's state.StudioNavItemInspector, nav target helpers,StudioPicker)PackageSwitcherwithPACKAGE_LIST_TOAST_IDandSTUDIO_LANDING_PATHNavTree,NavTreeGroup,ContributedNavRows,OffNavSections, the two rail contexts,navKindName,navOpenedItems, withKIND_ICON/navIconuseMetadataLocale,useNavTargetLabel,useOpenContributorInterfacesPillaronlyFlowRuntimeState…readFlowCopiedArrival, incl.FlowStatusDot, glyph tables,pairIdOfAutomationsPillar;AccessPillar(pairIdOf); 2 tests importFlowStatusDotFlowRuntimeStatesiteuseHeldEditReport,confirmDropUnsavedWork,findTakenIdentifier,CreateTakenNotice,StudioHeldNotice, the "Show me" focus helpers,announceDraftSaved,StudioReadOnlyLink,StudioBaseCustomizationuseStudioTabRowFoldStudioDesignSurfaceBodynextFieldName…formPreviewSource, the OWD option keys)DataPillaronly; 1 test importsrenderStudioGridListAccessPillarwith its arrival reader andStudioNameLabelStudioDesignSurfaceBody; 7 test filesAutomationsPillarStudioPicker, row 1) · 21 hooksStudioDesignSurfaceBody; 23+ test filesDataPillarStudioPicker) · 17 hooksStudioDesignSurfaceBody; 38+ test filesclickableNonControlCensus-13461rows keyed by this fileInterfacesPillarwithinterfacesSaveBody,leafKeyOf,customizeItemKeyStudioDesignSurfaceBody; 29+ test filesStudioDesignSurface/StudioDesignSurfaceBody,PILLARS,METADATA_AREA_TAB,PILLAR_FOR_SURFACE_TYPE, publish-refusal and backfill helpersindex.ts, the console's lazy Studio route, 51 test filesUnchanged from #30002: nothing below the whole-component level of rows 7–11 moves without a logic change, and none of it is needed, because rows 3–6 bring the file under 10,000. Serial order: rows 4–6 in any order, then rows 7–10 only after row 5.
What changes
ui/packages/app-shell/src/views/studio-design/InterfacesNavRail.tsx(new): row 3, base lines 663–679 and 2249–2673, each byte for byte, under a copyright line, a module comment and the imports the two blocks read. The block-level edits areexporton the eleven namesInterfacesPillarreads:navIcon,navKindName,InterfacesRailMarksContext,InterfacesNavContributionsContext,ContributedNavRows,NavTree,OFF_NAV_TYPES,OffNavType,itemKeyOf,navOpenedItems,OffNavSections.KIND_ICON,navTreeHoldsActive,NavTreeGroupandOffNavSectionare read only inside the module and stay unexported. The two contexts move as they were (React.createContextwith the same defaults);InterfacesPillarstill provides them, so no logic changed.ui/packages/app-shell/src/views/studio-design/StudioDesignSurface.tsx: both blocks are gone. It imports the eleven names from the new module beside the slice 2 import, and drops the import bindings only the rail used (Badge,Separator,FileText,BarChart3,Table2,Folder,Compass,Link as LinkIcon,Puzzle,BookOpen,Minus,listViewTargetOf,isSameSurface,inMenuOrder,isNavEntryType,NavTargetLabelResolver,RailCustomizations,NavContributionPlacement,TopLevelContributedNav). Nothing in the row was exported before, and no file outsideInterfacesPillarreads any of it (the other mentions are comments inservedNavText.ts,AppNavCanvas.tsxandStudioDesignSurface.railLabels.test.tsx), so there is no re-export.ui/packages/app-shell/src/__tests__/homeRecoveryRedirectsFollowDeclaration-7373.test.ts: the Studio site'salsoReadsgainsInterfacesNavRail.tsx.ui/scripts/__tests__/spec-symbol-ledger-app-shell-7265.test.ts:SITESgainsInterfacesNavRail.tsx.PackagesPage.confirmFlows-11784.test.tsx("PackageSwitcher's eviction inPackageSwitcher.tsx") andpackages-io.inflightShare-11797.test.tsx("thePACKAGE_LIST_TOAST_IDdoc inPackageSwitcher.tsx"). Comment text only..changeset/29988-studio-interfaces-nav-rail-module.md:@object-ui/app-shellpatch, "internal: move-only".Tests
No behaviour changes, so no new behaviour test. The existing suites run unchanged; results are in Verification.
Acceptance notes
git grepofStudioDesignSurface.tsx/studio-design/StudioDesignSurfaceoverscripts/**,ui/scripts/**and every ui test file finds the same by-path readers as slices 1–2. The two whole-text scanners gained the new module (above).clickableNonControlCensus-13461keys rows by file and handler; none of its rows is a rail handler (the rail's clicks are onStudioRailRow, a control), so it needs no edit.openPathObjectReaders-12811classifies readers ofuseMetadata().objects; the rail reads none. The directory walkers (noRetiredSetupLink-28578,noSetupMetadataLink-28578,CreateItemDialog.oneLabel-11787) pick the new file up by themselves. No gate underscripts/**names the file.StudioDesignSurface.tsxcitation underdocs/qa/was read against the moved blocks, and none cites rail text: the Interfaces citations name the pillar's app load, its save into the pair and its unsaved-work guard, and the dashboards citation quotes the file's header comment ("Interfaces: the real App navigation tree"), all of which stay. Sodocs/qa/is untouched and no revision row is added;check-platform-checkliststill exits 0 full and with--changed-from origin/main.StudioDesignSurface.tsx, the new module, either extended reader or the two commented test files when the seat claimed (round 3 Claim) or right before this push (see Verification). The branch was restarted fromorigin/mainafter [maintainer] refactor(app-shell): move Studio's package switcher out of StudioDesignSurface.tsx (slice 2) #30008 merged and is rebased oneee41490, which touches onlypackages/spec/.Verification
Move-only proof: byte-compare and the moved-lines diff
Both silent (identical): block A 17 lines, sha256
44978201e446c1bb…; block B 425 lines, sha25673d3528850a14d73….git diff --color=always --color-moved=zebra eee41490 HEAD -- ui/packages/app-shell/src/views/studio-design/: 440 lines removed and 440 added are coloured as moved (the block lines less the elevenexportlines, plus import specifier lines that recur). Apart from import lines, the new module's header comment and thepackages-iocomment line, every line NOT coloured as moved:(the added blank line joins the two blocks in the new module; the removed blank lines are the separators after each cut block).
Declaration files (ruling 6348891160's bar)
Base declarations emitted from the base source into a scratch
outDirunder the lock, tree restored (git diff HEADempty). Of the 701 base.d.tsfiles, 700 are byte-identical at head,StudioDesignSurface.d.tsincluded (sha256d0f9665b1e9ed6fc…, the same as at slice 2): the rail was never exported, so no declaration moved. The one difference ischrome/ErrorBoundary.d.ts, where the members of therender()return union print in another order; with every union's members sorted (the ruling's normalisation) the two files are identical. The one addition isviews/studio-design/InterfacesNavRail.d.ts/.js, reachable from no entry in the package'sexportsmap ("."only). Declared-surface digest ofdist/index.d.tsplusStudioDesignSurface.d.ts, root path masked: 245 exports,ce63368a1cf8becf…on both sides.Build, type-check, lint and tests (head 376a48cf; the rebased head 36954c6 has a byte-identical ui/ and changeset, checked with git diff --quiet)
All under scripts/pm/os-verify-lock.sh, one locked chain: VERDICT command-exit 0.
Ablation of the two extended readers (one-time, through scripts/ablation-replace.mjs; tree restored, git diff HEAD empty)
The moved rail holds neither reader's needle, so each leg plants one in the new module and then takes the module out of the reader's list.
'/home'literal planted in InterfacesNavRail.tsx, alsoReads as in this PREach mutation's landing was proven by the tool (anchor count 1 to 0, blob hashes) and by a grep count of the changed text.
Derived gates: node scripts/pm/dispatch-gates.mjs --commands, run at b4129e71, whose tree head 36954c6 keeps (the amend rewrote only the commit trailer) (35 commands)
node scripts/pm/dispatch-gates.mjs --ran: "35 derived famil(ies) accounted for — 35 run, 0 NOT-MEASURED". No docs/adr or docs/qa path changed, so the ADR-link and platform-checklist families are not derived this time; check-platform-checklist was still run by hand (Build, type-check, lint and tests, above).
Serial check before push
The 17 open PRs at 2026-11-04T05:50Z: each PR's changed files were read (seven PRs from their fetched heads against
origin/main, three-dot; #29979, #29866 and the eightpm:mailboxPRs through the PR file list or their fetched head; every mailbox PR lists no file). None touches StudioDesignSurface.tsx, InterfacesNavRail.tsx, homeRecoveryRedirectsFollowDeclaration-7373.test.ts, spec-symbol-ledger-app-shell-7265.test.ts, PackagesPage.confirmFlows-11784.test.tsx or packages-io.inflightShare-11797.test.tsx.Generated by Claude Code
🤖 Generated with Claude Code
https://claude.ai/code/session_01WGufzedfGwVcebpN5t3ETE