feat: add read-only defense presenter route

This commit is contained in:
lda
2026-07-13 09:16:14 +07:00 Verified
parent 1ea75086b5
commit 1f07f3a4fd
16 changed files with 454 additions and 45 deletions
+12
View File
@@ -196,4 +196,16 @@ describe("App", () => {
expect(screen.getByRole("main", { name: /lda.chat presentation/i })).toBeInTheDocument();
expect(screen.queryByLabelText("Lifecycle Explorer")).toBeNull();
});
it("routes to read-only presenter notes separately from presentation mode", () => {
window.location.hash = "#scene/thesis/title";
render(
<MemoryRouter initialEntries={["/presenter"]}>
<AppRoutes />
</MemoryRouter>,
);
expect(screen.getByRole("main", { name: /lda.chat presenter notes/i })).toBeInTheDocument();
expect(screen.queryByRole("main", { name: /lda.chat presentation/i })).not.toBeInTheDocument();
});
});
+2
View File
@@ -1,12 +1,14 @@
import { Navigate, Route, Routes } from "react-router-dom";
import { ConsoleHome } from "./ConsoleHome.js";
import { PresentationRoute } from "../presentation/PresentationRoute.js";
import { PresenterRoute } from "../presentation/presenter/PresenterRoute.js";
export const AppRoutes = () => (
<Routes>
<Route path="/" element={<ConsoleHome />} />
<Route path="/console" element={<ConsoleHome />} />
<Route path="/present" element={<PresentationRoute />} />
<Route path="/presenter" element={<PresenterRoute />} />
<Route path="*" element={<Navigate to="/" replace />} />
</Routes>
);