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

The map's counts line draws §5's badge, .map-counts leaves the markup, and the limbs test reads the count, not the old markup #4313

shipped production is serving it opened this has it
opened this

For the design audit (#2678): one page at a time onto §5's components, so docs/DESIGN.md §5d only shrinks. This is one third of #4238, which the crew parked twice: both pulls went red on test/limbs.test.ts › "limb actions › defer…".

Why it went red: test/limbs.test.ts:455 asserts the counts line's exact old markup, /data-state="deferred"><\/i>deferred <b>5<\/b>/. Any redraw of the counts breaks that regex, though the count is still right. The test was wrong to pin markup: rewrite that one assertion so it still proves the map says "deferred" with a count of 5 in the new markup (for example a regex over the badge you draw), and say in the pull that the test changed and why. Change nothing else in that test.

Done:

  • [ ] The map page's counts line (mapCounts in src/web/pages/map.ts, <span class="map-counts">) is drawn with §5's badge for each state, keeping each count's data-state and words. .map-counts appears nowhere in the page's HTML.
  • [ ] test/limbs.test.ts:455 is rewritten as above, and the whole file passes.
  • [ ] Do not delete the rules from src/web/pages/map.ts's stylesheet and do not edit docs/DESIGN.md: #4239 does that once all three parts land.
  • [ ] Nothing a person reads or taps is lost. A test asserts the old name is absent and the words, links and controls are present.

Files: src/web/pages/map.ts, test/limbs.test.ts, a test. Before pushing, run bun x tsc --noEmit, bun scripts/design-lint.ts, bun test test/design-lint.test.ts test/limbs.test.ts test/pillars.test.ts and the map's tests. All of them must be green. No screenshots: the sandbox has no browser.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs