Skip to content

Runtime policy: draw chips with the kit's Chip - #224

Open
agorischek wants to merge 1 commit into
agorischek/kit-chipfrom
agorischek/rp-chips
Open

agorischek wants to merge 1 commit into
agorischek/kit-chipfrom
agorischek/rp-chips

Conversation

@agorischek

@agorischek agorischek commented Dec 1, 2026 •

Copy link
Copy Markdown
Collaborator

Agent assessment

Self-reported assessment, not an independent review.

Assessed revision: 9b77a5e5ed73a1dd5659923356d9f39ffe257bde

Dimension Assessment Rationale
Change confidence 9/10 ↑ runtime-policy unit tests, browser spec and renderer checks pass on chromium-desktop, webkit-desktop and chromium-mobile.
↑ Before/after screenshots differ only where a chip's label wraps.
↓ Only the credentials fixture was screenshotted.

Superego feedback item 15, migration. Stacked on #223 (kit Chip).

runtime-policy's "applies to" chips (binaries, workloads, policies) are now the kit's Chip:

  • painted in the diff when they arrive or leave on their own (paint), signed only when they move with their row;
  • removed ones struck and muted;
  • selectable parts with the renderer's hover tint.

The renderer drops its own chip styles (pill metrics, fill, sign and removed rules). It keeps .rp-chips and the hover rule.

Visual result: identical to main, except a chip whose label wraps now has its sign by the first line, like a list marker, instead of centred.

Before (main) and after, light and dark (the Policies panel's wrapped chips):

runtime-policy chips before and after, light
runtime-policy chips before and after, dark

Not migrated: database tags. They're canvas-placed slots, measured once with every name a tag has, wrapped with balancedWrap and crossfading a renamed tag's name, at the card radius with wider padding. They already use the kit's StatusTab. Moving them onto Chip would change their look and keep their own measuring and placement, so they stay as they are.

The binaries, workloads and policies a rule or policy applies to are kit chips:
painted in the diff when they arrive or leave on their own, signed only when
they move with their row, struck when removed. The renderer keeps its hover
tint and drops its own chip styles.

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

The wrapped-label layout and removal-styling changes require real-host visual validation at intermediate emphasis and desktop/mobile widths, which could not be performed in this review environment.

No open issues 🎉

What changed in this PR

Migrates runtime-policy’s “applies to” chips to the renderer kit’s shared Chip component, following #223. Database tags remain unchanged.

Changes:

  • Uses kit chips for change indicators, removed labels, and selection, preserving the renderer’s hover tint.
  • Removes redundant chip styling; wrapped labels now place the sign beside the first line.
  • Updates unit and browser assertions for the kit’s markup and change attributes.
File Description
packages/​renderers/​runtime-policy/​test/​runtime-policy.test.mjs Updates the removed-chip markup assertion.
packages/​renderers/​runtime-policy/​src/​styles.css Removes chip styles now supplied by the kit.
packages/​renderers/​runtime-policy/​src/​chips.tsx Replaces custom chip buttons with the kit’s Chip.
packages/​renderers/​runtime-policy/​browser/​runtime-policy.spec.ts Updates selectors to use kit change attributes.

Review effort: Balanced

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