feat(ui): refonte menus & fenêtres — menu unique Panneaux et onglets projet (#26)

Sous-menus flyout dans MenuBar ; ProjectsView expose un menu unique
Panneaux et supprime les menus View/Window/File ainsi que le sélecteur
de projet ; ProjectTabs gère les onglets et le bouton +. Tests migrés
en conséquence.

QA vert : tsc --noEmit exit 0, vitest 62 fichiers / 616 tests passés,
invariants préservés.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-07-12 15:08:34 +02:00
parent 805d4b70a2
commit 09e7f212b7
7 changed files with 305 additions and 217 deletions

View File

@ -112,10 +112,14 @@ function renderView(project: MockProjectGateway) {
);
}
/** Opens a menu-bar dropdown item (#16 chrome). */
function openMenuItem(menu: string, item: string) {
fireEvent.click(screen.getByRole("button", { name: menu }));
fireEvent.click(screen.getByRole("button", { name: item }));
/**
* Opens a panel floating via the single « Panneaux » menu (#26): menu → panel
* entry (opens its placement submenu) → « Flottant ».
*/
function openPanel(panelTitle: string) {
fireEvent.click(screen.getByRole("button", { name: "Panneaux" }));
fireEvent.click(screen.getByRole("button", { name: panelTitle }));
fireEvent.click(screen.getByRole("button", { name: "Flottant" }));
}
async function openProjectAndWorkTab(label: string) {
@ -127,7 +131,7 @@ async function openProjectAndWorkTab(label: string) {
fireEvent.click(within(li!).getByRole("button", { name: "Open" }));
await screen.findByRole("tab");
// Open the Work panel window from the View menu.
openMenuItem("View", "Work");
openPanel("Work state");
}
describe("ProjectsView — LS7 conversation viewer integration", () => {
@ -177,7 +181,7 @@ describe("ProjectsView — LS7 conversation viewer integration", () => {
// persists across activation (the inline welcome list is replaced by the
// grid once a project is active).
await screen.findByText("/p/a");
openMenuItem("File", "Projects");
openPanel("Projects");
for (const root of ["/p/a", "/p/b"]) {
const li = screen
.getAllByRole("listitem")
@ -188,7 +192,7 @@ describe("ProjectsView — LS7 conversation viewer integration", () => {
// Make alpha the active tab, then open its conversation viewer.
fireEvent.click(screen.getByRole("tab", { name: "alpha" }));
openMenuItem("View", "Work");
openPanel("Work state");
fireEvent.click(
await screen.findByRole("button", { name: `open conversation ${CONV_ID}` }),
);