mirror of
https://github.com/Ark0N/Codeman.git
synced 2026-12-01 00:49:33 +01:00
fix(tabs): keep the working spinner on a ledger cell
The ledger layout hid every .tab-status to swap the dot for its coloured bar. The bar is green for idle and working alike, and the spinner is the dot's own .tab-status.busy::after ring, so a working session showed no mark at all. A busy cell now keeps the dot and its ring, idle cells stay bar-only, and an exited agent's cell still hides it like the classic strip. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
5548c17c4a
commit
79f444a2fc
6 files changed
+38
-4
No files matched your search
@@ -345,6 +345,29 @@ describe('tab layouts by case and ledger (static)', () => {
|
||||
);
|
||||
});
|
||||
|
||||
it('keeps the working spinner on a ledger cell', () => {
|
||||
// The bar replaces the status dot, but it is green for idle and working
|
||||
// alike, and the spinner is the dot's own ::after ring: hiding every dot
|
||||
// left a working session with no mark at all.
|
||||
const hides: string[] = [];
|
||||
postcss.parse(css).walkAtRules('media', (media: AtRule) => {
|
||||
if (media.params !== '(min-width: 768px)') return;
|
||||
media.walkRules((rule: Rule) => {
|
||||
if (!rule.selector.includes('.tabs-ledger')) return;
|
||||
if (!rule.nodes.some((n) => n.type === 'decl' && n.prop === 'display' && n.value === 'none')) return;
|
||||
hides.push(...rule.selectors.filter((s) => s.includes('.tab-status')));
|
||||
});
|
||||
});
|
||||
expect(hides.length).toBeGreaterThan(0);
|
||||
for (const selector of hides) {
|
||||
// Each one either spares a busy dot or is the exited-agent cell, whose
|
||||
// ring the classic strip hides too.
|
||||
expect(selector.endsWith('.tab-status:not(.busy)') || selector.includes('.tab-agent-exited')).toBe(true);
|
||||
}
|
||||
// The ring the cell keeps is the shared one every strip draws.
|
||||
expect(css).toMatch(/\.session-tab \.tab-status\.busy::after \{[^}]*animation: tab-load-spin/);
|
||||
});
|
||||
|
||||
it('dissolves the boxes into the one chip row on phones', () => {
|
||||
expect(mobileCss).toMatch(
|
||||
/:where\(\.header\) \.session-tabs-host > \.session-tabs\.tabs-clusters > \.tab-cluster \{\s*display: contents;/
|
||||
|
||||
Reference in new issue
Block a user