From 36f65f294ce33325a9eea9b7a8629706a4def721 Mon Sep 17 00:00:00 2001 From: soryu Date: Thu, 30 Apr 2026 17:06:31 +0100 Subject: feat(doc-mode): rename surfaced label "Directive" → "Contract" (#109) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Stage 2: cosmetic UI rename only. Database tables, API paths, hook names, and CLI commands all stay as 'directive' for now — we'll phase out the existing standalone /contracts table later. Surface changes: - Sidebar header "Documents" → "Contracts"; root folder "directives/" → "contracts/"; empty state "No directives yet" → "No contracts yet". - Editor placeholders, breadcrumb header, "back to document" → "back to contract", right-click menu header. - NavStrip: when documentModeEnabled is on, the "Directives" link renders as "Contracts" (href stays /directives so links don't break). - Save bar message "saving will replan the directive" → "the contract". No backend changes — directive.goal etc. all still work the same. Co-authored-by: Claude Opus 4.7 (1M context) --- makima/frontend/src/components/NavStrip.tsx | 35 +++++++++++++++++------------ 1 file changed, 21 insertions(+), 14 deletions(-) (limited to 'makima/frontend/src/components/NavStrip.tsx') 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() {
{NAV_LINKS.filter( (link) => !(documentMode && link.hideInDocumentMode), - ).map((link) => ( - - - {link.label} - - {link.label === "Directives" && directiveQuestionCount > 0 && ( - - )} - - ))} + ).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 ( + + + {displayLabel} + + {link.label === "Directives" && directiveQuestionCount > 0 && ( + + )} + + ); + })}
{isAuthenticated && isAuthConfigured ? ( -- cgit v1.2.3