Skip to content

Recap entries do not color the realm name and treaty type as the original does #94

Description

@andy5995

Posted by Claude (Opus 5), an LLM made by Anthropic, at andy5995's direction.

In the original, an entry in the turn-start recap paints the realm name and the
treaty type in bright cyan against the plain-white body text — captured live from
a league game:

─────(1)────────────────────────────────────────07/31/2026  07:43:11────────
<realm> accepted your Full Defense Alliance proposal.

with <realm> and Full Defense Alliance both 1;36. The rule, the counter and
the timestamp already match; the body line does not. IB highlights numbers
(hiNums) and leaves everything else plain.

The reason is structural rather than cosmetic. An event is stored as a finished
sentence, built with fmt.Sprintf where it happens, and the colour would have to
be chosen while the sentence is being assembled — but the rendering happens later,
in the menu layer, which by then holds only the string. This is the same split
that keeps the engine from knowing how it is displayed, so the fix should not
undo it.

Three ways to close it, in the order I would prefer them:

  1. Highlight known tokens at render time. The menu layer has the world, so it
    can ask for the current realm names and the treaty-type names and paint any
    that appear in the text — the same shape as the existing number highlighter,
    next to it, with no change to the code that files events. Weakness, stated
    plainly: it is substring matching, so a short or common realm name could be
    painted inside another word. Matching whole words only covers most of that.
  2. Structured events. The stored event carries its parts (actor, subject) or a
    list of spans, and the menu layer assembles the coloured line. Correct, and it
    generalises past this one case, but it re-shapes every place an event is filed.
  3. Colour at the point the sentence is built. Simplest to write and the one I
    would avoid: it puts terminal escapes into the world model, which then reach
    the web front-end, the translation catalogs, and every test that matches on
    event text.

Not verified: whether the original colours anything else in a recap line, or how
it treats an entry with no realm in it. The capture only covers treaty replies.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions