Repository navigation
test(app-shell): fold the other five Interfaces rail label pins onto the shared railLabels harness - #26309
Merged
Conversation
…the shared railLabels harness Second fold slice. interfacesRailLabelMap-11158, interfacesAppLabelMap-11181, railServedLabels-12688, zhPillarNames-11801 and navEntryIdentity-11774 become top-level describe blocks of StudioDesignSurface.railLabels.test.tsx, each installing its own metadata-client double into the shared vi.hoisted slot. navEntryIdentity-11774 registers an object-view recorder in beforeAll, so it sits last. Same it titles (50/50) and expect( count (153/153) as the ten former files; no test deleted, assertions verbatim. Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012Vh1mJSJN3FeocpnWPNdH1
Contributor
Author
席位核对 · ACCEPT · seat
|
This was referenced Oct 26, 2026
8 tasks done
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 1b of #25911, the follow-up to #26255. The other five Interfaces-rail label pins (
interfacesRailLabelMap-11158,interfacesAppLabelMap-11181,railServedLabels-12688,zhPillarNames-11801,navEntryIdentity-11774) render the realInterfacesPillarover the same three mocks as the five folded in #26255. They now joinStudioDesignSurface.railLabels.test.tsx. Each former file is a top-leveldescribenamed after it, and each block installs its own metadata-client double into the sharedvi.hoistedslot in abeforeEach. No test is deleted, and every assertion moves verbatim. The diff is test-only: nosrcfile, no sdui record, no changeset.Before / after (same command, same box,
--maxWorkers=2, shared-box seconds)pnpm exec vitest run packages/app-shell/src/views/studio-design/StudioDesignSurface --maxWorkers=2fromui/, with a throwaway reporter reading each module's diagnostics. Fixed cost = environment + prepare + setup + import.Across both slices the ten pins went from 10 files to 1, and the family's CPU went from 1021.7 s to 954.9 s (−6.5 %). Each folded file saved about 6.5 s of fixed cost, and the folded file's own fixed cost barely moved (7.3 s → 7.6 s). Test CPU moves by about ±10 s from run to run on this shared box, so the per-file rows are the clean reading.
Issue number → describe (reviewer check: no assertion dropped)
StudioDesignSurface.railLabels.test.tsxitexpect(StudioDesignSurface.interfacesRailLabelMap-11158.test.tsxStudioDesignSurface.interfacesRailLabelMap-11158(objectui#11158)StudioDesignSurface.interfacesAppLabelMap-11181.test.tsxStudioDesignSurface.interfacesAppLabelMap-11181(objectui#11181)StudioDesignSurface.railServedLabels-12688.test.tsxStudioDesignSurface.railServedLabels-12688(objectui#12688)StudioDesignSurface.zhPillarNames-11801.test.tsxStudioDesignSurface.zhPillarNames-11801(objectui#11801)StudioDesignSurface.navEntryIdentity-11774.test.tsxStudioDesignSurface.navEntryIdentity-11774(objectui#11774)The five blocks from #26255 stay as they were. The mechanical check of the new file against the ten former files on main gives the same
ittitles, 50 of 50 as an identical sorted list, and the sameexpect(count, 153 against 153. The run reports 56 tests passed in the folded file, the same 56 the six files reported before (it.eachrows expand).What changed besides the indentation:
beforeAll,MockInstance,act,useLocation,AppSchema,useObjectTranslation,MetadataContextValue,ComponentRegistry,path/fileURLToPath,readDesignerPairs,t,listStudioCanvasPreviewTypes). The@ts-expect-errorfor the untyped gate script moved with its import to the top of the file.Isolation: RTL
cleanup()and react-i18next's global reset still run after every test.navEntryIdentity-11774registers anobject-viewrecorder intoComponentRegistryin itsbeforeAll, so it is the last block in the file and no block after it can read that registration.Not in this PR
ui/packages/cli/src/__tests__/cli-bin.test.ts): slice 2, next.autosaveSwitch-11232(94 s of real debounce sleeps) is the family's next-largest lever. It is not touched.Verification (head f62241c)
eslinton the changed test file: 0 problems.tsc -p tsconfig.test.json --noEmitinui/packages/app-shell, afterpnpm --filter '@object-ui/app-shell^...' build: 0error TS.node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstack): 24 derived, 24 run, every one exit 0, and--ranreconciles as a derived zero. The diff is 1,896 changed lines, under the 3,000-line bar.Generated by Claude Code
🤖 Generated with Claude Code
https://claude.ai/code/session_012Vh1mJSJN3FeocpnWPNdH1