Files
magpie/internal
yetone 8ee85c59f3 context: a slim tile in the context map keeps its gap to the tile beside it
noahhrreion on Discord (11-06): in the context map the system prompt and
tool tiles sat right against the large "N more" tile beside them, and
sometimes ran over it. A tile is its rect less a 3px gap, but its 7px/9px
padding stayed on when the tile was too slim for labels (.bare). A box
can't be narrower than its padding, so a tile laid at 16px (TILE_SIDE) was
drawn 18px wide and ran 2px into its neighbour. A bare tile now has no
padding (its labels are hidden already), so every tile stays inside its
rect and the 3px gap holds at every width. Nothing else in the layout
changes.

Test: context-map.test.cjs "slim tiles keep their gap at every width"
lays a system prompt, tools and 110 turns (the reporter's shape) and
checks every pair of tiles is at least 2.5px apart at 13 widths from
1100px to 360px, in Chromium and WebKit, in all five languages.

Run on mote (mote-run):
- context-map.test.cjs: 36 of 36 passed (Chromium + WebKit, en/zh/zh-TW/
  ja/de, 1100 and 420px, the new test included).
- Broken by hand: on the old context.css the new test fails in all 10
  runs: '980px: "ctx-tile k-chat bare" and "ctx-tile k-chat" are -2.25px
  apart'.
- Screenshots, dark theme, zh, 980px, the old CSS and the new one: the
  old one has the slim column touching "另外 98 项", as in the report.
  The new one has the 3px gap.
- context-map-live, context-scroll-end, context-text, ctx-route,
  context-scripts, context-window, ctx-head-narrow, routing-ctx-fold,
  routing-ctx-still, routing-context-fold, routing-ctx-sessions,
  routing-live-patch, routing-return-cost: 319 of 320. The red was
  context-window "chromium en 420px: the Context tab": browserContext.newPage
  said the browser had closed (load ~150). It passed 3 of 3 alone. Filed
  as #5460.
Not run: the whole GUI suite, and the native apps. CSS only, so no Go
build or tests.

Reported-by: noahhrreion
2026-11-06 13:31:34 +08:00
..
…
…
…
…
…
…