From aa974c4888851f10c782e07b9d9bff7a6f1aef15 Mon Sep 17 00:00:00 2001 From: soryu Date: Fri, 20 Feb 2026 00:46:21 +0000 Subject: fix: reconcile:on blocking, pending question notifications, and infra improvements (#73) * feat: soryu-co/soryu - makima: Fix contracts page overflow - constrain layout to viewport height * feat: soryu-co/soryu - makima: Add git fetch to create_worktree and improve completion prompt merge conflict handling * WIP: heartbeat checkpoint * feat: soryu-co/soryu - makima: Add pending question notification badge to directive sidebar and nav * feat: soryu-co/soryu - makima: Fix reconcile:on blocking - make phaseguard poll indefinitely instead of returning immediately --- makima/frontend/src/components/NavStrip.tsx | 23 ++++++++++++++-------- .../src/components/directives/DirectiveList.tsx | 17 ++++++++++++++++ 2 files changed, 32 insertions(+), 8 deletions(-) (limited to 'makima/frontend/src') diff --git a/makima/frontend/src/components/NavStrip.tsx b/makima/frontend/src/components/NavStrip.tsx index 117f4e1..4932427 100644 --- a/makima/frontend/src/components/NavStrip.tsx +++ b/makima/frontend/src/components/NavStrip.tsx @@ -1,4 +1,5 @@ import { useAuth } from "../contexts/AuthContext"; +import { useSupervisorQuestions } from "../contexts/SupervisorQuestionsContext"; import { RewriteLink } from "./RewriteLink"; interface NavLink { @@ -19,6 +20,8 @@ const NAV_LINKS: NavLink[] = [ export function NavStrip() { const { isAuthenticated, isAuthConfigured, signOut, user } = useAuth(); + const { pendingQuestions } = useSupervisorQuestions(); + const directiveQuestionCount = pendingQuestions.filter(q => q.directiveId).length; const handleSignOut = async () => { await signOut(); @@ -38,14 +41,18 @@ export function NavStrip() {
{NAV_LINKS.map((link) => ( - - {link.label} - + + + {link.label} + + {link.label === "Directives" && directiveQuestionCount > 0 && ( + + )} + ))}
diff --git a/makima/frontend/src/components/directives/DirectiveList.tsx b/makima/frontend/src/components/directives/DirectiveList.tsx index 6393ea7..6a9c486 100644 --- a/makima/frontend/src/components/directives/DirectiveList.tsx +++ b/makima/frontend/src/components/directives/DirectiveList.tsx @@ -1,4 +1,6 @@ +import { useMemo } from "react"; import type { DirectiveSummary, DirectiveStatus } from "../../lib/api"; +import { useSupervisorQuestions } from "../../contexts/SupervisorQuestionsContext"; const STATUS_BADGE: Record = { draft: { color: "text-[#7788aa] border-[#2a3a5a]", label: "DRAFT" }, @@ -16,6 +18,18 @@ interface DirectiveListProps { } export function DirectiveList({ directives, selectedId, onSelect, onCreate }: DirectiveListProps) { + const { pendingQuestions } = useSupervisorQuestions(); + + const questionsPerDirective = useMemo(() => { + const counts = new Map(); + for (const q of pendingQuestions) { + if (q.directiveId) { + counts.set(q.directiveId, (counts.get(q.directiveId) || 0) + 1); + } + } + return counts; + }, [pendingQuestions]); + return (
@@ -55,6 +69,9 @@ export function DirectiveList({ directives, selectedId, onSelect, onCreate }: Di {d.title} + {questionsPerDirective.has(d.id) && ( + + )} -- cgit v1.2.3