From c8b169da8cb7eae0957e0ab5e7370b071093a224 Mon Sep 17 00:00:00 2001 From: soryu Date: Tue, 28 Apr 2026 00:18:40 +0100 Subject: feat: Document UI for directive orchestration with Lexical editor (#93) * WIP: heartbeat checkpoint * feat: soryu-co/soryu - makima: Save previous goal on update and include history in re-planning prompt * feat: soryu-co/soryu - makima: Install Lexical and create base document editor component * feat: soryu-co/soryu - makima: Create directive file system sidebar and document layout * feat: soryu-co/soryu - makima: Create custom Lexical step diagram block * feat: soryu-co/soryu - makima: Add context menu and goal auto-update integration * WIP: heartbeat checkpoint --- frontend/src/stores/index.ts | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'frontend/src/stores') diff --git a/frontend/src/stores/index.ts b/frontend/src/stores/index.ts index 58f461c..5ee9b08 100644 --- a/frontend/src/stores/index.ts +++ b/frontend/src/stores/index.ts @@ -36,6 +36,29 @@ export const skipIntroStore = atom( })() ) +// Document UI feature flag +export const documentUiEnabledStore = atom( + (() => { + try { + const saved = localStorage.getItem('document_ui_enabled') + return saved === 'true' + } catch { + return false + } + })() +) + +export const setDocumentUiEnabled = (enabled: boolean) => { + documentUiEnabledStore.set(enabled) + localStorage.setItem('document_ui_enabled', JSON.stringify(enabled)) + // Persist to backend (fire-and-forget) + fetch('/api/v1/settings', { + method: 'PUT', + headers: { 'Content-Type': 'application/json' }, + body: JSON.stringify({ key: 'document_ui_enabled', value: enabled }), + }).catch((err) => console.error('Failed to persist document_ui_enabled:', err)) +} + // Actions export const login = () => { isLoggedInStore.set(true) -- cgit v1.2.3