From e8a703e6cafe9a03b70854d9c7cc8bd83f4f0c6e Mon Sep 17 00:00:00 2001 From: Chris Hendrickson Date: Sat, 25 Apr 2026 12:47:58 -0400 Subject: [PATCH] fix(tui): escape quits board, full column highlight, visible empty state MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Escape on board home quits the app; if a filter/status message is active it clears that first (consistent with Esc-to-clear UX elsewhere) - Side-border cells (fillers, scroll-indicator blanks) in the selected column now use the column accent color instead of brightBlack, so the highlight box closes all the way around - Empty-state '··· empty ···' label uses the column accent color (bold when selected) / white on non-selected, replacing the invisible brightBlack dots Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../kanban/lib/src/commands/tui_command.dart | 26 +++++++++++++------ 1 file changed, 18 insertions(+), 8 deletions(-) diff --git a/packages/kanban/lib/src/commands/tui_command.dart b/packages/kanban/lib/src/commands/tui_command.dart index 1d9d81d..279652d 100644 --- a/packages/kanban/lib/src/commands/tui_command.dart +++ b/packages/kanban/lib/src/commands/tui_command.dart @@ -372,8 +372,12 @@ class TuiCommand extends DewCommand { detailScroll = 0; } case ControlCharacter.escape: - searchQuery = ''; - statusMsg = ''; + if (searchQuery.isNotEmpty || statusMsg.isNotEmpty) { + searchQuery = ''; + statusMsg = ''; + } else { + break loop; + } default: continue loop; // skip redraw } @@ -562,7 +566,7 @@ class TuiCommand extends DewCommand { final msg = _trunc(' ↑ $scroll above', innerW); cells.add(_Cell('│${msg.padRight(innerW)}│', fg: ConsoleColor.brightYellow)); } else { - cells.add(_Cell('│${' ' * innerW}│', fg: ConsoleColor.brightBlack)); + cells.add(_Cell('│${' ' * innerW}│', fg: isSelected ? color : ConsoleColor.brightBlack)); } // Visible tickets @@ -573,9 +577,15 @@ class TuiCommand extends DewCommand { // Empty state if (tickets.isEmpty) { - cells.add(_Cell('│${'·' * (innerW ~/ 2)}${' ' * (innerW - innerW ~/ 2)}│', fg: ConsoleColor.brightBlack)); - cells.add(_Cell('│ (empty)${' ' * (innerW - 9)}│', fg: ConsoleColor.brightBlack)); - cells.add(_Cell('│${'·' * (innerW ~/ 2)}${' ' * (innerW - innerW ~/ 2)}│', fg: ConsoleColor.brightBlack)); + final borderFg = isSelected ? color : ConsoleColor.brightBlack; + cells.add(_Cell('│${' ' * innerW}│', fg: borderFg)); + final hint = _trunc(' ··· empty ···', innerW).padRight(innerW); + cells.add(_Cell( + '│$hint│', + fg: isSelected ? color : ConsoleColor.white, + bold: isSelected, + )); + cells.add(_Cell('│${' ' * innerW}│', fg: borderFg)); } // "More below" indicator @@ -584,12 +594,12 @@ class TuiCommand extends DewCommand { final msg = _trunc(' ↓ $remaining below', innerW); cells.add(_Cell('│${msg.padRight(innerW)}│', fg: ConsoleColor.brightYellow)); } else { - cells.add(_Cell('│${' ' * innerW}│', fg: ConsoleColor.brightBlack)); + cells.add(_Cell('│${' ' * innerW}│', fg: isSelected ? color : ConsoleColor.brightBlack)); } // Fill remaining space before bottom border while (cells.length < areaH - 1) { - cells.add(_Cell('│${' ' * innerW}│', fg: ConsoleColor.brightBlack)); + cells.add(_Cell('│${' ' * innerW}│', fg: isSelected ? color : ConsoleColor.brightBlack)); } // Bottom border (always at areaH - 1)