From 7c68f50bf50d4518de0eb1f492fdac997f7c40fd Mon Sep 17 00:00:00 2001 From: Jean-Pierre Martineau Date: Sun, 9 Aug 2026 20:56:59 -0400 Subject: [PATCH] =?UTF-8?q?Chips:=20the=20=E2=98=85=20keeps=20its=20paddin?= =?UTF-8?q?g=20after=20all?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Dropping the pads around our own star saved two cells and cost the chip its shape — squeezed between two chevrons it read as a glyph wedged into the seam rather than as a segment of the route. The pads are not room for a long word, they are what makes a chip a chip. The dark grey fill and the map's yellow ink stay. Co-Authored-By: Claude Opus 5 (1M context) --- CLAUDE.md | 2 +- meshterm/ui/pathline.py | 24 ++++++++++-------------- 2 files changed, 11 insertions(+), 15 deletions(-) diff --git a/CLAUDE.md b/CLAUDE.md index 597f00f..ea1598f 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -134,7 +134,7 @@ Relative ages: `format_ago` for prose ("now", "5m ago", "never" — never "now a app-wide `★` (`pathline.SELF_GLYPH`, taken straight from `marks.SELF_MARK`), never our name: the one node the reader never has to be told, and the cells belong to the hops that differ from row to row. As a chip it is the map's yellow star on neutral dark - grey, padless — three cells, not five. + grey, padded like every other chip. - Chip seams are **one** interlocked chevron (previous fill on next). Two chips of the same fill are the exception the interlock can't draw: the point drops its background so the page cuts the wedge. An elision breaks the ribbon rather than joining it — bare `⋯` diff --git a/meshterm/ui/pathline.py b/meshterm/ui/pathline.py index 9fb4a01..3976d84 100644 --- a/meshterm/ui/pathline.py +++ b/meshterm/ui/pathline.py @@ -168,9 +168,8 @@ class PathHop: (its first byte, so every prefix agrees). ``None`` renders muted/grey: colour is reserved for keyed identities. you: Our own node. Arrows draw it in the pure-white ``you`` style; chips draw it - in the map's own yellow on the neutral dark grey :data:`_YOU_BG` — and where - the label is the bare :data:`SELF_GLYPH`, without the padding a word would - need, so our end of a route costs three cells rather than five. + in the map's own yellow on the neutral dark grey :data:`_YOU_BG`, padded like + every other chip. annotation: The trace-flavour hash note, rendered ``" (3d)"`` after the label in both modes (pass the bare ``3d``, no parentheses). lit_bytes: For a hash label: leading *bytes* drawn in the hue (the @@ -857,19 +856,17 @@ class PathLine: def _chip(self, hop: PathHop, fill: str) -> Text: """One chip: same words as arrow mode, dark ink on the identity fill. - A chip whose whole label is the ``★`` drops its padding: the pads exist to keep a - *word* off the chevrons that bracket it, and a single mark centred in its own cell - needs no such room — so our end of a route is three cells (cap, star, cap) rather - than five. Its ink is the map's own yellow, on the neutral dark grey - :data:`_YOU_BG`, so the star in the line and the star on the map read as one mark. + Every chip is padded on both sides, the ``★`` included (JP, 2026-08-09): the pads + are not there to make room for a long *word*, they are the chip's own shape, and a + star squeezed between two chevrons reads as a glyph wedged into the seam rather + than as a segment of the route. Our own chip's ink is the map's yellow on the + neutral dark grey :data:`_YOU_BG`, so the star in the line and the star on the map + read as one mark. """ - star = hop.you and hop.label == SELF_GLYPH ink = _DIM_FG if hop.dim else (_SELF_INK if hop.you else _CHIP_FG) soft = _DIM_FG if hop.dim else _CHIP_FG_SOFT - pad = "" if star else " " text = Text() - if pad: - text.append(pad, style=f"on {fill}") + text.append(" ", style=f"on {fill}") if hop.lit_bytes > 0 and not hop.dim: split = hop.lit_bytes * 2 text.append(hop.label[:split], style=f"bold {ink} on {fill}") @@ -879,8 +876,7 @@ class PathLine: text.append(hop.label, style=f"{weight}{ink} on {fill}") if hop.annotation: text.append(f" ({hop.annotation})", style=f"{soft} on {fill}") - if pad: - text.append(pad, style=f"on {fill}") + text.append(" ", style=f"on {fill}") return text