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 -25
View File
@@ -1,4 +1,4 @@
import { render, screen } from "@testing-library/react";
import { fireEvent, render, screen, within } from "@testing-library/react";
import userEvent from "@testing-library/user-event";
import { describe, expect, it, vi } from "vitest";
import { DirectorySidebar } from "./DirectorySidebar";
@@ -199,10 +199,9 @@ describe("multi-session navigation", () => {
onCommand={vi.fn()}
/>,
);
const user = userEvent.setup();
await user.click(screen.getByRole("button", { name: "Thinking Medium" }));
const thinking = screen.getByRole("combobox", { name: "Thinking" });
expect(
screen
within(thinking)
.getAllByRole("option")
.map((option) => option.getAttribute("value")),
).toEqual(["off", "minimal", "low", "medium", "xhigh"]);
@@ -380,29 +379,16 @@ describe("multi-session navigation", () => {
await user.type(search, "missing");
expect(screen.getByText(/No saved sessions match/)).toBeInTheDocument();
});
it("focuses search, traps focus, and restores the opener", async () => {
const user = userEvent.setup();
const opener = document.createElement("button");
document.body.append(opener);
opener.focus();
it("opens a native modal and handles cancellation", () => {
const onClose = vi.fn();
const { unmount } = render(
<SessionPicker sessions={[]} onOpen={vi.fn()} onClose={onClose} />,
);
const search = screen.getByRole("searchbox", {
name: "Search saved sessions",
});
const close = screen.getByRole("button", { name: "Close" });
expect(search).toHaveFocus();
await user.keyboard("{Shift>}{Tab}{/Shift}");
expect(close).toHaveFocus();
await user.keyboard("{Shift>}{Tab}{/Shift}");
expect(search).toHaveFocus();
await user.keyboard("{Escape}");
render(<SessionPicker sessions={[]} onOpen={vi.fn()} onClose={onClose} />);
const dialog = screen.getByRole("dialog", { name: "Saved sessions" });
expect(dialog).toHaveAttribute("open");
expect(
screen.getByRole("searchbox", { name: "Search saved sessions" }),
).toHaveFocus();
fireEvent(dialog, new Event("cancel", { cancelable: true }));
expect(onClose).toHaveBeenCalled();
unmount();
expect(opener).toHaveFocus();
document.body.removeChild(opener);
});
it("labels permission requests with the action and exact details", async () => {
const user = userEvent.setup();