fix: removing dependency on ansi and using lipgloss#739
Merged
bupd merged 1 commit intogoharbor:mainfrom Mar 13, 2026
Merged
Conversation
Signed-off-by: NucleoFusion <lakshit.singh.mail@gmail.com>
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #739 +/- ##
=========================================
- Coverage 10.99% 7.46% -3.53%
=========================================
Files 173 261 +88
Lines 8671 13021 +4350
=========================================
+ Hits 953 972 +19
- Misses 7612 11940 +4328
- Partials 106 109 +3 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Contributor
There was a problem hiding this comment.
Pull request overview
This PR replaces hardcoded ANSI escape sequences used for CLI text styling with lipgloss styles, centralizing styling behavior in pkg/views/styles.go and updating affected views to use the new styles.
Changes:
- Added reusable
lipglossstyles for green/red/bold text inpkg/views/styles.go. - Replaced direct ANSI concatenation with
Style.Render(...)in robot and health views. - Removed the old ANSI constant definitions from the shared styles package.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| pkg/views/styles.go | Introduces shared lipgloss styles and removes hardcoded ANSI constants. |
| pkg/views/robot/view/view.go | Updates robot detail output to use lipgloss styles instead of ANSI constants. |
| pkg/views/robot/list/view.go | Updates robot list status styling to use lipgloss styles. |
| pkg/views/health/view.go | Updates health status coloring to use lipgloss styles. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+125
to
131
| fmt.Printf("\n%s\n\n", views.BoldStyle.Render("System-level robot with access across projects")) | ||
| } else { | ||
| permissionsColumns = projectPermissionsColumns | ||
| resourceStrings = projectResourceStrings | ||
| systemLevel = false | ||
| fmt.Printf("%sProject-level robot for project: %s%s\n\n", views.BoldANSI, robot.Permissions[0].Namespace, views.ResetANSI) | ||
| fmt.Printf("\n%s\n\n", views.BoldStyle.Render(fmt.Sprintf("System-level robot with access across projects: %s", robot.Permissions[0].Namespace))) | ||
| } |
| } | ||
|
|
||
| fmt.Printf("\n%sProject-specific Permissions:%s\n", views.BoldANSI, views.ResetANSI) | ||
| fmt.Printf("\n%s\n\n", views.BoldStyle.Render("Project-specific Permissions:")) |
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.
Description
Type of Change
Please select the relevant type.
Changes
/pkg/views/styles.go