Add full shell, replaceable Omics adapter and bilingual interaction

Implement approved specification #32 and tickets #33-#37. Keep host authentication server-verified and pin session interaction language. Compile scoped base selectors for browser compatibility and retain full gutters during CSS pruning.
This commit is contained in:
Codex
2026-09-13 14:26:39 +02:00
parent 2d1b714ebe
commit d8a29bfbdd
207 changed files with 8570 additions and 2164 deletions
@@ -0,0 +1,25 @@
import { act, render, screen } from "@testing-library/react";
import { WidgetHost } from "./WidgetHost";
import { useSessionStore } from "../store/sessionStore";
import { setLocale } from "../i18n";
afterEach(() => {
act(() => { setLocale("en"); useSessionStore.getState().resetSession(); });
});
test("gate chrome follows UI locale while model questions and choices remain in their session language", () => {
useSessionStore.setState({ pendingWidget: {
id: "approval", widget: "select", title: "Domanda del revisore",
options: [
{ id: "approve", label: "Salva e procedi", label_i18n: "Save and proceed" },
{ id: "proposal", label: "Usa la data del ricovero" },
],
} });
render(<WidgetHost sessionId="s1" />);
expect(screen.getByRole("button", { name: "Save and proceed" })).toBeInTheDocument();
expect(screen.getByText("Domanda del revisore")).toBeInTheDocument();
expect(screen.getByRole("button", { name: "Usa la data del ricovero" })).toBeInTheDocument();
act(() => setLocale("it"));
expect(screen.getByRole("button", { name: "Salva e procedi" })).toBeInTheDocument();
expect(useSessionStore.getState().pendingWidget?.options?.[0].label).toBe("Salva e procedi");
});