feat: a Kanban card names the dials its next run will use (#84) - #85
Merged
Conversation
The board rendered one badge, `tk.sess_model`, and it was wrong twice over: blank on a task that had never run — so a board of freshly created cards said nothing about settings the user had just picked in the modal — and silent about a bot's model, which OVERRIDES the session's inside the runner. `kbRunBadges()` replaces it and mirrors server.js/startTask exactly: model = taskBot?.model || session?.model || task.model || 'sonnet' effort = task.effort engine = task.run_engine === 'subscription' ? 'subscription' : 'api' `bot_model` is joined in `getTasks` rather than looked up client-side: the board fetches its bot roster only when a modal opens, so `kbBots` is [] at first paint and a client lookup would render one model before the user touched anything and a different one afterwards. The join carries `AND b.deleted_at IS NULL` because `stmts.getBot` does — without it a card advertises the model of a bot the runner will refuse to load. Effort and engine render only when they are NOT the default: 'auto' effort and the 'api' engine are what nearly every card carries, and a badge on all of them is noise in a footer already holding the project, schedule, session and retry badges. An unknown effort is shown verbatim rather than dropped. No new i18n keys — the badges reuse tb.model / tb.effort / tb.engine / effort.* / engine.sub, which already exist in all five dictionaries. test/kanban-run-badges.test.js lifts the helper out of kanban.html and pins the runner's own expression as source text: the card and the runner live in different files, so a reorder there makes the card lie and nothing else notices. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes the Kanban Visibility half of #84.
The defect
A card rendered one badge,
tk.sess_model. It was wrong twice over:The fix
kbRunBadges()inpublic/kanban.htmlmirrorsserver.js/startTaskexactly:bot_modelis joined ingetTasks, not looked up client-side. The board fetches its bot roster only when a modal opens, sokbBotsis[]at first paint; a client-side lookup would render one model before the user touched anything and a different one afterwards. The join carriesAND b.deleted_at IS NULLbecausestmts.getBotdoes — without it a card advertises the model of a bot the runner will refuse to load.autoeffort and theapiengine are what nearly every card carries; a badge on all of them is noise in a footer already holding the project, schedule, session and retry badges. An unknown effort is shown verbatim rather than dropped — a bad stored dial reaching the run is exactly what a silent badge would hide.renderChainCard) is untouched. A chain has no bot and no per-task engine.Cost
LEFT JOIN+ one column on an existingSELECT;/api/tasksgains a key, which is backward-compatible.tb.model/tb.effort/tb.engine/effort.*/engine.sub, all already present in en/fr/he/ru/uk.tasks.bot_idagainst a table with a handful of rows; the board already polls this endpoint.test/kanban-run-badges.test.jstherefore pins the runner's own expression as source text as well as the helper's behaviour — a reorder instartTaskfails the suite instead of silently making every card lie.Deliberately NOT in this PR
The rest of #84 — a per-task provider (Codex/Gemini/…), dynamic option catalogs, task templates — is answered in a comment on the issue. In short: the Kanban worker parses
claude'sstream-json; external agents reach the studio only via/api/delegate+ the terminal, which is fire-and-forget with no turn budget, no retry and no session resume. Wiring one intotaskWorkeris a new execution backend, not a dropdown.Verification
Live, against a real server booted on a throwaway
APP_DIR:So the first card renders
haiku·High·Subscription, the secondopus— which is what each will actually run with.🤖 Generated with Claude Code