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

@ -47,10 +47,15 @@ async function renderWithProject() {
);
}
/** Opens a menu-bar dropdown item. */
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 ». `panelTitle` is the
* panel's human title ("Git", "Agents", …).
*/
function openPanelFloating(panelTitle: string) {
fireEvent.click(screen.getByRole("button", { name: "Panneaux" }));
fireEvent.click(screen.getByRole("button", { name: panelTitle }));
fireEvent.click(screen.getByRole("button", { name: "Flottant" }));
}
describe("ProjectsView view docking (#22)", () => {
@ -58,7 +63,7 @@ describe("ProjectsView view docking (#22)", () => {
await renderWithProject();
// View → Git opens a modal floating window (historical behaviour).
openMenuItem("View", "Git");
openPanelFloating("Git");
const dialog = await screen.findByRole("dialog", { name: "Git" });
expect(dialog).toBeTruthy();
@ -78,7 +83,7 @@ describe("ProjectsView view docking (#22)", () => {
it("keeps one slot per view: docking right moves it off the left dock", async () => {
await renderWithProject();
openMenuItem("View", "Git");
openPanelFloating("Git");
const dialog = await screen.findByRole("dialog", { name: "Git" });
fireEvent.click(within(dialog).getByRole("button", { name: "dock Git left" }));
@ -100,7 +105,7 @@ describe("ProjectsView view docking (#22)", () => {
await renderWithProject();
// Dock Git left.
openMenuItem("View", "Git");
openPanelFloating("Git");
fireEvent.click(
within(await screen.findByRole("dialog", { name: "Git" })).getByRole(
"button",
@ -108,7 +113,7 @@ describe("ProjectsView view docking (#22)", () => {
),
);
// Dock Agents right.
openMenuItem("View", "Agents");
openPanelFloating("Agents");
fireEvent.click(
within(await screen.findByRole("dialog", { name: "Agents" })).getByRole(
"button",