mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-05-08 03:01:47 +00:00
fix(kanban): wire dependency selects
This commit is contained in:
parent
3f97297413
commit
a49670c21b
2 changed files with 30 additions and 6 deletions
10
plugins/kanban/dashboard/dist/index.js
vendored
10
plugins/kanban/dashboard/dist/index.js
vendored
|
|
@ -2416,11 +2416,10 @@
|
|||
),
|
||||
),
|
||||
h("div", { className: "hermes-kanban-deps-row" },
|
||||
h(Select, {
|
||||
h(Select, Object.assign({
|
||||
value: newParent,
|
||||
onChange: function (e) { setNewParent(e.target.value); },
|
||||
className: "h-7 text-xs flex-1",
|
||||
},
|
||||
}, selectChangeHandler(setNewParent)),
|
||||
h(SelectOption, { value: "" }, "— add parent —"),
|
||||
candidatesFor(parentExclude).map(function (t) {
|
||||
return h(SelectOption, { key: t.id, value: t.id },
|
||||
|
|
@ -2455,11 +2454,10 @@
|
|||
),
|
||||
),
|
||||
h("div", { className: "hermes-kanban-deps-row" },
|
||||
h(Select, {
|
||||
h(Select, Object.assign({
|
||||
value: newChild,
|
||||
onChange: function (e) { setNewChild(e.target.value); },
|
||||
className: "h-7 text-xs flex-1",
|
||||
},
|
||||
}, selectChangeHandler(setNewChild)),
|
||||
h(SelectOption, { value: "" }, "— add child —"),
|
||||
candidatesFor(childExclude).map(function (t) {
|
||||
return h(SelectOption, { key: t.id, value: t.id },
|
||||
|
|
|
|||
|
|
@ -622,6 +622,32 @@ def test_dashboard_done_actions_prompt_for_completion_summary():
|
|||
assert "body: JSON.stringify(finalPatch)" in bundle
|
||||
|
||||
|
||||
def test_dashboard_dependency_selects_use_value_change_handler():
|
||||
"""Regression for the dependency selects in the task drawer: the
|
||||
add-parent / add-child dropdowns must wire through the shared
|
||||
selectChangeHandler helper so their value actually lands on the
|
||||
underlying React state. Salvaged from #20019 @LeonSGP43.
|
||||
"""
|
||||
repo_root = Path(__file__).resolve().parents[2]
|
||||
bundle = (
|
||||
repo_root / "plugins" / "kanban" / "dashboard" / "dist" / "index.js"
|
||||
).read_text()
|
||||
|
||||
parent_select = (
|
||||
'value: newParent,\n'
|
||||
' className: "h-7 text-xs flex-1",\n'
|
||||
' }, selectChangeHandler(setNewParent))'
|
||||
)
|
||||
child_select = (
|
||||
'value: newChild,\n'
|
||||
' className: "h-7 text-xs flex-1",\n'
|
||||
' }, selectChangeHandler(setNewChild))'
|
||||
)
|
||||
|
||||
assert parent_select in bundle
|
||||
assert child_select in bundle
|
||||
|
||||
|
||||
def test_bulk_archive(client):
|
||||
a = client.post("/api/plugins/kanban/tasks", json={"title": "a"}).json()["task"]
|
||||
b = client.post("/api/plugins/kanban/tasks", json={"title": "b"}).json()["task"]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue