Commit graph

12 commits

Author SHA1 Message Date
4193282325 TUI: add F1 hint to all mode footers, wire F1 in editor, update board hints
- Board footer now shows all actions: D, L, F1, and the full keybinding list
- Detail footer shows [F1] help alongside scroll and edit hints
- Editor footer shows [F1] help hint
- F1 key now handled in editor mode (was only wired in board/detail)
- Stage deleted .project/kanban/backlog/DEW-0016.md

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-04-25 15:08:14 -04:00
5d9d9ded3f feat(tui): widen editor modal to max 100 cols
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-04-25 14:27:43 -04:00
0a2e8fbd90 fix(tui): replace brightBlack with white for terminal contrast
brightBlack (dark gray) is invisible on gray/medium terminal backgrounds.
Replace all instances with white for borders, hints, and secondary text.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-04-25 14:13:39 -04:00
21d3814da4 feat(tui): full ticket editor modal overlay
- Add _EditorField enum and _EditorState class for mutable field tracking
- Add _Mode.editor and wire 'e' key in board+detail modes
- Editor supports: title (inline text edit), type (◀/▶ selector),
  column (◀/▶ selector), labels (chips + add/delete), milestones (same),
  body (preview + launches $VISUAL/$EDITOR/vi in raw terminal)
- j/k and arrow keys navigate between fields
- h/l cycle selector values and move item cursor in multi-value lists
- d removes selected label/milestone
- s saves all fields via store.update(), returns to board with focus on ticket
- Esc/q discards, returns to board
- _renderEditor: centered modal overlay (max 76 wide), dim background,
  double-line border in column accent colour, 'unsaved' indicator when dirty

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-04-25 14:03:12 -04:00
ade243e2c7 Archive command and include-archived flag (DEW-0015)
- ArchiveCommand (kanban archive --id <id>): moves ticket file from its
  current column dir to .project/kanban/archive/; attachments stay put
  (under attachments/<id>/); registered as 'kanban_archive_ticket' MCP tool
- TicketStore.list() gains includeArchived param (default false);
  archive/ dir skipped unless includeArchived=true
- ListCommand: --include-archived flag
- SearchCommand: --include-archived flag
- Test: list excludes/includes archive correctly
- 14 MCP tools; 'archive' added to expected subcommands list

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-04-23 20:07:50 -04:00
5d8451383b Column transition validation and enhanced search filters (DEW-0013, DEW-0014)
DEW-0013: Enhanced search filters (already implemented in DEW-0011 pass)
- dew kanban search already had --column/--type/--label/--milestone filters
- Closed ticket

DEW-0014: Column transition validation
- ColumnConfig gains optional allowedTransitions: List<String>
- Parsed from allowed_transitions YAML list on each column entry
- MoveCommand validates current column's allowedTransitions before moving;
  unconfigured (empty list) = all transitions allowed (existing behaviour)
- Test: transition validation integration test with constrained + unconstrained columns

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-04-23 20:05:55 -04:00
27a45e3d52 Grouped list view and ASCII board command (DEW-0012)
- ListCommand: when no --column filter, groups output by column with counts;
  with --column filter, returns flat list (no redundant column header)
- BoardCommand (kanban board): ASCII box per column in config order,
  self-sizing to longest ticket line; supports --type/--label/--milestone filters
  registered as 'kanban_board' MCP tool
- Test counts updated: 13 MCP tools, 'board' in subcommands list

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-04-23 20:03:55 -04:00
f89b3aa998 Add milestones and labels to Ticket model (DEW-0011)
- Ticket.milestones and Ticket.labels: List<String>, optional (default [])
- toFileContent() emits milestones:/labels: YAML lists when non-empty
- fromFileContent() parses them back; empty when absent (backwards compat)
- TicketStore.create() and update() accept milestones/labels params
- CreateCommand and UpdateCommand: --milestone/--label multi-options
- ListCommand and SearchCommand: --milestone/--label filter options
- 4 new tests: model roundtrip, store persistence, update patch, no fields when empty

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-04-23 20:01:47 -04:00
31f9ba4726 dew init with module init hooks (DEW-0010)
- DewInitHook interface and DewInitOptions added to packages/core/src/init.dart
- InitCommand: creates .project/dew.yaml from default template, calls hooks
  --path/-p option (default '.'), --[no-]gitkeep flag (default true)
- CommandRegistry gains initHooks list and registerInitHook()
- KanbanInitHook: creates column dirs, archive/, attachments/ under
  .project/kanban/; adds .gitkeep to freshly-created dirs when enabled
- KanbanInitHook registered in kanban.registerCommands()
- CLI wires InitCommand(registry.initHooks) as a top-level command

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-04-23 19:58:53 -04:00
198d65b7e2 Update stale documentation (DEW-0009)
- index.md: rewrite architecture section to reflect DewToolCommand mixin,
  CommandRegistry, and per-package config extension pattern
- config.md: update default columns to backlog/doing/done
- features/mcp.md: replace McpToolProvider references with DewToolCommand,
  add all 12 tools to the table, add link types table
- features/kanban.md: replace stub with full docs covering storage layout,
  ticket format, CLI command reference, link types, and config

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-04-23 19:56:08 -04:00
a25411d4fa Config refactor: DewConfig.raw + per-package extensions (DEW-0007)
DewConfig in core is now a thin YamlMap wrapper. Feature-specific config
classes live in their own packages and expose themselves via Dart extensions:

- KanbanConfig, ColumnConfig, TicketTypeConfig + KanbanDewConfig extension
  moved to packages/kanban/lib/src/kanban_config.dart
- McpConfig + McpDewConfig extension added to
  packages/mcp/lib/src/mcp_config.dart
- DewConfig.fromYaml() now trivially wraps the raw YamlMap
- All call sites unchanged: context.config.kanban.* / context.config.mcp.*
- Added yaml dependency to dew_mcp pubspec
- Updated core test to validate raw yaml instead of typed fields
- Fixed cross-suite Directory.current isolation (existing issue, not introduced)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-04-23 19:54:35 -04:00
951f0d8bc8 Storage refactor: tickets in column subdirs, drop redundant column frontmatter
- TicketStore rewritten: tickets live in .project/kanban/<column>/<id>.md
- _findTicketFile() searches all column subdirs (one level deep)
- update() moves the file when column changes
- delete() cleans up attachments/<id>/ if present
- _nextNumber() scans all subdirs including archive
- Ticket.fromFileContent() now takes column as explicit parameter
- Ticket.toFileContent() drops column field (derived from path)
- _yamlQuote() added to safely quote titles containing ': '
- dew.yaml: columns changed to backlog/doing/done (alphabetical order)
- Existing tickets migrated to .project/kanban/backlog/

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-04-23 19:42:21 -04:00