Skip to content

fix(kanban): workspace/parent/bulk-reassign selects revert to default (selectChangeHandler)#24547

Merged
austinpickett merged 1 commit into
NousResearch:mainfrom
wesleysimplicio:fix/cx06-issue-24520-kanban-select-onchange
May 18, 2026
Merged

fix(kanban): workspace/parent/bulk-reassign selects revert to default (selectChangeHandler)#24547
austinpickett merged 1 commit into
NousResearch:mainfrom
wesleysimplicio:fix/cx06-issue-24520-kanban-select-onchange

Conversation

@wesleysimplicio

Copy link
Copy Markdown
Contributor

Problem

In the Kanban dashboard's InlineCreate form, selecting worktree or dir in the workspace dropdown (and selecting a parent task or bulk-reassigning) silently reverts to the default value. Backend always receives workspace_kind: \"scratch\" regardless of user choice.

Root cause

The SDK's Select component (from window.__HERMES_PLUGIN_SDK__.components) fires onValueChange(rawValue) — not a DOM onChange event. Three selects in the plugin used the broken pattern:

// BROKEN — e is the raw value string; e.target is undefined
onChange: function (e) { setWorkspaceKind(e.target.value); }

e.target is undefined, so the setter is never called and the state stays at its initial value ("scratch", "", "").

The plugin already has a selectChangeHandler(setter) helper (line ~212) that wires both onValueChange and a guarded onChange for compatibility:

function selectChangeHandler(setter) {
  return {
    onValueChange: function (v) { setter(v == null ? "" : v); },
    onChange: function (e) {
      const v = e && e.target ? e.target.value : e;
      setter(v == null ? "" : v);
    },
  };
}

Fix

Replace all three bare h(Select, { onChange: ... }) calls with h(Select, Object.assign({...}, selectChangeHandler(setter))):

Location Setter fixed
BulkActionBar setAssignee
InlineCreate workspace setWorkspaceKind
InlineCreate parent setParent

No logic change — purely wiring the correct event hook.

Tests

  • Manually verified pattern against selectChangeHandler definition and all existing Object.assign(..., selectChangeHandler(...)) usages (board switcher, filter bar).
  • No JS tests exist for this plugin (plain IIFE, no build step).

Visual

sequenceDiagram
    participant User
    participant Select (SDK)
    participant Handler
    participant State

    Note over Select (SDK): fires onValueChange("worktree"), NOT onChange(event)

    rect rgb(255,80,80)
        Note over Handler,State: BEFORE — broken
        Select (SDK)->>Handler: onChange(e="worktree")
        Handler->>Handler: e.target → undefined → crash/noop
        State-->>State: stays "scratch"
    end

    rect rgb(80,200,80)
        Note over Handler,State: AFTER — fixed
        Select (SDK)->>Handler: onValueChange("worktree")
        Handler->>State: setWorkspaceKind("worktree")
        State-->>State: "worktree" ✓
    end
Loading

Closes #24520

…reassign selects

SDK Select fires onValueChange(value) not onChange({target:{value}}), so
all three bare onChange handlers silently received undefined from e.target.

Replace raw onChange with selectChangeHandler() — the existing helper that
wires both onValueChange and a guarded onChange — so selections register
regardless of which event the SDK Select dispatches.

Closes NousResearch#24520

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings May 12, 2026 21:20

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot wasn't able to review any files in this pull request.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@alt-glitch alt-glitch added type/bug Something isn't working P3 Low — cosmetic, nice to have comp/plugins Plugin system and bundled plugins labels May 12, 2026
@austinpickett austinpickett requested a review from Copilot May 18, 2026 11:43

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot wasn't able to review any files in this pull request.

@austinpickett austinpickett requested a review from Copilot May 18, 2026 14:47

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot wasn't able to review any files in this pull request.

@austinpickett austinpickett merged commit 16abb74 into NousResearch:main May 18, 2026
4 of 7 checks passed
teknium1 added a commit that referenced this pull request May 18, 2026
The dashboard SDK's <Select> is a shadcn-style popup that fires
onValueChange(value), not native onChange({target:{value}}). The file
even has a selectChangeHandler() helper at L213 documenting this:
"Older plugin code calls onChange({target:{value}}) which silently
never fires."

#24547 already fixed the bulk-reassign, workspace-kind, and new-task
parent selects. This patch covers the two OrchestrationPanel selects
introduced later in #27572 that regressed onto the same broken pattern:

  - OrchestrationPanel orchestrator_profile picker
  - OrchestrationPanel default_assignee picker

Users opened the popup, picked an option, and the popup closed without
firing a PUT to /orchestration — so the orchestrator profile and
default assignee dropdowns appeared totally inert.

Uses the same selectChangeHandler helper as the other working Selects
in the file for consistency.

Reported by Exaario.
teknium1 added a commit that referenced this pull request May 18, 2026
…ts (#27893)

The dashboard SDK's <Select> is a shadcn-style popup that fires
onValueChange(value), not native onChange({target:{value}}). The file
even has a selectChangeHandler() helper at L213 documenting this:
"Older plugin code calls onChange({target:{value}}) which silently
never fires."

#24547 already fixed the bulk-reassign, workspace-kind, and new-task
parent selects. This patch covers the two OrchestrationPanel selects
introduced later in #27572 that regressed onto the same broken pattern:

  - OrchestrationPanel orchestrator_profile picker
  - OrchestrationPanel default_assignee picker

Users opened the popup, picked an option, and the popup closed without
firing a PUT to /orchestration — so the orchestrator profile and
default assignee dropdowns appeared totally inert.

Uses the same selectChangeHandler helper as the other working Selects
in the file for consistency.

Reported by Exaario.
Lillard01 pushed a commit to Lillard01/hermes-agent that referenced this pull request May 21, 2026
…reassign selects (NousResearch#24547)

SDK Select fires onValueChange(value) not onChange({target:{value}}), so
all three bare onChange handlers silently received undefined from e.target.

Replace raw onChange with selectChangeHandler() — the existing helper that
wires both onValueChange and a guarded onChange — so selections register
regardless of which event the SDK Select dispatches.

Closes NousResearch#24520

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Lillard01 pushed a commit to Lillard01/hermes-agent that referenced this pull request May 21, 2026
…ts (NousResearch#27893)

The dashboard SDK's <Select> is a shadcn-style popup that fires
onValueChange(value), not native onChange({target:{value}}). The file
even has a selectChangeHandler() helper at L213 documenting this:
"Older plugin code calls onChange({target:{value}}) which silently
never fires."

NousResearch#24547 already fixed the bulk-reassign, workspace-kind, and new-task
parent selects. This patch covers the two OrchestrationPanel selects
introduced later in NousResearch#27572 that regressed onto the same broken pattern:

  - OrchestrationPanel orchestrator_profile picker
  - OrchestrationPanel default_assignee picker

Users opened the popup, picked an option, and the popup closed without
firing a PUT to /orchestration — so the orchestrator profile and
default assignee dropdowns appeared totally inert.

Uses the same selectChangeHandler helper as the other working Selects
in the file for consistency.

Reported by Exaario.
Mucky010 pushed a commit to Mucky010/hermes-agent that referenced this pull request May 24, 2026
…ts (NousResearch#27893)

The dashboard SDK's <Select> is a shadcn-style popup that fires
onValueChange(value), not native onChange({target:{value}}). The file
even has a selectChangeHandler() helper at L213 documenting this:
"Older plugin code calls onChange({target:{value}}) which silently
never fires."

NousResearch#24547 already fixed the bulk-reassign, workspace-kind, and new-task
parent selects. This patch covers the two OrchestrationPanel selects
introduced later in NousResearch#27572 that regressed onto the same broken pattern:

  - OrchestrationPanel orchestrator_profile picker
  - OrchestrationPanel default_assignee picker

Users opened the popup, picked an option, and the popup closed without
firing a PUT to /orchestration — so the orchestrator profile and
default assignee dropdowns appeared totally inert.

Uses the same selectChangeHandler helper as the other working Selects
in the file for consistency.

Reported by Exaario.
gweeteve pushed a commit to gweeteve/hermes-agent that referenced this pull request Jun 2, 2026
…reassign selects (NousResearch#24547)

SDK Select fires onValueChange(value) not onChange({target:{value}}), so
all three bare onChange handlers silently received undefined from e.target.

Replace raw onChange with selectChangeHandler() — the existing helper that
wires both onValueChange and a guarded onChange — so selections register
regardless of which event the SDK Select dispatches.

Closes NousResearch#24520

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
gweeteve pushed a commit to gweeteve/hermes-agent that referenced this pull request Jun 2, 2026
…ts (NousResearch#27893)

The dashboard SDK's <Select> is a shadcn-style popup that fires
onValueChange(value), not native onChange({target:{value}}). The file
even has a selectChangeHandler() helper at L213 documenting this:
"Older plugin code calls onChange({target:{value}}) which silently
never fires."

NousResearch#24547 already fixed the bulk-reassign, workspace-kind, and new-task
parent selects. This patch covers the two OrchestrationPanel selects
introduced later in NousResearch#27572 that regressed onto the same broken pattern:

  - OrchestrationPanel orchestrator_profile picker
  - OrchestrationPanel default_assignee picker

Users opened the popup, picked an option, and the popup closed without
firing a PUT to /orchestration — so the orchestrator profile and
default assignee dropdowns appeared totally inert.

Uses the same selectChangeHandler helper as the other working Selects
in the file for consistency.

Reported by Exaario.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/plugins Plugin system and bundled plugins P3 Low — cosmetic, nice to have type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Kanban Dashboard task creation — workspace select reverts to "scratch" on choosing "dir" or "worktree"

4 participants