BACK-468 - Add blockedStatuses config key for custom blocked-status styling#637
BACK-468 - Add blockedStatuses config key for custom blocked-status styling#637lenucksi wants to merge 1 commit into
Conversation
MrLesk
left a comment
There was a problem hiding this comment.
Alex's Agent: Thanks for the PR. I think configurable blocked styling could be useful, but this branch is not ready to merge as-is.
The main issue is scope: the PR is titled as BACK-468 - Add blockedStatuses config key for custom blocked-status styling, but the branch also includes terminal-status config/runtime work from several other BACK IDs. Please split or rebase this so the PR contains one coherent task. I do not see matching Backlog task files in this branch for the referenced BACK IDs, and the local task currently using BACK-465 is unrelated.
Concrete blockers I found:
-
The branch carries unrelated
terminalStatusesbehavior. Even with those commits included, the runtime behavior is still incomplete: cleanup still callsgetTerminalStatus(statuses)andisTerminalStatus(task.status, statuses)withoutconfig.terminalStatuses, so configured terminal statuses would not apply to cleanup. -
blockedStatusesis only threaded into the Web board column badge path. The shared TUI/status-icon call sites still callgetStatusIcon(status),getStatusColor(task.status), andformatStatusWithIcon(task.status)without passing config, so custom blocked statuses will not be reflected in those views. -
The Web fallback behavior changes when
blockedStatusesis configured. InTaskColumn, the ternary checks only the configured array when it is non-empty, so existing fallback statuses such asStuckstop rendering as blocked. The PR body says the fallback is preserved, but the implementation currently makes it config-or-fallback rather than config-plus-fallback. -
The new
blocked_statusesconfig key is parsed/serialized but does not appear in config get/set/list and has no config command tests. If this is intended as a user-facing config key, it should be discoverable and tested consistently with the rest of the config surface.
The narrow blocked-status idea can be revisited, but I would strongly prefer this be reduced to a small PR with a matching task, focused tests, and no terminal-status changes mixed in.
Agree, this is the raw Clauded version that came out a bit convoluted and not as atomic a instructed. Will be overhauled together with the others as soon as time's available.
As stated above, that's the instructed goal which wasn't properly executed. Will refactor, might need a series of PR that depend on each other, especially for the terminalStatuses work. Let's see how we can chain those properly.
I saw those comments across all the dependent PRs. There are of course local Backlog task files that I did not check in on purpose to not pollute the PR further. Is there any process advice document in this repo that describes the desired approach? Found https://github.com/MrLesk/Backlog.md/blob/main/AGENTS.md - will take a look.
[details removed] look useful thanks - I will use those for refactoring.
Yeah, so do I. See above. Will refactor. |
- Add blockedStatuses?: string[] to BacklogConfig (src/types/index.ts) - Parse blocked_statuses YAML key in loadConfig (src/file-system/operations.ts) - Serialize blockedStatuses back to YAML; round-trip safe with empty-array→undefined normalization - Fix status-icon.ts functions to accept optional blockedStatuses param: config-array check first, then built-in heuristics as fallback (config-PLUS-fallback) - Thread blockedStatuses through all TUI callers: board.ts, overview-tui.ts, simple-unified-view.ts, unified-view.ts, task-viewer-with-search.ts, formatters/task-plain-text.ts, commands/overview.ts - Fix Web board TaskColumn isBlocked logic from exclusive ternary to || (config-PLUS-fallback) - Thread blockedStatuses through Web component tree: App → BoardPage → Board → TaskColumn - Add blockedStatuses to config get/set/list CLI commands (src/cli.ts) - Tests: 11 new cases covering custom blocked status, Stuck fallback preservation, config CLI round-trip, empty-array normalization (src/test/status-icon.test.ts, src/test/config-commands.test.ts)
be5a6a6 to
6a0776b
Compare
|
This branch has been force-pushed (old tip 1. Scope pollution (terminal-status commits) — fixed The branch was rebased from scratch on 2. TUI call sites not receiving All TUI consumers of
Config flows from 3. config-OR-fallback bug in The exclusive ternary has been replaced with // before (config-OR-fallback — broke "Stuck" when config was set)
const isBlocked = blockedStatuses?.length
? blockedStatuses.some(...)
: statusLower.includes('blocked') || statusLower.includes('stuck');
// after (config-PLUS-fallback — both always apply)
const isBlocked =
(blockedStatuses?.some(bs => bs.toLowerCase() === statusLower)) ||
statusLower.includes('blocked') ||
statusLower.includes('stuck');The same config-PLUS-fallback logic is used in 4.
Four new tests in Task file
Test summary
|
Summary
blockedStatuses?: string[]toBacklogConfig, parsed fromblocked_statuses:inconfig.yml(same pattern asterminalStatuses)getStatusStyle()(and wrappers) instatus-icon.tsto check config array first, then fall back to exact-match"Blocked"and substring heuristic for English boardsblockedStatusesprop throughApp.tsx → BoardPage → Board → TaskColumn, updatinggetStatusBadgeClass()with config-aware logic and preservedincludes('blocked')/includes('stuck')fallbackTest plan
bun test src/test/status-icon.test.ts— 3 new tests pass (custom status, English fallback, empty-array heuristic)bun test— no new failures (5 pre-existing auto-commit failures unchanged; CLI priority filtering timeout is pre-existing flakiness under parallelism, passes in isolation)bunx tsc --noEmit— cleanbun run check .— cleanblocked_statuses: ["Gesperrt"]toconfig.yml, open web board, verify "Gesperrt" column gets red badge; remove config, verify "Blocked" column still red🤖 Generated with Claude Code