Repository navigation
Graph cards: no weight bar along the top edge; the accent band replaces the card's border - #72
Conversation
…es the card's border Size by's bar along a card's top edge read as a rendering glitch, and the card already shows the value itself (12K) on its kind line. Size by now shows only that number, and the legend says what it is (Number on each card: tokens). The kit's GraphCanvas weight prop, weightShares and the gauge go with it. A card's accent band was a path with a fixed 6-unit radius from the card's outer edge: its corners missed the card's themed radius and half the card's border showed outside it. It is now the card's own shape, filled and edged in the accent and cut to the band's width, so its corners are the card's and its edge replaces the border there. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
|
One or more custom setup steps configured for this repository failed during this Copilot code review run: Setup steps run before each review. If the review above is missing context, or no review was posted at all, the failing step above may be the cause. See the workflow run for failure details, fix your setup steps configuration, and re-request a review. Note You can configure setup steps for Copilot code review separately from Copilot cloud agent with a |
There was a problem hiding this comment.
🟡 Changes recommended
The API removal leaves live consumers that break typechecking and tests, while file cards lose their visible numeric “Size by” indicator in normal and diff modes.
2 open issues
What changed in this PR
This PR simplifies graph cards by removing top-edge size gauges from the shared renderer kit and changing accent bands to follow the card’s border and corner radius.
Changes:
- Removes the gauge and its weight-related APIs, leaving compact numeric detail as the Size by display.
- Replaces the accent path with a clipped, filled-and-stroked card rectangle.
- Updates control descriptions, legend labels, documentation, and test expectations.
| File | Description |
|---|---|
packages/renderers/kit/styles/graph.css |
Applies themed stroke and radius to accent bands. |
packages/renderers/kit/src/react/graph-canvas/props.ts |
Removes the canvas weight prop. |
packages/renderers/kit/src/react/graph-canvas/gauge.tsx |
Deletes the gauge component. |
packages/renderers/kit/src/react/graph-canvas/facts.tsx |
Renders accents as clipped card rectangles. |
packages/renderers/kit/src/react/graph-canvas/entity-card.tsx |
Stops rendering weight gauges. |
packages/renderers/kit/src/react/graph-canvas/drawing.ts |
Removes weight-share drawing state. |
packages/renderers/kit/src/react/graph-canvas/canvas.tsx |
Removes weight-share computation and propagation. |
packages/renderers/kit/src/index.ts |
Removes public weight-helper exports. |
packages/renderers/kit/src/graph-canvas/weight.ts |
Deletes weight normalization helpers. |
packages/renderers/graph/test/facts.test.mjs |
Updates the expected numeric legend label. |
packages/renderers/graph/src/facts/controls.ts |
Describes Size by as numeric detail. |
packages/renderers/graph/src/facts.ts |
Removes weight facts and updates legend wording. |
packages/renderers/graph/browser/architecture.spec.ts |
Checks gauge absence and the revised legend. |
docs/reference/renderer-kit.md |
Removes documentation for deleted weight APIs. |
docs/builtins/renderers/graph.md |
Documents numeric-only Size by behavior. |
Review effort: Balanced
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
A file card has no kind line, so its only mark of Size by was the bar. Its number now sits at the right of its path line, which leaves it room, and a diff card puts it on a line of its own under the path. The facts test no longer reads the removed weight. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
The band was the card's whole shape cut to its width, so its box enclosed the card's icon (a change color inside a change color, by the nested-accents check) and its accented edge hid the card's ring. It is now two band-wide rects cut to the card's corners by clip paths of its shape: the band from the border's middle, and a rim over the border's outer half that gives way while the card is ringed. The drawing carries the card's border width. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>


The user, about the self-topology projection's architecture cards: "This bar at the top of cards in the self projection honestly looks kind of like a bug and it might not really be necessary."
What the bar was
It's the Size by gauge (
sizeBy: /data/tokensin the self-topology definition), drawn by the kit'sGraphCanvas, not emitted by the extractor. Its length is the square root of the card's share of the largest card's value, from the leading corner, in the accent's paint. The legend called it "Top bar: tokens".It's redundant. Every card keeps one width, and the exact value is already on the card's kind line, compact (
30K). The bar only repeated it, imprecisely, in a form that reads as a rendering glitch beside the accent band.Changes
Size by now shows only the number. The legend says what it is ("Number on each card: tokens"), and the control's description no longer claims cards grow wider.
Kit:
GraphCanvas'sweightprop,weightShares/WeightShareand the gauge are removed. No other built-in used them.The accent band no longer doubles the card's border. It was a path with a fixed 6-unit corner radius, drawn from the card's outer edge, so:
The band is now the card's own rectangle, with the same CSS radius, filled and stroked in the accent and clipped to the band's width. Its corners are the card's, and its edge replaces the border there: one line.
Docs and tests:
docs/builtins/renderers/graph.mdand the kit reference are updated, and so are the facts unit test and the architecture spec. The spec now asserts there's no.node-gaugeand checks the new legend label.The self-topology definition doesn't change, so
check -p self-topologyisn't affected.Changes since review
fact-graph.tsxno longer passesweight, and the facts test no longer reads it.clipPaths of its shape. The rim covers the border's outer half at rest and gives way while the card is ringed, so the ring shows; the band never encloses the card's icon. This fixes CI'scheck -p self-topologyring and nested-accent failures, and the check passes locally.Before → after: self-topology
enginecard (2×)Light:
Dark:
The top-left corner, 6× (before, then after): the band now follows the card's corner and replaces its border there.
Checks
tools check --fastpasses.projections show -p self-topology --png --scale 2, rendered with main's and this branch's renderer assets.