feat: add pageFrame containerMinWidthPx CI enforcement - #21
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c21c62e4d7
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if (minWidthPx === null) { | ||
| TAILWIND_MIN_WIDTH_REGEX.lastIndex = 0; | ||
| const minWidthMatch = TAILWIND_MIN_WIDTH_REGEX.exec(content); | ||
| if (minWidthMatch) { |
There was a problem hiding this comment.
Scope Tailwind min-width extraction to page container
This fallback extracts min-w-[...] from the entire file content, not from the element marked with data-contract="page-container". In a surface where the page-frame container has no min-width but some unrelated component uses min-w-[1024px], minWidthPx is populated anyway and CI can incorrectly pass containerMinWidthPx enforcement. Because this commit adds strict min-width matching, this creates a real false-negative path for the new check.
Useful? React with 👍 / 👎.
| maxWidthPx === null || | ||
| minWidthPx === null || | ||
| paddingLeftPx === null || |
There was a problem hiding this comment.
Skip min-width fallback scans when min-width is not contracted
The new guard makes every fallback strategy run whenever minWidthPx is null, but minWidthPx stays null for contracts that omit containerMinWidthPx (the common optional case). That means validation now always scans CSS/TSX fallbacks even after max-width and padding are already resolved, which is an avoidable CI-time regression introduced by this change.
Useful? React with 👍 / 👎.
Summary
layout.pageFrame.containerMinWidthPxto contract schema/typeslayout.pageframe.minwidth-mismatchValidation