mirror of
https://github.com/binaricat/Netcatty.git
synced 2026-11-12 09:24:24 +00:00
* fix(#2725): automated Cursor CLI fix * fix(ui): keep Quick Switcher open for host context menu clicks Portaled ContextMenuContent lives outside containerRef, so outside mousedown was closing the switcher before Connect/Edit host could run. Co-authored-by: Cursor <cursoragent@cursor.com> --------- Co-authored-by: netcatty-bot <308658023+netcatty-bot@users.noreply.github.com> Co-authored-by: bincxz <16399091+binaricat@users.noreply.github.com> Co-authored-by: Cursor <cursoragent@cursor.com>
22 lines
937 B
TypeScript
22 lines
937 B
TypeScript
import assert from 'node:assert/strict';
|
|
import { readFileSync } from 'node:fs';
|
|
import test from 'node:test';
|
|
import { fileURLToPath } from 'node:url';
|
|
|
|
import { isSessionReconnectDisabled } from './SessionTabContextMenuContent';
|
|
|
|
const source = readFileSync(fileURLToPath(new URL('./SessionTabContextMenuContent.tsx', import.meta.url)), 'utf8');
|
|
|
|
test('reconnect is disabled while a session is still connecting', () => {
|
|
assert.equal(isSessionReconnectDisabled('connecting'), true);
|
|
assert.equal(isSessionReconnectDisabled('connected'), false);
|
|
assert.equal(isSessionReconnectDisabled('disconnected'), false);
|
|
});
|
|
|
|
test('session tab menu exposes optional edit-host when a vault host is present', () => {
|
|
assert.match(source, /editHost\?: Host/);
|
|
assert.match(source, /onEditHost\?: \(host: Host\) => void/);
|
|
assert.match(source, /editHost && onEditHost/);
|
|
assert.match(source, /terminal\.layer\.hostTree\.editHost/);
|
|
});
|