From 1850a582a4817210a822ca602163942b034a4dc3 Mon Sep 17 00:00:00 2001 From: soryu Date: Sat, 17 Jan 2026 06:44:22 +0000 Subject: feat(frontend): Add UI for phase transition confirmation requests When phase_guard is enabled and a supervisor tries to advance the contract phase, users now see a confirmation modal with: - Current and proposed next phase visualization - Phase deliverables checklist (if available) - Summary of the phase work - Options to "Approve & Advance" or "Request Changes" with feedback Components added: - PhaseConfirmationModal: Full modal dialog for phase confirmations - PhaseConfirmationInline: Inline variant for task output view - PhaseConfirmationNotification: Global notification wrapper - PhaseConfirmationToast: Alternative toast-style notification Integration: - Added phase_confirmation message type to TaskOutput renderer - Extended PendingQuestion API type with phase confirmation data - Integrated notification into main app layout The UI uses the existing supervisor question infrastructure (polling via /api/v1/mesh/questions) and responds with APPROVE or CHANGES_REQUESTED prefixed feedback. Co-Authored-By: Claude Opus 4.5 --- makima/frontend/src/lib/api.ts | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'makima/frontend/src/lib') diff --git a/makima/frontend/src/lib/api.ts b/makima/frontend/src/lib/api.ts index 9c56f6b..8b6b59d 100644 --- a/makima/frontend/src/lib/api.ts +++ b/makima/frontend/src/lib/api.ts @@ -1938,6 +1938,19 @@ export interface PendingQuestion { choices: string[]; context: string | null; createdAt: string; + /** Question type - "general" for regular questions, "phase_confirmation" for phase transitions */ + questionType?: "general" | "phase_confirmation"; + /** Phase confirmation specific data (when questionType is "phase_confirmation") */ + phaseConfirmation?: { + currentPhase: ContractPhase; + nextPhase: ContractPhase; + contractName?: string; + summary?: string; + deliverables?: Array<{ + name: string; + completed: boolean; + }>; + }; } export interface AnswerQuestionRequest { -- cgit v1.2.3