Skip to content

Cards show change status in a footer band, as graph cards do - #292

Open
agorischek wants to merge 3 commits into
mainfrom
card-change-footer
Open

agorischek wants to merge 3 commits into
mainfrom
card-change-footer

Conversation

@agorischek

@agorischek agorischek commented Dec 3, 2026 •

Copy link
Copy Markdown
Collaborator

Agent assessment

Self-reported assessment, not an independent review.

Assessed revision: 9a1a64d6e263a3d54e0654605f684fe8b93c9e59

Dimension Assessment Rationale
Change confidence 8.5/10 ↑ The new status-bands check fails the 7 card scenarios (github-actions, agentic-workflows, gallery) on main's styling and passes all 90 built-in scenarios with the band; status-bands, centred-pixels, label-centring and frame-edges pass on all 90.
↑ Built-in checks for the three card renderers pass in chromium-desktop, webkit-desktop and chromium-mobile, including the scaled canvases that first failed centred-pixels; the craft spec has loose, banded and header fixtures; testing unit tests (28) pass.
↑ At emphasis 0 the band's tint and rule are transparent and its height is reserved as before (8px gap plus the 18px band), so endpoints stay neutral and nothing moves.
↑ The band turns neutral wherever the card does (pk-holds-changes, or changed parts inside it, as nesting.css decides), per Copilot's review; checked on the modified agentic-workflows cards. A card renamed and changed is marked pk-mixed-change and drawn neutral, as graph cards are.
↑ status-bands counts SVG text and graphics as a card's content, so a header status above a diagram isn't taken for a footer (fixture in the craft spec); status-bands, centred-pixels, label-centring, frame-edges, nested-accents and palette pass on all 90 scenarios.
↓ Cards that show status are now pk-frames (clipped, isolated); the full checks suite for every renderer runs in CI, not locally.
Diagnosis confidence 9/10 ↑ EntityCard already owned the footer (ChangeFooter), but the kit's HTML styling only centred its words: no band, rule or tint, unlike the SVG CardChangeMarks. Every HTML card renderer inherited the loose text.
Evidence fit 9.5/10 ↑ The reported cards (GitHub Actions deploy-worker, agentic-workflows "Added" under "Loads") are EntityCards, and the screenshots below show them before and after.

What

A card-level change status should be a footer band, as the SVG graph cards draw it (the README's e2e card): a strip across the card's bottom, ruled off from the body in the change's edge color, tinted, with the words centred. HTML cards (EntityCard) drew only the centred words, so the GitHub Actions and agentic-workflows cards showed "Added" as loose text under their body.

  • Kit: EntityCard draws the band itself whenever it gets change. A foot wrapper (pk-entity-card-foot) keeps an 8px gap and sits at the card's bottom. The band (pk-change-footer) is 18px like the SVG one, tinted with the change's highlight, and ruled in its border color (dashed 5/3 when removed). Both fade with --emphasis, so at either endpoint the band is invisible but its space stays reserved. A card that holds changes (pk-holds-changes, or changed parts inside it) or is renamed and changed (pk-mixed-change) keeps a neutral band (recessed fill, emphasis border), as SVG cards do. A card that shows status is a pk-frame, so its edge is drawn over the band's corners.
  • Renderers: github-actions, agentic-workflows and gallery all go through EntityCard, so they need no changes.
  • Check: status-bands (fails). Status words centred at a card's foot, below everything else it shows, must sit in an element that paints a surface or rule reaching the card's inner sides and bottom. Status in a header, beside a row or in SVG is left out.
  • centred-pixels: gaps are now measured in the holder's own CSS pixels, with ancestor transforms taken out. A canvas scaled to fit (the GitHub Actions view at WebKit desktop or phone width) can't land on whole device pixels, so the band's icon read as 2.51px either side; unscaled, it sits exactly 3px either side.
  • Guidance: SKILL.md tells authors to pass change to EntityCard rather than placing status text themselves. The kit guides and the testing README are updated too. Changelog fragment: card-status-band.md.

Before / after

GitHub Actions deploy-worker (added), light and dark:

GitHub Actions card before, light: Added as loose text GitHub Actions card after, light: Added in a green footer band

GitHub Actions card before, dark GitHub Actions card after, dark

agentic-workflows docs-bot-digest (added), the card's foot, light and dark:

Agentic workflows card before, light: Added under Loads as loose text Agentic workflows card after, light: Added in a footer band

Agentic workflows card before, dark Agentic workflows card after, dark

…bands check; centred-pixels measures scaled drawings in their own pixels

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot AI 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.

🟡 Changes recommended

The footer band remains amber on cards with nested value changes but no explicit holdsChanges, leaving it inconsistent with their neutral body, edge, and status text.

1 open issue
What changed in this PR

Aligns HTML card change-status footers with graph cards through the shared renderer kit.

Changes:

  • Adds tinted footer bands with rules and emphasis-based fading.
  • Adds status-bands validation and scale-aware pixel measurements.
  • Updates tests, author guidance and release notes.
File Description
packages/​renderers/​testing/​test/​helpers.test.mjs Updates the check count.
packages/​renderers/​testing/​src/​types.ts Adds status-band report and check types.
packages/​renderers/​testing/​src/​measure/​pixels.ts Measures gaps in local CSS pixels.
packages/​renderers/​testing/​src/​measure/​craft/​bands.ts Detects loose card status text.
packages/​renderers/​testing/​src/​measure/​craft.ts Includes status-band measurements.
packages/​renderers/​testing/​src/​checks/​craft.ts Implements the status-band check.
packages/​renderers/​testing/​src/​checks/​catalog.ts Registers check title and guidance.
packages/​renderers/​testing/​README.md Documents the new check.
packages/​renderers/​kit/​styles/​layout.css Styles footer bands and neutral states.
packages/​renderers/​kit/​src/​react/​layout-components.tsx Adds footer wrappers and card framing.
packages/​renderers/​harness/​browser/​craft.spec.ts Tests loose, banded and header statuses.
packages/​cli/​templates/​SKILL.md Guides authors toward built-in footer bands.
docs/​reference/​renderer-kit.md Updates the EntityCard description.
docs/​guides/​renderer-kit-graphs.md Explains HTML and SVG footer consistency.
docs/​guides/​renderer-kit-components.md Documents the card footer option.
docs/​agents/​create-projection.md Updates authoring and validation guidance.
changelog.d/​card-status-band.md Records footer and validation changes.

Review effort: Balanced

…ing changed parts

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot AI 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.

🔵 Needs a closer look

Mixed HTML cards retain misleading colored bands, and the status-band check can falsely reject valid cards by ignoring SVG body text.

No open issues 🎉

2 previously missed issues

In code that hasn't changed since last review

Medium severity Render mixed HTML cards with neutral change bands

packages/​renderers/​kit/​styles/​layout.css:299

For a card with change={{status: 'modified', renamed: true}} and no marked descendants, the new band stays amber in diff mode (violet in progress mode), surrounding the differently colored “Renamed” and “Modified” statuses. Graph cards explicitly keep this case neutral via mixedChange/pk-mixed-change (emphasis.ts:33–38, nesting.css:27–33). Please mark mixed HTML cards too and include them in the neutral-band override so the new band matches that treatment.

Medium severity Include SVG text when detecting loose footer statuses

packages/​renderers/​testing/​src/​measure/​craft/​bands.ts:24

A centred header status above an SVG diagram is incorrectly reported as a loose footer when the diagram contains the remaining text: this skips all SVG text, so textBottom() sees nothing below the header. Since status-bands is a failing check, valid cards can fail validation. Include SVG body text when locating the card's last content; SVG status candidates are already excluded separately in looseStatuses().

1 resolved since last review

Review effort: Balanced

… is; status-bands counts SVG and graphics as a card's content

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@agorischek

Copy link
Copy Markdown
Collaborator Author

Addressed the two items Copilot flagged as previously missed, in 9a1a64d:

  • Mixed cards: EntityCard marks a card that is renamed and changed pk-mixed-change. Its body, edge and band are drawn neutral, as a graph card's are, and each status word keeps its own hue. A kit test covers it.
  • SVG content: status-bands now counts SVG text and graphics (svg, img, canvas, video) as a card's content. A centred header status above a diagram therefore isn't treated as a footer. A craft-spec fixture covers it.

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

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants