Summary
--no-color disables color for plain table output but not for the interactive search-table TUI (catalog course / catalog section / catalog teacher), which keeps emitting full ANSI color.
Reproduction
life-ustc --no-color --server <server> catalog course
Captured with tmux capture-pane -e (escape sequences visible): the TUI still emits ESC[38;5;62m (border), ESC[38;5;42m (title), ESC[38;5;244m (muted), ESC[38;5;230mESC[48;5;62m (selected row). Full capture: /tmp/tui-results-nocolor-80x24.txt.
Root cause
internal/cmd/root/root.go:124-126 only sets color.NoColor = true (fatih/color). The TUI (internal/tui/tui.go, styles at lines 643-661) uses lipgloss/bubbletea, which are never told about the flag — RunSearchTable (tui.go:69) starts the program with no renderer/color-profile option.
Suggested fix
When output.Current.NoColor is set, also disable lipgloss color before starting the program, e.g. lipgloss.SetColorProfile(termenv.Ascii) in RunSearchTable, or thread a no-color option through SearchTable. This matters for accessibility, terminals with broken color, and users who set NO_COLOR/--no-color expecting a monochrome UI.
Summary
--no-colordisables color for plain table output but not for the interactive search-table TUI (catalog course/catalog section/catalog teacher), which keeps emitting full ANSI color.Reproduction
Captured with
tmux capture-pane -e(escape sequences visible): the TUI still emitsESC[38;5;62m(border),ESC[38;5;42m(title),ESC[38;5;244m(muted),ESC[38;5;230mESC[48;5;62m(selected row). Full capture:/tmp/tui-results-nocolor-80x24.txt.Root cause
internal/cmd/root/root.go:124-126only setscolor.NoColor = true(fatih/color). The TUI (internal/tui/tui.go, styles at lines 643-661) uses lipgloss/bubbletea, which are never told about the flag —RunSearchTable(tui.go:69) starts the program with no renderer/color-profile option.Suggested fix
When
output.Current.NoColoris set, also disable lipgloss color before starting the program, e.g.lipgloss.SetColorProfile(termenv.Ascii)inRunSearchTable, or thread a no-color option throughSearchTable. This matters for accessibility, terminals with broken color, and users who setNO_COLOR/--no-colorexpecting a monochrome UI.