Skip to content

refactor(releases): migrate release table, document header and variant inventory wrappers to vanilla-extract - #14989

Draft
stipsan wants to merge 1 commit into
cody/ve-lite2-03-comments-menus-tasks-0ee6from
cody/ve-lite2-04-releases-inventory-0ee6
Draft

stipsan wants to merge 1 commit into
cody/ve-lite2-03-comments-menus-tasks-0ee6from
cody/ve-lite2-04-releases-inventory-0ee6

Conversation

@stipsan

@stipsan stipsan commented Sep 24, 2026 •

Copy link
Copy Markdown
Member

Description

Layer 4/10 of a second low-risk cherry-pick stack from the styled-components to vanilla-extract migration in #14566 (the 12-PR ve-stack series, #14616 to #14627). The first stack (#14905 to #14914) took the purely static rules and has merged; this one takes the lowest-risk tier that is left, in the same shape: at most 20 files per layer, one commit each, every file copied verbatim from the reference tip, whose merge base with main is 455717e. On top of static rules and && overrides, this tier allows attribute and pseudo selectors, keyframes, globalStyle scoped under a local class, closed-set styleVariants, a few prop- or theme-driven values (createVar with assignInlineVars, or useTheme_v2) and a few media or container queries with default-theme literal breakpoints. Layers are ordered by risk, lowest first, so the stack can be merged bottom-up and stopped at any layer. Based on #14987.

This layer covers the release document table column definitions, the release type picker, the document header chips and copy-to-release menu, the releases table header, and the variant inventory set, action, bundle picker and checkbox.

What to review

  • documentHeader/styles.ts becomes styles.tsx wrappers. ChipButton scopes its --card-border-color override to :not([data-disabled='true']); the comment in styles.css.ts walks through why that reproduces exactly which of Button's (0,1,0), (0,2,0) and (0,3,0) rules the original beat.
  • TableHeader and VariantCheckbox double their class inside a globalStyle so the descendant rule outranks the primitive's own.
  • Package: sanity (core/releases, core/documentGroupInventory).

Testing

Each layer passes oxfmt --check and a type-aware oxlint --type-check of its files plus every file importing them, on its own commit. At the stack tip pnpm check:oxlint passes, the packages build with the migrated rules in lib/bundle.css, and pnpm vitest run --project=sanity --changed origin/main passes (227 files, 1885 tests, rebased on main at 4cebde0), as does the exports snapshot test, so no public export changes shape. Every Storybook story that renders a file from this stack (17 stories) was screenshotted on main and at the tip and compared pixel by pixel: all 17 are identical, while a one-value negative control produced 42,739 changed pixels. For this layer, the Table browser test passes, but its columns only use BasicHeader, so it does not render the sortable header button that carries the migrated TableHeader class; no story or browser test renders the other files.

Notes for release

N/A – Internal styling migration.


Open in Web Open in Cursor 

@vercel

vercel Bot commented Sep 24, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
auth-test-studio Ready Ready Preview Sep 25, 2026 7:49am UTC
page-building-studio Ready Ready Preview Sep 25, 2026 7:49am UTC
studio-diagnostics Ready Ready Preview Sep 25, 2026 7:49am UTC
studio-radar Ready Ready Preview Sep 25, 2026 7:49am UTC
studio-storybook Ready Ready Preview Sep 25, 2026 7:49am UTC
test-studio Ready Ready Preview Sep 25, 2026 7:49am UTC
test-studio-preview-iframe Ready Ready Preview Sep 25, 2026 7:49am UTC

Request Review

@github-actions

github-actions Bot commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

📦 Bundle Stats — sanity

Compared against cody/ve-lite2-03-comments-menus-tasks-0ee6 (30076fd7) · v6.16.0 (npm)

sanity

Metric Value vs cody/ve-lite2-03-comments-menus-tasks-0ee6 (30076fd) vs v6.16.0
Internal (raw) 4.46 MB +988 B, +0.0% +31.1 KB, +0.7%
Internal (gzip) 1.11 MB +44 B, +0.0% +9.8 KB, +0.9%
Bundled (raw) 13.29 MB +40 B, +0.0% +28.8 KB, +0.2%
Bundled (gzip) 3.14 MB -222 B, -0.0% +8.6 KB, +0.3%
Import time 1.85s +2ms, +0.1% +104ms, +5.9%

bin:sanity

Metric Value vs cody/ve-lite2-03-comments-menus-tasks-0ee6 (30076fd) vs v6.16.0
Internal (raw) 7.1 KB - -
Internal (gzip) 2.9 KB - -
Bundled (raw) 7.1 KB - -
Bundled (gzip) 2.8 KB - -
Import time 5ms -0ms, -0.7% +0ms, +2.6%

🗺️ View treemap · Artifacts

Details
  • Import time regressions over 10% are flagged with ⚠️
  • Sizes shown as raw / gzip 🗜️. Internal bytes = own code only. Total bytes = with all dependencies. Import time = Node.js cold-start median.

@github-actions

github-actions Bot commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

📚 TypeDoc Generation Result

✅ TypeDoc generated successfully!

  • File size: 8.7M
  • Total exports: 1105
  • Artifact: sanity-typedoc-1ed32f6d11c92a0c44534128b0a76c89f6864830

The TypeDoc JSON file has been generated and validated. All documentation scripts completed successfully.

@github-actions

github-actions Bot commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

❌ E2E Tests

🟢 115 passed • 🔴 16 failed • 🟡 86 flaky • (⚪ 93 skipped) • view full report • view run

🤖 Share with an AI agent:

Fix the failing e2e tests. The failure report with error messages and page snapshots is at https://e2e-studio-c3cjw7njt.sanity.dev/agent-report.md
Debug failing tests locally
SANITY_E2E_PROJECT_ID=ittbm412 \
SANITY_E2E_BASE_URL=https://e2e-studio-oslp08ia7.sanity.dev \
SANITY_E2E_DATASET=pr-14989-chromium-36109501175 \
SANITY_E2E_DATASET_CHROMIUM=pr-14989-chromium-36109501175 \
SANITY_E2E_DATASET_FIREFOX=pr-14989-firefox-36109501175 \
pnpm test:e2e --headed \
  e2e/tests/comments/inline.spec.ts \
  e2e/tests/components-api/studio.spec.ts \
  e2e/tests/enhanced-object-dialog/componentItemSmoke.spec.ts \
  e2e/tests/inputs/text.spec.ts \
  e2e/tests/inputs/reference.spec.ts \
  e2e/tests/inputs/object.spec.ts \
  e2e/tests/tasks/tasks.spec.ts \
  e2e/tests/structure/menuItemSelectedIndicator.spec.ts

Studio: https://e2e-studio-oslp08ia7.sanity.dev

@github-actions

github-actions Bot commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

Visual regression coverage

77 changed UI files: 16 covered, 0 pending, 61 uncovered.

Per-file coverage (77)
File Status Evidence
packages/sanity/src/core/comments-v2/components/avatars/CommentsAvatar.css.ts uncovered
packages/sanity/src/core/comments-v2/components/avatars/CommentsAvatar.tsx uncovered
packages/sanity/src/core/comments-v2/components/list/CommentOriginBadge.css.ts covered packages/sanity/src/core/comments-v2/components/list/__tests__/CommentOriginBadge.stories.tsx
packages/sanity/src/core/comments-v2/components/list/CommentOriginBadge.tsx covered packages/sanity/src/core/comments-v2/components/list/__tests__/CommentOriginBadge.stories.tsx
packages/sanity/src/core/comments-v2/components/list/CommentsListItemContextMenu.css.ts uncovered
packages/sanity/src/core/comments-v2/components/list/CommentsListItemContextMenu.tsx uncovered
packages/sanity/src/core/comments-v2/components/mentions/MentionsMenu.css.ts covered packages/sanity/src/core/comments-v2/components/mentions/__tests__/MentionsMenu.stories.tsx
packages/sanity/src/core/comments-v2/components/mentions/MentionsMenu.tsx covered packages/sanity/src/core/comments-v2/components/mentions/__tests__/MentionsMenu.stories.tsx
packages/sanity/src/core/comments-v2/components/onboarding/CommentsOnboardingPopover.css.ts uncovered
packages/sanity/src/core/comments-v2/components/onboarding/CommentsOnboardingPopover.tsx uncovered
packages/sanity/src/core/comments-v2/plugin/inspector/CommentsInspector.css.ts uncovered
packages/sanity/src/core/comments-v2/plugin/inspector/CommentsInspector.tsx uncovered
packages/sanity/src/core/comments/components/avatars/CommentsAvatar.css.ts uncovered
packages/sanity/src/core/comments/components/avatars/CommentsAvatar.tsx uncovered
packages/sanity/src/core/comments/components/list/CommentsListItemContextMenu.css.ts uncovered
packages/sanity/src/core/comments/components/list/CommentsListItemContextMenu.tsx uncovered
packages/sanity/src/core/comments/components/mentions/MentionsMenu.css.ts covered packages/sanity/src/core/comments/components/mentions/__tests__/MentionsMenu.stories.tsx
packages/sanity/src/core/comments/components/mentions/MentionsMenu.tsx covered packages/sanity/src/core/comments/components/mentions/__tests__/MentionsMenu.stories.tsx
packages/sanity/src/core/comments/components/mentions/MentionsMenuItem.tsx uncovered
packages/sanity/src/core/comments/components/onboarding/CommentsOnboardingPopover.css.ts uncovered
packages/sanity/src/core/comments/components/onboarding/CommentsOnboardingPopover.tsx uncovered
packages/sanity/src/core/comments/components/pte/blocks/NormalBlock.css.ts uncovered
packages/sanity/src/core/comments/components/pte/blocks/NormalBlock.tsx uncovered
packages/sanity/src/core/comments/components/reactions/TransparentCard.css.ts uncovered
packages/sanity/src/core/comments/components/reactions/TransparentCard.styled.tsx uncovered
packages/sanity/src/core/comments/plugin/field/CommentsFieldButton.css.ts uncovered
packages/sanity/src/core/comments/plugin/field/CommentsFieldButton.tsx uncovered
packages/sanity/src/core/comments/plugin/input/components/FloatingButtonPopover.css.ts uncovered
packages/sanity/src/core/comments/plugin/input/components/FloatingButtonPopover.tsx uncovered
packages/sanity/src/core/comments/plugin/input/components/InlineCommentInputPopover.css.ts covered packages/sanity/src/core/comments/components/pte/comment-input/__tests__/InlineComposerMentions.browser.test.tsx (browser test)
packages/sanity/src/core/comments/plugin/input/components/InlineCommentInputPopover.tsx covered packages/sanity/src/core/comments/components/pte/comment-input/__tests__/InlineComposerMentions.browser.test.tsx (browser test)
packages/sanity/src/core/comments/plugin/inspector/CommentsInspector.css.ts uncovered
packages/sanity/src/core/comments/plugin/inspector/CommentsInspector.tsx uncovered
packages/sanity/src/core/comments/plugin/inspector/CommentsInspectorHeader.css.ts uncovered
packages/sanity/src/core/comments/plugin/inspector/CommentsInspectorHeader.tsx uncovered
packages/sanity/src/core/documentGroupInventory/components/CreateVariant/SelectBundle.css.ts uncovered
packages/sanity/src/core/documentGroupInventory/components/CreateVariant/SelectBundle.tsx uncovered
packages/sanity/src/core/documentGroupInventory/components/DocumentGroupInventoryAction.css.ts uncovered
packages/sanity/src/core/documentGroupInventory/components/DocumentGroupInventoryAction.tsx uncovered
packages/sanity/src/core/documentGroupInventory/components/VariantSet/VariantCheckbox.css.ts uncovered
packages/sanity/src/core/documentGroupInventory/components/VariantSet/VariantCheckbox.tsx uncovered
packages/sanity/src/core/documentGroupInventory/components/VariantSet/VariantSet.css.ts uncovered
packages/sanity/src/core/documentGroupInventory/components/VariantSet/VariantSet.tsx uncovered
packages/sanity/src/core/releases/components/documentHeader/contextMenu/CopyToReleaseMenuGroup.css.ts uncovered
packages/sanity/src/core/releases/components/documentHeader/contextMenu/CopyToReleaseMenuGroup.tsx uncovered
packages/sanity/src/core/releases/components/documentHeader/styles.css.ts uncovered
packages/sanity/src/core/releases/components/documentHeader/styles.tsx uncovered
packages/sanity/src/core/releases/tool/components/Table/TableHeader.css.ts covered packages/sanity/src/core/releases/tool/components/Table/__tests__/Table.browser.test.tsx (browser test)
packages/sanity/src/core/releases/tool/components/Table/TableHeader.tsx covered packages/sanity/src/core/releases/tool/components/Table/__tests__/Table.browser.test.tsx (browser test)
packages/sanity/src/core/releases/tool/detail/ReleaseTypePicker.css.ts uncovered
packages/sanity/src/core/releases/tool/detail/ReleaseTypePicker.tsx uncovered
packages/sanity/src/core/releases/tool/detail/documentTable/DocumentTableColumnDefs.css.ts uncovered
packages/sanity/src/core/releases/tool/detail/documentTable/DocumentTableColumnDefs.tsx uncovered
packages/sanity/src/core/studio/components/navbar/free-trial/FreeTrialButton.css.ts uncovered
packages/sanity/src/core/studio/components/navbar/free-trial/FreeTrialButton.tsx uncovered
packages/sanity/src/core/studio/components/navbar/free-trial/PopoverContent.css.ts covered packages/sanity/src/core/studio/components/navbar/free-trial/__tests__/FreeTrialPopoverContent.stories.tsx
packages/sanity/src/core/studio/components/navbar/free-trial/PopoverContent.tsx covered packages/sanity/src/core/studio/components/navbar/free-trial/__tests__/FreeTrialPopoverContent.stories.tsx
packages/sanity/src/core/studio/components/navbar/new-document/NewDocumentList.css.ts uncovered
packages/sanity/src/core/studio/components/navbar/new-document/NewDocumentList.tsx uncovered
packages/sanity/src/core/studio/components/navbar/presence/PresenceMenu.css.ts uncovered
packages/sanity/src/core/studio/components/navbar/presence/PresenceMenu.tsx uncovered
packages/sanity/src/core/studio/components/navbar/resources/DiagnosticsReport.css.ts covered packages/sanity/src/core/studio/components/navbar/resources/__tests__/DiagnosticsReport.stories.tsx
packages/sanity/src/core/studio/components/navbar/resources/DiagnosticsReport.tsx covered packages/sanity/src/core/studio/components/navbar/resources/__tests__/DiagnosticsReport.stories.tsx
packages/sanity/src/core/studio/components/navbar/search/SearchDialog.css.ts uncovered
packages/sanity/src/core/studio/components/navbar/search/SearchDialog.tsx uncovered
packages/sanity/src/core/studio/components/navbar/search/components/common/FilterPill.css.ts uncovered
packages/sanity/src/core/studio/components/navbar/search/components/common/FilterPill.tsx uncovered
packages/sanity/src/core/studio/components/navbar/search/components/filters/filter/FilterPopoverContent.css.ts uncovered
packages/sanity/src/core/studio/components/navbar/search/components/filters/filter/FilterPopoverContent.tsx uncovered
packages/sanity/src/core/studio/components/navbar/search/components/filters/filter/inputs/date/datePicker/calendar/CalendarMonth.css.ts uncovered
packages/sanity/src/core/studio/components/navbar/search/components/filters/filter/inputs/date/datePicker/calendar/CalendarMonth.tsx uncovered
packages/sanity/src/core/studio/components/navbar/workspace/WorkspaceAuth/Layout.css.ts covered packages/sanity/src/core/studio/components/navbar/workspace/WorkspaceAuth/__tests__/WorkspaceAuthLayout.stories.tsx
packages/sanity/src/core/studio/components/navbar/workspace/WorkspaceAuth/Layout.tsx covered packages/sanity/src/core/studio/components/navbar/workspace/WorkspaceAuth/__tests__/WorkspaceAuthLayout.stories.tsx
packages/sanity/src/core/tasks/components/activity/helpers/index.css.ts uncovered
packages/sanity/src/core/tasks/components/activity/helpers/index.tsx uncovered
packages/sanity/src/core/tasks/plugin/TasksFooterOpenTasks.css.ts uncovered
packages/sanity/src/core/tasks/plugin/TasksFooterOpenTasks.tsx uncovered

covered: a committed *.stories.tsx (snapshotted by the "sanity studio" Chromatic project) or *.browser.test.tsx (end state snapshotted by "sanity studio vitest") imports the file, directly or through its *Story.tsx harness. pending: an open PR adds such a story; do not open a duplicate. uncovered: no story or browser test renders this file. How to add one: .agents/skills/sanity-visual-coverage/SKILL.md.

@github-actions

github-actions Bot commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

Coverage Report

Status Category Percentage Covered / Total
🔵 Lines 49.84% 40075 / 80395
🔵 Statements 45.02% 53231 / 118224
🔵 Functions 45.06% 8139 / 18061
🔵 Branches 40.02% 30742 / 76806
File Coverage
File Stmts Branches Functions Lines Uncovered Lines
Changed Files
packages/sanity/src/core/documentGroupInventory/components/DocumentGroupInventoryAction.css.ts 0% 0% 0% 0%
packages/sanity/src/core/documentGroupInventory/components/DocumentGroupInventoryAction.tsx 6.97% 0% 0% 11.53% 27-35
packages/sanity/src/core/documentGroupInventory/components/CreateVariant/SelectBundle.css.ts 0% 0% 0% 0%
packages/sanity/src/core/documentGroupInventory/components/CreateVariant/SelectBundle.tsx 3.26% 0% 0% 3.77% 33-55
packages/sanity/src/core/documentGroupInventory/components/VariantSet/VariantCheckbox.css.ts 0% 0% 0% 0%
packages/sanity/src/core/documentGroupInventory/components/VariantSet/VariantCheckbox.tsx 0% 0% 0% 0% 8-10
packages/sanity/src/core/documentGroupInventory/components/VariantSet/VariantSet.css.ts 0% 0% 0% 0%
packages/sanity/src/core/documentGroupInventory/components/VariantSet/VariantSet.tsx 0% 0% 0% 0% 8-11
packages/sanity/src/core/releases/components/documentHeader/styles.css.ts 0% 0% 0% 0%
packages/sanity/src/core/releases/components/documentHeader/styles.tsx 90% 80% 100% 100% 11-16
packages/sanity/src/core/releases/components/documentHeader/contextMenu/CopyToReleaseMenuGroup.css.ts 0% 0% 0% 0%
packages/sanity/src/core/releases/components/documentHeader/contextMenu/CopyToReleaseMenuGroup.tsx 97.36% 88.23% 100% 95% 68-74
packages/sanity/src/core/releases/tool/components/Table/TableHeader.css.ts 0% 0% 0% 0%
packages/sanity/src/core/releases/tool/components/Table/TableHeader.tsx 98.52% 97.56% 87.5% 100% 85
packages/sanity/src/core/releases/tool/detail/ReleaseTypePicker.css.ts 0% 0% 0% 0%
packages/sanity/src/core/releases/tool/detail/ReleaseTypePicker.tsx 86.89% 75.32% 100% 87.6% 91-102, 132, 167, 299-306
packages/sanity/src/core/releases/tool/detail/documentTable/DocumentTableColumnDefs.css.ts 0% 0% 0% 0%
packages/sanity/src/core/releases/tool/detail/documentTable/DocumentTableColumnDefs.tsx 80.5% 65.86% 89.47% 88.54% 94, 155, 169, 172, 222-246, 245-225, 320-321, 465, 468, 475
Generated in workflow #71942 for commit a16cc68 by the Vitest Coverage Report Action

…t inventory wrappers to vanilla-extract

Layer 4/10 of the second low-risk cherry-pick series from the styled-components to
vanilla-extract migration in #14566. Files are taken from the tip of that stack.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

Most migrated UI states lack visual coverage, and the cited Table test does not render the changed sortable header.

Get a fresh assessment by requesting another Copilot review.

Review effort: Balanced
Findings: 9 Low severity

Open (9)
What changed in this PR

Migrates release and document-group inventory UI wrappers from styled-components to vanilla-extract without intended behavior changes.

Changes:

  • Moves static, descendant, and specificity-sensitive styles into .css.ts files.
  • Preserves wrapper APIs, refs, class names, and default props.
  • Replaces internal styled elements with native elements or existing primitives.
File Description
ReleaseTypePicker.tsx Applies the extracted trigger class.
ReleaseTypePicker.css.ts Defines the schedule trigger styling.
DocumentTableColumnDefs.tsx Uses a styled native span for truncation.
DocumentTableColumnDefs.css.ts Defines ellipsis behavior.
TableHeader.tsx Applies the sortable-header class.
TableHeader.css.ts Preserves descendant font-weight specificity.
documentHeader/​styles.tsx Adds class-merging chip wrappers.
documentHeader/​styles.ts Removes styled-components wrappers.
documentHeader/​styles.css.ts Recreates chip layout and cascade rules.
CopyToReleaseMenuGroup.tsx Applies extracted list styling.
CopyToReleaseMenuGroup.css.ts Defines scrolling and child sizing.
VariantSet.tsx Replaces the styled Card wrapper.
VariantSet.css.ts Preserves clipped overflow.
VariantCheckbox.tsx Replaces the styled Checkbox wrapper.
VariantCheckbox.css.ts Preserves the expanded hit-area selector.
DocumentGroupInventoryAction.tsx Applies extracted button truncation styling.
DocumentGroupInventoryAction.css.ts Defines width and ellipsis rules.
SelectBundle.tsx Applies extracted title truncation styling.
SelectBundle.css.ts Defines flex-item ellipsis behavior.

💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread packages/sanity/src/core/releases/tool/detail/ReleaseTypePicker.tsx

This branch was successfully deployed

7 active deployments
Preview – test-studio — a16cc688 Deployed Sep 25, 2026 by vercel[bot]
Preview – studio-storybook — a16cc688 Deployed Sep 25, 2026 by vercel[bot]
Preview – auth-test-studio — a16cc688 Deployed Sep 25, 2026 by vercel[bot]
Preview – studio-diagnostics — a16cc688 Deployed Sep 25, 2026 by vercel[bot]
Preview – page-building-studio — a16cc688 Deployed Sep 25, 2026 by vercel[bot]
Preview – studio-radar — a16cc688 Deployed Sep 25, 2026 by vercel[bot]
Preview – test-studio-preview-iframe — a16cc688 Deployed Sep 25, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants