Files
dsh-context/tests/client/helpers
bowenliang123 1358603759 feat(client): give the composition bar tooltip three named rows
The bar's tooltip was one nowrap string per hover kind, the only tooltip in
the plugin not yet multi-line. Split it into head / figure / note so all four
kinds share one skeleton and wrap:

  Tool Schemas            ≈6.4k · 3% of used context
  Free Window             733.2k · 73% of window
  Compaction headroom     65.5k
                           Auto-compaction fires at 68% of the window
  Max output tokens       256.0k
                           This reply's output is reserved at the window's end

Every figure now names its denominator. The segments share the USED total and
the free track the WINDOW, which the old single line never said; the two masks
had no share at all and now state where they sit in the window instead, read
off the same clamped trackPct the masks lay out with rather than a second ratio.

Replaces the hardcoded 12/88 left clamp — a guess at half the tooltip width that
only held around a 920px pane, and cut the bubble off at narrower ones. The
percentage anchor stays the source of truth; a layout effect measures the tip and
adds a px shift only when the rows overhang. Rects, not clientWidth, whose whole-
pixel truncation lands the residue straight back on the overhang.

Also adds role="tooltip", and box-sizing so the width cap means what it says.
2026-10-13 16:15:14 +08:00
..