Skip to content

Style success checkmark in status command output#179

Open
gtsiolis wants to merge 2 commits intomainfrom
des-193-style-success-checkmark-in-status-command-output
Open

Style success checkmark in status command output#179
gtsiolis wants to merge 2 commits intomainfrom
des-193-style-success-checkmark-in-status-command-output

Conversation

@gtsiolis
Copy link
Copy Markdown
Member

BEFORE AFTER
Screenshot 2026-03-28 at 02 20 30 Screenshot 2026-03-28 at 02 20 25

Copy link
Copy Markdown

@claude claude bot left a comment

Choose a reason for hiding this comment

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

Claude Code Review

This repository is configured for manual code reviews. Comment @claude review to trigger a review and subscribe this PR to future pushes, or @claude review once for a one-time review.

Tip: disable this comment in your organization's Code Review settings.

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Mar 28, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

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

Review profile: CHILL

Plan: Pro

Run ID: b44d0224-66ab-4a6f-ade1-ac2737cabd73

📥 Commits

Reviewing files that changed from the base of the PR and between 327e884 and 3d288a0.

📒 Files selected for processing (1)
  • internal/ui/app.go
🚧 Files skipped from review as they are similar to previous changes (1)
  • internal/ui/app.go

📝 Walkthrough

Walkthrough

Added App.addLine(styledLine) in internal/ui/app.go to centralize the conditional append-to-buffer logic, refactored multiple event handlers to use it, simplified ResourceSummary handling, and added a new InstanceInfoEvent case that formats, replaces the success marker, splits on newlines, and appends via addLine.

Changes

Cohort / File(s) Summary
UI output centralization & event handling
internal/ui/app.go
Added (*App).addLine(styledLine) to centralize spinner-buffer conditional appends; refactored MessageEvent, LogLineEvent, FormatEventLine fallthrough, TableEvent multiline handling, and ResourceSummaryEvent to use it; added InstanceInfoEvent case that formats lines, replaces success marker with styled success, splits on \n, and appends via addLine. Net change: +23/-39 lines.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Suggested reviewers

  • carole-lavillonniere
  • silv-io
🚥 Pre-merge checks | ✅ 2
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main change: styling the success checkmark in status command output, which aligns with the code changes refactoring event handling and introducing InstanceInfoEvent styling.
Description check ✅ Passed The description includes before/after screenshots that visually demonstrate the styling changes to the success checkmark in the status command output, which is directly related to the changeset's objectives.

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

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch des-193-style-success-checkmark-in-status-command-output

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
Copy Markdown

@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/ui/app.go (1)

227-232: Optional: deduplicate success-marker styling into a helper.

strings.Replace(...SuccessMarker...) is now duplicated with the container-ready path; a tiny helper would reduce drift risk.

♻️ Proposed refactor
+func styleSuccessMarker(line string) string {
+	return strings.Replace(line, output.SuccessMarker(), styles.Success.Render(output.SuccessMarker()), 1)
+}
+
...
- line = strings.Replace(line, output.SuccessMarker(), styles.Success.Render(output.SuccessMarker()), 1)
+ line = styleSuccessMarker(line)

Also apply the same helper at output.ContainerStatusEvent ready handling.

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

In `@internal/ui/app.go` around lines 227 - 232, The success-marker styling logic
is duplicated where output.InstanceInfoEvent handles ready lines; extract a
small helper (e.g., renderSuccessMarker(line string) string) that replaces
output.SuccessMarker() with styles.Success.Render(output.SuccessMarker()) and
use it in the InstanceInfoEvent handling (where output.FormatEventLine is used
and lines are split/added with a.addLine/styledLine) and also replace the same
duplicated call in the output.ContainerStatusEvent ready handling so both code
paths share the helper.
🤖 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/ui/app.go`:
- Around line 227-232: The success-marker styling logic is duplicated where
output.InstanceInfoEvent handles ready lines; extract a small helper (e.g.,
renderSuccessMarker(line string) string) that replaces output.SuccessMarker()
with styles.Success.Render(output.SuccessMarker()) and use it in the
InstanceInfoEvent handling (where output.FormatEventLine is used and lines are
split/added with a.addLine/styledLine) and also replace the same duplicated call
in the output.ContainerStatusEvent ready handling so both code paths share the
helper.

ℹ️ Review info
⚙️ Run configuration

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

Review profile: CHILL

Plan: Pro

Run ID: 23271972-cc3d-4f70-a146-ee03e840f532

📥 Commits

Reviewing files that changed from the base of the PR and between d2de6da and 327e884.

📒 Files selected for processing (1)
  • internal/ui/app.go

@gtsiolis gtsiolis force-pushed the des-193-style-success-checkmark-in-status-command-output branch from 327e884 to 3d288a0 Compare March 31, 2026 10:09
@gtsiolis
Copy link
Copy Markdown
Member Author

Ready for review.

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