Skip to content

Use checkmark for success message#113

Open
gtsiolis wants to merge 1 commit intomainfrom
george/des-169
Open

Use checkmark for success message#113
gtsiolis wants to merge 1 commit 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

📝 Walkthrough

Walkthrough

Adds a colored success marker (checkmark glyph) to output rendering: new styling utilities in internal/output/style.go and updates to plain-formatters and UI components to use SuccessMarkerText()/SuccessColorHex instead of textual "Success:" labels.

Changes

Cohort / File(s) Summary
Style definition
internal/output/style.go
New file: defines SuccessColorHex, SuccessMarker() (ANSI-colored marker) and SuccessMarkerText() (checkmark glyph).
Output formatting & tests
internal/output/plain_format.go, internal/output/plain_format_test.go, internal/output/plain_sink_test.go
Replaced textual "Success:" prefixes with calls to SuccessMarkerText() in formatted status and message outputs; updated tests to expect the marker.
UI rendering & styles
internal/ui/components/message.go, internal/ui/styles/styles.go, internal/ui/app_test.go
UI now renders success severity with output.SuccessMarkerText() and uses output.SuccessColorHex for the Success style; tests updated to assert marker presence.

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 'Use checkmark for success message' directly and clearly summarizes the main change: replacing text-based success labels with checkmark symbols throughout the codebase.
Description check ✅ Passed The pull request description clearly explains the changes: replacing text-based 'Success:' labels with a checkmark symbol for success messages, with before/after visual comparison.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch george/des-169
📝 Coding Plan
  • Generate coding plan for human review comments

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.

Tip

You can enable review details to help with troubleshooting, context usage and more.

Enable the reviews.review_details setting to include review details such as the model used, the time taken for each step and more in the review comments.

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
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.

1 participant