Some checks failed
build-packages / resolve bundled mosh-client (push) Has been cancelled
build-packages / resolve bundled et-client (push) Has been cancelled
build-packages / build-macos (push) Has been cancelled
build-packages / build-windows (push) Has been cancelled
build-packages / build-linux-x64 (push) Has been cancelled
build-packages / build-linux-arm64 (push) Has been cancelled
build-packages / release (push) Has been cancelled
build-packages / update Nix release metadata (push) Has been cancelled
build-packages / bump homebrew tap (push) Has been cancelled
test / lint-and-test (push) Has been cancelled
AI automation / Route event (push) Has been cancelled
AI automation / Hand reopened issue to maintainers (push) Has been cancelled
AI automation / Clean source issue state (push) Has been cancelled
AI automation / Reconcile handoffs (push) Has been cancelled
AI automation / Classify issue (push) Has been cancelled
AI automation / Claude Code smoke (push) Has been cancelled
AI automation / Review issue follow-up (push) Has been cancelled
AI automation / Publish issue follow-up (push) Has been cancelled
AI automation / Implement with Claude Code (push) Has been cancelled
AI automation / Publish implement PR (push) Has been cancelled
AI automation / Continue queued issue comments (push) Has been cancelled
AI automation / Codex review loop (push) Has been cancelled
AI automation / Publish Codex fix (push) Has been cancelled
AI automation / Clear Codex dispatch marker (push) Has been cancelled
AI automation / Own PR re-request Codex (push) Has been cancelled
AI automation / External PR re-request Codex (push) Has been cancelled
AI automation / Poll Codex reaction / retry (push) Has been cancelled
build-et-binaries / build-linux-x64 (push) Has been cancelled
build-et-binaries / build-linux-arm64 (push) Has been cancelled
build-et-binaries / build-macos-universal (push) Has been cancelled
build-et-binaries / build-windows-x64 (push) Has been cancelled
build-et-binaries / release (push) Has been cancelled
43 lines
2.0 KiB
TypeScript
43 lines
2.0 KiB
TypeScript
import assert from 'node:assert/strict';
|
|
import { readFileSync } from 'node:fs';
|
|
import test from 'node:test';
|
|
|
|
const panelSource = readFileSync(new URL('./AIChatPanelContent.tsx', import.meta.url), 'utf8');
|
|
const selectorSource = readFileSync(new URL('./ai/AgentSelector.tsx', import.meta.url), 'utf8');
|
|
const preparingSource = readFileSync(new URL('./AIChatSidePanel.tsx', import.meta.url), 'utf8');
|
|
|
|
const primaryToolbarSources = [
|
|
panelSource,
|
|
readFileSync(new URL('./ScriptsSidePanel.tsx', import.meta.url), 'utf8'),
|
|
readFileSync(new URL('./HistorySidePanel.tsx', import.meta.url), 'utf8'),
|
|
readFileSync(new URL('./SftpSidePanel.tsx', import.meta.url), 'utf8'),
|
|
readFileSync(new URL('./notes/NotesManager.tsx', import.meta.url), 'utf8'),
|
|
readFileSync(new URL('./systemManager/SystemManagerSidePanel.tsx', import.meta.url), 'utf8'),
|
|
readFileSync(new URL('./terminal/ThemeSidePanel.tsx', import.meta.url), 'utf8'),
|
|
];
|
|
|
|
test('AI chat header matches the compact system panel toolbar height', () => {
|
|
assert.match(panelSource, /TERMINAL_SIDE_PANEL_INNER_HEADER_CLASS/);
|
|
assert.match(selectorSource, /className="group flex h-6/);
|
|
assert.match(selectorSource, /truncate text-\[11px\]/);
|
|
assert.match(panelSource, /className="h-6 w-6 rounded-md/);
|
|
});
|
|
|
|
test('AI chat preparing state keeps the same compact header height', () => {
|
|
assert.match(preparingSource, /TERMINAL_SIDE_PANEL_INNER_HEADER_CLASS/);
|
|
assert.match(preparingSource, /className="h-6 w-32/);
|
|
});
|
|
|
|
test('agent selector menu stays compact with restrained corners', () => {
|
|
assert.match(selectorSource, /w-\[256px\].*rounded-md/);
|
|
assert.match(selectorSource, /flex h-9 w-full items-center gap-2\.5 px-3/);
|
|
assert.doesNotMatch(selectorSource, /rounded-lg/);
|
|
assert.doesNotMatch(selectorSource, /rounded-2xl/);
|
|
});
|
|
|
|
test('terminal side panel tools share one primary toolbar height', () => {
|
|
for (const source of primaryToolbarSources) {
|
|
assert.match(source, /TERMINAL_SIDE_PANEL_INNER_HEADER_CLASS/);
|
|
}
|
|
});
|