Make status command output easier to read#243
Conversation
gtsiolis
commented
May 12, 2026
| BEFORE | AFTER |
|---|---|
![]() |
![]() |
anisaoshafi
left a comment
There was a problem hiding this comment.
This looks much neater ✨ thank you!
| a.addLine(styledLine{text: styles.Success.Render(output.SuccessMarker()) + " " + msg.EmulatorName + " is running"}) | ||
| if msg.Host != "" { | ||
| a.addLine(styledLine{text: "• Endpoint: " + msg.Host, secondary: true}) | ||
| } | ||
| if msg.ContainerName != "" { | ||
| a.addLine(styledLine{text: "• Container: " + msg.ContainerName, secondary: true}) | ||
| } | ||
| if msg.Version != "" { | ||
| a.addLine(styledLine{text: "• Version: " + msg.Version, secondary: true}) | ||
| } | ||
| if msg.Uptime > 0 { | ||
| a.addLine(styledLine{text: "• Uptime: " + output.FormatUptime(msg.Uptime), secondary: true}) |
There was a problem hiding this comment.
This code is mostly duplicate across app.go and plain_format.go. If we add more properties in the future, we risk diverging.
Could you try to bring back the FormatEventLine and make sure the field list lives in exactly one place, not sure if sth like this would work?
| a.addLine(styledLine{text: styles.Success.Render(output.SuccessMarker()) + " " + msg.EmulatorName + " is running"}) | |
| if msg.Host != "" { | |
| a.addLine(styledLine{text: "• Endpoint: " + msg.Host, secondary: true}) | |
| } | |
| if msg.ContainerName != "" { | |
| a.addLine(styledLine{text: "• Container: " + msg.ContainerName, secondary: true}) | |
| } | |
| if msg.Version != "" { | |
| a.addLine(styledLine{text: "• Version: " + msg.Version, secondary: true}) | |
| } | |
| if msg.Uptime > 0 { | |
| a.addLine(styledLine{text: "• Uptime: " + output.FormatUptime(msg.Uptime), secondary: true}) | |
| if line, ok := output.FormatEventLine(msg); ok { | |
| parts := strings.Split(line, "\n") | |
| for i, part := range parts { | |
| if i == 0 { | |
| part = strings.Replace(part, output.SuccessMarker(), styles.Success.Render(output.SuccessMarker()), 1) | |
| a.addLine(styledLine{text: part}) | |
| } else { | |
| a.addLine(styledLine{text: part, secondary: true}) | |
| } | |
| } | |
There was a problem hiding this comment.
There's a risk with this change as it creates an implicit contract between formatInstanceInfo and the TUI: the TUI assumes line 1 of the formatted output is the header with the success marker and lines 2+ are secondary key:value bullets. Checking if this breaks anything right now... 👀
There was a problem hiding this comment.
Thanks for checking, merging!
Co-authored-by: Anisa Oshafi <anisaoshafi@gmail.com>
9a244eb to
98141b5
Compare


