diff options
| author | soryu <soryu@soryu.co> | 2026-04-28 19:12:52 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-04-28 19:12:52 +0100 |
| commit | d1fdfb140cc440664f77a24886172f9976a05a31 (patch) | |
| tree | 454739f80dde60fc6c1cd97acbaef3223ac041c6 /frontend/src/components/document/DocumentSettings.tsx | |
| parent | 636694182fe9381479f2e9062229dda3838c5421 (diff) | |
| download | soryu-d1fdfb140cc440664f77a24886172f9976a05a31.tar.gz soryu-d1fdfb140cc440664f77a24886172f9976a05a31.zip | |
feat: revert broken directive PRs, re-implement Lexical document orchestrator (#98)
* feat: soryu-co/soryu - makima: Revert broken directive PRs and verify clean build
* feat: soryu-co/soryu - makima: Re-implement frontend: Lexical document editor with feature flag and base components
* WIP: heartbeat checkpoint
* feat: soryu-co/soryu - makima: Add contract blocks, expandable log rows, and interaction controls
* WIP: heartbeat checkpoint
* feat: soryu-co/soryu - makima: End-to-end build verification and integration polish
Diffstat (limited to 'frontend/src/components/document/DocumentSettings.tsx')
| -rw-r--r-- | frontend/src/components/document/DocumentSettings.tsx | 76 |
1 files changed, 0 insertions, 76 deletions
diff --git a/frontend/src/components/document/DocumentSettings.tsx b/frontend/src/components/document/DocumentSettings.tsx deleted file mode 100644 index b575b3d..0000000 --- a/frontend/src/components/document/DocumentSettings.tsx +++ /dev/null @@ -1,76 +0,0 @@ -import { useState, useCallback } from 'react' -import { upsertUserSetting } from '../../services/directiveApi' - -interface DocumentSettingsProps { - isOpen: boolean - onClose: () => void - enabled: boolean - onToggle: (enabled: boolean) => void -} - -export default function DocumentSettings({ - isOpen, - onClose, - enabled, - onToggle, -}: DocumentSettingsProps) { - const [saving, setSaving] = useState(false) - - const handleToggle = useCallback(async () => { - const newValue = !enabled - setSaving(true) - try { - // Update localStorage immediately for instant UI response - localStorage.setItem('document_ui_enabled', JSON.stringify(newValue)) - onToggle(newValue) - - // Persist to backend - await upsertUserSetting('document_ui_enabled', newValue) - } catch (err) { - console.error('Failed to save document UI setting:', err) - // Revert on failure - localStorage.setItem('document_ui_enabled', JSON.stringify(!newValue)) - onToggle(!newValue) - } finally { - setSaving(false) - } - }, [enabled, onToggle]) - - if (!isOpen) return null - - return ( - <div className="modal-overlay" onClick={onClose}> - <div className="config-modal" onClick={(e) => e.stopPropagation()}> - <div className="modal-header"> - <h2>Document UI Settings</h2> - <button className="close-btn" onClick={onClose}>{'\u00D7'}</button> - </div> - - <div className="modal-content"> - <div className="config-option"> - <label className="config-label" style={{ cursor: 'pointer' }}> - <input - type="checkbox" - checked={enabled} - onChange={handleToggle} - disabled={saving} - className="config-checkbox" - /> - <span className="config-text"> - Enable Document UI (Experimental) - </span> - </label> - <div className="config-description"> - Replace the directive management interface with an interactive - document editor. This is a proof of concept. - </div> - </div> - </div> - - <div className="modal-footer"> - <button className="modal-btn" onClick={onClose}>Close</button> - </div> - </div> - </div> - ) -} |
