diff --git a/desktop/src/features/channels/ui/TaskChannelWorkspace.tsx b/desktop/src/features/channels/ui/TaskChannelWorkspace.tsx index 10f1203cb5..ba681068ba 100644 --- a/desktop/src/features/channels/ui/TaskChannelWorkspace.tsx +++ b/desktop/src/features/channels/ui/TaskChannelWorkspace.tsx @@ -1,5 +1,5 @@ import { openUrl } from "@tauri-apps/plugin-opener"; -import * as React from "react"; +import type * as React from "react"; import { toast } from "sonner"; import { useCanvasQuery } from "@/features/channels/hooks"; import { @@ -68,49 +68,26 @@ export function TaskChannelWorkspace({ }) { const canvas = useCanvasQuery(channelId, channelId !== null); const task = parseChannelBackedTask(canvas.data?.content); - const [view, setView] = React.useState<"overview" | "conversation">( - "overview", - ); if (!task) return children; return (
- - {view === "conversation" ? ( - children - ) : ( -
+
+ + {task.task.title} +
-

{task.task.title}

-

- {task.task.description} -

-
+

{task.task.description}

+ {task.branch && } +
Origin
@@ -118,10 +95,17 @@ export function TaskChannelWorkspace({ Parent
- {task.branch && }
-
- )} + +
+
+ {children} +
); } diff --git a/desktop/src/features/sidebar/ui/TaskChannelStatusGlyph.tsx b/desktop/src/features/sidebar/ui/TaskChannelStatusGlyph.tsx index 4832d69c1b..5358edd129 100644 --- a/desktop/src/features/sidebar/ui/TaskChannelStatusGlyph.tsx +++ b/desktop/src/features/sidebar/ui/TaskChannelStatusGlyph.tsx @@ -1,4 +1,5 @@ import { useContext } from "react"; +import { CircleAlert } from "lucide-react"; import { TaskChannelBranches } from "@/features/channels/useChannelBackedTaskParents"; import { useTaskBranchStatus } from "@/features/channels/useTaskBranchStatus"; import type { ChannelBackedTask } from "@/features/channels/lib/channelBackedTask"; @@ -17,11 +18,36 @@ function BranchGlyph({ className="ml-auto flex shrink-0" data-testid="task-channel-status" > - + {query.error && !pr ? ( + + ) : pr ? ( + + ) : ( + + + + + + + + )} ); } diff --git a/desktop/tests/e2e/task-channel-views.spec.ts b/desktop/tests/e2e/task-channel-views.spec.ts index bb42f5eb32..8016ee8a55 100644 --- a/desktop/tests/e2e/task-channel-views.spec.ts +++ b/desktop/tests/e2e/task-channel-views.spec.ts @@ -14,7 +14,7 @@ branch: name: "jtennant/berd-voice-status-sounds" ---`; -test("a task canvas exposes overview and conversation only", async ({ +test("a task summary sits above the conversation and can collapse", async ({ page, }) => { await installMockBridge(page, { canvasContent: TASK_CANVAS }); @@ -30,8 +30,13 @@ test("a task canvas exposes overview and conversation only", async ({ "jtennant/berd-voice-status-sounds", ); await expect(page.getByTestId("task-work-tree")).toHaveCount(0); - await page.getByTestId("task-view-conversation").click(); + await expect(page.getByTestId("task-view-tabs")).toHaveCount(0); await expect(page.getByTestId("message-timeline")).toBeVisible(); + await page.getByTestId("task-overview").locator("summary").click(); + await expect(page.getByTestId("task-overview-details")).toBeHidden(); + await expect(page.getByTestId("message-timeline")).toBeVisible(); + await page.getByTestId("task-overview").locator("summary").press("Enter"); + await expect(page.getByTestId("task-overview-details")).toBeVisible(); await expect(page.getByTestId("task-work-navigator")).toHaveCount(0); }); diff --git a/docs/experiments/channel-backed-tasks.md b/docs/experiments/channel-backed-tasks.md index 467d41cb7e..af4bfa1189 100644 --- a/docs/experiments/channel-backed-tasks.md +++ b/docs/experiments/channel-backed-tasks.md @@ -16,7 +16,7 @@ Conversation → local task + new channel → implementation branch → pull req - A branch created outside this workflow can remain unbound temporarily and should be flagged for resolution. A person or agent can attach it to an appropriate channel or create a new one. - Rebinding an established branch is for correcting mistakes, not routine restructuring. - The branch, pull request, CI, and review use the task's channel. -- The client recognizes the canvas schema and adds Overview and Conversation views. Overview shows the selected task and its branch or pull request. The nested left sidebar shows branch and PR status glyphs, using the local `gh` login to discover pull requests. +- The client recognizes the canvas schema and shows a collapsible task summary above the conversation, including its branch or pull request. The nested left sidebar shows branch and PR status glyphs, using the local `gh` login to discover pull requests. ## Canvas data model