@@ -127,7 +127,6 @@ func (m model) renderQueueView() string {
127127 b .WriteString (titleStyle .Render (title .String ()))
128128 // In compact mode, show version mismatch inline since the status area is hidden
129129 if compact && m .versionMismatch {
130- errorStyle := lipgloss .NewStyle ().Foreground (lipgloss.AdaptiveColor {Light : "124" , Dark : "196" }).Bold (true )
131130 b .WriteString (" " )
132131 b .WriteString (errorStyle .Render (fmt .Sprintf ("MISMATCH: TUI %s != Daemon %s" , version .Version , m .daemonVersion )))
133132 }
@@ -177,7 +176,6 @@ func (m model) renderQueueView() string {
177176
178177 // Update notification on line 3 (above the table)
179178 if m .updateAvailable != "" {
180- updateStyle := lipgloss .NewStyle ().Foreground (lipgloss.AdaptiveColor {Light : "136" , Dark : "226" }).Bold (true )
181179 var updateMsg string
182180 if m .updateIsDevBuild {
183181 updateMsg = fmt .Sprintf ("Dev build - latest release: %s - run 'roborev update --force'" , m .updateAvailable )
@@ -533,10 +531,8 @@ func (m model) renderQueueView() string {
533531 // Status line: flash message (temporary)
534532 // Version mismatch takes priority over flash messages (it's persistent and important)
535533 if m .versionMismatch {
536- errorStyle := lipgloss .NewStyle ().Foreground (lipgloss.AdaptiveColor {Light : "124" , Dark : "196" }).Bold (true ) // Red
537534 b .WriteString (errorStyle .Render (fmt .Sprintf ("VERSION MISMATCH: TUI %s != Daemon %s - restart TUI or daemon" , version .Version , m .daemonVersion )))
538535 } else if m .flashMessage != "" && time .Now ().Before (m .flashExpiresAt ) && m .flashView == viewQueue {
539- flashStyle := lipgloss .NewStyle ().Foreground (lipgloss.AdaptiveColor {Light : "28" , Dark : "46" }) // Green
540536 b .WriteString (flashStyle .Render (m .flashMessage ))
541537 }
542538 b .WriteString ("\x1b [K\n " ) // Clear to end of line
@@ -641,6 +637,10 @@ func stripControlChars(s string) string {
641637 return b .String ()
642638}
643639
640+ // toggleableColumns is the ordered list of columns the user can show/hide.
641+ // colSel and colJobID are always visible and not included here.
642+ var toggleableColumns = []int {colRef , colBranch , colRepo , colAgent , colStatus , colQueued , colElapsed , colPF , colHandled }
643+
644644// columnNames maps column constants to display names.
645645var columnNames = map [int ]string {
646646 colRef : "Ref" ,
@@ -694,7 +694,7 @@ func parseHiddenColumns(names []string) map[int]bool {
694694func hiddenColumnsToNames (hidden map [int ]bool ) []string {
695695 var names []string
696696 // Maintain stable order
697- for _ , col := range [] int { colRef , colBranch , colRepo , colAgent , colStatus , colQueued , colElapsed , colPF , colHandled } {
697+ for _ , col := range toggleableColumns {
698698 if hidden [col ] {
699699 names = append (names , columnConfigNames [col ])
700700 }
@@ -706,7 +706,7 @@ func hiddenColumnsToNames(hidden map[int]bool) []string {
706706// always including colSel and colJobID, plus any non-hidden toggleable columns.
707707func (m model ) visibleColumns () []int {
708708 cols := []int {colSel , colJobID }
709- for _ , c := range [] int { colRef , colBranch , colRepo , colAgent , colStatus , colQueued , colElapsed , colPF , colHandled } {
709+ for _ , c := range toggleableColumns {
710710 if ! m .hiddenColumns [c ] {
711711 cols = append (cols , c )
712712 }
@@ -749,7 +749,7 @@ func (m model) renderColumnOptionsView() string {
749749 line = selectedStyle .Render (line )
750750 }
751751 // Separator before "Column borders" item
752- if opt .id == - 1 && i > 0 {
752+ if opt .id == colOptionBorders && i > 0 {
753753 b .WriteString ("\n " )
754754 }
755755 b .WriteString (prefix )
0 commit comments