summaryrefslogtreecommitdiff
path: root/frontend/src/stores
diff options
context:
space:
mode:
authorsoryu <soryu@soryu.co>2026-04-28 00:18:40 +0100
committerGitHub <noreply@github.com>2026-04-28 00:18:40 +0100
commitc8b169da8cb7eae0957e0ab5e7370b071093a224 (patch)
treec3f9720a8acfe863ac0b65df9439abf9a941323a /frontend/src/stores
parent3679ceb3325033faa2f889ef3dfee5668ef7aeea (diff)
downloadsoryu-c8b169da8cb7eae0957e0ab5e7370b071093a224.tar.gz
soryu-c8b169da8cb7eae0957e0ab5e7370b071093a224.zip
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
Diffstat (limited to 'frontend/src/stores')
-rw-r--r--frontend/src/stores/index.ts23
1 files changed, 23 insertions, 0 deletions
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<boolean>(
})()
)
+// Document UI feature flag
+export const documentUiEnabledStore = atom<boolean>(
+ (() => {
+ 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)