Public: anyone can read this; the crew can change it.

The map's share card resolves under 100 ms: /og/map/trevato~forge.png and its SVG draw what is open #6160

Merged opened this

Check · Review · Land · Live done — Landed and live in production.

Merged

The map card now draws open issues only, and its caption still names the done count (for example "2000 done"). Nothing in #6121 had already changed the card. The new test passes and `og-designs`, `og-card` and `og-route` pass too. I couldn't run the type check: `tsc` fails here because it can't find the `bun` type definitions, even after `bun install`. The forge's check will cover it.

shipped production is serving it deploy 0583edb

opened this

The map card now draws open issues only, and its caption still names the done count (for example "2000 done"). Nothing in #6121 had already changed the card. The new test passes and og-designs, og-card and og-route pass too. I couldn't run the type check: tsc fails here because it can't find the bun type definitions, even after bun install. The forge's check will cover it.

  • Change: mapInput in src/web/og/map.ts now builds the thumbnail from a graph holding only open issues and the edges between them. The counts and words still come from the full graph, so "ready", "blocked" and "done" read as before. Nothing outside src/web/og changed.
  • Existing test: test/og-designs.test.ts expected a closed issue to be drawn as a node. The test was out of date, so I changed it to expect four nodes instead of five and no done edges.
  • New test: test/og-map.test.ts seeds 2,000 closed and 300 open issues with chains, then fetches the card. It asserts the SVG is under 200 KB, the caption contains "2000 done" and "300 open issues", and resolve;dur is under 100 ms.
  • Not measured: I didn't measure the PNG raster step (609 ms in the issue). It should shrink with the smaller SVG, but I haven't confirmed it.
  • To try it: open /og/map/<owner>~<repo>.svg on the preview.

Closes #6150

commented

The map card now draws open issues only, and its caption still names the done count (for example "2000 done"). Nothing in #6121 had already changed the card. The new test passes and og-designs, og-card and og-route pass too. I couldn't run the type check: tsc fails here because it can't find the bun type definitions, even after bun install. The forge's check will cover it.

  • Change: mapInput in src/web/og/map.ts now builds the thumbnail from a graph holding only open issues and the edges between them. The counts and words still come from the full graph, so "ready", "blocked" and "done" read as before. Nothing outside src/web/og changed.
  • Existing test: test/og-designs.test.ts expected a closed issue to be drawn as a node. The test was out of date, so I changed it to expect four nodes instead of five and no done edges.
  • New test: test/og-map.test.ts seeds 2,000 closed and 300 open issues with chains, then fetches the card. It asserts the SVG is under 200 KB, the caption contains "2000 done" and "300 open issues", and resolve;dur is under 100 ms.
  • Not measured: I didn't measure the PNG raster step (609 ms in the issue). It should shrink with the smaller SVG, but I haven't confirmed it.
  • To try it: open /og/map/<owner>~<repo>.svg on the preview.
Approved

Approved. The thumbnail now draws only open issues and the edges between them. Counts, words and the "N done" caption still come from the full graph, and the old og-designs expectation was rightly updated. The new test seeds 2,000 closed and 300 open issues and checks SVG size, both caption counts and resolve under 100 ms. No web/design surface is touched. The preview has no trevato~forge data (the card URL answers 404 JSON), so I could not see it draw there.

Two things I would do next:

  1. Measure and assert the PNG path. The title promises the PNG, and the issue put the raster step at 609 ms. The test only covers the SVG.
  2. Make the 100 ms assertion less likely to flake on a loaded CI machine. Compare against a relative bound, or drive the card builder directly.
Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs