Skip to content

feat(tui): style background subagent indicator#36751

Merged
kitlangton merged 5 commits into
v2from
subagent-indicator
Jul 13, 2026
Merged

feat(tui): style background subagent indicator#36751
kitlangton merged 5 commits into
v2from
subagent-indicator

Conversation

@kitlangton

@kitlangton kitlangton commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

What

Background subagent rows now show a subtle, padded Background status pill instead of a literal [background] suffix.

Before: the background state was embedded in the title as bracketed text, so it had the same visual weight as the subagent identity and description.

After: the title remains plain text and the state uses the existing muted backgroundElement treatment with one painted padding cell on each side. Foreground subagent rows remain unchanged.

How

  • derive background state reactively in packages/tui/src/routes/session/index.tsx
  • add an optional trailing renderable to inline-tool rows and spinners
  • render the literal padded text as a non-shrinking flex item, so it stays at the far right when it fits and wraps as a complete unit when it does not
  • keep formatSubagentTitle responsible only for the unstyled identity and description

Scope

This only changes TUI presentation. Subagent execution, background lifecycle, and session state are unchanged.

Testing

  • bun run test from packages/tui: 221 passed, 1 skipped
  • bun typecheck from packages/tui
  • bunx prettier --check packages/tui/src/component/spinner.tsx packages/tui/src/routes/session/index.tsx packages/tui/test/cli/tui/inline-tool-wrap-snapshot.test.tsx
  • pre-push bun turbo typecheck --concurrency=3: 32 package tasks passed
  • renderer regression test verifies inline and whole-item wrapping boundaries, including both padding cells
  • scripted OpenCode Drive walkthrough verified active and completed background states at 100 and 62 columns

Demo

The newest local OpenCode Drive main runs the real TUI and subagent tool flow against a simulated LLM backend. The recording shows the active spinner and painted padded status pill, atomic narrow-terminal wrapping, and the completed checkmark state.

recording-c75cd482-0add-4606-981c-c8d6eeee2bcd.mp4

@kitlangton kitlangton merged commit ce2e301 into v2 Jul 13, 2026
7 checks passed
@kitlangton kitlangton deleted the subagent-indicator branch July 13, 2026 21:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant