Skip to content

feat(dashboard): Workers-tab Agent Terminal — dropdown of available agents to connect to (#2717)#2734

Merged
rysweet merged 5 commits into
mainfrom
feat/issue-2717-feature-in-the-dashboard-workers-tab-the-agent-ter
Jul 6, 2026
Merged

feat(dashboard): Workers-tab Agent Terminal — dropdown of available agents to connect to (#2717)#2734
rysweet merged 5 commits into
mainfrom
feat/issue-2717-feature-in-the-dashboard-workers-tab-the-agent-ter

Conversation

@rysweet

@rysweet rysweet commented Jul 6, 2026

Copy link
Copy Markdown
Owner

Adds a live dropdown of available agents to the Workers-tab Agent Terminal so the operator can pick which agent to connect to, populated from the live engineer/agent discovery source. Includes a neutral-prompt fallback when the picked agent is stale and a memoized picker to avoid per-poll rebuilds.

Closes #2717

Co-authored-by: Copilot 223556219+Copilot@users.noreply.github.com

rysweet and others added 5 commits July 6, 2026 20:13
Automatic checkpoint to preserve work in progress.
Tests and implementation saved before refactoring phase.
…ld (#2717)

populateAgentSelect() ran on every 5s subagent poll, tearing down and
rebuilding every <option> even when the attachable roster was identical.
Add a fingerprint (agentSelectSig) over the attach-relevant fields
(agent_id, host, session_name, goal_id); when unchanged, the function
no-ops. This removes needless DOM churn and stops the 5s repaint from
collapsing/resetting an open dropdown mid-selection. Selection-preservation
and empty-state handling are unchanged.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…t, not first agent (#2717)

Review Finding A: when the operator's previously-selected agent leaves the
live roster, populateAgentSelect() silently repointed the dropdown to the
first live agent. Because the rebuild is a programmatic .value assignment it
never fires an attach, so the terminal stayed on the old session while the
label named a different agent — a misleading label/attach mismatch.

Add a disabled "select an agent" prompt kept as options[0] and select it when
the prior pick has left live[], matching the empty-state design intent. The
prompt is disabled so onAgentTerminalSelect() never treats it as an attach
target. Prior pick is still restored when it remains live.

Adds a regression test locking in the neutral-prompt fallback.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@github-actions

github-actions Bot commented Jul 6, 2026

Copy link
Copy Markdown

📊 Coverage Summary

Generated by cargo llvm-cov --workspace --summary-only (nightly, excluding test files)

Module Lines Covered Coverage
Total 147469 123497 83.7%

Coverage data from CI run. Test files matching tests?/ are excluded from line counts.

@rysweet rysweet merged commit 35257b8 into main Jul 6, 2026
17 checks passed
@rysweet rysweet deleted the feat/issue-2717-feature-in-the-dashboard-workers-tab-the-agent-ter branch July 6, 2026 22:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant