detached 6e3bc4e

fix: address Copilot review feedback

- Remove unused label parameter from RenderStatusBadge function
- Fix IconContainer Unicode escape sequence (U+F489)
- Fix IconNetwork Unicode escape sequence (U+F06F3)
- Use rune-based truncation for attachment names with Unicode icons
commit
6e3bc4eac18d642578037348ecad0acb82136748
author
brice · · 2026-01-17 14:36 UTC
parent
547b44c
signature
unsigned
3 files · +11 -8
M internal/adapters/in/cli/routes.go +4 -2
@@ -172,8 +172,10 @@ func runRoutesListRemote(ctx context.Context, client *remote.Client) error {
172172 for _, attachment := range route.Attachments {
173173 // Use container icon with indent for attachment tree display
174174 attachmentName := " " + styles.IconContainer + " " + attachment.Name
175- if len(attachmentName) > 25 {
176- attachmentName = attachmentName[:22] + "..."
175+ // Use rune count for proper Unicode handling (icons are multi-byte)
176+ runes := []rune(attachmentName)
177+ if len(runes) > 25 {
178+ attachmentName = string(runes[:22]) + "..."
177179 }
178180 attachmentStatus := components.ContainerStatusBadge(attachment.Status)
179181 attachmentImage := truncateImage(attachment.Image, imageColWidth)
@@ -172,8 +172,10 @@ func runRoutesListRemote(ctx context.Context, client *remote.Client) error {
172 for _, attachment := range route.Attachments {172 for _, attachment := range route.Attachments {
173 // Use container icon with indent for attachment tree display173 // Use container icon with indent for attachment tree display
174 attachmentName := " " + styles.IconContainer + " " + attachment.Name174 attachmentName := " " + styles.IconContainer + " " + attachment.Name
175- if len(attachmentName) > 25 {175+ // Use rune count for proper Unicode handling (icons are multi-byte)
176- attachmentName = attachmentName[:22] + "..."176+ runes := []rune(attachmentName)
177+ if len(runes) > 25 {
178+ attachmentName = string(runes[:22]) + "..."
177 }179 }
178 attachmentStatus := components.ContainerStatusBadge(attachment.Status)180 attachmentStatus := components.ContainerStatusBadge(attachment.Status)
179 attachmentImage := truncateImage(attachment.Image, imageColWidth)181 attachmentImage := truncateImage(attachment.Image, imageColWidth)
M internal/adapters/in/cli/ui/components/status.go +5 -4
@@ -92,8 +92,9 @@ func RenderStatus(status Status, label string) string {
9292 return config.Style.Render(config.Icon + " " + label)
9393 }
9494
95-// RenderStatusBadge renders a status as a badge with background and icon.
96-func RenderStatusBadge(status Status, _ string) string {
95+// RenderStatusBadge renders a status as a compact icon badge with background.
96+// It displays only the icon (no label) for minimal width in table columns.
97+func RenderStatusBadge(status Status) string {
9798 config := DefaultStatusConfigs[status]
9899 var badgeStyle lipgloss.Style
99100 switch status {
@@ -171,7 +172,7 @@ func NewStatusBadge(status Status, label string) StatusIndicator {
171172 // View renders the status indicator.
172173 func (s StatusIndicator) View() string {
173174 if s.Badge {
174- return RenderStatusBadge(s.Status, s.Label)
175+ return RenderStatusBadge(s.Status)
175176 }
176177 return RenderStatus(s.Status, s.Label)
177178 }
@@ -185,5 +186,5 @@ func ContainerStatusIndicator(status string) string {
185186 // ContainerStatusBadge renders container status as a badge.
186187 func ContainerStatusBadge(status string) string {
187188 parsed := ParseStatus(status)
188- return RenderStatusBadge(parsed, status)
189+ return RenderStatusBadge(parsed)
189190 }
@@ -92,8 +92,9 @@ func RenderStatus(status Status, label string) string {
92 return config.Style.Render(config.Icon + " " + label)92 return config.Style.Render(config.Icon + " " + label)
93 }93 }
94 94
95-// RenderStatusBadge renders a status as a badge with background and icon.95+// RenderStatusBadge renders a status as a compact icon badge with background.
96-func RenderStatusBadge(status Status, _ string) string {96+// It displays only the icon (no label) for minimal width in table columns.
97+func RenderStatusBadge(status Status) string {
97 config := DefaultStatusConfigs[status]98 config := DefaultStatusConfigs[status]
98 var badgeStyle lipgloss.Style99 var badgeStyle lipgloss.Style
99 switch status {100 switch status {
@@ -171,7 +172,7 @@ func NewStatusBadge(status Status, label string) StatusIndicator {
171 // View renders the status indicator.172 // View renders the status indicator.
172 func (s StatusIndicator) View() string {173 func (s StatusIndicator) View() string {
173 if s.Badge {174 if s.Badge {
174- return RenderStatusBadge(s.Status, s.Label)175+ return RenderStatusBadge(s.Status)
175 }176 }
176 return RenderStatus(s.Status, s.Label)177 return RenderStatus(s.Status, s.Label)
177 }178 }
@@ -185,5 +186,5 @@ func ContainerStatusIndicator(status string) string {
185 // ContainerStatusBadge renders container status as a badge.186 // ContainerStatusBadge renders container status as a badge.
186 func ContainerStatusBadge(status string) string {187 func ContainerStatusBadge(status string) string {
187 parsed := ParseStatus(status)188 parsed := ParseStatus(status)
188- return RenderStatusBadge(parsed, status)189+ return RenderStatusBadge(parsed)
189 }190 }
M internal/adapters/in/cli/ui/styles/icons.go +2 -2
@@ -24,9 +24,9 @@ const (
2424 IconRoute = "\uf0e8" // nf-fa-sitemap
2525 IconSecret = "\uf023" // nf-fa-lock
2626 IconToken = "\uf084" // nf-fa-key
27- IconContainer = "\uf4b7" // nf-oct-container
27+ IconContainer = "\uf489" // nf-oct-container (U+F489)
2828 IconServer = "\uf233" // nf-fa-server
29- IconNetwork = "\U000f0317" // nf-md-lan
29+ IconNetwork = "\U000f06f3" // nf-md-lan (U+F06F3)
3030 IconVolume = "\uf1c0" // nf-fa-database
3131 IconImage = "\uf187" // nf-fa-archive
3232 IconDocker = "\ue7b0" // nf-dev-docker
@@ -24,9 +24,9 @@ const (
24 IconRoute = "\uf0e8" // nf-fa-sitemap24 IconRoute = "\uf0e8" // nf-fa-sitemap
25 IconSecret = "\uf023" // nf-fa-lock25 IconSecret = "\uf023" // nf-fa-lock
26 IconToken = "\uf084" // nf-fa-key26 IconToken = "\uf084" // nf-fa-key
27- IconContainer = "\uf4b7" // nf-oct-container27+ IconContainer = "\uf489" // nf-oct-container (U+F489)
28 IconServer = "\uf233" // nf-fa-server28 IconServer = "\uf233" // nf-fa-server
29- IconNetwork = "\U000f0317" // nf-md-lan29+ IconNetwork = "\U000f06f3" // nf-md-lan (U+F06F3)
30 IconVolume = "\uf1c0" // nf-fa-database30 IconVolume = "\uf1c0" // nf-fa-database
31 IconImage = "\uf187" // nf-fa-archive31 IconImage = "\uf187" // nf-fa-archive
32 IconDocker = "\ue7b0" // nf-dev-docker32 IconDocker = "\ue7b0" // nf-dev-docker

Keyboard shortcuts

Single-key shortcuts are on. ctrl k and esc work whatever this says.

ctrl k :
go to a section, branch, tag, file or repository
?
this list
j k
move the row cursor down / up
enter
open the row under the cursor; on Files, a directory opens or closes in place
↑ ↓ ← → home end
in the file tree (focus on a row): previous / next row, close / open a directory or go to its parent / first entry, first / last row. They never open a file
l h
on Files: open a directory or a file / close a directory or go up to its parent, then to the parent page. Elsewhere: into the side panel (on a merge request, its files) / back to the content; there j k move between its controls
g g G
first / last row
/
filter the list; on Files, find a file anywhere in the repository (esc clears, enter opens the best match)
b
switch branch or tag
g s g f g c g b g m g i g r g a
tabs: summary, files, commits, branches & tags, merge requests, issues, releases, actions (when available)
g h
home
w
wide mode: use the whole width of the screen, or not (remembered)
y
copy a permalink pinned to the commit
d u x
diff: split / unified / collapse or expand all
e E
diff: the whole file in view / every file, with the lines the hunks hide
n
merge request: next note in the diff
esc
close a dialog, leave a field

Branches 7

Tags 106

↑↓ moveenter openesc close