Initial commit: NetMesh smart ops platform with 3D topology, inspection reports, RCA and AI ops assistant
Some checks failed
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
Some checks failed
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
This commit is contained in:
42
components/AIChatPanelContent.test.ts
Normal file
42
components/AIChatPanelContent.test.ts
Normal file
@@ -0,0 +1,42 @@
|
||||
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/);
|
||||
}
|
||||
});
|
||||
Reference in New Issue
Block a user