Approval cards show again: the buttons no longer throw, the command is the item's detail
An agent chat's bash approval left "Waiting for you to allow bash…" with no card: cardOf()
called append(actions, a, b, c) while append() took one array, so `children.flat` threw for
every approval and plan card (questions used el.append and worked). renderCards() had already
unhidden #cards, which stayed empty. append() now takes children as rest arguments too.
- The editable command is `detail` (services/device_link.py puts the fixed "Run a command" in
the title); it is sent back as the item's text only when changed. Non-editable approvals
show the title and the device's input. `purpose` ("It says: …"), `reason` and the asking
subagent (`job`) are shown, as on the web page.
- renderCards() keeps a card already on the screen (by id) instead of drawing every card again
on each `ask` frame, which the server re-sends whenever the countdown changes; a card that
cannot be drawn shows the error instead of an empty box.
- tests/ui/: headless harness with a mocked Tauri bridge; five A1 cases (device bash card
shows and is visible, Allow/edit/Deny post to /chats/{id}/interactions/{card}, redraw keeps
edits, reopen gets the card from the stream's first pass, 390 px).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
7 files changed
+537
-17
No files matched your search
@@ -61,6 +61,8 @@ KEYS = (
|
||||
"The agent asks to run %(tool)s:",
|
||||
"The agent asks:",
|
||||
"Command",
|
||||
"%(job)s asks:",
|
||||
"It says: %(purpose)s",
|
||||
"Recommended",
|
||||
"Or type an answer",
|
||||
"Your answer",
|
||||
|
||||
Reference in new issue
Block a user