Skip to content

fix CoS content panel overflow and wrap long log tokens#485

Merged
atomantic merged 1 commit into
mainfrom
cos/task-mplqfw0g/agent-2fd78078
May 25, 2026
Merged

fix CoS content panel overflow and wrap long log tokens#485
atomantic merged 1 commit into
mainfrom
cos/task-mplqfw0g/agent-2fd78078

Conversation

@atomantic
Copy link
Copy Markdown
Owner

Summary

The Chief of Staff page's content panel could appear wider than its allocated grid column and clip tab content past the fold. Two underlying causes:

  1. Content panel didn't claim parent height. The inner <div className="overflow-y-auto p-3 lg:p-4"> sat inside a flex flex-col overflow-hidden wrapper with no flex-1 min-h-0, so its height equalled content height and its overflow-y-auto never triggered. Tall tab content spilled out and was clipped by the wrapper's overflow-hidden, leaving the user with no way to scroll. Collapsed the two divs into a single flex-1 min-h-0 min-w-0 overflow-y-auto overflow-x-hidden p-3 lg:p-4 div — it claims parent height in both the lg+ grid context and the sub-lg flex flex-col context, scrolls vertically, and clips horizontal overflow defensively.
  2. Log message rows lacked word-break. EventLog and TerminalCoSPanel rendered raw log strings with no break-all, so a long unbreakable token (URL, hash, path) in a single message could push the row wider than the 320px sidebar column visually. Added break-all to log rows and min-w-0 to the scroll-container ancestry in both components.

Test plan

  • Open /cos/tasks with the SVG avatar style and a long pending task list — content scrolls inside the right column instead of being clipped past the fold.
  • Open /cos/agents and trigger an agent that emits a long log line (paste a long URL or hash into a task description) — the EventLog row wraps inside the 320px sidebar rather than pushing the column wider.
  • Switch avatar style to ASCII in /cos/config — the TerminalCoSPanel's event log wraps long lines the same way.
  • At sub-lg viewport width (resize browser below 1024px) — left CoS section stacks above the content section, both scroll independently as expected.
  • Collapse and re-expand the CoS panel — no layout shift outside the animated grid-cols transition.

… long log tokens in the 320px sidebar

ChiefOfStaff.jsx: collapse the redundant outer flex wrapper into a single
flex-1 min-h-0 min-w-0 overflow-y-auto overflow-x-hidden div so tall tab
content scrolls inside the panel instead of expanding it and getting
clipped by the parent's overflow-hidden.

EventLog.jsx / TerminalCoSPanel.jsx: add break-all to log rows and min-w-0
to the scroll container ancestry so long unbreakable tokens (URLs, hashes,
paths) wrap inside the 320px sidebar instead of pushing the column wider.
Copy link
Copy Markdown
Contributor

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

Fixes layout overflow issues on the Chief of Staff (CoS) page by ensuring the main content panel properly scrolls within its grid/flex container and by forcing long, unbroken log tokens to wrap instead of widening the sidebar.

Changes:

  • Refactors the CoS content panel wrapper so the scroll container correctly claims available height (flex-1 min-h-0 min-w-0) and enables vertical scrolling.
  • Prevents horizontal layout expansion from long log lines by adding min-w-0 to relevant containers and break-all to log rows in both log UIs.
  • Documents the fix in the vNEXT changelog.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

File Description
client/src/pages/ChiefOfStaff.jsx Collapses nested wrappers into a single scrollable content panel with correct flex/grid sizing and overflow behavior.
client/src/components/cos/TerminalCoSPanel.jsx Adds min-w-0 to log container ancestry and break-all to log rows to prevent sidebar widening.
client/src/components/cos/EventLog.jsx Adds min-w-0 to containers and break-all to log rows to wrap long tokens within the sidebar.
.changelog/NEXT.md Adds a “Fixed” entry describing the CoS overflow and log wrapping changes.

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

@atomantic atomantic merged commit a4dd6f3 into main May 25, 2026
3 checks passed
@atomantic atomantic deleted the cos/task-mplqfw0g/agent-2fd78078 branch May 25, 2026 22:10
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