Skip to content

feat(calibration): size-constraints strip responsive visual-compare (…#209

Merged
let-sunny merged 2 commits intomainfrom
feat/205-size-constraints-responsive-strip
Mar 30, 2026
Merged

feat(calibration): size-constraints strip responsive visual-compare (…#209
let-sunny merged 2 commits intomainfrom
feat/205-size-constraints-responsive-strip

Conversation

@let-sunny
Copy link
Copy Markdown
Owner

@let-sunny let-sunny commented Mar 30, 2026

#205)

  • converter.md: mandatory expanded-viewport compare for size-constraints strip; baselineResponsiveSimilarity from step 6 responsiveSimilarity
  • evaluation: apply strip override for responsive-critical only when size-constraints.responsiveDelta is finite
  • critic.md: document conditional strip vs baseline responsive
  • tests: strip ablation applies when strip responsive delta present

Made-with: Cursor

Summary by CodeRabbit

  • Bug Fixes

    • More accurate responsive similarity measurement at expanded viewport; size-constraint comparisons are now required and produce explicit responsive metrics when available.
    • Responsive-critical rule handling refined so strip-based overrides apply only when a valid size-constraint responsive metric exists; otherwise baseline responsive classification is preserved.
  • Tests

    • Added and updated tests to verify responsive-critical behavior across finite and non-finite metric scenarios and to ensure correct inclusion/exclusion of strip-based overrides.

…205)

- converter.md: mandatory expanded-viewport compare for size-constraints strip;
  baselineResponsiveSimilarity from step 6 responsiveSimilarity
- evaluation: apply strip override for responsive-critical only when
  size-constraints.responsiveDelta is finite
- critic.md: document conditional strip vs baseline responsive
- tests: strip ablation applies when strip responsive delta present

Made-with: Cursor
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Mar 30, 2026

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 29d8f62d-e2a7-464a-afe0-e78723b7d15d

📥 Commits

Reviewing files that changed from the base of the PR and between ab232cc and fcaa5e7.

📒 Files selected for processing (1)
  • src/agents/evaluation-agent.test.ts

📝 Walkthrough

Walkthrough

The pull request requires responsive comparison at the expanded viewport for size-constraints strips and conditions responsive-critical rule overrides on the presence of a finite size-constraints.responsiveDelta, while keeping responsive fields null for other strip types when step 6 is skipped.

Changes

Cohort / File(s) Summary
Converter & Critic docs
.claude/agents/calibration/converter.md, .claude/agents/calibration/critic.md
Clarify responsive similarity instructions: always measure responsive fields for size-constraints at expanded viewport (run visual-compare and record responsiveSimilarity/responsiveDelta); make responsive-critical override behavior conditional on a finite size-constraints.responsiveDelta.
Evaluation agent implementation
src/agents/evaluation-agent.ts
Add sizeConstraintsStripHasResponsiveMetric() and change strip-override logic to skip responsive-critical overrides only when size-constraints.responsiveDelta is missing or non-finite; allow strip-based classification when a finite responsiveDelta exists.
Tests
src/agents/evaluation-agent.test.ts
Update test descriptions; add cases asserting responsive-critical overrides are applied when size-constraints.responsiveDelta is finite and not applied when it is non-finite (NaN, +Infinity, -Infinity).

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~22 minutes

Possibly related issues

Possibly related PRs

Poem

🐰 In widened view the strips align,

size-constraints sings its responsive sign.
When delta is finite, ablation may play,
otherwise the baseline holds the day.
A rabbit cheers for metrics kept in mind.

🚥 Pre-merge checks | ✅ 2
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main change: implementing mandatory responsive visual-compare for size-constraints strip at expanded viewport.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/205-size-constraints-responsive-strip

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@src/agents/evaluation-agent.test.ts`:
- Around line 536-573: Add a test that explicitly passes a non-finite
responsiveDelta (e.g., NaN or Infinity) to the runEvaluationAgent call to
exercise the production gate that treats non-finite like missing values;
duplicate the existing test case structure using EvaluationAgentInput, set
responsiveDelta to NaN (or Infinity), include the same stripDeltas and rule data
for "missing-size-constraint", then assert the resulting mismatch for ruleId
"missing-size-constraint" has the same expected actualDifficulty and contains
"strip-ablation" (or whatever the current null/missing behavior asserts). Ensure
the new test references runEvaluationAgent, EvaluationAgentInput,
responsiveDelta, stripDeltas, and the ruleId "missing-size-constraint" so it's
clear which logic is being validated.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 44208f00-d149-4027-b560-c5a16343ff54

📥 Commits

Reviewing files that changed from the base of the PR and between fb45b54 and ab232cc.

📒 Files selected for processing (4)
  • .claude/agents/calibration/converter.md
  • .claude/agents/calibration/critic.md
  • src/agents/evaluation-agent.test.ts
  • src/agents/evaluation-agent.ts

…ite responsiveDelta

Addresses CodeRabbit PR #209 review — NaN/±Infinity treated like missing.

Made-with: Cursor
@let-sunny let-sunny merged commit 06d55d8 into main Mar 30, 2026
2 of 3 checks passed
@let-sunny let-sunny deleted the feat/205-size-constraints-responsive-strip branch March 30, 2026 19:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant