Skip to content

Use checkmark for success message#113

Merged
silv-io merged 5 commits intomainfrom
george/des-169
Mar 20, 2026
Merged

Use checkmark for success message#113
silv-io merged 5 commits intomainfrom
george/des-169

Conversation

@gtsiolis
Copy link
Member

@gtsiolis gtsiolis commented Mar 13, 2026

This will changes success messages rendering from text to a shared checkmark marker. ✔️

This makes success output more compact and visually consistent across renderers. 💄

BEFORE AFTER
Screenshot 2026-03-13 at 15 09 24 Screenshot 2026-03-13 at 15 03 16

@coderabbitai
Copy link

coderabbitai bot commented Mar 13, 2026

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

Replaces textual "Success:" prefixes with a centralized success marker and color. Adds SuccessColorHex and SuccessMarkerText() to internal/output, updates plain-text formatters, UI rendering and styles to use the marker, and updates tests to expect the marker.

Changes

Cohort / File(s) Summary
Style definition
internal/output/style.go
New file: adds SuccessColorHex and SuccessMarkerText() returning a checkmark glyph for success styling.
Output formatting & tests
internal/output/plain_format.go, internal/output/plain_format_test.go, internal/output/plain_sink_test.go
Replaces textual "Success:" and literal checkmarks with SuccessMarkerText() in status/message/instance formatting; test expectations updated accordingly.
UI rendering & styles
internal/ui/components/message.go, internal/ui/styles/styles.go, internal/ui/app.go, internal/ui/app_test.go
UI now uses output.SuccessMarkerText() as the success prefix and output.SuccessColorHex for success styling; app.go substitutes raw markers with styled markers; tests adjusted.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Suggested reviewers

  • carole-lavillonniere
  • silv-io
  • anisaoshafi
🚥 Pre-merge checks | ✅ 2
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title directly summarizes the main change: replacing text-based success messages with checkmark symbols across the codebase.
Description check ✅ Passed The description clearly explains the change—switching from text labels to checkmark markers for success messages—and includes before/after visual comparisons.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch george/des-169

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (3)
internal/output/plain_format.go (1)

45-47: Consider keeping FormatEventLine ANSI-free for plain output.

Using SuccessMarkerText() here (and applying color in TTY/UI renderers) avoids escape-sequence noise in redirected logs and script-consumed output.

♻️ Possible adjustment
-			return fmt.Sprintf("%s LocalStack ready (%s)", SuccessMarker(), e.Detail), true
+			return fmt.Sprintf("%s LocalStack ready (%s)", SuccessMarkerText(), e.Detail), true
...
-		return SuccessMarker() + " LocalStack ready", true
+		return SuccessMarkerText() + " LocalStack ready", true
...
-		return SuccessMarker() + " " + e.Text
+		return SuccessMarkerText() + " " + e.Text

Also applies to: 115-115

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@internal/output/plain_format.go` around lines 45 - 47, FormatEventLine is
emitting ANSI-colored markers via SuccessMarker(), which pollutes non-TTY/plain
outputs; change those calls to SuccessMarkerText() so the function returns
ANSI-free marker text (replace SuccessMarker() with SuccessMarkerText() in
FormatEventLine and the other occurrence around the second branch), and ensure
any TTY/UI renderers apply coloring themselves rather than relying on
FormatEventLine to produce colored output.
internal/output/plain_sink_test.go (1)

62-62: Consider avoiding raw ANSI literals in expected values.

Building these expectations from SuccessMarker() will reduce drift risk if marker styling changes.

♻️ Suggested assertion cleanup
-			expected: "\x1b[38;2;183;201;92m✔︎\x1b[0m LocalStack ready (abc123)\n",
+			expected: SuccessMarker() + " LocalStack ready (abc123)\n",
...
-			expected: "\x1b[38;2;183;201;92m✔︎\x1b[0m LocalStack ready\n",
+			expected: SuccessMarker() + " LocalStack ready\n",

Also applies to: 67-67

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@internal/output/plain_sink_test.go` at line 62, The test uses hard-coded ANSI
escape sequences for the success marker; replace the raw literal (e.g.
"\x1b[38;2;183;201;92m✔︎\x1b[0m") with a call to SuccessMarker() when building
the expected string (for example: fmt.Sprintf("%s LocalStack ready (abc123)\n",
SuccessMarker())) so the test follows marker styling changes; update the other
occurrence on the same test (line ~67) similarly.
internal/ui/app_test.go (1)

177-177: Prefer shared marker helper in assertion.

Using output.SuccessMarkerText() here avoids brittle literal coupling if the glyph changes later.

♻️ Suggested test tweak
-	if !strings.Contains(app.lines[0].text, "✔︎") || !strings.Contains(app.lines[0].text, "Done") {
+	if !strings.Contains(app.lines[0].text, output.SuccessMarkerText()) || !strings.Contains(app.lines[0].text, "Done") {
 		t.Fatalf("expected rendered success message, got: %q", app.lines[0].text)
 	}
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@internal/ui/app_test.go` at line 177, Replace the hard-coded success glyph in
the test assertion with the shared helper to avoid brittle coupling: instead of
checking for the literal "✔︎" use output.SuccessMarkerText() in the assertion
that inspects app.lines[0].text (the same check that also looks for "Done");
update the condition to assert that app.lines[0].text contains
output.SuccessMarkerText() and "Done".
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@internal/output/plain_format.go`:
- Around line 45-47: FormatEventLine is emitting ANSI-colored markers via
SuccessMarker(), which pollutes non-TTY/plain outputs; change those calls to
SuccessMarkerText() so the function returns ANSI-free marker text (replace
SuccessMarker() with SuccessMarkerText() in FormatEventLine and the other
occurrence around the second branch), and ensure any TTY/UI renderers apply
coloring themselves rather than relying on FormatEventLine to produce colored
output.

In `@internal/output/plain_sink_test.go`:
- Line 62: The test uses hard-coded ANSI escape sequences for the success
marker; replace the raw literal (e.g. "\x1b[38;2;183;201;92m✔︎\x1b[0m") with a
call to SuccessMarker() when building the expected string (for example:
fmt.Sprintf("%s LocalStack ready (abc123)\n", SuccessMarker())) so the test
follows marker styling changes; update the other occurrence on the same test
(line ~67) similarly.

In `@internal/ui/app_test.go`:
- Line 177: Replace the hard-coded success glyph in the test assertion with the
shared helper to avoid brittle coupling: instead of checking for the literal
"✔︎" use output.SuccessMarkerText() in the assertion that inspects
app.lines[0].text (the same check that also looks for "Done"); update the
condition to assert that app.lines[0].text contains output.SuccessMarkerText()
and "Done".

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI (base), Organization UI (inherited)

Review profile: CHILL

Plan: Pro

Run ID: 2219f247-e368-4826-bf7b-d9b2288e81ce

📥 Commits

Reviewing files that changed from the base of the PR and between 2ce11ae and fc18360.

📒 Files selected for processing (7)
  • internal/output/plain_format.go
  • internal/output/plain_format_test.go
  • internal/output/plain_sink_test.go
  • internal/output/style.go
  • internal/ui/app_test.go
  • internal/ui/components/message.go
  • internal/ui/styles/styles.go

@gtsiolis gtsiolis self-assigned this Mar 13, 2026
Comment on lines +7 to +9
func SuccessMarker() string {
return fmt.Sprintf("\x1b[38;2;183;201;92m%s\x1b[0m", SuccessMarkerText())
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The problem with having color in the non-TUI output as well is that it won't respect the NO_COLOR environment variable that bubbletea handles.

In general, I don't see the reason for color output in non-TUI mode. It will just make the output unreadable if the target is unable to render those colors.
This is very likely in non-TTY outputs!

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point. I didn't intent to add colors in non-TUI output. Made some changes in 5e1991c.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you take another look when you're free, @silv-io?

@gtsiolis gtsiolis requested a review from silv-io March 16, 2026 20:00
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
internal/output/plain_format.go (1)

116-153: Use shared marker in formatInstanceInfo too to avoid glyph drift.

This file now centralizes success markers in updated paths, but formatInstanceInfo still hardcodes "✓ ". Reusing SuccessMarkerText() there would keep one canonical source.

Proposed refactor
 func formatInstanceInfo(e InstanceInfoEvent) string {
 	var sb strings.Builder
-	sb.WriteString("✓ " + e.EmulatorName + " is running (" + e.Host + ")")
+	sb.WriteString(SuccessMarkerText() + " " + e.EmulatorName + " is running (" + e.Host + ")")
 	var meta []string
 	if e.Uptime > 0 {
 		meta = append(meta, "UPTIME: "+formatUptime(e.Uptime))
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@internal/output/plain_format.go` around lines 116 - 153, formatInstanceInfo
currently hardcodes the success glyph ("✓ ") causing marker drift; update the
function (formatInstanceInfo) to use the canonical SuccessMarkerText() instead
of the literal "✓ " and preserve the existing spacing and string composition
around e.EmulatorName and e.Host so the output remains "SuccessMarkerText() + "
" + e.EmulatorName + " is running (" + e.Host + ")".
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@internal/output/plain_format.go`:
- Around line 116-153: formatInstanceInfo currently hardcodes the success glyph
("✓ ") causing marker drift; update the function (formatInstanceInfo) to use the
canonical SuccessMarkerText() instead of the literal "✓ " and preserve the
existing spacing and string composition around e.EmulatorName and e.Host so the
output remains "SuccessMarkerText() + " " + e.EmulatorName + " is running (" +
e.Host + ")".

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI (base), Organization UI (inherited)

Review profile: CHILL

Plan: Pro

Run ID: 15043f25-2f66-47ea-8885-a32b629c50e1

📥 Commits

Reviewing files that changed from the base of the PR and between 11eab6b and 5e1991c.

📒 Files selected for processing (8)
  • internal/output/plain_format.go
  • internal/output/plain_format_test.go
  • internal/output/plain_sink_test.go
  • internal/output/style.go
  • internal/ui/app.go
  • internal/ui/app_test.go
  • internal/ui/components/message.go
  • internal/ui/styles/styles.go
🚧 Files skipped from review as they are similar to previous changes (5)
  • internal/output/plain_sink_test.go
  • internal/ui/app_test.go
  • internal/ui/styles/styles.go
  • internal/output/plain_format_test.go
  • internal/ui/components/message.go

@gtsiolis
Copy link
Member Author

Rebased to keep fresh. 🥗

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
internal/output/plain_format.go (1)

152-154: Inconsistent checkmark character in formatInstanceInfo.

This function uses a hardcoded "✓ " (U+2713), while the rest of the PR uses SuccessMarkerText() which returns "✔︎" (U+2714 + variation selector). Consider using the shared marker for visual consistency across all success indicators.

♻️ Suggested fix
 func formatInstanceInfo(e InstanceInfoEvent) string {
 	var sb strings.Builder
-	sb.WriteString("✓ " + e.EmulatorName + " is running (" + e.Host + ")")
+	sb.WriteString(SuccessMarkerText() + " " + e.EmulatorName + " is running (" + e.Host + ")")
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@internal/output/plain_format.go` around lines 152 - 154, Replace the
hardcoded checkmark in formatInstanceInfo with the shared SuccessMarkerText() so
the success marker is consistent across the codebase; in the formatInstanceInfo
function (which builds the string for InstanceInfoEvent) use SuccessMarkerText()
as the prefix instead of "✓ " when writing to the strings.Builder so the output
matches other success indicators.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@internal/output/plain_format.go`:
- Around line 152-154: Replace the hardcoded checkmark in formatInstanceInfo
with the shared SuccessMarkerText() so the success marker is consistent across
the codebase; in the formatInstanceInfo function (which builds the string for
InstanceInfoEvent) use SuccessMarkerText() as the prefix instead of "✓ " when
writing to the strings.Builder so the output matches other success indicators.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI (base), Organization UI (inherited)

Review profile: CHILL

Plan: Pro

Run ID: 55be1436-504e-4662-9be6-c49872e1521f

📥 Commits

Reviewing files that changed from the base of the PR and between 5e1991c and 37f1d1b.

📒 Files selected for processing (8)
  • internal/output/plain_format.go
  • internal/output/plain_format_test.go
  • internal/output/plain_sink_test.go
  • internal/output/style.go
  • internal/ui/app.go
  • internal/ui/app_test.go
  • internal/ui/components/message.go
  • internal/ui/styles/styles.go
🚧 Files skipped from review as they are similar to previous changes (3)
  • internal/output/plain_sink_test.go
  • internal/ui/app.go
  • internal/output/style.go

@gtsiolis gtsiolis force-pushed the george/des-169 branch 2 times, most recently from fb804cf to 82363e5 Compare March 18, 2026 10:58
@gtsiolis
Copy link
Member Author

Rebased to keep fresh. 🥗

Copy link
Member

@silv-io silv-io left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, just some clean up we'll need I think.

All the color stuff should go to ui styles. Then the output "styles" can become the symbols file instead.

@gtsiolis
Copy link
Member Author

Thanks, @silv-io! Pushed 8a425d9 to address all three comments above. Please, take another look when you're free.

@gtsiolis gtsiolis requested a review from silv-io March 19, 2026 12:16
@gtsiolis
Copy link
Member Author

Rebased to keep fresh. 🥗

@silv-io
Copy link
Member

silv-io commented Mar 20, 2026

Thanks, @silv-io! Pushed 8a425d9 to address all three comments above. Please, take another look when you're free.

@gtsiolis It went a bit backwards now and uses ui code in the plain output. I'll take this over and fix it and merge then if it's ok? :)

@gtsiolis
Copy link
Member Author

Absolutely, @silv-io! Leaving this to you. 🏀

@silv-io
Copy link
Member

silv-io commented Mar 20, 2026

Adapted it now, will merge if all tests pass ✔️

Copy link
Member

@silv-io silv-io left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM now, merging

@silv-io silv-io merged commit 1aa2f2e into main Mar 20, 2026
8 checks passed
@silv-io silv-io deleted the george/des-169 branch March 20, 2026 16:33
@gtsiolis
Copy link
Member Author

Woohoo!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants