Codex flagged: the previous image-card test had \`height: 180\` with an image fill_container child + a moderately long caption. With the way fitContentHeight resolves a fill_container image's height (returns 0 when no parent height context), the natural height landed at ~120 — well below the declared 180 — so the bug condition \`natural > declared\` never fired and the assertion \`changed === false\` would have passed even with image-card back in CARD_ROLES. Rewrite to actually exercise the regression: - Drop declared height to 80 (a tight 1:3.75 crop). - Use a multi-paragraph caption that wraps to ~10 lines at the card's 300px width — natural height lands at ~210, well past 80. - Add a sanity assertion (\`fitContentHeight(card) > 80\`) before the no-change check so future edits to the test fixture can't silently re-introduce the vacuous-pass shape without setting off this guard. - Mirror the same shape under \`role: 'card'\` and assert it DOES get expanded. The role-based gate is the whole point of the fix; asserting the contrast across two near-identical fixtures makes the regression's blast radius and behavior obvious. Verified by temporarily putting \`image-card\` back into CARD_ROLES: the test correctly fails with "expected true to be false". With the fix in place, all 6 tests pass. |
||
|---|---|---|
| .. | ||
| agent-native@e1f90cab96 | ||
| pen-acp | ||
| pen-ai-skills | ||
| pen-core | ||
| pen-engine | ||
| pen-figma | ||
| pen-mcp | ||
| pen-react | ||
| pen-renderer | ||
| pen-sdk | ||
| pen-types | ||
| CLAUDE.md | ||