fix: prevent subagent progress content from being clipped
Constrain nested subagent grids so long tool summaries cannot widen progress and final output beyond the card. Preserve text wrapping and local scrolling for code and tables, and extend the layout regression test. Release note: Subagent progress and results now stay within the card width, keeping long text and tool status controls readable.
This commit is contained in:
@@ -98,11 +98,16 @@ describe('ChatTimeline', () => {
|
||||
expect(Boolean(card.querySelector('.tool-execution__full-summary'))).toBe(hasSummary)
|
||||
})
|
||||
|
||||
it('constrains tool grid columns so long summaries cannot clip controls', () => {
|
||||
it('constrains tool and subagent grid columns so long content cannot clip text or controls', () => {
|
||||
for (const selector of ['.tool-execution-list', '.tool-execution-list > ol',
|
||||
'.tool-execution__details', '.tool-execution__details section']) {
|
||||
const rule = stylesheet.slice(stylesheet.indexOf(`${selector} {`)).split('}')[0]
|
||||
'.tool-execution__details', '.tool-execution__details section',
|
||||
'.subagent-status-list', '.subagent-status-card__details',
|
||||
'.subagent-status-card__progress', '.subagent-status-card__details section']) {
|
||||
const rule = stylesheet.slice(stylesheet.indexOf(`\n${selector} {`)).split('}')[0]
|
||||
expect(rule).toContain('grid-template-columns: minmax(0, 1fr)')
|
||||
if (selector.startsWith('.subagent-')) {
|
||||
expect(rule).toContain('min-width: 0')
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
@@ -6402,6 +6402,8 @@ button > svg {
|
||||
|
||||
.subagent-status-list {
|
||||
display: grid;
|
||||
grid-template-columns: minmax(0, 1fr);
|
||||
min-width: 0;
|
||||
margin: var(--space-2) 0 var(--space-4);
|
||||
gap: var(--space-2);
|
||||
}
|
||||
@@ -6558,6 +6560,8 @@ button > svg {
|
||||
|
||||
.subagent-status-card__details {
|
||||
display: grid;
|
||||
grid-template-columns: minmax(0, 1fr);
|
||||
min-width: 0;
|
||||
padding: var(--space-3) var(--space-4) var(--space-4);
|
||||
border-top: 1px solid var(--border-subtle);
|
||||
background: var(--surface-subtle);
|
||||
@@ -6566,6 +6570,7 @@ button > svg {
|
||||
|
||||
.subagent-status-card__progress {
|
||||
display: grid;
|
||||
grid-template-columns: minmax(0, 1fr);
|
||||
min-width: 0;
|
||||
gap: var(--space-3);
|
||||
padding-left: var(--space-3);
|
||||
@@ -6574,6 +6579,8 @@ button > svg {
|
||||
|
||||
.subagent-status-card__details section {
|
||||
display: grid;
|
||||
grid-template-columns: minmax(0, 1fr);
|
||||
min-width: 0;
|
||||
gap: var(--space-2);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user