diff options
Diffstat (limited to 'makima/frontend/src/routes/document-directives.tsx')
| -rw-r--r-- | makima/frontend/src/routes/document-directives.tsx | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/makima/frontend/src/routes/document-directives.tsx b/makima/frontend/src/routes/document-directives.tsx index 87102a2..d442a41 100644 --- a/makima/frontend/src/routes/document-directives.tsx +++ b/makima/frontend/src/routes/document-directives.tsx @@ -17,6 +17,7 @@ import { skipDirectiveStep, stopTask, listDirectiveRevisions, + newDirectiveDraft, } from "../lib/api"; import type { DirectiveStatus, @@ -32,6 +33,7 @@ const STATUS_DOT: Record<DirectiveStatus, string> = { active: "bg-green-400", idle: "bg-yellow-400", paused: "bg-orange-400", + inactive: "bg-[#75aafc]", archived: "bg-[#3a4a6a]", }; @@ -797,14 +799,16 @@ function DocumentSidebar({ return { directivesWithPending: dirs, tasksWithPending: tasks }; }, [pendingQuestions]); - // Sort active first, then idle, then paused, then archived. + // Sort active first, then idle, then paused, then drafts, then inactive + // (shipped contracts are quieter), then archived. const sorted = useMemo(() => { const order: Record<DirectiveStatus, number> = { active: 0, paused: 1, idle: 2, draft: 3, - archived: 4, + inactive: 4, + archived: 5, }; return [...directives].sort((a, b) => { const oa = order[a.status] ?? 99; @@ -1177,6 +1181,13 @@ export default function DocumentDirectivesPage() { window.open(contextMenu.directive.prUrl, "_blank", "noreferrer"); } }} + onNewDraft={async () => { + await newDirectiveDraft(contextMenu.directive.id); + await refreshList(); + // Send the user into the freshly-cleared contract so they can + // start typing the next iteration immediately. + navigate(`/directives/${contextMenu.directive.id}`); + }} /> )} {contextMenu?.kind === "task" && ( |
