Skip to content

feat(components): mine layout deviations from visual repetition - #408

Draft
wibus-wee wants to merge 2 commits into
geometry-geometric-row-discoveryfrom
feat/capture-mobile-viewports
Draft

feat(components): mine layout deviations from visual repetition#408
wibus-wee wants to merge 2 commits into
geometry-geometric-row-discoveryfrom
feat/capture-mobile-viewports

Conversation

@wibus-wee

Copy link
Copy Markdown
Member

Summary

  • add a visual-only heuristic that mines alignment and pitch deviations from repeated rendered boxes
  • group by normalized visual kind and height, rank candidates without applying a gate threshold
  • cover alignment, series splitting, kind normalization, ranking, and irregular-pitch cases

Testing

  • Not run (not requested).

Stack

The authored contracts only find what a reviewer already wrote down, and
they name their members by DOM shape — row family, role, accessible name.
That hides the defects worth finding: a layout bug comes from two code
paths rendering one visual thing differently, so it correlates with the
structural difference, and a structural key files the two paths into
different groups and never compares them.

So group by what renders alike and mine the expected edge from what the
run's best-supported level actually does. Nobody writes down that the
indent step is 26px; it is counted. Bias is recall — candidates are
ranked, never filtered — so a legitimate indent ladder comes back too and
sorts below the stray, whose level has no company.

Not wired to the capture run or the gate: a recall-first pass that blocks
CI has one natural remedy, raising its thresholds, which destroys the
recall it exists for.

Model: claude-opus-5[1m]

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 5, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-09-05T03:11:05.524032Z 545e26d PR opened
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 545e26de06

ℹ️ 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".

Comment on lines +258 to +259
const axis = seriesAxis(group);
for (const run of splitIntoSeries(group, axis, seriesBreakRatio, minimumSeriesLength)) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Infer orientation after isolating each visual series

When one signature occurs in multiple side-by-side vertical lists, seriesAxis(group) measures the entire page-wide group before those lists are separated; if their horizontal separation exceeds their vertical span, it classifies them as one horizontal series. splitIntoSeries then orders by X (often producing zero gaps for same-column atoms), emits false Y/pitch deviations for an otherwise regular grid, and never checks either list's X alignment. Partition local series before selecting an orientation for each one.

AGENTS.md reference: packages/components/src/lib/geometry-discovery/AGENTS.md:L46-L48

Useful? React with 👍 / 👎.

@wibus-wee
wibus-wee marked this pull request as draft September 5, 2026 03:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant