fix(panel): prevent top pill nav overflow in narrow sidebar via minmax(0, 1fr) and @container stages

This commit is contained in:
fish
2026-11-18 12:56:51 +09:00
parent 336f9ddd55
commit c948126c96
8 changed files with 120 additions and 23 deletions
@@ -809,10 +809,13 @@ test('post-compaction context preserves static channels + checkpoint summary, ca
assert.equal(ctx2.assistantTokens, 600);
assert.equal(ctx2.totalTokens, 31_100);
// Verify capsule 100% slot CSS and non-hardcoded compaction suffix color
// Verify capsule 100% slot CSS, non-hardcoded compaction suffix color, and narrow-width top pill nav containment
const stylesCss = fs.readFileSync(new URL('../styles.css', import.meta.url), 'utf8');
assert.match(stylesCss, /\.wm-ctx-seg\s*\{[^}]*width:\s*58px;/);
assert.match(stylesCss, /\.wm-ctx-pct\s*\{[^}]*max-width:\s*none;[^}]*overflow:\s*visible;[^}]*text-overflow:\s*clip;/s);
assert.match(stylesCss, /\.step-model-compact\s*\{[^}]*color:\s*var\(--accent-primary\);/);
assert.doesNotMatch(stylesCss, /\.step-model-compact\s*\{[^}]*--metric-info/);
assert.match(stylesCss, /\.long-pill-nav\s*\{[^}]*container-type:\s*inline-size;[^}]*minmax\(0,\s*1fr\)[^}]*overflow:\s*hidden;/s);
assert.match(stylesCss, /\.pill-tab\s*\{[^}]*min-width:\s*0;/s);
assert.match(stylesCss, /@container\s*\(max-width:\s*30em\)\s*\{[\s\S]*?\.pill-tab-badge\s*\{\s*display:\s*none\s*!important;/);
});