Skip to content

fix(cos): prevent CoS panel width blowout when non-canvas avatar is active - #6234

Merged
atomantic merged 1 commit into
mainfrom
cos/task-mtn24g1t/agent-7a048a31
Sep 4, 2026
Merged

fix(cos): prevent CoS panel width blowout when non-canvas avatar is active#6234
atomantic merged 1 commit into
mainfrom
cos/task-mtn24g1t/agent-7a048a31

Conversation

@atomantic

Copy link
Copy Markdown
Owner

Summary

Fixes an issue where the Chief of Staff left panel expanded beyond its intended 320px column width after an agent completed a task, pushing the right column of stat cards (Pending, Issues, Queue Pause) outside the visible render area.

Root Cause

  1. In ChiefOfStaff.jsx, when an agent is active with a dynamic 3D/canvas avatar style (e.g. cyber, sigil, esoteric, rigged), hasCanvasAvatar is true, and the avatar container applied lg:w-full.
  2. When the agent finished the task, activeAgentMeta was cleared and avatarStyle fell back to configAvatarStyle (SVG).
  3. SVG avatars set hasCanvasAvatar to false. The false branch lacked w-full / lg:w-full, rendering with lg:flex-none and unconstrained width.
  4. Children with wide content or long event logs (such as the task cleanup logs emitted on completion) caused the flex container to size to their max-content width (~600px).
  5. The stats grid inside the container scaled its 2 columns to ~300px each, causing column 1 to fill the entire 320px sidebar rail and column 2 to be clipped by overflow-x-hidden.
  6. Once a new task began, activeAgentMeta was re-set, hasCanvasAvatar became true again, re-applying lg:w-full and snapping the pane back to 320px.

Fix

  • Added min-w-0, w-full, and lg:w-full lg:max-w-full across the CoS sidebar rail, the collapsible agent panel, the inner avatar container (for both canvas and non-canvas branches), and child wrappers (stats grid and event log).
  • Added regression test in client/src/pages/ChiefOfStaff.test.jsx asserting that non-canvas avatar styles retain w-full, max-w-full, and min-w-0 constraints on the desktop rail.

@atomantic atomantic added the planner:gemini-3-8-flash Plan authored by the gemini-3-8-flash model label Sep 4, 2026
@atomantic
atomantic merged commit 2c553ee into main Sep 4, 2026
7 checks passed
@atomantic
atomantic deleted the cos/task-mtn24g1t/agent-7a048a31 branch September 4, 2026 14:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

planner:gemini-3-8-flash Plan authored by the gemini-3-8-flash model

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant