Skip to content

🤖 fix: align sidebar parent/sub-agent connectors#3129

Merged
ammario merged 1 commit intomainfrom
fix/subagent-sidebar-connector-alignment
Apr 5, 2026
Merged

🤖 fix: align sidebar parent/sub-agent connectors#3129
ammario merged 1 commit intomainfrom
fix/subagent-sidebar-connector-alignment

Conversation

@ammar-agent
Copy link
Copy Markdown
Collaborator

Summary

Derive the left-sidebar sub-agent connector from shared sidebar geometry so the default parent→child rail lands on both status indicators instead of relying on disconnected offsets.

Background

The connector between a parent agent row and its sub-agent rows had drifted out of alignment because the rail and elbow geometry were encoded with hardcoded offsets that were no longer tied to the actual leading status-slot centers. That made the connector fragile whenever surrounding row layout changed.

Implementation

  • added sidebarItemLayout.ts to centralize sidebar padding and leading-slot geometry
  • updated AgentListItem to compute the parent rail and child endpoint from that shared layout instead of ad hoc offsets
  • updated SubAgentListItem to draw the elbow from explicit x-coordinates, which makes the default connector alignment correct by construction
  • reused the shared padding helper in TaskGroupListItem so grouped rows stay on the same indentation grid
  • added focused helper/component/integration tests for the connector geometry

Validation

  • make static-check
  • bun test src/browser/components/sidebarItemLayout.test.ts src/browser/components/AgentListItem/SubAgentListItem.test.tsx src/browser/components/AgentListItem/AgentListItem.test.tsx
  • visually verified Storybook stories for App Sidebar Three Active Sub-Agents and BestOfSubagents

Risks

Low-to-medium risk in left-sidebar row layout and grouped sub-agent rendering. The main mitigation is that the connector now derives from shared layout primitives, and the new tests cover both the geometry helpers and rendered connector positions.


Generated with mux • Model: openai:gpt-5.4 • Thinking: xhigh • Cost: $6.76

@ammar-agent
Copy link
Copy Markdown
Collaborator Author

@codex review

Derive sidebar connector geometry from shared leading-slot layout so the default parent/sub-agent rail lines up with both status indicators. Add focused geometry tests to keep the alignment stable.

---

_Generated with `mux` • Model: `openai:gpt-5.4` • Thinking: `xhigh` • Cost: `$6.76`_

<!-- mux-attribution: model=openai:gpt-5.4 thinking=xhigh costs=6.76 -->
@ammar-agent ammar-agent force-pushed the fix/subagent-sidebar-connector-alignment branch from 3ed9ca3 to d6e8793 Compare April 5, 2026 18:12
@ammar-agent
Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector
Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Keep it up!

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@ammario ammario merged commit 3aeeb99 into main Apr 5, 2026
24 checks passed
@ammario ammario deleted the fix/subagent-sidebar-connector-alignment branch April 5, 2026 21:15
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