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 source = readFileSync(new URL('./TerminalLayerTabBridge.tsx', import.meta.url), 'utf8');
|
|
|
|
test('terminal layer bridge does not dock the shared host tree', () => {
|
|
assert.doesNotMatch(source, /hostTreeDockedInLayer/);
|
|
});
|
|
|
|
test('terminal layer is visible only for terminal sessions or workspaces', () => {
|
|
assert.match(source, /const isVisible = Boolean\(activeSession \|\| activeWorkspace \|\| s\.draggingSessionId\)/);
|
|
});
|
|
|
|
test('terminal panes can gate cwd restore per session host resolution', () => {
|
|
const supportSource = readFileSync(new URL('./TerminalLayerSupport.tsx', import.meta.url), 'utf8');
|
|
const layerSource = readFileSync(new URL('../TerminalLayer.tsx', import.meta.url), 'utf8');
|
|
|
|
assert.match(supportSource, /sessionHostResolved: boolean/);
|
|
assert.match(supportSource, /restoreTerminalCwd=\{restoreTerminalCwd && sessionHostResolved\}/);
|
|
assert.match(layerSource, /session\.protocol === 'local'/);
|
|
});
|
|
|
|
test('terminal layer bridge refreshes when terminal settings change', () => {
|
|
assert.match(source, /terminalSettings: s\.terminalSettings/);
|
|
assert.match(source, /\[\s*[\s\S]*s\.terminalSettings[\s\S]*\]\);/);
|
|
});
|
|
|
|
test('terminal layer bridge passes vault open callbacks into the side panel context', () => {
|
|
assert.match(source, /onOpenVaultNoteFromChat: s\.onOpenVaultNoteFromChat/);
|
|
assert.match(source, /onOpenVaultHostFromChat: s\.onOpenVaultHostFromChat/);
|
|
assert.match(source, /onOpenVaultSectionFromChat: s\.onOpenVaultSectionFromChat/);
|
|
});
|
|
|
|
test('terminal layer bridge updates side panel live state after render', () => {
|
|
assert.match(source, /const sidePanelLiveSnapshot = useMemo<SidePanelLiveSnapshot>/);
|
|
assert.match(
|
|
source,
|
|
/useLayoutEffect\(\(\) => \{\s*sidePanelLiveStore\.update\(sidePanelLiveSnapshot\);\s*\}, \[sidePanelLiveSnapshot\]\);/,
|
|
);
|
|
assert.doesNotMatch(source, /sidePanelLiveStore\.update\(\{\s*sftpActiveHost/);
|
|
});
|