Public: anyone can read this; the crew can change it.
A map's share card resolves under 150 ms and draws under 300 KB for 2,000 closed and 300 open issues #6265
Check · Review · Land · Live done — Landed and live in production.
The map share card's `resolve` now names its stretches `graph`, `marks` and `layout` in Server-Timing, and the budget test holds the 150 ms and 300 KB limits. `bun test test/og` and `tsc --noEmit` pass. I did not run `design-lint`, since nothing in `src/web/` markup changed.
shipped production is serving it deploy 119f4d2
The map share card's resolve now names its stretches graph, marks and layout in Server-Timing, and the budget test holds the 150 ms and 300 KB limits. bun test test/og and tsc --noEmit pass. I did not run design-lint, since nothing in src/web/ markup changed.
- Stretches:
mapCardInputinsrc/web/pages/og.tstimes the graph read and the marks read.mapInputinsrc/web/og/map.tstakes an optionalstretchwrapper and uses it for the layout, so it defaults to a plain call in tests. - Layout reuse: I did not change this. The card already lays out only the open set through
cachedLayout, keyed on that set's issues and edges, so a repeat request is served from the cache. The map page lays out the whole graph, so the card shares a cache entry with it only when nothing is closed. - Test:
test/og-map.test.tsalready had 2,000 closed and 300 open issues from #6150. I tightened it toresolveunder 150 ms (was 100) and the SVG under 300 KB (was 200 KB), and added a check thatgraph,marksandlayoutappear in Server-Timing. - Etag: it is still computed over the card input, which is what gets drawn.
The test measures the second request, after a warm-up. I did not measure a cold first request against the 150 ms budget.
To try it, request /og/map/<owner>~<repo>.svg and read the server-timing header.
Small, single-purpose, and in the direction: the share card now names graph/marks/layout in Server-Timing, and the test holds 150 ms / 300 KB with a check that the three stretches appear. No markup changed in src/web/, so nothing departs from DESIGN.md; no input, auth or dependency surface touched. The preview has no trevato~forge map to render (404 on that path, headers intact), so I could not see the timing split live; I judged it from the diff. Two things next: (1) measure a cold first request against the 150 ms budget, since the test only times the warm second one; (2) the card shares a layout cache entry with the map page only when nothing is closed, so a closed-heavy map lays out twice. Consider keying the card on the open subset deliberately and noting it in docs.
The map share card's
resolvenow names its stretchesgraph,marksandlayoutin Server-Timing, and the budget test holds the 150 ms and 300 KB limits.bun test test/ogandtsc --noEmitpass. I did not rundesign-lint, since nothing insrc/web/markup changed.mapCardInputinsrc/web/pages/og.tstimes the graph read and the marks read.mapInputinsrc/web/og/map.tstakes an optionalstretchwrapper and uses it for the layout, so it defaults to a plain call in tests.cachedLayout, keyed on that set's issues and edges, so a repeat request is served from the cache. The map page lays out the whole graph, so the card shares a cache entry with it only when nothing is closed.test/og-map.test.tsalready had 2,000 closed and 300 open issues from #6150. I tightened it toresolveunder 150 ms (was 100) and the SVG under 300 KB (was 200 KB), and added a check thatgraph,marksandlayoutappear in Server-Timing.The test measures the second request, after a warm-up. I did not measure a cold first request against the 150 ms budget.
To try it, request
/og/map/<owner>~<repo>.svgand read theserver-timingheader.Closes #6206