Repository navigation
test(app-shell): fold ten Interfaces rail label pins onto one shared StudioDesignSurface harness - #26255
Merged
Conversation
…DesignSurface harness (wip) Claude-Session: https://claude.ai/code/session_012Vh1mJSJN3FeocpnWPNdH1 Co-authored-by: Claude <noreply@anthropic.com>
…s file Claude-Session: https://claude.ai/code/session_012Vh1mJSJN3FeocpnWPNdH1 Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012Vh1mJSJN3FeocpnWPNdH1 Co-authored-by: Claude <noreply@anthropic.com>
…ve return for the next slice Claude-Session: https://claude.ai/code/session_012Vh1mJSJN3FeocpnWPNdH1 Co-authored-by: Claude <noreply@anthropic.com>
Contributor
Author
席位核对 · ACCEPT · seat
|
This was referenced Oct 26, 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 Steve · project thread
Part of #25911
Slice 1a of #25911: the shared-setup pilot on the
StudioDesignSurface.*app-shell tests. Five Interfaces-rail label pins rendered the realInterfacesPillarover the same three mocks and differed only in their metadata-client double. They are now folded into one file,StudioDesignSurface.railLabels.test.tsx. The file declares the three mocks once, and each former file is a top-leveldescribenamed after it. Each of those blocks installs its own client double in abeforeEach. No test is deleted, and every assertion moves verbatim. The seat split the original ten-file fold to keep this PR under the 3,000-line bar. The other five pins (interfacesRailLabelMap-11158,interfacesAppLabelMap-11181,railServedLabels-12688,zhPillarNames-11801,navEntryIdentity-11774) join this file in the next PR from this branch.Clause-②: no
Metadata-protocol: none
Measured first (base f143cd8, this container, under
os-verify-lock,--maxWorkers=2)Per-file vitest module diagnostics over the 95
StudioDesignSurface.*files (656 tests). Fixed cost = environment + prepare + setup + import:autosaveSwitch-11232takes 94 s, 72 s of it inside its tests (19 real 2.5 s debounce sleeps). That is not setup cost.Before / after (same command, same box,
--maxWorkers=2, shared-box seconds)The family-level test CPU moves by about ±10 s from run to run on this shared box. The per-file rows are the clean reading: each folded file saves about 5 to 6 s of fixed cost.
Issue number → describe (reviewer check: no assertion dropped)
StudioDesignSurface.railLabels.test.tsxStudioDesignSurface.railLabelInherits-11196.test.tsxStudioDesignSurface.railLabelInherits-11196(objectui#11196)StudioDesignSurface.surfaceLabelInherits-11196.test.tsxStudioDesignSurface.surfaceLabelInherits-11196(objectui#11196)StudioDesignSurface.surfaceIdentity.test.tsxStudioDesignSurface.surfaceIdentityStudioDesignSurface.navRailLabels-11862.test.tsxStudioDesignSurface.navRailLabels-11862(objectui#11862)StudioDesignSurface.railSeparatorBadge-11791.test.tsxStudioDesignSurface.railSeparatorBadge-11791(objectui#11791)Each block keeps its former file's header comment, fixtures, hooks and inner
describenames verbatim, indented one level. The mechanical check against the five files at f143cd8 gives the sameittitles, 25 of 25 as an identical sorted list, and the sameexpect(count, 70 against 70. The run reports 25 tests passed in the folded file, the same 25 the five files reported.What changed besides the indentation:
vi.mockfactories readstudio.client, avi.hoistedslot, instead of each file'smockClient. Each block's firstbeforeEachsets the slot to its ownmockClient. ThefetchPackagesanduseAdapterdoubles were identical in all five files.StudioDesignSurface.interfacesRailLabelMap-11158.test.tsx.NavTree's JSDoc inStudioDesignSurface.tsxnames the folded file. tsc keeps comments, so the publisheddistchanges by that one comment, and the PR carries apatchchangeset for@object-ui/app-shell.Isolation: RTL
cleanup()and react-i18next's global reset run after every test, as before. No block in the file registers into a metadata or component registry.Not in this PR
ui/scripts/__tests__/date-only-zone-pins-10183.test.tsalready drives all 26 pins through ONE memoized forked child vitest (73 s measured), so the card's "collapse into one spawn" is already true. Splitting it would only rebalance shard legs, not cut CPU, and the seat ruled it out.ui/packages/cli/src/__tests__/cli-bin.test.ts, 81 s here: a 33 s self-build inbeforeAllplus 48 serial CLI spawns): this is slice 2, which comes after both rail PRs.Acceptance notes
autosaveSwitch-11232(94 s, real-time debounce sleeps) is the next-largest single lever in this family. It is noted here and not touched.Verification (head 76d53f2)
pnpm exec vitest run packages/app-shell/src/views/studio-design/StudioDesignSurface --maxWorkers=2(fromui/): 91 files, 656 tests passed.tsc -p tsconfig.test.json --noEmitinui/packages/app-shell: 0error TS.eslinton the changed test files: 0 problems.node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstack, re-derived with the changeset): 35 derived, 35 run, every one exit 0, and--ranreconciles as a derived zero. CI on 76d53f2 is green: all eight required contexts passed, as did Check Changeset and the 16 Test UI legs.No sdui record change: this is test-only in app-shell apart from the comment.
Generated by Claude Code
https://claude.ai/code/session_012Vh1mJSJN3FeocpnWPNdH1
Generated by Claude Code