summaryrefslogtreecommitdiff
path: root/makima/frontend/src/components
diff options
context:
space:
mode:
Diffstat (limited to 'makima/frontend/src/components')
-rw-r--r--makima/frontend/src/components/NavStrip.tsx35
-rw-r--r--makima/frontend/src/components/directives/DocumentEditor.tsx8
2 files changed, 25 insertions, 18 deletions
diff --git a/makima/frontend/src/components/NavStrip.tsx b/makima/frontend/src/components/NavStrip.tsx
index a6e483d..6fe4ba9 100644
--- a/makima/frontend/src/components/NavStrip.tsx
+++ b/makima/frontend/src/components/NavStrip.tsx
@@ -62,20 +62,27 @@ export function NavStrip() {
<div className="flex flex-wrap gap-2 items-center flex-1">
{NAV_LINKS.filter(
(link) => !(documentMode && link.hideInDocumentMode),
- ).map((link) => (
- <span key={link.label} className="relative inline-flex items-center">
- <RewriteLink
- to={link.href}
- disabled={link.requiresAuth && !hasAccess}
- external={link.external}
- >
- {link.label}
- </RewriteLink>
- {link.label === "Directives" && directiveQuestionCount > 0 && (
- <span className="ml-0.5 inline-block w-2 h-2 rounded-full bg-amber-400 animate-pulse" title={`${directiveQuestionCount} pending question(s)`} />
- )}
- </span>
- ))}
+ ).map((link) => {
+ // In document mode, the directive concept is surfaced to the user
+ // as "Contracts" — keep the same href (/directives) so existing
+ // links and bookmarks continue to work.
+ const displayLabel =
+ documentMode && link.label === "Directives" ? "Contracts" : link.label;
+ return (
+ <span key={link.label} className="relative inline-flex items-center">
+ <RewriteLink
+ to={link.href}
+ disabled={link.requiresAuth && !hasAccess}
+ external={link.external}
+ >
+ {displayLabel}
+ </RewriteLink>
+ {link.label === "Directives" && directiveQuestionCount > 0 && (
+ <span className="ml-0.5 inline-block w-2 h-2 rounded-full bg-amber-400 animate-pulse" title={`${directiveQuestionCount} pending question(s)`} />
+ )}
+ </span>
+ );
+ })}
</div>
<div className="flex items-center gap-2 pl-2.5 border-l border-[rgba(117,170,252,0.35)]">
{isAuthenticated && isAuthConfigured ? (
diff --git a/makima/frontend/src/components/directives/DocumentEditor.tsx b/makima/frontend/src/components/directives/DocumentEditor.tsx
index 3dd8522..08e4d73 100644
--- a/makima/frontend/src/components/directives/DocumentEditor.tsx
+++ b/makima/frontend/src/components/directives/DocumentEditor.tsx
@@ -638,7 +638,7 @@ function EditorContextMenu({
style={{ left: x, top: y }}
>
<div className="px-3 py-1.5 text-[10px] font-mono text-[#556677] uppercase border-b border-[rgba(117,170,252,0.2)]">
- Document
+ Contract
</div>
<button
type="button"
@@ -727,7 +727,7 @@ function SaveCountdownBar({
}
} else if (state === "dirty") {
label = orchestratorRunning
- ? "Unsaved changes — saving will replan the directive."
+ ? "Unsaved changes — saving will replan the contract."
: "Unsaved changes.";
progressPct = 0;
} else if (state === "saving") {
@@ -1129,10 +1129,10 @@ export function DocumentEditor({
<RichTextPlugin
contentEditable={
<ContentEditable
- aria-placeholder="Describe the directive's goal…"
+ aria-placeholder="Describe the contract's goal…"
placeholder={
<div className="pointer-events-none absolute text-[#445566] font-mono text-[13px] mt-2">
- Describe the directive's goal…
+ Describe the contract's goal…
</div>
}
className="outline-none font-mono text-[13px] leading-relaxed text-[#dbe7ff] [&_.makima-doc-h1]:text-[24px] [&_.makima-doc-h1]:font-medium [&_.makima-doc-h1]:text-white [&_.makima-doc-h1]:mb-3 [&_.makima-doc-h1]:tracking-tight [&_.makima-doc-paragraph]:my-2 [&_.makima-doc-paragraph]:text-[13px] [&_.makima-doc-paragraph]:text-[#c0d0e0] relative"