Skip to content

Graph cards: no weight bar along the top edge; the accent band replaces the card's border - #72

Merged
agorischek merged 6 commits into
mainfrom
agorischek/drop-weight-gauge
Nov 20, 2026
Merged

agorischek merged 6 commits into
mainfrom
agorischek/drop-weight-gauge

Conversation

@agorischek

@agorischek agorischek commented Nov 20, 2026 •

Copy link
Copy Markdown
Collaborator

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/tokens in the self-topology definition), drawn by the kit's GraphCanvas, 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's weight prop, weightShares/WeightShare and 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:

    • with the themed radius (8 in the harness), its corners missed the card's;
    • the outer half of the card's grey border showed outside it.

    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.md and the kit reference are updated, and so are the facts unit test and the architecture spec. The spec now asserts there's no .node-gauge and checks the new legend label.

The self-topology definition doesn't change, so check -p self-topology isn't affected.

Changes since review

  • File cards have no kind line, so the bar was their only mark of Size by. Their number now sits at the right of the path line, with the path's room reduced to fit. A diff card puts it on its own line under the path.
  • fact-graph.tsx no longer passes weight, and the facts test no longer reads it.
  • The accent band is now two band-wide rects, clipped to the card's corners by 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's check -p self-topology ring and nested-accent failures, and the check passes locally.

Before → after: self-topology engine card (2×)

Light:

before light
after light

Dark:

before dark
after dark

The top-left corner, 6× (before, then after): the band now follows the card's corner and replaces its border there.

corner before light
corner after light
corner before dark
corner after dark

Checks

  • tools check --fast passes.
  • Kit unit tests (139) and graph unit tests (39) pass, and so does the architecture spec's Size by test (chromium-desktop).
  • Crops come from projections show -p self-topology --png --scale 2, rendered with main's and this branch's renderer assets.

…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>

Copilot AI commented Nov 20, 2026

Copy link
Copy Markdown

One or more custom setup steps configured for this repository failed during this Copilot code review run:

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 copilot-code-review.yml file. Read the docs for details.

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 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

Comment thread packages/renderers/graph/src/facts.ts Resolved
agorischek and others added 5 commits November 20, 2026 08:00
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>
@agorischek
agorischek merged commit 598f634 into main Nov 20, 2026
95 of 96 checks passed
@agorischek
agorischek deleted the agorischek/drop-weight-gauge branch November 20, 2026 20:18
@agorischek agorischek mentioned this pull request Dec 1, 2026
2 of 3 tasks
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