Repository navigation
Add chrome policy contract support - #22
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 8f086343d4
ℹ️ 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".
| for (let index = sectionStack.length - 1; index >= 0; index -= 1) { | ||
| if (sectionStack[index]?.tagName === tagName) { | ||
| sectionStack.splice(index, 1); | ||
| break; |
There was a problem hiding this comment.
Pop section stack only for tracked opening tags
The landing-pattern parser currently removes a tracked section whenever it sees any closing tag with the same tag name, even if that closing tag belongs to an untracked element. In markup like <section data-contract-section="hero"><section>...<section data-contract-section="guidance">...</section></section></section>, the inner plain </section> pops hero from sectionStack, so subsequent contract sections can be misclassified as top-level and nested-order violations are missed under strict policy.
Useful? React with 👍 / 👎.
| const MIN_SCREEN_CLASS_REGEX = | ||
| /className\s*=\s*(?:"[^"]*\bmin-h-screen\b[^"]*\bw-full\b[^"]*"|'[^']*\bmin-h-screen\b[^']*\bw-full\b[^']*')/; |
There was a problem hiding this comment.
Make landing background class detection order-insensitive
The class matcher for background-mode extraction assumes min-h-screen appears before w-full, but class order is not semantically meaningful in JSX/HTML. If a page uses className="w-full min-h-screen", extractPageBackgroundMode falls back to unknown, and landing-pattern-background-mode enforcement is silently skipped for that surface.
Useful? React with 👍 / 👎.
Summary
Verification