Commit Graph

32 Commits

Author SHA1 Message Date
anders 63f3c0dec8 Add timeout + lower temperature for AI calls 2026-05-27 10:58:12 +02:00
anders b2b454c563 Fix AI edit mode: strip code fences, stronger prompt 2026-05-27 10:55:47 +02:00
anders 0b0f917694 Pin AI chat panel to bottom of editor area 2026-05-27 10:50:43 +02:00
anders 8223e72fe3 AI chat panel with Edit/Chat modes + verify dropdown
- AI chat panel at bottom of editor (all 3 modes)
- Edit mode: AI modifies document directly (no explanations)
- Chat mode: AI answers questions about the document
- Verify dropdown: Spec Review, Grammar & Spelling, Summary
- Enter sends, Shift+Enter for newline
- /api/ai/chat endpoint with edit/chat system prompts
- Grammar and spec verify actions added to /api/ai/generate
2026-05-27 10:44:56 +02:00
anders f46f57eded Auto-save drafts to localStorage
- Drafts saved 1s after last keystroke (debounced)
- 'Draft saved' indicator in toolbar
- On file open: prompts to restore unsaved draft if found
- Draft cleared on successful save (Ctrl+S)
- Works across disconnects/logouts — draft persists in browser
2026-05-27 10:31:47 +02:00
anders b2f3aa39af Fix share dialog overflow, improve shared files UX
- Share dialog max-width respects viewport (no off-screen)
- Shared files show filename + owner + permission level
- Click hint below shared list
- Empty state message when no files shared
- openSharedFile uses owner_id for cross-user read
2026-05-27 10:28:53 +02:00
anders 764a405958 Rename WYSIWYG to Full Page, show format toolbar in Raw/Split 2026-05-27 10:21:53 +02:00
anders ff4b932b42 Remove border-bottom from headings in WYSIWYG 2026-05-27 10:17:28 +02:00
anders 370a206ccb Fix white screen on trash, split nav into two rows 2026-05-27 10:11:26 +02:00
anders 4259760884 Add WYSIWYG toolbar (bold, italic, headings, lists, quote, link, hr) 2026-05-27 08:03:14 +02:00
anders 0dae678c2e Update README and INSTALL with LDAP, collab, and all features 2026-05-27 00:08:54 +02:00
anders 8a7b0e18ed LDAP admin GUI + group filter
- LDAP settings configurable from Admin panel (no restart needed)
- Required group filter: only users in specified group can login
- Supports both memberOf attribute and groupOfNames search
- Settings stored in DB (settings table), env vars as fallback
- SLDAP supported via ldaps:// URL
- Bind password masked in UI
2026-05-27 00:08:00 +02:00
anders f58ac04069 Add LDAP authentication
- LDAP bind + search auth with auto-create local user
- Falls back to local auth if LDAP not configured or fails
- Configurable via MH_LDAP_* environment variables
- Supports ldap:// and ldaps:// with optional TLS skip
- go-ldap/ldap/v3 dependency added
2026-05-27 00:00:12 +02:00
anders bf655c6bc5 Complete remaining TODO: image upload, spinners, drag-to-trash, sort
- Image upload: drag-drop images into editor, stored in .assets/
- Serve images via /api/files/image/ endpoint
- Loading spinner bar in sidebar during file operations
- Sort files by name/date buttons
- Drag files onto Trash button to delete
- All code TODO items complete
2026-05-26 23:56:13 +02:00
anders 68eaee0b9f Complete TODO items: security, features, polish
Security:
- Encrypt Gitea tokens at rest (AES-256-GCM with MH_SECRET)
- Secure cookie flag when behind HTTPS (X-Forwarded-Proto)
- Password complexity (min 8 chars)
- TOTP: defer persist until verified (totp_pending column)
- Audit log table + logging on login/rename/password change

Features:
- Rename files/folders (double-click in tree, /api/files/rename)
- beforeunload warning for unsaved changes
- Mobile hamburger menu
- PWA icons (192px, 512px)
- Max file size enforcement (10MB)
- Shared file read access (cross-user with permission check)

Polish:
- Toast notifications replace all alert() calls
- Keyboard shortcut help overlay (Ctrl+/)
- File rename via double-click in FileTree
2026-05-26 23:51:02 +02:00
anders f60d223c06 Add About page 2026-05-26 23:42:23 +02:00
anders 7b8f9e3050 Add logout button 2026-05-26 23:06:08 +02:00
anders f4000cc675 Add TODO.md with remaining tasks 2026-05-26 22:53:26 +02:00
anders 4f3113199b Security hardening
- JWT: validate signing algorithm (prevent alg confusion)
- Login: rate limiting (10 attempts per 5 min per IP)
- Request body: 10MB size limit (prevent DoS)
- WebSocket: require JWT auth (token query param or cookie)
- Daemon endpoints: require admin role (not just any user)
- io.LimitReader on all request body decoding
2026-05-26 22:51:33 +02:00
anders 2de92b0375 Add INSTALL.md with deployment guide 2026-05-26 22:30:31 +02:00
anders 55a9ae816f Add change password (Preferences > Change Password) 2026-05-25 08:44:15 +02:00
anders ed4d0b261f Real-time collaboration (Yjs + WebSocket)
- Go WebSocket hub: rooms per document, broadcast updates, persist state
- Yjs integration: connect/disconnect, sync document state
- Collab toggle button in toolbar (Solo/Live)
- When Live: edits broadcast to all connected users in real-time
- Yjs state persisted to SQLite (survives server restart)
- gorilla/websocket dependency added
2026-05-22 23:49:12 +02:00
anders 1a77d068a7 PWA offline support + client-side encryption
- Service worker: caches app shell, network-first for HTML
- manifest.json for installable PWA
- IndexedDB: cache files locally, queue pending saves
- Offline fallback: open cached files when server unreachable
- Sync pending changes on reconnect (online event)
- Client-side AES-256-GCM encryption lib (PBKDF2 key derivation)
- Ready for Private Vault feature
2026-05-22 23:36:06 +02:00
anders 35bf1164ee Fix .gitignore: track cmd/ directories, add mdsync + server source 2026-05-22 23:26:08 +02:00
anders 62ab0fb796 CLI tool (mdsync), 2FA setup UI, git remotes UI
- mdsync: login, pull, push, status, list, flag commands
- Preferences: 2FA enable/disable with TOTP code verification
- Preferences: git remotes add/list, push/pull buttons
- Load remotes on login
2026-05-22 23:25:29 +02:00
anders 1433890a4c Add trash: deleted files go to trash, restore or empty 2026-05-22 21:12:29 +02:00
anders 88eebf6944 Drag and drop files between folders 2026-05-22 20:08:09 +02:00
anders a3e4a08281 Allow saving without file open (Save as... prompt) 2026-05-22 20:05:21 +02:00
anders 73144d4ef1 Wire up frontend: git status, history, sharing, AI verify
- Git sync button (green/red indicator) in toolbar
- History panel: view commits, click to restore
- Share dialog: share files with other users by username
- AI Verify button: sends spec to LiteLLM for review
- AI response panel with rendered markdown
- Auto-refresh git status on file open/save
- Watch for history panel open to load commits
2026-05-22 20:02:31 +02:00
anders 60a83d90dd Update README with full documentation 2026-05-22 19:57:20 +02:00
anders 4df87cbf9a Phase 2-6: Git sync, sharing, 2FA, AI integration
- Git: init, commit, log, diff, restore, remotes, push/pull
- Auto-commit on every file save
- Sharing: share/unshare files with other users (ro/rw)
- Shared documents view in sidebar
- 2FA: TOTP setup/verify/disable, enforced at login
- AI: verify spec endpoint (LiteLLM), generate (summarize/prompt/expand)
- Light/dark theme with CSS variables
- File delete (recursive for folders)
- Admin panel + preferences panel
- File creation timestamp display
2026-05-22 19:53:24 +02:00
anders 0c1047d390 Initial commit: Phase 1+2 prototype
- Go backend with SQLite, JWT auth, file CRUD
- Vue 3 frontend with split/raw/WYSIWYG editor modes
- Markdown preview (marked, GFM)
- Formatting toolbar + keyboard shortcuts
- File tree with search, create, delete
- Light/dark theme toggle
- Admin panel (user management)
- Preferences (timezone, theme, default mode)
- Shared documents section (placeholder)
- Export: PDF, HTML, MD
- Build daemon (Python, stdlib only)
- Build job queue API
- Docker deployment
2026-05-22 19:48:48 +02:00