BACK-466 - Core fix: isTerminalStatus in statistics, handlers, milestones#635
BACK-466 - Core fix: isTerminalStatus in statistics, handlers, milestones#635lenucksi wants to merge 7 commits into
Conversation
MrLesk
left a comment
There was a problem hiding this comment.
Alex's Agent: Thanks for working on this. The direction is useful, but I do not think this PR is ready to merge yet.
Main blockers I found:
- The PR references BACK-466, but I cannot find a matching Backlog task. It also carries BACK-465 commits, while the current local BACK-465 task is an unrelated Windows MCP document-tool fix, and GitHub issues #465/#466 are unrelated to this work. The PR body says the BACK-465 dependency was merged to main, but these commits do not appear to be on main, so the branch/task history needs cleanup.
terminal_statusesis parsed intoconfig.terminalStatuses, but this PR does not serialize it insaveConfig(). I reproduced this by setting another config key on a config file containingterminal_statuses; the save removed theterminal_statusesline.- The new config key is not exposed in
backlog config get,set, orlist, and there are no config-command tests for it. That makes the setting difficult to discover and easy to lose. - The runtime wiring is still partial. CLI cleanup and
Core.getTerminalStatusTasksByAge()still call the terminal-status helpers withoutconfig.terminalStatuses, and Web milestones still use the old terminal-status behavior. So a custom terminal status can work in statistics/MCP paths while cleanup and milestone views still disagree. - There are no GitHub checks reported on this branch yet.
I would suggest rebasing/splitting this onto a clean, task-backed branch and making the terminal-status behavior complete end to end: config persistence, config commands, cleanup, statistics, milestones, MCP, and Web consumers should all agree. The existing tests that were added here pass locally, as do TypeScript and changed-file Biome checks, so the core helper/statistics part looks like a good starting point.
- 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>
…atistics, milestones, handlers Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…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>
…nalStatuses wiring - config list now outputs terminalStatuses even when unset - CLI cleanup command passes config.terminalStatuses to getTerminalStatus/isTerminalStatus - Core.getTerminalStatusTasksByAge passes config.terminalStatuses to isTerminalStatus - TUI: enhanced-views, simple-unified-view, unified-view all pass config.terminalStatuses to renderBoardTui - Web Board.tsx: cleanup affordance uses isTerminalStatus(status, statuses, terminalStatuses) for all configured terminal statuses - Web TaskList.tsx: isFilteringTerminalStatus wired through terminalStatuses prop - Web App.tsx: passes config.terminalStatuses to TaskList - Tests: getTerminalStatusTasksByAge + config list coverage added (RED-GREEN verified) - package.json: fix tab indentation (upstream uses spaces, biome requires tabs)
…lated to English Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
e155687 to
a23cd3f
Compare
|
Thanks for the thorough review — all five blockers you raised are addressed in this force-push. Here's the rundown: 1. Missing Backlog task / BACK-465 commit pollution 2. 3. 4. Partial runtime wiring — cleanup,
5. No GitHub checks PR #636 (which covered BACK-467/469/470 as a follow-on) has been closed — it's fully absorbed here. |
Hi,
thanks for creating this! I especially love that there's all the modalities from CLI, TUI, Web and MCP with a refreshingly simple well thought out UI/form selection.
I found a few issues around handling of translated status names, think 'Done' column -> different language. Thus I tasked the Claude with a bit of debugging and review from my side to fix it.
Basic point here is that instead of assuming that the last element of the column list is the terminal status, we now have a set of terminal stati that are explicitly configured. And there were a few hard coded cases of 'Done' which are now replaced by a lookup into the terminal set state list.
I might add a few other PRs for that feature range. And might ammend them later. Feel free to discard or take, just a fix I needed locally here.
Summary
=== 'Done'checks instatistics.tswithisTerminalStatus()isDoneStatus()inhandlers.ts;completeTask()/archiveTask()now load config and useisTerminalStatus()with the actual configured terminal status name in error messagesmilestones.tsisDoneStatus(),createBucket(),buildMilestoneBuckets(),buildMilestoneSummary()to threadstatuses+terminalStatusesthrough the call chainloadAllTasksForStatisticsnow returnsterminalStatuses; wired throughserver/index.tsandcommands/overview.tsstatistics.test.tsfor German-board scenario (terminalStatuses: ['Fertig'])Depends on: BACK-465 (merged to main via 97353ba)
Test plan
bun test— 1246 pass, 4 pre-existing failures (auto-commit tests)bunx tsc --noEmit— cleanbun run check .— cleanstatus 'Fertig'counted as terminal)🤖 Generated with Claude Code