#6516 [GUI] Subagent list: log dialog closes the popover; helper work and replies are not visible
open · @xvcezrqpbxtpzblrt · 0 评论 · 去 GitHub 看
Setup & installNVIDIA / CUDAWindows
说明
## Environment
- GPU: NVIDIA GeForce RTX 3080 Ti Laptop GPU, 16384 MiB (16 GB) VRAM
- RAM: 63.71 GB
- OS: Microsoft Windows 11 Pro, build 26300
- Strata 0.2.18, Windows desktop app.
- This is a static analysis of the source at the `v0.2.18` tag. It was **not reproduced on an installed build**. Findings marked "inference" are not confirmed.
## Reproduction status
Unconfirmed static analysis. No runtime logs, no screenshots. The verification steps at the end have not been run.
## Problem 1: Clicking inside the log dialog closes the dialog and the subagent list together (source-confirmed)
Steps: open the Subagents button -> click "View log" on a row -> click inside the log window; the whole window disappears.
Mechanism: the log dialog is portaled to `document.body` (`ui.tsx:434,441`), and so is the subagent popover (`Popover.tsx:37,43`). They are siblings in the DOM, not parent and child. The popover listens on `document` for `pointerdown` and closes when the target is neither inside the popover nor on the anchor button (`Popover.tsx:25-28,32`). Clicking inside the log satisfies that condition, so `setAgents(false)` runs (`ChatToolbar.tsx:42`) and the popover, its rows, and the dialog unmount together (`SubagentRow.tsx:41`).
There is no timed auto-close, blur-close, or visibility-close anywhere in the source. Switching sessions does close the popover (`ChatToolbar.tsx:36`), but there is no evidence linking that to the reported behavior.
Expected: clicking inside the log must not close the list.
Actual (per user report): the window disappears.
## Problem 2: The button and list do not express real working state (source-confirmed)
- `ChatToolbar.tsx:32,40`: the number is `count || agents.length` - the working count when helpers are working, otherwise the total. Three finished records also show "3", so you cannot tell whether it means "3 working" or "3 total records".
- `ChatToolbar.tsx:40` sets a working flag, but no CSS in the repository reads it; the element that actually pulses is a different, always-on dot (`annotation-fixes.css:109-110,120`).
- Hover only changes the button color and background (`app.css:5935`, `liquid.css:583-588`); the name list appears only after clicking.
- There is no "idle" status (`types.ts:443`); the popover detail shows only running/completed/total, with queued and cancelled folded into the total (`ChatToolbar.tsx:42`).
Expected: the button shows "N working / M not working", a hover summary when helpers are working, and clicking a row opens that helper's work view.
Actual: one ambiguous number, rows are not clickable (`SubagentRow.tsx:37`), hover only changes color.
## Problem 3: Helper messages are one-way on screen, follow-up depends on the parent, and there is no per-helper interrupt (source-confirmed; inferences marked)
- Each row offers only "View log" and "Message this helper"; after sending it shows only "Sent to ..." - neither your message nor the helper's reply is displayed (`SubagentRow.tsx:30,39`).
- The backend supports two deliveries: `steer` for a working helper (delivered at its next step) and `queue` for a finished one (a new turn), via `POST /api/chat/helper` (`agent-bridge.mjs:1355-1368`, `index.mjs:2038-2042`). The call passes `mode: 'continuable'` with the helper's session ID, so a helper is not a one-shot target. Note: the engine implementation is outside this repository and was not verified; only the host-side call is confirmed here.
- The helper's reply is not returned by the send API - it returns only `{ok, messageId, delivery}` (`agent-bridge.mjs:1368`). Replies are stored only as an after-the-fact summary in the log, at most 20 entries truncated to 400 characters each (`children.mjs:25,135-138`, `agents.ts:7,15`). There is no user/assistant message thread.
- A follow-up is refused while the parent assistant is idle (source-confirmed, not reproduced): `messageHelper` throws `helper-idle` when `rt.hp.running` is false (`agent-bridge.mjs:1364-1365`). The helper itself can still take messages: the call uses `mode: 'continuable'` (`agent-bridge.mjs:1367`) and a finished helper receiving a message is reset to `queued` (`children.mjs:133`). So the ability to continue exists; what is missing is a visible thread, and the parent-live requirement blocks a follow-up once the parent stops.
- Interrupt: all three `interruptByParent` calls are internal, not callable from the page (`agent-bridge.mjs:595,604,1589`); the page can only "Stop" the whole chat, which stops every helper (`index.mjs:2118-2125`). There is no per-helper interrupt button and no callable endpoint.
Expected: clicking a helper opens a work view with a persistent input at the bottom, supporting steer, follow-up chat, and visible replies; an "interrupt this helper" button stops only the selected helper.
Actual: one message shows only "Sent to ...", with no reply, no follow-up, and no way to stop a single helper.
## Suggested changes (please confirm scope first)
1. Fix the log/popover interaction: clicking inside the dialog must not close the popover, or make the work view a standalone surface.
2. Add a structured message record for helpers (user input, reply, time); the current `steps` is at most 20 truncated summaries.
3. Put a persistent input at the bottom of the work view, using `steer` for working helpers and `queue` for finished ones, reusing `/api/chat/helper`, and listing messages and replies in order.
4. Add a per-helper interrupt button that calls the existing internal `subagents/interruptByParent` for the selected helper only, without stopping the parent chat.
5. Show "N working / M not working" on the button, add a working style, a hover name list, and make rows clickable into the work view.
6. Allow a follow-up to a continuable helper while the parent is idle, or make the `helper-idle` refusal explain in the UI what to do instead.
7. Keep the default path unchanged; add UI tests for: clicking the log does not close the window, the two-number button, a visible message thread, and per-helper interrupt.
## Verification steps (not run)
- Click inside the log; check whether the popover closes with it.
- Wait without clicking; check whether the window closes by itself.
- Click a helper row; check whether a full work view opens.
- Send two messages to a working helper; check whether your text and its reply are shown, and whether the second message is accepted.
- Let the parent assistant go idle, then try to send a follow-up to a finished but continuable helper.
- Press Stop; check whether other helpers are also stopped.
本站相关内容
相关页面的快捷入口。