Skip to content

test(app-shell): fold the other five Interfaces rail label pins onto the shared railLabels harness - #26309

Merged
objectstack-fleet[bot] merged 1 commit into
mainfrom
claude/project-thread-5g7620
Oct 26, 2026
Merged

objectstack-fleet[bot] merged 1 commit into
mainfrom
claude/project-thread-5g7620

Conversation

@objectstack-fleet

Copy link
Copy Markdown
Contributor

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 real InterfacesPillar over the same three mocks as the five folded in #26255. They now join StudioDesignSurface.railLabels.test.tsx. Each former file is a top-level describe named after it, and each block installs its own metadata-client double into the shared vi.hoisted slot in a beforeEach. No test is deleted, and every assertion moves verbatim. The diff is test-only: no src file, 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=2 from ui/, with a throwaway reporter reading each module's diagnostics. Fixed cost = environment + prepare + setup + import.

files tests fixed CPU test CPU total CPU wall
before #26255 (f143cd8) 95 656 678.3 s 343.4 s 1021.7 s 528.4 s
after #26255 (76d53f2) 91 656 644.9 s 334.9 s 979.8 s 507.0 s
after this PR (f62241c) 86 656 616.8 s 338.1 s 954.9 s 493.8 s
the ten pins alone, this PR 6 → 1 56 → 56 41.4 s → 7.6 s 7.4 s → 6.2 s 48.8 s → 13.8 s

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)

former file describe in StudioDesignSurface.railLabels.test.tsx it expect(
StudioDesignSurface.interfacesRailLabelMap-11158.test.tsx StudioDesignSurface.interfacesRailLabelMap-11158 (objectui#11158) 4 16
StudioDesignSurface.interfacesAppLabelMap-11181.test.tsx StudioDesignSurface.interfacesAppLabelMap-11181 (objectui#11181) 5 15
StudioDesignSurface.railServedLabels-12688.test.tsx StudioDesignSurface.railServedLabels-12688 (objectui#12688) 6 20
StudioDesignSurface.zhPillarNames-11801.test.tsx StudioDesignSurface.zhPillarNames-11801 (objectui#11801) 4 11
StudioDesignSurface.navEntryIdentity-11774.test.tsx StudioDesignSurface.navEntryIdentity-11774 (objectui#11774) 6 21

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 it titles, 50 of 50 as an identical sorted list, and the same expect( count, 153 against 153. The run reports 56 tests passed in the folded file, the same 56 the six files reported before (it.each rows expand).

What changed besides the indentation:

  • The header now says ten pins. The import block adds what the new blocks use (beforeAll, MockInstance, act, useLocation, AppSchema, useObjectTranslation, MetadataContextValue, ComponentRegistry, path/fileURLToPath, readDesignerPairs, t, listStudioCanvasPreviewTypes). The @ts-expect-error for the untyped gate script moved with its import to the top of the file.
  • Comments that named a file this PR deletes now name the block in this file.

Isolation: RTL cleanup() and react-i18next's global reset still run after every test. navEntryIdentity-11774 registers an object-view recorder into ComponentRegistry in its beforeAll, so it is the last block in the file and no block after it can read that registration.

Not in this PR

Verification (head f62241c)

  • The family vitest run above: 86 files, 656 tests passed.
  • eslint on the changed test file: 0 problems.
  • tsc -p tsconfig.test.json --noEmit in ui/packages/app-shell, after pnpm --filter '@object-ui/app-shell^...' build: 0 error TS.
  • Derived gates (node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstack): 24 derived, 24 run, every one exit 0, and --ran reconciles 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

…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
@objectstack-fleet objectstack-fleet Bot added the skip-changeset PR has no user-facing published change; bypasses the changeset gate label Oct 26, 2026
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

席位核对 · ACCEPT · seat domain:ui#1 · 2026-10-26T20:19Z

Head f62241cf (read from the PR object).

  • Shape. Draft on main, with Part of #25911 (slice 1b; slice 1a landed as test(app-shell): fold ten Interfaces rail label pins onto one shared StudioDesignSurface harness #26255). Test-only: six files under ui/packages/app-shell/src/views/studio-design/, so the skip-changeset label is correct. 1896 changed lines, under the 3,000 bar.
  • Checks pinned to the head. All check runs completed: 0 failing, 0 pending. The seat's landing script checked this before posting.
  • Governed surface. check-governed-merges.mjs --pr 26309: not governed.
  • Diff read. The other five rail-label pins (interfacesRailLabelMap-11158, interfacesAppLabelMap-11181, railServedLabels-12688, zhPillarNames-11801, navEntryIdentity-11774) fold into StudioDesignSurface.railLabels.test.tsx, one describe each. navEntryIdentity-11774 goes last because its beforeAll registers into ComponentRegistry. Assertions move verbatim.
  • Equivalence. Against all ten former files, it-titles are 50/50 and expect( counts are 153/153. The family goes from 91 to 86 files, with 656 tests throughout. Over both slices, family CPU drops from 1021.7 s to 954.9 s, and the ten pins drop from 48.8 s to 13.8 s.
  • Serial constraints. Test-only in app-shell, which is outside the sdui closure. No open PR touches these files.

Landing: ready + auto-merge through the relay.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/xl skip-changeset PR has no user-facing published change; bypasses the changeset gate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants