msg.Safe is the one owner: a graphic character in any script is safe;
controls, bidi controls, format characters, variation selectors, private
use and the invisible fillers are not. Printable and OneLine drop what
Safe refuses, agent save's diff escapes it, and forbidigo bans
unicode.IsGraphic, IsPrint, IsControl and Bidi_Control outside
internal/msg.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
A msg.M always renders as its text: String, Error, Parts and Segments no
longer read DEVVM_MESSAGES, and Line is gone. internal/ui reads names mode
in newStyle, with each stream's color, and shows messages as names through
the style (message, segments, line, valueParts). ui.New takes the function
it reads the environment with, so tests make a names-mode UI without
t.Setenv. Messages shown as data go through UI.Text or Table.Text (doctor
--json, ls's image cell, setup's network choices); vm.PickRow.Desc is a
msg.M that cli renders. A config.toml value's refusal keeps its message
(state.CorruptError.Msg, Shown), so fail shows its names in names mode.
Tests: ui TestNamesMode; state TestFiles covers Msg and Shown; Go tests
compare NamesOf or Names, and drop t.Setenv("DEVVM_MESSAGES") outside ui,
msg's TestNames and the testscript runner. The structure test lists
DEVVM_MESSAGES in internal/ui/style.go only; ui.UI's method limit is 47
(Text).
Co-Authored-By: Claude Opus 5.5 <[email protected]>
The values a message's template fills in (a VM's name, a path, a port,
a count, a value inside a command) are bold (SGR 1) in a terminal; the
template's own words stay in the default foreground. Bold, not italic,
which some terminals don't draw or draw as reverse video. Same enable
rule and streams as the other colors; the run log, DEVVM_MESSAGES=names,
M.String/Line and anything not a terminal are byte-identical.
internal/msg: M.Segments returns the text as segments (the template's
words, or a value) and the doc link apart; names mode gives the names as
one segment and no link. It renders the template with each value between
U+E000 and U+E001, after dropping those runes from the values, so a
value can't start or end a marking; VM-made values still go through
msg.Shown, so their control characters are quoted. Joined, the segments
are Text.
internal/ui: style.message bolds value segments (per line) and paints
the link; the status line's label and the done line are parts, values
bold, cut and counted on their plain text (style.fit), so truncation
inside a value closes its code. DieLogged's log end stays Line inside
dim.
Tests: TestSegments (a VM name, a path, a log path, both plural forms,
two values, an empty value), TestSegmentsOfHostileValues (marker runes,
escape codes through Shown), TestSegmentsInNamesMode; TestEveryMessageRenders
checks every message's segments join to its text with each field a
value, in every language; ui's TestMessagesColored with the value bold,
TestStatusLineValuesBold (bold, cut at 12 columns, plain unchanged),
TestDoneMarkGreen with a bold value.
Docs: using/settings (Colors); contributing (Messages: Colors).
Co-Authored-By: Claude Opus 5.5 <[email protected]>