Skip to content

BACK-467/469/470 - Active-filter isTerminalStatus, config get/set CLI, missing tests#636

Closed
lenucksi wants to merge 5 commits into
MrLesk:mainfrom
lenucksi:fix/back-467-active-filters
Closed

BACK-467/469/470 - Active-filter isTerminalStatus, config get/set CLI, missing tests#636
lenucksi wants to merge 5 commits into
MrLesk:mainfrom
lenucksi:fix/back-467-active-filters

Conversation

@lenucksi
Copy link
Copy Markdown

@lenucksi lenucksi commented May 7, 2026

Summary

BACK-467 — Replace hardcoded done-checks with isTerminalStatus in active-task filters:

  • src/core/backlog.ts: listActiveSequences / moveTaskInSequences.toLowerCase() !== 'done'!isTerminalStatus()
  • src/cli.ts: sequence list active filter
  • src/ui/sequences.ts: reload filter
  • src/ui/board.ts: removed internal isDoneStatus(); buildColumnTasks / prepareBoardColumns signatures extended with statuses + terminalStatuses
  • src/web/lib/lanes.ts: sortTasksForStatus / groupTasksByLaneAndStatus signatures extended
  • src/web/components/Board.tsx, BoardPage.tsx, App.tsx: terminalStatuses prop threaded through

BACK-469 — Register terminalStatuses in config get/config set CLI commands:

  • src/cli.ts: added terminalStatuses case in both switches + updated available-keys error messages
  • src/file-system/operations.ts: fixed serializeConfig (missing terminal_statuses line) and saveConfig (empty array normalization)
  • 4 new tests in src/test/config-commands.test.ts

BACK-470 — Add missing tests for BACK-467 (catch-up):

  • 4 new tests in src/web/lib/lanes.test.ts covering sortTasksForStatus with custom terminalStatuses:
    • Custom terminal status gets done-sort even when not last in statuses array
    • Empty terminalStatuses falls back to last-element convention
    • Active status unaffected when terminalStatuses is configured

Depends on: BACK-465 (merged to main), BACK-466 (PR #635)

Test plan

  • bun test — 1248 pass, 3 pre-existing auto-commit failures
  • bunx tsc --noEmit — clean
  • bun run check . — clean
  • Custom terminal status (terminalStatuses: ['Fertig']) filters active sequences correctly
  • bun run cli config set terminalStatuses Done,Closed persists and round-trips

🤖 Generated with Claude Code

lenucksi and others added 5 commits May 6, 2026 22:19
- 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>
Copy link
Copy Markdown
Owner

@MrLesk MrLesk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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:

  1. The PR references BACK-467, BACK-469, and BACK-470, but I do not see matching Backlog task files in this branch. The GitHub issue numbers with those IDs are unrelated, and local BACK-465 is a different completed MCP task. Please make the work traceable to the project workflow before this is merged.

  2. The branch says it depends on PR #635, but it targets main while #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.

  3. terminalStatuses is not wired into cleanup. config terminalStatuses can be set, but CLI cleanup still calls getTerminalStatus(statuses) and filters with isTerminalStatus(task.status, statuses), and Core.getTerminalStatusTasksByAge() has the same issue. That means configured terminal statuses would not be cleaned up.

  4. The Web board only uses terminalStatuses for lane sorting/grouping. The cleanup affordance still derives terminalStatus from getTerminalStatus(statuses) and only renders cleanup for that one status, so custom terminal statuses do not behave consistently in the board.

  5. The TUI board helper accepts terminalStatuses, but important callers still do not pass it through (enhanced-views, simple-unified-view, and unified-view). That makes terminal-status behavior depend on which TUI entry point the user is using.

  6. config get/set terminalStatuses is added, but config list still 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.

@lenucksi
Copy link
Copy Markdown
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants