feat(doctor): flutter-doctor-style report with two-colour status markers#124
Merged
Conversation
The doctor was one colour with a ✓ on almost every line, so "which block needs
me" did not stand out — the exact complaint. It now reads like flutter doctor:
each section (Hook wiring / Observer / Cost meter / Continuous learning) leads
with a [✓] / [!] / [✗] / [·] header that rolls up the worst status of its
lines, and every detail line leads with the matching glyph, so the markers scan
down a column.
Colour is two hues only, by request: green for OK, red for warn+error (with two
colours, "look here" and "broken" share the attention hue), and neutral /
informational lines stay uncoloured so they never compete for the eye. It is on
only when stdout is a real terminal (termio.IsTTY, the same isatty check the
spinner uses — now shared rather than duplicated), NO_COLOR is unset, and TERM
is not "dumb". A pipe, a redirect, a CI log, or a NO_COLOR user gets the
identical layout in bare glyphs — the "only colour where it renders reliably,
otherwise leave it white" contract, backed by go-isatty rather than a guess.
One semantic fix falls out of giving sections a rollup: a correctly-wired repo
with no live conflict now rolls up to [✓]. The cross-scope caveat ("a plugin
MIGHT be enabled elsewhere") drops from a [!] to a • heads-up, because painting
every correct setup yellow is the nagging the redesign exists to remove. Only a
double-fire happening in this settings.json right now paints the section [✗].
The marker/colour logic is a new termio.Styler + Status, unit-tested for the
two-colour mapping, the TTY-off plain path, the rollup ordering, and the
property that message text is never wrapped in an escape sequence (so tokens a
test or a grep looks for are never split). Verified by eye on a faked TTY:
green ✓ marks, a red [✗] on a real double-fire, a red [!] on an exported API
key, plain glyphs through a pipe.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Makes
bough claude doctorread likeflutter doctor: per-section[✓]/[!]/[✗]/[·]rollup headers, glyph-led detail lines, and two colours on a TTY (green OK / red attention; neutral stays plain).termio.IsTTY, shared with the spinner) +NO_COLORunset +TERM≠dumb. Pipe / CI / redirect → identical layout, plain glyphs.[✓]; the cross-scope caveat drops to a•heads-up (was a nagging[!]); only a live double-fire is[✗].termio.Styler/Status(two-colour map, plain-on-non-TTY, rollup order, message-text-never-coloured); doctor section-rollup; conformance updated. 30 pkg pass, lint 0.Verified by eye on a faked TTY: green
✓, red[✗]on a real double-fire, red[!]on an exported API key, plain glyphs through a pipe.Refs:
internal/termio/color.go