feat(workstate): panneau Work state encore plus compact — intention tronquée + badge indicateur, ligne summary repliée supprimée — #235 (QA verte)
This commit is contained in:
@ -149,6 +149,47 @@ describe("ProjectWorkStatePanel", () => {
|
||||
expect(within(list).getByLabelText("9 more characters")).toBeTruthy();
|
||||
});
|
||||
|
||||
it("keeps long ticket intent out of the default agent row", async () => {
|
||||
const longPreview =
|
||||
"Goal: inspect the entire repository and produce a verbose implementation summary";
|
||||
const workState = new MockWorkStateGateway();
|
||||
workState._setProjectWorkState(PROJECT_ID, {
|
||||
agents: [
|
||||
{
|
||||
agentId: "agent-long",
|
||||
name: "Git",
|
||||
profileId: "codex",
|
||||
busy: {
|
||||
state: "busy",
|
||||
ticket: "ticket-long-abcdef",
|
||||
sinceMs: 789,
|
||||
},
|
||||
tickets: [
|
||||
{
|
||||
ticketId: "ticket-long-abcdef",
|
||||
conversationId: "conversation-long",
|
||||
position: 0,
|
||||
status: "inProgress",
|
||||
source: { kind: "human" },
|
||||
requesterLabel: "Anthony",
|
||||
taskPreview: longPreview,
|
||||
taskLen: longPreview.length,
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
});
|
||||
|
||||
renderPanel(workState);
|
||||
|
||||
expect(await screen.findByText("Git")).toBeTruthy();
|
||||
expect(screen.queryByText(longPreview)).toBeNull();
|
||||
expect(screen.getByText("Goal: inspect the entire repository and p...")).toBeTruthy();
|
||||
await openAgentDetails("Git");
|
||||
const list = await screen.findByLabelText("Git tickets");
|
||||
expect(within(list).getByText(longPreview)).toBeTruthy();
|
||||
});
|
||||
|
||||
it("renders two tickets in FIFO order", async () => {
|
||||
const workState = new MockWorkStateGateway();
|
||||
workState._setProjectWorkState(PROJECT_ID, {
|
||||
@ -291,7 +332,9 @@ describe("ProjectWorkStatePanel", () => {
|
||||
|
||||
renderPanel(workState);
|
||||
|
||||
expect(await screen.findByText("6 background tasks (3 active, 3 failed)")).toBeTruthy();
|
||||
expect(await screen.findByText("Runner")).toBeTruthy();
|
||||
expect(screen.getByText("6 bg")).toBeTruthy();
|
||||
expect(screen.queryByText("6 background tasks (3 active, 3 failed)")).toBeNull();
|
||||
expect(screen.queryByLabelText("Runner background tasks")).toBeNull();
|
||||
const list = await openBackgroundTasks("Runner");
|
||||
const cancelButtons = within(list).getAllByRole("button", { name: "Cancel" });
|
||||
@ -378,7 +421,9 @@ describe("ProjectWorkStatePanel", () => {
|
||||
|
||||
renderPanel(workState);
|
||||
|
||||
expect(await screen.findByText("4 background tasks (1 active, 1 failed)")).toBeTruthy();
|
||||
expect(await screen.findByText("Reporter")).toBeTruthy();
|
||||
expect(screen.getByText("4 bg")).toBeTruthy();
|
||||
expect(screen.queryByText("4 background tasks (1 active, 1 failed)")).toBeNull();
|
||||
expect(screen.queryByLabelText("Reporter background tasks")).toBeNull();
|
||||
const list = await openBackgroundTasks("Reporter");
|
||||
// Terminal tasks with a summary render it discreetly.
|
||||
@ -604,6 +649,12 @@ describe("ProjectWorkStatePanel", () => {
|
||||
|
||||
expect(await screen.findByText("Continue implementation")).toBeTruthy();
|
||||
expect(screen.queryByLabelText("Summarizer tickets")).toBeNull();
|
||||
expect(screen.queryByText("Goal: Ship the Work panel summaries")).toBeNull();
|
||||
expect(
|
||||
screen.queryByText("Previous turn established the adapter boundary."),
|
||||
).toBeNull();
|
||||
expect(screen.queryByRole("button", { name: "View" })).toBeNull();
|
||||
expect(screen.queryByRole("button", { name: "Copy" })).toBeNull();
|
||||
await openAgentDetails("Summarizer");
|
||||
const list = await screen.findByLabelText("Summarizer tickets");
|
||||
expect(within(list).getAllByText("Summary")).toHaveLength(2);
|
||||
|
||||
Reference in New Issue
Block a user