Uh oh!
There was an error while loading. Please reload this page.
test(types): drop eight unused schema imports from phase2-schemas.test.ts - #6013
Merged
Merged
Conversation
…t.ts The suite imported AppActionSchema, AppMenuItemSchema, ReportViewerSchema, BlockEditorSchema, BlockInstanceSchema, ActionExecutionModeSchema, ActionCallbackSchema and CRUDSchema without asserting against any of them, so an import-based coverage census read them as pinned by this file when nothing here exercises them. Each dropped name occurred exactly once in the file (the import line itself); eslint's @typescript-eslint/no-unused-vars count on the file falls 8 -> 0. No assertions added and no test verdict moves. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CSoz9uGhaaSgiq3hshtN7L
Contributor
✅ Console Performance Budget
The eager closure is every chunk the entry reaches through static imports — what the browser fetches and parses before the app renders. The entry chunk on its own is a small fraction of it. 📦 Bundle Size Report
Size Limits
|
yinlianghui
marked this pull request as ready for review
August 24, 2026 13:09
Uh oh!
There was an error while loading. Please reload this page.
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 freeto 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.
Fixes#5824
packages/types/src/__tests__/phase2-schemas.test.tsimported eight schema names from../zod/index.zodthat no test in the file uses. Each one mildly overstated the suite's pin coverage: an import-based coverage census saw them imported by the acceptance suite and could conclude they were pinned, when nothing asserts against them. Per the triage ruling the imports are dropped, not backfilled with new assertions — authoring coverage for schemas nobody asked this file to cover would turn an S card unbounded.Verified at
81377502c.The card's list of 10 was stale — re-derived, name by name
The card measured 10 names at
ad404e057. Two of them no longer exist in the import block, so the real count is 8:main(11d3ab999)AppActionSchemaAppMenuItemSchemaThemePreviewSchemaReportViewerSchemaBlockEditorSchemaBlockInstanceSchemaActionExecutionModeSchemaActionCallbackSchemaActionConditionSchemaCRUDSchemaDelta against the card: 10 minus
ThemePreviewSchemaminusActionConditionSchema= 8 dropped. The PM's assumption about #5981 held.Measurement, not eyeballing
Instrument:
@typescript-eslint/no-unused-vars(warning level in this repo), count read from--format json.On the merge-base the file reported 8 warnings, 0 errors — and the eight names eslint flagged are exactly the eight above. Because typescript-eslint's
no-unused-varscounts type-position usage as usage, a flagged name is unused as a value and as a type; none of the eight was load-bearing as a type-only import.Counter-probe, both directions:
AppComponentSchema7,ReportBuilderSchema3,BlockLibrarySchema3,ActionSchema13,ListViewSchema13,AnyComponentSchema9,CrudActionSchema2, …), so the zero-hit result is a real measurement and not a broken pattern.@object-ui/typesmoves 252 to 244 warnings across 115 files, 0 errors both ways — the whole package delta is this file's own 8, so no other file's verdict moved. The 244 remaining are pre-existing and out of scope for this card.Reverse-verification
Direction predicted before running: re-adding one dropped name should raise the file's warning count from 0 to exactly 1 and name that name.
Observed: re-adding
CRUDSchemaproduced exactly 1 warning,'CRUDSchema' is defined but never used. The mutation was proven on disk in both directions rather than trusted to an editor's exit code — grep for the injected line returned 1, grep confirmed the anchor line was not clobbered, and grep confirmed no other dropped name had reappeared. Restoration ran undertrap … EXIT INT TERM; afterwardsgit diff HEAD --statwas empty andgit status --porcelainsilent, so the tree is byte-identical to HEAD.The same trap discipline covered the package-level base measurement, which mutates the file back to its merge-base content.
Gates
pnpm --filter @object-ui/types type-checkTYPECHECK_EXIT=0(tsc --noEmit+tsconfig.examples.json+tsconfig.test.json)packages/types/src/__tests__VITEST_EXIT=0— Test Files 54 passed (54), Tests 591 passed (591)VITEST_PHASE2_EXIT=0— Tests 34 passed (34)node scripts/check-changeset-presence.mjsnode scripts/check-changeset-no-major.mjsmajorbump"No test verdict moved: the diff touches zero
it(,describe(orexpect(lines — it is eight deleted import lines and nothing else.Changeset
Measured rather than assumed.
check-changeset-presence.mjsfailed on the bare edit, because the file sits under thesrc/of a released package. This is test-only and publishes nothing, so it carries the repo's first-class empty-frontmatter declaration (AGENTS.md line 161) rather than a version bump. objectui has noskip-changesetlabel and none was created.Noted, deliberately not acted on
The ruling says to name a suspicious omission rather than write the assertion, so, for the record:
ReportViewerSchemasits beside a describe block that pinsReportComponentSchemaandReportBuilderSchema, andBlockEditorSchema/BlockInstanceSchemasit beside one that pinsBlockSchemaandBlockLibrarySchema— sibling families where some members are pinned and these are not.CRUDSchemahas no describe block anywhere in the file.AppActionSchemaandAppMenuItemSchemaare the weakest candidates: theAppComponentSchemafixture exercises both shapes transitively through itsmenuandactionsarrays, so they are covered in substance already. Whether any of that is a genuine coverage gap worth its own card is a triage call, not this card's.Generated by Claude Code