overhaul variant UI: editable card, picker dialog, name editing#12
Merged
Conversation
Reworks the variants experience end-to-end so the page-level and section-level variant flows share the same components, sizing, and behaviour. - Replace the custom matcher-picker modal with a CommandDialog list - Convert the variant rule area into a collapsible bordered card (state persisted in localStorage) with the Rule picker and schema fields aligned at the same px-5 inset - Make the variant title in the breadcrumb inline-editable via a pencil affordance; persist as a top-level "name" on the raw multivariate variant (exposed through CmsVariant / PageVariantEntry) - Rebuild DateField as a styled overlay over a real datetime-local input so users can both type and pick; restore the input border beneath the overlay - Unify both variant lists on a single SortableVariantItem (flag icon only, no colored chip) with drag-reorder for page variants too - Allow adding the first page variant from a flat-sections page - Add a delete button inside the page-variant detail breadcrumb - Drop all-caps title styling; bring section labels to text-sm font-semibold to match the FieldLabel scale Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Apply biome auto-fixes to satisfy ci:check: - Format api/tools/files.ts and web/tools/file-explorer/cms-form.tsx - Sort imports in web/tools/file-explorer/index.tsx Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
- Remove try/catch around localStorage and showPicker; let the rare
failure modes throw naturally
- Drop ad-hoc { name?: string } casts on variant types now that name
lives on CmsVariant and PageVariantEntry
- Collapse repeated newName.trim() and intermediate Record<string,
unknown> shuffling in the rename handlers
- Use cn() instead of an inline ternary on the date overlay span
- Strip a few what-comments left over from refactors
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
guitavano
approved these changes
May 8, 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.
Summary
Reworks the variants UX end-to-end so page-level and section-level flows share the same components, sizing, and behaviour. Adds a
namefield on multivariate variants (plumbed throughCmsVariant/PageVariantEntry) editable inline from the breadcrumb via a pencil affordance, swaps the custom matcher-picker modal for aCommandDialoglist, and rebuilds the rule area as a collapsible bordered card whose open state persists inlocalStorage. TheDateFieldis now a styled overlay over a realdatetime-localinput so users can both type and pick — and the overlay finally inherits the same border the input has, fixing the apparent "borderless" look. Both variant lists were unified on a singleSortableVariantItem(flag icon only, no colored chip) with drag-reordering on page variants too, and you can now add the first page variant from a flat-sections page or delete a page variant from inside its detail view.Test plan
🤖 Generated with Claude Code
Summary by cubic
Overhauled the variants UI so page-level and section-level share the same components and flows, with inline variant naming, a new rule picker, and a cleaner date input. Adds drag-reordering for page variants and lets you add the first page variant from a flat page.
New Features
nameon multivariate variants and exposed viaCmsVariant/PageVariantEntry.CommandDialog.SortableVariantItemwith drag-reorder for page variants; you can add the first page variant and delete a page variant from its detail view.DateFieldnow overlays a realdatetime-localinput so users can type or pick, with a clear button and visible border.Refactors
name(getPageSectionsTool, Zod schemas).onChangeVariantName,onChangePageVariantName, andonReorderPageVariants; wiring for auto-save and preview refresh included.nameis on the types; minor UI tidy-ups.Written for commit 21b1f55. Summary will update on new commits.