fix(tui): escape quits board, full column highlight, visible empty state

- 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>
This commit is contained in:
Chris Hendrickson 2026-04-25 12:47:58 -04:00
parent 46fffc91e1
commit e8a703e6ca

View file

@ -372,8 +372,12 @@ class TuiCommand extends DewCommand {
detailScroll = 0; detailScroll = 0;
} }
case ControlCharacter.escape: case ControlCharacter.escape:
if (searchQuery.isNotEmpty || statusMsg.isNotEmpty) {
searchQuery = ''; searchQuery = '';
statusMsg = ''; statusMsg = '';
} else {
break loop;
}
default: default:
continue loop; // skip redraw continue loop; // skip redraw
} }
@ -562,7 +566,7 @@ class TuiCommand extends DewCommand {
final msg = _trunc('$scroll above', innerW); final msg = _trunc('$scroll above', innerW);
cells.add(_Cell('${msg.padRight(innerW)}', fg: ConsoleColor.brightYellow)); cells.add(_Cell('${msg.padRight(innerW)}', fg: ConsoleColor.brightYellow));
} else { } else {
cells.add(_Cell('${' ' * innerW}', fg: ConsoleColor.brightBlack)); cells.add(_Cell('${' ' * innerW}', fg: isSelected ? color : ConsoleColor.brightBlack));
} }
// Visible tickets // Visible tickets
@ -573,9 +577,15 @@ class TuiCommand extends DewCommand {
// Empty state // Empty state
if (tickets.isEmpty) { if (tickets.isEmpty) {
cells.add(_Cell('${'·' * (innerW ~/ 2)}${' ' * (innerW - innerW ~/ 2)}', fg: ConsoleColor.brightBlack)); final borderFg = isSelected ? color : ConsoleColor.brightBlack;
cells.add(_Cell('│ (empty)${' ' * (innerW - 9)}', fg: ConsoleColor.brightBlack)); cells.add(_Cell('${' ' * innerW}', fg: borderFg));
cells.add(_Cell('${'·' * (innerW ~/ 2)}${' ' * (innerW - innerW ~/ 2)}', fg: ConsoleColor.brightBlack)); 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 // "More below" indicator
@ -584,12 +594,12 @@ class TuiCommand extends DewCommand {
final msg = _trunc('$remaining below', innerW); final msg = _trunc('$remaining below', innerW);
cells.add(_Cell('${msg.padRight(innerW)}', fg: ConsoleColor.brightYellow)); cells.add(_Cell('${msg.padRight(innerW)}', fg: ConsoleColor.brightYellow));
} else { } else {
cells.add(_Cell('${' ' * innerW}', fg: ConsoleColor.brightBlack)); cells.add(_Cell('${' ' * innerW}', fg: isSelected ? color : ConsoleColor.brightBlack));
} }
// Fill remaining space before bottom border // Fill remaining space before bottom border
while (cells.length < areaH - 1) { 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) // Bottom border (always at areaH - 1)