Add an interactive Trello-style kanban TUI powered by dart_console. Features: - Side-by-side column layout, adapts to terminal width - Keyboard navigation: j/k (up/down), h/l or ←/→ (switch column) - Move selected ticket between columns with < and > - Ticket cards show ID, type badge (colour-coded), title, labels/milestone - Scroll indicators (↑ N above / ↓ N below) when a column overflows - Column headers highlighted in their configured colour; active column uses filled background + double-line border - Live filter with / (fuzzy search across id, title, type, labels, body) - Detail view (Enter): full ticket info, body and comments with word-wrap, scrollable with j/k - r to reload tickets from disk without leaving the TUI - Graceful terminal restoration on exit (Esc / q) - Requires an interactive terminal; prints a clear error otherwise Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
51 lines
1.7 KiB
Dart
51 lines
1.7 KiB
Dart
import 'package:dew_core/dew_core.dart';
|
|
import 'package:file/file.dart';
|
|
import 'package:file/local.dart';
|
|
|
|
import 'commands/add_comment_command.dart';
|
|
import 'commands/archive_command.dart';
|
|
import 'commands/board_command.dart';
|
|
import 'commands/create_command.dart';
|
|
import 'commands/delete_command.dart';
|
|
import 'commands/get_command.dart';
|
|
import 'commands/get_config_command.dart';
|
|
import 'commands/link_command.dart';
|
|
import 'commands/list_command.dart';
|
|
import 'commands/move_command.dart';
|
|
import 'commands/search_command.dart';
|
|
import 'commands/stats_command.dart';
|
|
import 'commands/tui_command.dart';
|
|
import 'commands/unarchive_command.dart';
|
|
import 'commands/unlink_command.dart';
|
|
import 'commands/update_command.dart';
|
|
|
|
/// Top-level CLI command for all Kanban board operations.
|
|
class KanbanCommand extends DewCommand {
|
|
KanbanCommand({FileSystem fs = const LocalFileSystem()}) {
|
|
addSubcommand(CreateCommand(fs: fs));
|
|
addSubcommand(ListCommand(fs: fs));
|
|
addSubcommand(BoardCommand(fs: fs));
|
|
addSubcommand(GetCommand(fs: fs));
|
|
addSubcommand(UpdateCommand(fs: fs));
|
|
addSubcommand(DeleteCommand(fs: fs));
|
|
addSubcommand(ArchiveCommand(fs: fs));
|
|
addSubcommand(UnarchiveCommand(fs: fs));
|
|
addSubcommand(MoveCommand(fs: fs));
|
|
addSubcommand(SearchCommand(fs: fs));
|
|
addSubcommand(AddCommentCommand(fs: fs));
|
|
addSubcommand(GetConfigCommand(fs: fs));
|
|
addSubcommand(StatsCommand(fs: fs));
|
|
addSubcommand(TuiCommand(fs: fs));
|
|
addSubcommand(LinkCommand(fs: fs));
|
|
addSubcommand(UnlinkCommand(fs: fs));
|
|
}
|
|
|
|
@override
|
|
final String name = 'kanban';
|
|
|
|
@override
|
|
final String description = 'Manage the Kanban board.';
|
|
|
|
@override
|
|
Future<void> run() async => printUsage();
|
|
}
|