Repository navigation
[maintainer] refactor(app-shell): move Studio's flow rail helpers, pillar kit and Data pillar helpers out of StudioDesignSurface.tsx (slice 4, final: file under 10,000 lines) - #30027
Merged
Conversation
…ers out of StudioDesignSurface.tsx Move-only (ruling #24586 A), seam row 4: the flow runtime and rail states, FlowStatusDot with its glyph tables, the flow, definition and object-label reads, the new-flow trigger helpers, pairIdOf and the copied-flow arrival reader move byte for byte into views/studio-design/AutomationsFlowRail.tsx. Only imports and `export` change; FlowStatusDot and NewFlowTrigger are re-exported from StudioDesignSurface.tsx, so their importers keep working. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WGufzedfGwVcebpN5t3ETE
… StudioDesignSurface.tsx Move-only (ruling #24586 A), seam row 6: the create dialog's OWD option keys, the added-field names, the system field names, the CEL panel stamps and formPreviewSource move byte for byte into views/studio-design/DataPillarHelpers.tsx. Only imports and `export` change. renderStudioGridList stays where it is: its eslint-disable line for react-refresh/only-export-components would be an unused directive (an error) in a module that exports no component, so moving it unchanged is not possible. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WGufzedfGwVcebpN5t3ETE
…tudioDesignSurface.tsx Move-only (ruling #24586 A), seam row 5: useHeldEditReport, confirmDropUnsavedWork, findTakenIdentifier, CreateTakenNotice, StudioHeldNotice, the "Show me" focus helpers with their section comment, announceDraftSaved, StudioReadOnlyLink and StudioBaseCustomization move byte for byte into views/studio-design/StudioPillarKit.tsx. Only imports and `export` change; StudioHeldNotice, StudioReadOnlyLink and StudioBaseCustomization are re-exported from StudioDesignSurface.tsx, so their importers keep working. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WGufzedfGwVcebpN5t3ETE
… sources at the slice 4 modules The 7373 Studio site's alsoReads and the 7265 spec-symbol ledger's SITES gain AutomationsFlowRail.tsx, StudioPillarKit.tsx and DataPillarHelpers.tsx. Four studio-authoring checklist sources that named moved helpers now name the module that holds them, each with a revision row; no clause changed. 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 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
Fixes #29988
维护者速读
AutomationsFlowRail.tsx,各支柱共用的工具集(335 行)进StudioPillarKit.tsx,数据支柱的辅助(181 行)进DataPillarHelpers.tsx;主文件 10,757 → 9,928 行,低于 1 万,本卡完成。export;原来从StudioDesignSurface导出的五个名字在原处重新导出,所有引用照常工作;对外导出摘要两边一致(只是类型的声明文件变了);回滚即 revert 本 PR。StudioDesignSurface.tsx的 import 段和三行重新导出;studio-authoring.json四处出处改动与新加的 history 行。cmp命令组,预期全部无输出(逐字节相同)。Clause-②: no
Metadata-protocol: none
Seam table
Carried forward from #30014. Base lines below are at
origin/main9d1a465f0(this PR's base, after slice 3), whereui/packages/app-shell/src/views/studio-design/StudioDesignSurface.tsxis 10,757 lines. "Left" is the file's line count after that row and every row above it, measured at this PR's commits.StudioNavItemInspector, nav target helpers,StudioPicker)PackageSwitcherwithPACKAGE_LIST_TOAST_IDandSTUDIO_LANDING_PATHNavTree…KIND_ICON/navIcon)FlowRuntimeState…readFlowCopiedArrival, incl.FlowStatusDot, glyph tables,pairIdOf→AutomationsFlowRail.tsxAutomationsPillar;AccessPillar(pairIdOf); 2 tests importFlowStatusDot(re-exported)nextFieldName…STUDIO_SYSTEM_FIELD_NAMES,formFieldNames…formPreviewSource→DataPillarHelpers.tsxDataPillaronlyrenderStudioGridList(5204–5279, 76 lines) stays, see What changesuseHeldEditReport,confirmDropUnsavedWork,findTakenIdentifier,CreateTakenNotice,StudioHeldNotice, the "Show me" focus helpers with their section comment,announceDraftSaved,StudioReadOnlyLink,StudioBaseCustomization→StudioPillarKit.tsxuseStudioTabRowFoldStudioDesignSurfaceBody;StudioBundleItemEditor.tsx,StudioMetadataArea.tsxand 6 tests import its types or components through./StudioDesignSurface(re-exported)AccessPillarwith its arrival reader andStudioNameLabelStudioDesignSurfaceBody; 7 test filesAutomationsPillarStudioPicker, row 1) · 21 hooksStudioDesignSurfaceBody; 23+ test filesDataPillarStudioPicker) · 17 hooksStudioDesignSurfaceBody; 38+ test filesclickableNonControlCensus-13461rows keyed by this file)InterfacesPillarwithinterfacesSaveBody,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 filesRows 4–6 now live outside the file, so a later card can move rows 7–10 without an import cycle back into it.
What changes
One commit per seam row, then one for the readers and the checklist.
ui/packages/app-shell/src/views/studio-design/AutomationsFlowRail.tsx(new): base lines 7614–7960, byte for byte, under a copyright line, a module comment and the imports the block reads.exportis added on the 18 names the rest of the file reads (FlowRuntimeState,FlowRailState,flowRailState,flowRailStatus,flowDotClass,FLOW_GLYPH_ICON,FLOW_GLYPH_LABEL_KEY,NO_OBJECT_GROUP_KEY,readFlowRegistrations,readFlowDefinitions,readObjectLabels,newFlowTriggerFields,withStartTrigger,NO_OBJECT_ORDER,FlowCopiedStrip,FLOW_COPIED_ARRIVAL_STATE,pairIdOf,readFlowCopiedArrival).FlowStatusDotandNewFlowTriggerwere already exported, keep theirexport, and are re-exported fromStudioDesignSurface.tsx. The one-line section comment above the block at 7613 (/** Automations pillar — flows: … */) headsAutomationsPillarand stays.DataPillarHelpers.tsx(new): base lines 443–460, 5135–5202 and 5281–5375, byte for byte;exporton the 13 namesDataPillarreads.renderStudioGridList(5204–5279) stays inStudioDesignSurface.tsx. It carries// eslint-disable-next-line react-refresh/only-export-components, and in a module that exports no component that line is an unused directive, which this repo's eslint reports as an error (measured on the first cut). Moving it would need that line edited or dropped, which is not a move, and the file is under 10,000 lines without it.StudioPillarKit.tsx(new): base lines 504–643, 663–751 (the "Show me" section comment at 663–671 and its helpers), 764–843 and 2233–2258, byte for byte;exporton the 7 names the rest of the file reads (useHeldEditReport,confirmDropUnsavedWork,findTakenIdentifier,CreateTakenNotice,useShowInputFocus,StudioSavedDraft,announceDraftSaved).StudioHeldNotice,StudioReadOnlyLinkandStudioBaseCustomizationwere already exported and are re-exported fromStudioDesignSurface.tsx.StudioDesignSurface.tsx: the eight blocks are gone. It imports the names from the three modules beside the slice 3 import, re-exports the five names it exported before in two lines with a comment each (where their first block was), and drops the import bindings only the moved code used (describeFlowRunStatus,FlowRunStatusView,FlowRuntimeRow,fieldsForNodeType,localizeFlowFields,FlowConfigField,Zap,Clock,MousePointerClick,CornerDownRight,FlowTriggerGlyph,customizationPackageId,SpecFlowRuntimeState,romanizeHan,toFieldNameLoose,PackageCustomizationsState,useStudioTabRowFold)../StudioDesignSurfaceare unchanged, by the re-exports:FlowStatusDot.test.tsx,FlowStatusDot.registration-12349.test.tsx,StudioReadOnlyLink.overlay-27356.test.tsx, the five tests that importtype StudioBaseCustomization, and the two source filesStudioBundleItemEditor.tsxandStudioMetadataArea.tsx(type-only imports, so no runtime cycle).StudioDesignSurface.gridRefresh.test.tsximportsrenderStudioGridList, which did not move.homeRecoveryRedirectsFollowDeclaration-7373.test.ts's Studio sitealsoReadsandspec-symbol-ledger-app-shell-7265.test.ts'sSITESeach gain the three modules. The ledger'sFlowRuntimeStatesite (type FlowRuntimeState = Partial<SpecFlowRuntimeState>) now lives inAutomationsFlowRail.tsx.docs/qa/platform-checklist/areas/studio-authoring.json, source re-points only, each with a revision bump and a history row ("No clause changed"):held-edit-leave-guardr5 → r6:confirmDropUnsavedWorkanduseHeldEditReportnow cited inStudioPillarKit.tsx; the rest stays onStudioDesignSurface.tsx.automations-rail-and-new-flowr2 → r3:FLOW_GLYPH_ICON/FLOW_GLYPH_LABEL_KEY,flowDotClass,FlowStatusDotnow cited inAutomationsFlowRail.tsx; the rail legend and the New automation presets stay.flow-status-matches-runtimer2 → r3:FlowStatusDotandflowRailStatusnow cited inAutomationsFlowRail.tsx.access-permission-set-lifecycler7 → r8:findTakenIdentifierandCreateTakenNoticenow cited inStudioPillarKit.tsx; the Access pillar's use of them stays..changeset/29988-studio-pillar-helpers-modules.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
StudioDesignSurface.tsxis 9,928 lines at this head (wc -l), so this PR saysFixes #29988.StudioDesignSurface.tsx; the two source files that import a moved type through it do so type-only), no census row to re-key (clickableNonControlCensus-13461's rows for this file areDataPillarandStudioDesignSurfaceBodyhandlers, which stay; the moved clicks are<button>s), and 1,941 changed lines in all, under 3,000.git grepofStudioDesignSurface.tsx/studio-design/StudioDesignSurfaceoverscripts/**,ui/scripts/**and every ui test file finds the same two whole-text readers as before; both gained the three modules. The directory walkers (noRetiredSetupLink-28578,noSetupMetadataLink-28578,CreateItemDialog.oneLabel-11787) andclickableNonControlCensus-13461walk the tree themselves.openPathObjectReaders-12811classifies readers ofuseMetadata().objects; none of the moved code reads it.StudioDesignSurface.tsxcitation underdocs/qa/was read against the moved names: the four above named moved helpers, and the rest cite pillar logic that stays (railPairId,ledgerRow,openCreateFlow,openCreateSet,heldEdit,unsavedPillarWork, each still in the file).spec-symbol-parity.test.tssays "StudioDesignSurfacedeclarestype FlowRuntimeState = …" (now inAutomationsFlowRail.tsx; the test pins the types, not the file).StudioDesignSurface.tsx, the three new modules, either extended reader orstudio-authoring.jsonwhen the seat claimed (round 4 Claim) or right before this push (see Verification). The branch was restarted fromorigin/mainafter [maintainer] refactor(app-shell): move the Interfaces nav rail out of StudioDesignSurface.tsx (slice 3) #30014 merged and is rebased on63b86b38, which touches onlypackages/rest/and its changeset.Verification
Move-only proof: byte-compare of all eight blocks and the moved-lines diff
All eight silent (identical). Per block (base range → module range, sha256 of the base text):
AutomationsFlowRail.tsx:StudioPillarKit.tsx:DataPillarHelpers.tsx:git diff --color=always --color-moved=zebra 9d1a465f0 HEAD -- ui/packages/app-shell/src/views/studio-design/: 1,678 lines are coloured as moved. Apart from import lines and the three module headers, every line NOT coloured as moved is below: the 38 declarations that gainedexport(each once without, once with), the two re-export lines with their comments, and the two blank separators of cut blocks.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 702 base.d.tsfiles, 699 are byte-identical at head. The three that differ:chrome/ErrorBoundary.d.tsandconsole/ai/outboundAgentText.d.ts: the members of one union print in another order (render()'s return union;Record<"en" | "zh", string>againstRecord<"zh" | "en", string>), program-order type creation; with union members sorted (the ruling's normalisation) each pair is identical.views/studio-design/StudioDesignSurface.d.ts(base sha256d0f9665b1e9ed6fc…): the moved declarations now come from the three new.d.tsfiles, and the five names it exported before are re-exported (export { FlowStatusDot, type NewFlowTrigger },export { StudioHeldNotice, StudioReadOnlyLink, type StudioBaseCustomization }). Every declaration chunk of the base file appears verbatim in the head file or in one ofAutomationsFlowRail.d.ts,StudioPillarKit.d.ts,DataPillarHelpers.d.ts; the one chunk that does not is the file's header comment with its import block, whose import lines are what changed.The three new
.d.ts/.jspairs are reachable from no entry in the package'sexportsmap ("."only). Declared-surface digest ofdist/index.d.tsplusStudioDesignSurface.d.ts: 245 exports on both sides. Read with the declaring file of a type masked (the printer qualifiesStudioBaseCustomization,StudioSavedDraft,FlowRailStateandNewFlowTriggerby the file that declares them, which is now the new module), the two dumps are identical (6e1f795576824163…); unmasked, they differ in exactly those 7 qualified names.Build, type-check, lint and tests (head ec616a8)
All under scripts/pm/os-verify-lock.sh, one locked chain at 16500092 (ui/, docs/qa/ and the changeset are identical at head ec616a8, checked with git diff --quiet): VERDICT command-exit 0.
renderStudioGridList, failed here with one error (an unused eslint-disable directive in DataPillarHelpers.tsx); that is why it stays.Ablation of the two extended readers (one-time, through scripts/ablation-replace.mjs; tree restored, git diff HEAD empty)
Each new module gets two legs per reader: a planted needle in the module (expected red), then the same needle with the module taken out of the reader's list (expected green, i.e. blind).
'/home'literal planted in AutomationsFlowRail.tsx, alsoReads as in this PRinterface ObjectLikeplanted in AutomationsFlowRail.tsx, SITES as in this PR'/home'literal planted in StudioPillarKit.tsx, alsoReads as in this PRinterface ObjectLikeplanted in StudioPillarKit.tsx, SITES as in this PR'/home'literal planted in DataPillarHelpers.tsx, alsoReads as in this PRinterface ObjectLikeplanted in DataPillarHelpers.tsx, SITES 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; the tree was restored after every module (git diff HEAD empty).
Derived gates: node scripts/pm/dispatch-gates.mjs --commands on head ec616a8 (42 commands)
node scripts/pm/dispatch-gates.mjs --ran: "42 derived famil(ies) accounted for — 42 run, 0 NOT-MEASURED".
Serial check before push
The 19 open PRs at 2026-11-04T08:05Z, each PR's changed files read: the ten branch PRs (#30021, #30015, #30012, #30010, #30004, #29998, #29993, #29984, #29968, #29963) from their fetched heads against
origin/main, three-dot, re-fetched for the two updated since the first pass; #29979, #29866 and the sevenpm:mailboxPRs through the PR file list, none updated since it was read (every mailbox PR lists no file). None touches StudioDesignSurface.tsx, AutomationsFlowRail.tsx, StudioPillarKit.tsx, DataPillarHelpers.tsx, homeRecoveryRedirectsFollowDeclaration-7373.test.ts, spec-symbol-ledger-app-shell-7265.test.ts or studio-authoring.json.Generated by Claude Code
🤖 Generated with Claude Code
https://claude.ai/code/session_01WGufzedfGwVcebpN5t3ETE