Skip to content

feat(tui): hint to view workflow agents after workflow tool runs#1353

Merged
wqymi merged 2 commits into
mainfrom
vb/4dbf-dynamic-workflow
Jun 25, 2026
Merged

feat(tui): hint to view workflow agents after workflow tool runs#1353
wqymi merged 2 commits into
mainfrom
vb/4dbf-dynamic-workflow

Conversation

@wqymi

@wqymi wqymi commented Jun 25, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Dynamic-workflow agents already register as subagents in the session and appear in the Subagents panel, but nothing told users the shortcut to view them existed.
  • Render the session_child_first keybind hint after workflow tool messages too, with workflow-specific copy (view workflow agents), reusing the existing panel and navigation.

Why

Workflow guest scripts spawn agents via agent()/parallel()/pipeline(), all using actor.spawn({ mode: "subagent", sessionID }) against the main session — so they are already listed in DialogSubagent and drillable to their transcripts. The only gap was discoverability: the actor tool advertises the panel with a view subagents hint, but the workflow tool rendered none.

Change

packages/opencode/src/cli/cmd/tui/routes/session/index.tsx (AssistantMessage):

  • Add hasActorPart / hasWorkflowPart memos.
  • Show the keybind hint when a message has an actor or workflow tool part.
  • Copy is view workflow agents for workflow messages, view subagents otherwise (mixed messages fall back to the subagent wording). Same session_child_first keybind — moveFirstChild() already includes workflow agents.

No new data plumbing, schema, persistence, or runtime changes.

Verification

  • Design spec lives in the internal docs repo (docs/compose/specs/2026-06-25-workflow-agents-view-hint-design.md).
  • Note: bun typecheck could not be run in the authoring sandbox (missing installed deps). The change is a refactor of an already-type-checked props.parts.some(...) expression plus a string ternary, so it introduces no new types. Please confirm bun typecheck from packages/opencode in CI/your env.
  • Manual: run a workflow in the TUI; confirm the view workflow agents hint renders after the workflow tool message and the shortcut opens the Subagents panel listing the workflow's agents.

Note on diff

The chore: add generated files commit (regenerated SDK types.gen.ts) was already part of this branch's history prior to this work; the functional change here is the ~12-line index.tsx edit.

wqymi added 2 commits June 25, 2026 23:20
Dynamic-workflow agents already register as subagents in the session and
appear in the Subagents panel, but nothing told users the shortcut existed.
Render the session_child_first keybind hint after workflow tool messages too,
with workflow-specific copy ('view workflow agents'), reusing the existing
panel and navigation.
@wqymi wqymi merged commit 4cbe302 into main Jun 25, 2026
3 of 6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant