fix(kanban): make the "+ Group" button open its form again (#115) - #118
Merged
Merged
Conversation
Two defects made the button look dead: - buildChainForm() carried a bot picker copied from buildForm(tk) in a38e2a4 that read `tk.bot_id` - a variable that does not exist there. The ReferenceError fired before the modal body was assigned, so neither "new group" nor "edit group" ever opened. saveChain() never read the field and a group has no bot, so the block is removed, not rewired. - In the all-projects view the button was `disabled`, and `.hb:disabled` carries `pointer-events:none`, which swallowed the click and the tooltip. It is now dimmed via `.is-off` + aria-disabled and stays clickable, so openAddChainModal() toasts "Select a project first". The button also gets a tooltip saying what a group is (tasks run one after another in one shared session), in all five locales. test/kanban-group-button.test.js runs the real buildChainForm in a vm context and parses every inline script of the board; 4 of its 6 checks fail against the previous kanban.html. Fixes #115 Co-Authored-By: Claude Opus 5.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.
Fixes #115.
Root cause
buildChainForm()contained a bot picker copied frombuildForm(tk)(commit a38e2a4) that referencedtk.bot_id— undefined in that scope.ReferenceErrorbeforemodalBody.innerHTMLwas set → "New group" and "Edit group" never opened, with no visible error.saveChain()never read#fBotand a group has no bot, so the block is removed.disabled;.hb:disabled { pointer-events:none }also killed the tooltip. Now it is dimmed (.is-off,aria-disabled) but clickable, andopenAddChainModal()toasts "Select a project first".Plus a tooltip explaining what the button does ("New group: tasks run one after another in one shared session"), 5 locales.
Verification
npm test→ exit 0 (83 files).test/kanban-group-button.test.js: runs the realbuildChainFormin avmcontext + parses every inline<script>inkanban.html. Againstmain'skanban.html: 4/6 checks fail (tk is not defined).mainthe form input count is 0 after clicking; on this branch the group is created (GET /api/task-chainsreturns it), the edit modal opens with the saved title, the all-projects click shows the toast, 0 page errors.Not in scope
"Group by project/status/…" as asked in the issue is a separate feature — the button creates a task group (chain), it never grouped the board.
🤖 Generated with Claude Code