- #151: chevauchement des boutons dans la barre supérieure pendant une conversation agent - #158: popup de reprise de conversation intempestive (ajout cellule / changement layout / projet) - #159: pastille d'activité de projet
This commit is contained in:
@ -48,8 +48,10 @@ if (typeof globalThis.ResizeObserver === "undefined") {
|
||||
import type { DomainEvent } from "@/domain";
|
||||
import type { Gateways } from "@/ports";
|
||||
import {
|
||||
MOCK_REFERENCE_PROFILES,
|
||||
MockAgentGateway,
|
||||
MockLayoutGateway,
|
||||
MockProfileGateway,
|
||||
MockSystemGateway,
|
||||
MockTerminalGateway,
|
||||
} from "@/adapters/mock";
|
||||
@ -69,12 +71,14 @@ interface GridSetup {
|
||||
async function makeSplitAgentGrid(): Promise<GridSetup> {
|
||||
const layout = new MockLayoutGateway();
|
||||
const agentGateway = new MockAgentGateway();
|
||||
const profileGateway = new MockProfileGateway();
|
||||
const terminal = new MockTerminalGateway();
|
||||
const system = new MockSystemGateway();
|
||||
await profileGateway.saveProfile(MOCK_REFERENCE_PROFILES[0]);
|
||||
|
||||
const agent = await agentGateway.createAgent("p1", {
|
||||
name: "Worker",
|
||||
profileId: "claude",
|
||||
profileId: "mock-claude",
|
||||
});
|
||||
|
||||
const initial = await layout.loadLayout("p1");
|
||||
@ -98,6 +102,7 @@ async function makeSplitAgentGrid(): Promise<GridSetup> {
|
||||
gateways: {
|
||||
layout,
|
||||
agent: agentGateway,
|
||||
profile: profileGateway,
|
||||
terminal,
|
||||
system,
|
||||
} as unknown as Gateways,
|
||||
@ -174,6 +179,24 @@ function expectedOperation(action: CellAction, cellId: string) {
|
||||
}
|
||||
|
||||
describe("LayoutGrid — ticket #48 cell control layering", () => {
|
||||
it("keeps custom CLI mode controls compact inside the cell toolbar (#151)", async () => {
|
||||
const setup = await makeSplitAgentGrid();
|
||||
|
||||
renderGrid(setup.gateways);
|
||||
|
||||
const group = await screen.findByRole("group", {
|
||||
name: `mode CLI agent ${setup.bId}`,
|
||||
});
|
||||
const { controls } = controlsFor(setup.bId);
|
||||
|
||||
expect(group.textContent).toBe("TUI nativeCLI custom");
|
||||
expect(group.style.maxWidth).toBe("128px");
|
||||
expect(controls.style.left).toBe("4px");
|
||||
expect(controls.style.right).toBe("16px");
|
||||
expect(controls.style.justifyContent).toBe("flex-end");
|
||||
expect(controls.style.overflow).toBe("hidden");
|
||||
});
|
||||
|
||||
it.each<CellAction>(["selector", "split", "close"])(
|
||||
"keeps %s above/clickable over a terminal launch error",
|
||||
async (action) => {
|
||||
|
||||
Reference in New Issue
Block a user