Skip to content

Fix: detect side-tab stripes drawn as child elements (#394) - #804

Open
abdulwahabone wants to merge 8 commits into
mainfrom
fix/394-stripe-child
Open

abdulwahabone wants to merge 8 commits into
mainfrom
fix/394-stripe-child

Conversation

@abdulwahabone

Copy link
Copy Markdown
Collaborator

side-tab missed empty chromatic edge children (Tailwind w-1 bg-amber-500, flex-row rails, absolute inset). The same rule now flags those constructions in the text, static HTML, and browser engines, with the existing exemptions for neutrals, selected/active, and ordinary narrow content.

Fixes #394

Validated with crate tests, oracle goldens, and the issue's JSX repro. Prepared with AI assistance.

Made with Cursor

Empty narrow chromatic children (Tailwind w-1 bg-*, flex-row rails, absolute inset) now flag as side-tab across the text, static HTML, and browser engines.

Prepared with AI assistance.

Co-authored-by: Cursor <cursoragent@cursor.com>
@greptile-apps

greptile-apps Bot commented Sep 10, 2026 •

Copy link
Copy Markdown

RetriggerConfidence Score: 5/5

The PR appears safe to merge; the latest fix fully handles the previously missed initial and unset auto-height cases without introducing a new actionable issue.

Summary

This PR extends the existing side-tab detector to recognize empty, narrow, chromatic child elements used as card-edge stripes.

  • Adds shared stripe-child classification and browser geometry checks.
  • Adds static HTML handling for flex and absolutely positioned stripes, including cascade-order and CSS-wide height behavior.
  • Adds conservative Tailwind/JSX text matching with false-positive gates.
  • Updates fixtures, contract documentation, browser assets, and oracle goldens.
  • The latest changes fully address the previous static-engine miss for height: initial and height: unset.
Diagram
%%{init: {'theme': 'neutral'}}%%
flowchart LR
    Source[HTML / JSX / Browser DOM] --> Text[Regex text matcher]
    Source --> Static[Static HTML engine]
    Source --> Browser[Browser DOM engine]
    Static --> Layout[Resolve flex, inset, height, and edge]
    Browser --> Geometry[Measure child and host geometry]
    Text --> Cues[Check Tailwind width, color, emptiness, and edge cues]
    Layout --> Gate[Shared stripe-child gate]
    Geometry --> Gate
    Cues --> Finding[side-tab finding]
    Gate --> Finding
Loading

Reviews (8) · Last reviewed commit: "Honor auto-height reset keywords in stri..."

Comment thread crates/detect/src/regex_matchers.rs
Comment thread crates/html/src/adapters.rs Outdated
Comment thread crates/html/src/adapters.rs Outdated

@cursor cursor Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Stale Bugbot comment from a previous run.

Comment thread crates/html/src/adapters.rs
Comment thread crates/html/src/adapters.rs Outdated
Comment thread crates/html/tests/stripe_child.rs
Keep flex/align out of the frozen expandStaticDeclaration map, require empty tagged stripe cues on the text path, and honor inset order plus rem width.

Prepared with AI assistance.

Co-authored-by: Cursor <cursoragent@cursor.com>
Comment thread crates/detect/src/regex_matchers.rs
A class-only line has no opening tag, so emptiness is unknown; still require a self-closing or empty tag when the tag is on this line.

Prepared with AI assistance.

Co-authored-by: Cursor <cursoragent@cursor.com>
@github-actions github-actions Bot added the ready to merge Passing, resolved, and ready for a maintainer merge decision label Sep 10, 2026
@github-actions github-actions Bot added blocked: merge conflicts PR cannot merge until conflicts are resolved waiting on contributor Waiting for the PR author to respond or make changes and removed ready to merge Passing, resolved, and ready for a maintainer merge decision labels Sep 11, 2026
AI-assisted conflict resolution performed by Codex at maintainer pbakaus request. Preserve both stripe-child and placeholder checks/tests; rebuild the browser bundle. Reviewed aggregate oracle deltas: only main placeholder cases added to the prior PR results, no findings removed. Rust workspace, source-first build, full Bun/Node/oracle/plugin suite, and real Chrome stripe fixture passed.
@pbakaus

pbakaus commented Sep 15, 2026

Copy link
Copy Markdown
Owner

AI-assisted update for pbakaus: merged current main into this branch in afc0596, preserving both stripe-child checks and the new placeholder checks/tests. Rebuilt the tracked detector bundle; generated provider harness output was not refreshed. All Rust workspace tests, source-first build, full Bun/Node/oracle/plugin suite, and a Chrome URL scan of stripe-child.html passed (all four intended stripe hits). Reviewed aggregate oracle changes: main adds only its four placeholder findings to the previous PR output; nothing was removed. No merge performed.

Comment thread tests/fixtures/antipatterns/stripe-child.html

@cursor cursor Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Stale Bugbot comment from a previous run.

Comment thread crates/html/src/adapters.rs Outdated
Comment thread crates/detect/src/regex_matchers.rs
AI-assisted changes requested by pbakaus. Preserve winning auto inset longhands and require complete Tailwind cue tokens. Added regressions that fail before the fixes; focused tests, cargo test --workspace, release build, and the full rebuilt-engine Bun/Node suite pass.
@pbakaus

pbakaus commented Sep 15, 2026

Copy link
Copy Markdown
Owner

AI-assisted final verification for pbakaus: 8b0cc87 fixes both new Cursor findings with regressions that failed beforehand. Full Rust workspace tests, release build, rebuilt-engine Bun/Node suite and the earlier real Chrome stripe fixture check passed. Current CI is green, both review bots succeeded, no unresolved review threads remain, and the post-push review quiet window completed (01:36:49–01:46:59 UTC, 610 seconds). PR remains open and ready; nothing merged.

@github-actions github-actions Bot added ready to merge Passing, resolved, and ready for a maintainer merge decision needs maintainer review Ready for a maintainer to review or decide and removed blocked: merge conflicts PR cannot merge until conflicts are resolved waiting on contributor Waiting for the PR author to respond or make changes ready to merge Passing, resolved, and ready for a maintainer merge decision labels Sep 15, 2026
Preserve stripe-child findings while adopting upstream rendered-rule changes. Rebuild the detector bundle and update only upstream descriptions in stripe and aggregate oracle goldens. Full Rust, rebuilt-engine Bun/Node, distribution and real Chrome fixture checks pass.

AI-assisted by Codex under pbakaus's instructions.

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes using default effort and found 2 potential issues.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Want higher recall? High effort reviews run extra passes and find more bugs. A team admin can switch effort levels in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 7454f54. Configure here.

Comment thread crates/core/src/browser/element_checks.rs
Comment thread crates/html/src/adapters.rs
Do not infer a full-height absolute stripe from opposing insets when height is definite. Cover px, rem, percent and calc corner tiles, and pin existing anchor/button exemptions. Full Rust workspace, rebuilt-engine Bun/Node suite and build pass; static and real Chrome agree on the repro.

AI-assisted by Codex under pbakaus's instructions.
Comment thread crates/html/src/adapters.rs Outdated
Treat initial and unset as auto for non-inherited height in both absolute and flex stripe detection. Cover keyword casing and keep definite-height tiles excluded.

AI-assisted by Codex at the request of maintainer pbakaus.
@github-actions github-actions Bot removed the needs maintainer review Ready for a maintainer to review or decide label Sep 22, 2026
@github-actions github-actions Bot added the ready to merge Passing, resolved, and ready for a maintainer merge decision label Sep 22, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Thanks for the PR. Impeccable is moving quickly, and this PR is currently waiting on contributor action.

It has been waiting for contributor action for 12 days. Please address the outstanding review feedback, draft state, merge conflict, policy requirement, or explicit maintainer wait request. PRs that are still waiting on contributor action after 14 days are closed automatically.

If nothing changes, this PR may be closed on or after 2026-09-25. Happy to reopen when it is ready to continue.

@github-actions github-actions Bot added blocked: merge conflicts PR cannot merge until conflicts are resolved stale Inactive PR that may be closed soon waiting on contributor Waiting for the PR author to respond or make changes and removed ready to merge Passing, resolved, and ready for a maintainer merge decision stale Inactive PR that may be closed soon labels Sep 23, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Thanks for the PR. Impeccable is moving quickly, and this PR is currently waiting on contributor action.

It has been waiting for contributor action for 7 days. Please address the outstanding review feedback, draft state, merge conflict, policy requirement, or explicit maintainer wait request. PRs that are still waiting on contributor action after 14 days are closed automatically.

If nothing changes, this PR may be closed on or after 2026-10-07. Happy to reopen when it is ready to continue.

@github-actions github-actions Bot added the stale Inactive PR that may be closed soon label Sep 30, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

blocked: merge conflicts PR cannot merge until conflicts are resolved stale Inactive PR that may be closed soon waiting on contributor Waiting for the PR author to respond or make changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

detector: side-tab rule misses non-border stripe constructions (inset box-shadow, ::before, stripe divs)

2 participants