refactor!: remove redundant compatibility layers

Use native browser and Tauri behavior instead of custom selector, dialog, and window-state implementations. Remove obsolete bridge, relay, asset, and dependency paths to keep the supported surface small.

BREAKING CHANGE: The Noctalia relay no longer accepts --agent, and the Tauri host no longer exposes the legacy load_agent command.
This commit is contained in:
2026-08-31 17:35:07 +02:00
parent a4ee3eb7a8
commit 0949c6f0d7
37 changed files with 510 additions and 1341 deletions
+11 -15
View File
@@ -114,8 +114,14 @@ test("Quick Pane keeps slash-containing model IDs atomic and renews only on pane
assert.match(pane, /provider: submittedModel\.provider/);
assert.match(pane, /modelId: submittedModel\.modelId/);
assert.doesNotMatch(pane, /selectedModel\.split/);
assert.match(pane, /listen\("quick-pane-shown"[\s\S]*?void renewChatOnShow\(\)/);
assert.match(pane, /onFocusChanged[\s\S]*?if \(event\.payload\) focusInput\(\);/);
assert.match(
pane,
/listen\("quick-pane-shown"[\s\S]*?void renewChatOnShow\(\)/,
);
assert.match(
pane,
/onFocusChanged[\s\S]*?if \(event\.payload\) focusInput\(\);/,
);
assert.match(pane, /const CHAT_RENEWAL_MS = 180_000/);
assert.match(pane, /Date\.now\(\) - lastActivity > CHAT_RENEWAL_MS/);
assert.match(pane, /event\.ctrlKey && event\.key\.toLowerCase\(\) === "n"/);
@@ -131,7 +137,7 @@ test("Quick Pane keeps slash-containing model IDs atomic and renews only on pane
assert.match(catalog, /JSON\.parse\(value\)/);
});
test("Quick Pane dismiss and mutually exclusive window visibility stay native-serialized", async () => {
test("Quick Pane dismiss and mutually exclusive visibility use native window state", async () => {
const [pane, nativeSource] = await Promise.all([
readFile(
new URL("../ui/src/quick-pane/QuickPane.tsx", import.meta.url),
@@ -151,32 +157,26 @@ test("Quick Pane dismiss and mutually exclusive window visibility stay native-se
nativeSource,
/dismiss_quick_pane,[\s\S]*create_session_runtime/,
);
assert.match(
nativeSource,
/struct WindowVisibility\(Mutex<ManagedWindowVisibility>\)/,
);
assert.doesNotMatch(nativeSource, /ManagedWindowVisibility|WindowVisibility/);
assert.match(nativeSource, /window\.is_visible\(\)/);
const mainShow = nativeSource.slice(
nativeSource.indexOf("fn apply_main_window_action"),
nativeSource.indexOf("fn get_or_create_quick_pane"),
);
const mainHideQuick = mainShow.indexOf("quick_pane.hide()");
const mainClearQuick = mainShow.indexOf('visibility.hidden("quick-pane")');
const showMain = mainShow.indexOf("window.show()");
assert.ok(mainShow.indexOf('get_webview_window("quick-pane")') >= 0);
assert.ok(mainHideQuick >= 0 && mainHideQuick < showMain);
assert.ok(mainClearQuick >= 0 && mainClearQuick < showMain);
const quickShow = nativeSource.slice(
nativeSource.indexOf("fn toggle_quick_pane"),
nativeSource.indexOf("fn requested_new_worktree_argument"),
);
const quickHideMain = quickShow.indexOf("main.hide()");
const quickClearMain = quickShow.indexOf('visibility.hidden("main")');
const showQuick = quickShow.indexOf("window.show()");
assert.ok(quickShow.indexOf('get_webview_window("main")') >= 0);
assert.ok(quickHideMain >= 0 && quickHideMain < showQuick);
assert.ok(quickClearMain >= 0 && quickClearMain < showQuick);
});
test("native promotion owns visibility and Main consumes pending runtime after startup refresh", async () => {
@@ -196,10 +196,6 @@ test("native promotion owns visibility and Main consumes pending runtime after s
promotion.indexOf("quick_pane\n .hide()") <
promotion.indexOf("window\n .show()"),
);
assert.ok(
promotion.indexOf('visibility.hidden("quick-pane")') <
promotion.indexOf("window\n .show()"),
);
assert.match(promotion, /\*pending = Some\(runtime_id\)/);
assert.match(nativeSource, /fn get_pending_promoted_runtime/);
assert.match(nativeSource, /fn consume_pending_promoted_runtime/);