BACK-467/469/470 - Active-filter isTerminalStatus, config get/set CLI, missing tests#636
BACK-467/469/470 - Active-filter isTerminalStatus, config get/set CLI, missing tests#636lenucksi wants to merge 5 commits into
Conversation
- Add terminalStatuses?: string[] to BacklogConfig interface - Parse terminal_statuses key in config loader (same pattern as statuses) - Extend getTerminalStatus/isTerminalStatus with optional terminalStatuses param - Falls back to last-element convention when not provided (backward-compatible) - isTerminalStatus returns true for any entry in terminalStatuses array - getTerminalStatus returns terminalStatuses[0] as primary terminal status - Add 5 new test cases covering multi-terminal, fallback, empty-array, and non-last-element override scenarios Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
BACK-465 - Config-Schema: terminalStatuses-Key einführen
…uences and board filters Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…x serializeConfig Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Added 4 tests to src/web/lib/lanes.test.ts covering the sortTasksForStatus refactoring from BACK-467: custom terminal status gets done-sort even when not last in statuses array, empty terminalStatuses falls back to last-element convention, and active statuses are unaffected when terminalStatuses is set. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
MrLesk
left a comment
There was a problem hiding this comment.
Alex's Agent: Thanks for putting this together. I think the direction of replacing hardcoded done checks with the shared terminal-status helper is reasonable, but this PR is not ready to merge as-is.
Concrete blockers:
-
The PR references
BACK-467,BACK-469, andBACK-470, but I do not see matching Backlog task files in this branch. The GitHub issue numbers with those IDs are unrelated, and localBACK-465is a different completed MCP task. Please make the work traceable to the project workflow before this is merged. -
The branch says it depends on PR #635, but it targets
mainwhile #635 is still open. If #635 is required, this PR should either be rebased after that lands or be retargeted/structured so the dependency is explicit and reviewable. -
terminalStatusesis not wired into cleanup.config terminalStatusescan be set, but CLI cleanup still callsgetTerminalStatus(statuses)and filters withisTerminalStatus(task.status, statuses), andCore.getTerminalStatusTasksByAge()has the same issue. That means configured terminal statuses would not be cleaned up. -
The Web board only uses
terminalStatusesfor lane sorting/grouping. The cleanup affordance still derivesterminalStatusfromgetTerminalStatus(statuses)and only renders cleanup for that one status, so custom terminal statuses do not behave consistently in the board. -
The TUI board helper accepts
terminalStatuses, but important callers still do not pass it through (enhanced-views,simple-unified-view, andunified-view). That makes terminal-status behavior depend on which TUI entry point the user is using. -
config get/set terminalStatusesis added, butconfig liststill does not show it, so the config surface is inconsistent.
I ran the targeted tests for terminal status, config commands, cleanup, and lanes; they pass, but they do not cover the cleanup/Web/TUI gaps above. Please narrow this into a complete, traceable terminal-status PR with the runtime call sites and tests updated end to end.
|
Absorbed into PR #635 which now covers the complete terminalStatuses feature end-to-end: data-loss fix (saveConfig serialization), full config CLI surface (get/set/list), Core/CLI/TUI/Web wiring, and tests. Closing this PR to avoid duplicate review surface. |
Summary
BACK-467 — Replace hardcoded done-checks with
isTerminalStatusin active-task filters:src/core/backlog.ts:listActiveSequences/moveTaskInSequences—.toLowerCase() !== 'done'→!isTerminalStatus()src/cli.ts: sequence list active filtersrc/ui/sequences.ts: reload filtersrc/ui/board.ts: removed internalisDoneStatus();buildColumnTasks/prepareBoardColumnssignatures extended withstatuses+terminalStatusessrc/web/lib/lanes.ts:sortTasksForStatus/groupTasksByLaneAndStatussignatures extendedsrc/web/components/Board.tsx,BoardPage.tsx,App.tsx:terminalStatusesprop threaded throughBACK-469 — Register
terminalStatusesinconfig get/config setCLI commands:src/cli.ts: addedterminalStatusescase in both switches + updated available-keys error messagessrc/file-system/operations.ts: fixedserializeConfig(missingterminal_statusesline) andsaveConfig(empty array normalization)src/test/config-commands.test.tsBACK-470 — Add missing tests for BACK-467 (catch-up):
src/web/lib/lanes.test.tscoveringsortTasksForStatuswith customterminalStatuses:statusesarrayterminalStatusesfalls back to last-element conventionterminalStatusesis configuredDepends on: BACK-465 (merged to main), BACK-466 (PR #635)
Test plan
bun test— 1248 pass, 3 pre-existing auto-commit failuresbunx tsc --noEmit— cleanbun run check .— cleanterminalStatuses: ['Fertig']) filters active sequences correctlybun run cli config set terminalStatuses Done,Closedpersists and round-trips🤖 Generated with Claude Code