diff --git a/panel/src/app/(dashboard)/prompter/page.tsx b/panel/src/app/(dashboard)/prompter/page.tsx index 2b4beaa1..94d1f92c 100644 --- a/panel/src/app/(dashboard)/prompter/page.tsx +++ b/panel/src/app/(dashboard)/prompter/page.tsx @@ -4,10 +4,12 @@ import { useEffect, useRef } from "react"; import { Loader2, Sparkles, X } from "lucide-react"; import { Button } from "@/components/ui/button"; import { usePrompter } from "@/hooks/use-prompter"; +import { Team } from "@/types"; import { ChatMessages, ChatComposer, SuccessCard, + BoardReviewSentCard, IntakeForm, BatchReviewCard, } from "@/components/prompter"; @@ -42,7 +44,7 @@ export default function PrompterPage() { batch, batchWaves, batchResult, - updateBatchDraftProject, + setBatchDraftProjects, confirmBatch, } = usePrompter(); @@ -113,22 +115,40 @@ export default function PrompterPage() { createdTaskTeam ? (
- {batchResult.root_subtask_ids.length} tasks sequenced into{" "} - {batchResult.waves.length} wave - {batchResult.waves.length === 1 ? "" : "s"}. - {batchResult.warnings.length > 0 && - ` ${batchResult.warnings.length} advisory note${ - batchResult.warnings.length === 1 ? "" : "s" - }.`} -
+ {/* Board-routed MegaTask: created HELD for PO+HoM review, not + dispatched — the CEO releases it with Approve & Start on the + umbrella task. Every other path is a real "created/launched" + success. ``createdTaskTeam === BOARD`` is set only by the + batch board route (the single-draft board route parks and + never reaches success). */} + {createdTaskTeam === Team.BOARD && batchResult ? ( ++ {batchResult.root_subtask_ids.length} tasks sequenced + into {batchResult.waves.length} wave + {batchResult.waves.length === 1 ? "" : "s"}. + {batchResult.warnings.length > 0 && + ` ${batchResult.warnings.length} advisory note${ + batchResult.warnings.length === 1 ? "" : "s" + }.`} +
+ )} + > )}+ Projects {selected.length === 0 && "— pick at least one"} +
+ {CELL_TEAMS.map((cell) => { + const repos = scopedByCell(cell); + if (repos.length === 0) return null; + return ( +- Pick a project for every cell of every task before launching the + Pick at least one project for every task before launching the MegaTask.
)} diff --git a/panel/src/components/prompter/board-review-sent-card.tsx b/panel/src/components/prompter/board-review-sent-card.tsx new file mode 100644 index 00000000..59b4618b --- /dev/null +++ b/panel/src/components/prompter/board-review-sent-card.tsx @@ -0,0 +1,91 @@ +"use client"; + +import Link from "next/link"; +import { Users, ExternalLink, RefreshCw } from "lucide-react"; +import { Button } from "@/components/ui/button"; +import { + Card, + CardContent, + CardFooter, + CardHeader, + CardTitle, +} from "@/components/ui/card"; +import { Badge } from "@/components/ui/badge"; + +interface BoardReviewSentCardProps { + /** The umbrella task id — the single board-review / CEO-approve unit. */ + taskId: string; + taskTitle: string; + rootSubtaskCount: number; + waveCount: number; + onStartAnother: () => void; +} + +/** + * The MegaTask "Board review & Start" confirmation: the umbrella + root-subtasks + * were created HELD (umbrella assigned to the Product Owner, root-subtasks in + * BACKLOG) for the Product Owner + Head of Marketing to review. Nothing is + * dispatched yet — the CEO releases the sequenced tasks with Approve & Start on + * the umbrella task once the board finishes. This is the batch analogue of the + * single-draft board route's "sent to the board" wait, reusing the existing CEO + * Approve & Start gate on the umbrella (which fires ``approve_and_start`` → + * ``_activate_batch_root_subtasks``). + */ +export function BoardReviewSentCard({ + taskId, + taskTitle, + rootSubtaskCount, + waveCount, + onStartAnother, +}: BoardReviewSentCardProps) { + return ( +{taskTitle}
++ The Product Owner and Head of Marketing are reviewing this MegaTask. + Nothing is dispatched yet. Once they finish, open the umbrella task + and use Approve & Start to + release the sequenced tasks. You can leave and come back. +
+