Skip to content

feat: stack parallel agents vertically#5

Merged
Jason-Adam merged 3 commits intomainfrom
feat/stack-agents-vertically
Mar 29, 2026
Merged

feat: stack parallel agents vertically#5
Jason-Adam merged 3 commits intomainfrom
feat/stack-agents-vertically

Conversation

@Jason-Adam
Copy link
Copy Markdown
Owner

@Jason-Adam Jason-Adam commented Mar 29, 2026

Summary

  • Each subagent now renders on its own line instead of being joined horizontally with " | ", making parallel agent activity much easier to read
  • Removed the fixed 25-character agent name width cap — full names are shown, with the render pipeline's per-line ANSI truncation as the safety net
  • Fixed pre-commit go-vet hook to work correctly in git worktrees by using a local system hook instead of the archived dnephin/pre-commit-golang go-vet

Test plan

  • make check passes (fmt + vet + tests)
  • make test-race passes
  • Visual verification with live parallel subagents

🤖 Generated with Claude Code

Each subagent now renders on its own line instead of being joined with
" | " on a single row. This prevents truncation of agent names and makes
parallel agent activity easier to scan.

- Add ExtraLines field to WidgetResult for multi-row widget output
- Agents widget puts first agent in main result, rest in ExtraLines
- Render pipeline emits ExtraLines with ANSI reset + truncation
- Remove fixed agent name width cap (render pipeline handles overflow)
- Fix pre-commit go-vet hook to work in git worktrees

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings March 29, 2026 08:22
@Jason-Adam Jason-Adam self-assigned this Mar 29, 2026
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the HUD renderer so parallel subagents are displayed as a vertical stack (one agent per line) rather than a single horizontally-joined segment, and adjusts tooling config for go vet in worktrees.

Changes:

  • Add multi-line support to widget results via WidgetResult.ExtraLines and emit those extra lines from Render().
  • Update the agents widget to return the first agent as the main segment and additional agents as ExtraLines (removing widget-level name width capping / “+N more” behavior).
  • Switch pre-commit go-vet hook to a local/system hook for worktree compatibility.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
internal/render/widget/agents.go Switch agents rendering to vertical stacking using ExtraLines and remove fixed name truncation.
internal/render/widget/widget.go Extend WidgetResult with ExtraLines for multi-row widget output.
internal/render/render.go Emit ExtraLines after the main rendered line, applying truncation per extra line.
internal/render/widget/widget_test.go Update agents widget tests to validate stacking/ExtraLines behavior.
internal/render/widget/agents_test.go Rewrite agents tests around stacked output and removal of widget-level truncation.
.pre-commit-config.yaml Replace go-vet hook with a repo: local system hook.
Comments suppressed due to low confidence (1)

internal/render/widget/widget.go:37

  • WidgetResult.IsEmpty() ignores ExtraLines. With the new multi-line capability, a widget could legitimately have empty Text/PlainText but non-empty ExtraLines and still be considered "empty" (and therefore skipped). Update IsEmpty to also consider len(ExtraLines) == 0.
// IsEmpty reports whether the result has no content to display.
func (w WidgetResult) IsEmpty() bool {
	return w.Text == "" && w.PlainText == ""
}

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Jason-Adam and others added 2 commits March 29, 2026 10:25
- Change ExtraLines from []string to []WidgetResult so the render
  pipeline applies mode-appropriate styling to each extra line
- Remove dead truncateAgentName function and its tests
- Add render pipeline integration test covering all three modes

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Update Agents() doc comment to reflect FgColor is now set
- Add non-empty assertions to MaxFiveTotal tests in both test files

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@Jason-Adam Jason-Adam merged commit 5467b81 into main Mar 29, 2026
1 check passed
@Jason-Adam Jason-Adam deleted the feat/stack-agents-vertically branch March 29, 2026 08:32
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.

2 participants