Skip to content

fix(kanban): make the "+ Group" button open its form again (#115) - #118

Merged
Lexus2016 merged 1 commit into
mainfrom
fix/115-kanban-group-button
Sep 23, 2026
Merged

Lexus2016 merged 1 commit into
mainfrom
fix/115-kanban-group-button

Conversation

@Lexus2016

Copy link
Copy Markdown
Owner

Fixes #115.

Root cause

  1. The form threw. buildChainForm() contained a bot picker copied from buildForm(tk) (commit a38e2a4) that referenced tk.bot_id — undefined in that scope. ReferenceError before modalBody.innerHTML was set → "New group" and "Edit group" never opened, with no visible error. saveChain() never read #fBot and a group has no bot, so the block is removed.
  2. The click was swallowed. In the all-projects view the button was disabled; .hb:disabled { pointer-events:none } also killed the tooltip. Now it is dimmed (.is-off, aria-disabled) but clickable, and openAddChainModal() 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).
  • New test/kanban-group-button.test.js: runs the real buildChainForm in a vm context + parses every inline <script> in kanban.html. Against main's kanban.html: 4/6 checks fail (tk is not defined).
  • Headless Chromium against a throwaway server: on main the form input count is 0 after clicking; on this branch the group is created (GET /api/task-chains returns 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

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>
@Lexus2016
Lexus2016 merged commit 19547bf into main Sep 23, 2026
2 checks passed
@Lexus2016
Lexus2016 deleted the fix/115-kanban-group-button branch September 23, 2026 11:55
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.

Bug: "Group" Button in Kanban View Does Nothing

1 participant