diff --git a/docs/API.md b/docs/API.md index da865b5e..46282c01 100644 --- a/docs/API.md +++ b/docs/API.md @@ -1,6 +1,6 @@ # Scribe API Reference -> Complete reference for Scribe's Tauri IPC commands +> Complete reference for Scribe's Tauri IPC commands (v1.20.0) --- @@ -490,6 +490,110 @@ Export all notes to Obsidian-compatible markdown files. --- +## Project Commands + +### list_projects + +List all projects. + +**Returns:** `Project[]` + +--- + +### create_project + +Create a new project. + +**Parameters:** +| Name | Type | Required | Description | +|------|------|----------|-------------| +| `project.name` | string | Yes | Project name | +| `project.type` | string | Yes | Project type (research, teaching, r-package, r-dev, generic) | +| `project.color` | string | No | Hex color code | + +**Returns:** `Project` + +--- + +### update_project + +Update an existing project. + +**Parameters:** +| Name | Type | Required | Description | +|------|------|----------|-------------| +| `id` | string | Yes | Project UUID | +| `updates` | object | Yes | Fields to update | + +**Returns:** `Project` + +--- + +### delete_project + +Delete a project. + +**Parameters:** +| Name | Type | Required | Description | +|------|------|----------|-------------| +| `id` | string | Yes | Project UUID | + +**Returns:** `boolean` + +--- + +## Terminal Commands + +### spawn_shell + +Spawn a PTY shell process. + +**Returns:** `string` (PTY ID) + +--- + +### write_to_shell + +Write input to a shell process. + +**Parameters:** +| Name | Type | Required | Description | +|------|------|----------|-------------| +| `pty_id` | string | Yes | PTY identifier | +| `data` | string | Yes | Input data | + +**Returns:** `void` + +--- + +### resize_shell + +Resize a terminal. + +**Parameters:** +| Name | Type | Required | Description | +|------|------|----------|-------------| +| `pty_id` | string | Yes | PTY identifier | +| `cols` | number | Yes | Column count | +| `rows` | number | Yes | Row count | + +**Returns:** `void` + +--- + +### kill_shell + +Kill a shell process. + +**Parameters:** +| Name | Type | Required | Description | +|------|------|----------|-------------| +| `pty_id` | string | Yes | PTY identifier | + +**Returns:** `void` + +--- + ## Error Handling All commands return `Result` in Rust. On error, a descriptive string is thrown: diff --git a/docs/ARCHITECTURE.md b/docs/ARCHITECTURE.md index 1f8abc66..bb902653 100644 --- a/docs/ARCHITECTURE.md +++ b/docs/ARCHITECTURE.md @@ -61,20 +61,22 @@ graph TB graph TD App[App.tsx] - subgraph "Navigation" - Ribbon[Ribbon] - CommandPalette[CommandPalette] + subgraph "Left Sidebar" + MissionSidebar[MissionSidebar] + IconBar[IconBar] + ExpandedPanel[ExpandedIconPanel] end - subgraph "Left Sidebar" - FileList[File List] - SearchBar[SearchBar] - TagFilter[TagFilter] + subgraph "Navigation" + KSH[KeyboardShortcutHandler] + CommandPalette[CommandPalette] + EditorTabs[EditorTabs] end subgraph "Main Editor" - EmptyState[EmptyState] + EditorOrch[EditorOrchestrator] HybridEditor[HybridEditor] + CodeMirror[CodeMirrorEditor] WikiLink[WikiLinkAutocomplete] TagAuto[TagAutocomplete] Citation[CitationAutocomplete] @@ -84,24 +86,39 @@ graph TD PropertiesPanel[PropertiesPanel] BacklinksPanel[BacklinksPanel] TagsPanel[TagsPanel] + StatsPanel[StatsPanel] + ClaudePanel[ClaudePanel] + TerminalPanel[TerminalPanel] + end + + subgraph "Status Bar" + PomodoroTimer[PomodoroTimer] + WritingProgress[WritingProgress] end subgraph "Modals" SettingsModal[SettingsModal] ExportDialog[ExportDialog] + GraphView[GraphView / D3] + QuickCapture[QuickCaptureOverlay] + CreateProject[CreateProjectModal] end - App --> Ribbon + App --> MissionSidebar + MissionSidebar --> IconBar + MissionSidebar --> ExpandedPanel + App --> KSH App --> CommandPalette - App --> FileList - App --> HybridEditor - App --> EmptyState - App --> PropertiesPanel - App --> SettingsModal - + App --> EditorTabs + App --> EditorOrch + EditorOrch --> HybridEditor + HybridEditor --> CodeMirror HybridEditor --> WikiLink HybridEditor --> TagAuto HybridEditor --> Citation + App --> PropertiesPanel + App --> SettingsModal + App --> PomodoroTimer ``` --- @@ -177,11 +194,24 @@ erDiagram TEXT title TEXT content TEXT folder + TEXT project_id FK INTEGER created_at INTEGER updated_at INTEGER deleted_at } + PROJECTS { + TEXT id PK + TEXT name + TEXT description + TEXT type + TEXT color + TEXT icon + TEXT settings + INTEGER created_at + INTEGER updated_at + } + TAGS { TEXT id PK TEXT name UK @@ -207,6 +237,7 @@ erDiagram INTEGER sort_order } + PROJECTS ||--o{ NOTES : contains NOTES ||--o{ NOTE_TAGS : has TAGS ||--o{ NOTE_TAGS : has NOTES ||--o{ LINKS : "links from" @@ -221,69 +252,76 @@ erDiagram ``` scribe/ ├── src/ -│ ├── main/ # Electron main (not used - Tauri) │ └── renderer/ │ └── src/ -│ ├── App.tsx # Main application component -│ ├── main.tsx # React entry point -│ ├── index.css # Global styles + Tailwind +│ ├── App.tsx # Main application component +│ ├── main.tsx # React entry point +│ ├── index.css # Global styles + Tailwind │ │ │ ├── components/ -│ │ ├── HybridEditor.tsx # Main editor component -│ │ ├── EmptyState.tsx # Empty state with quotes -│ │ ├── Ribbon.tsx # Left icon bar -│ │ ├── CommandPalette.tsx # ⌘K command palette -│ │ ├── SettingsModal.tsx # Settings dialog -│ │ ├── SearchBar.tsx # Note search -│ │ ├── TagFilter.tsx # Tag filtering UI -│ │ ├── TagsPanel.tsx # Right sidebar tags -│ │ ├── PropertiesPanel.tsx # Note properties -│ │ ├── BacklinksPanel.tsx # Backlinks display -│ │ ├── ExportDialog.tsx # Pandoc export -│ │ ├── MathRenderer.tsx # KaTeX math rendering -│ │ ├── SimpleWikiLinkAutocomplete.tsx -│ │ ├── SimpleTagAutocomplete.tsx -│ │ └── CitationAutocomplete.tsx +│ │ ├── sidebar/ # MissionSidebar system +│ │ │ ├── MissionSidebar.tsx +│ │ │ ├── IconBar.tsx +│ │ │ ├── ExpandedIconPanel.tsx +│ │ │ ├── SmartIconButton.tsx +│ │ │ ├── ActivityBar.tsx +│ │ │ └── ... # 25+ sidebar components +│ │ ├── EditorTabs/ # Tab management +│ │ │ └── EditorTabs.tsx +│ │ ├── Settings/ # Settings subsystem +│ │ │ ├── SettingsModal.tsx +│ │ │ ├── GeneralSettingsTab.tsx +│ │ │ ├── EditorSettingsTab.tsx +│ │ │ └── ... # 12 settings components +│ │ ├── HybridEditor.tsx +│ │ ├── CodeMirrorEditor.tsx +│ │ ├── EditorOrchestrator.tsx +│ │ ├── KeyboardShortcutHandler.tsx +│ │ ├── CommandPalette.tsx +│ │ ├── PomodoroTimer.tsx +│ │ ├── GraphView.tsx +│ │ ├── TerminalPanel.tsx +│ │ ├── ClaudePanel.tsx +│ │ └── ... # 50+ components total │ │ │ ├── hooks/ -│ │ └── usePreferences.ts # Cached prefs hook (event sync) +│ │ ├── usePreferences.ts +│ │ ├── useIconGlowEffect.ts +│ │ └── useForestTheme.ts │ │ │ ├── lib/ -│ │ ├── api.ts # Tauri IPC wrapper -│ │ ├── preferences.ts # localStorage preferences R/W -│ │ ├── shortcuts.ts # SHORTCUTS registry + matcher -│ │ ├── themes.ts # Theme definitions -│ │ └── mathjax.ts # KaTeX processing +│ │ ├── api.ts # API factory (Tauri/Browser) +│ │ ├── browser-api.ts # Browser-mode IndexedDB API +│ │ ├── browser-db.ts # IndexedDB schema +│ │ ├── preferences.ts # localStorage preferences R/W +│ │ ├── shortcuts.ts # SHORTCUTS registry + matcher +│ │ ├── themes.ts # Theme definitions +│ │ ├── quarto-completions.ts # Quarto/LaTeX completions +│ │ ├── settingsSchema.ts # Settings validation +│ │ └── ... │ │ -│ ├── store/ -│ │ └── useNotesStore.ts # Zustand state +│ ├── store/ # Zustand stores (singular) +│ │ ├── useNotesStore.ts +│ │ ├── useProjectStore.ts +│ │ ├── useAppViewStore.ts +│ │ ├── usePomodoroStore.ts +│ │ └── useSettingsStore.ts │ │ -│ ├── types/ -│ │ └── index.ts # TypeScript interfaces -│ │ -│ └── utils/ -│ ├── search.ts # Search utilities -│ └── sanitize.ts # HTML sanitization +│ └── __tests__/ # 76 test files, 2280+ tests │ ├── src-tauri/ │ └── src/ -│ ├── main.rs # Tauri entry point -│ ├── lib.rs # Tauri setup + command registration -│ ├── commands.rs # IPC command handlers -│ ├── database.rs # SQLite operations -│ └── academic.rs # Citations + Pandoc export -│ -├── docs/ -│ ├── API.md # API reference -│ ├── ARCHITECTURE.md # This file -│ └── planning/ -│ ├── SPRINT-12-UI-POLISH.md -│ └── SPRINT-13-PROJECT-SYSTEM.md +│ ├── main.rs # Tauri entry point +│ ├── lib.rs # Tauri setup + command registration +│ ├── commands.rs # IPC command handlers +│ ├── database.rs # SQLite operations +│ ├── database/ # Database modules +│ ├── academic.rs # Citations + Pandoc export +│ └── terminal.rs # PTY terminal backend │ -├── .STATUS # Project status -├── CLAUDE.md # AI assistant guidance -├── PROJECT-DEFINITION.md # Scope control -└── PROPOSAL-UI-IMPROVEMENTS.md # UI improvement plan +├── docs/ # Documentation site (mkdocs) +├── .STATUS # Project status +└── CLAUDE.md # AI assistant guidance ``` --- @@ -297,8 +335,10 @@ scribe/ | **Styling** | Tailwind CSS | Utility-first CSS | | **State** | Zustand | Lightweight state management | | **Database** | SQLite (rusqlite) | Local persistence | -| **Editor** | HybridEditor++ | Custom contenteditable + markdown | +| **Editor** | CodeMirror 6 | Source editor with extensions | | **Math** | KaTeX | LaTeX rendering | +| **Terminal** | xterm.js | Embedded terminal emulator | +| **Graph** | D3.js | Knowledge graph visualization | | **AI** | Claude/Gemini CLI | AI assistance (no API keys) | | **Export** | Pandoc | Document conversion | | **Citations** | BibTeX/Zotero | Bibliography management | @@ -322,17 +362,17 @@ scribe/ --- -### 2. HybridEditor++ (Custom Editor) +### 2. CodeMirror 6 Editor -**Decision:** Build custom editor instead of using BlockNote/TipTap. +**Decision:** Use CodeMirror 6 for source editing with custom extensions. **Rationale:** - Full control over markdown handling -- Better wiki-link `[[...]]` support -- Lighter weight than full rich-text editors -- ADHD-optimized: minimal distractions +- Extensible via CodeMirror's extension API +- Better wiki-link `[[...]]` and LaTeX support via custom completions +- Three modes: Source (CodeMirror), Live Preview (split), Reading (rendered) -**Trade-off:** More maintenance, less features. +**Trade-off:** More maintenance than drop-in editors, but full control over academic workflows. --- @@ -384,30 +424,16 @@ scribe/ --- -## Future Architecture - -### Sprint 13: Project System - -```mermaid -graph TD - Projects[Projects Table] - Notes[Notes Table] - Settings[Project Settings] - - Projects --> Notes - Projects --> Settings - - Note[Per-project themes, fonts, bibliography] -``` +## State Management -### Sprint 15: Search + Goals +Scribe uses five Zustand stores, all in `src/renderer/src/store/`: -```mermaid -graph TD - Goals[Writing Goals] - Stats[Statistics] - Calendar[Streak Calendar] +| Store | Responsibility | +|-------|----------------| +| `useNotesStore` | Notes CRUD, selected note, search | +| `useProjectStore` | Projects list, current project | +| `useAppViewStore` | Sidebar state, tabs, pinned vaults | +| `usePomodoroStore` | Pomodoro timer state machine | +| `useSettingsStore` | App settings, quick actions | - Goals --> Stats - Stats --> Calendar -``` +Stores communicate with the database exclusively through the API layer (`api.ts`). Stores do not call Tauri IPC or IndexedDB directly. diff --git a/docs/COMPONENTS.md b/docs/COMPONENTS.md index 2b8062bc..e731b783 100644 --- a/docs/COMPONENTS.md +++ b/docs/COMPONENTS.md @@ -1,6 +1,8 @@ # Scribe Component Reference -> React component documentation +> React component documentation — v1.20.0 +> +> **Last Updated:** 2026-02-24 --- @@ -14,21 +16,12 @@ Main application component. Manages: - Focus mode - Keyboard shortcuts (delegated to `KeyboardShortcutHandler`) - User preferences via `usePreferences()` hook +- Pomodoro timer integration +- Tab management -**Key State:** -```typescript -selectedNoteId: string | null -focusMode: boolean -leftSidebarCollapsed: boolean -rightSidebarCollapsed: boolean -editorMode: 'write' | 'preview' -``` +**Key State:** Managed via Zustand stores (`useNotesStore`, `useAppViewStore`, `useProjectStore`, `usePomodoroStore`, `useSettingsStore`). -**Keyboard Handlers:** -- `⌘N` → Create new note -- `⌘D` → Open daily note -- `⌘⇧F` → Toggle focus mode -- `⌘K` → Open command palette +**Keyboard Handlers:** Delegated to `KeyboardShortcutHandler.tsx` — 27 registered shortcuts. --- @@ -119,59 +112,49 @@ interface CommandPaletteProps { --- -### Ribbon.tsx +### MissionSidebar (sidebar/) -Left icon bar with navigation buttons. - -**Props:** -```typescript -interface RibbonProps { - onToggleLeft: () => void - onToggleRight: () => void - onSearch: () => void - onSettings: () => void - leftCollapsed: boolean - rightCollapsed: boolean -} -``` +Icon-centric sidebar system introduced in v1.16. Replaces the original Ribbon. -**Icons:** -- Files (toggle left sidebar) -- Search -- Tags (toggle right sidebar) -- Stats -- Settings +**Structure:** +- `MissionSidebar.tsx` — Container orchestrating IconBar + ExpandedIconPanel +- `IconBar.tsx` — 48px icon column (always visible): pinned vaults, smart icons, system icons +- `ExpandedIconPanel.tsx` — Collapsible panel showing note list, search, graph preview +- `SmartIconButton.tsx` — Typed project shortcut icons (`⌘⇧1`–`⌘⇧4`) +- `ActivityBar.tsx` — Activity indicator dots +- `StatusDot.tsx` — Project status indicators +- `InboxButton.tsx` — Quick inbox access +- `ProjectAvatar.tsx` — Project type icon rendering +- `CompactListView.tsx` / `CardGridView.tsx` — Two note list display styles -**Features:** -- CSS tooltips on hover -- Keyboard shortcut hints -- Active state highlighting +**25+ components** in `src/renderer/src/components/sidebar/` -**File:** `src/renderer/src/components/Ribbon.tsx` +**File:** `src/renderer/src/components/sidebar/MissionSidebar.tsx` --- -### SettingsModal.tsx +### SettingsModal (Settings/) -Application settings dialog. +Application settings dialog with 12 sub-components. **Tabs:** -1. **General** - App settings -2. **Editor** - Font, size, line height -3. **Appearance** - Themes, custom creator - -**Theme System:** -- 10 built-in themes (5 dark, 5 light) -- Custom theme creator with live preview -- Import/export (JSON, Base16 YAML, URL) -- Keyboard shortcuts (⌘Alt+0-9) - -**Font System:** -- 14 ADHD-friendly font recommendations -- One-click Homebrew installation -- Font preview - -**File:** `src/renderer/src/components/SettingsModal.tsx` +1. **General** — App settings, Pomodoro timer config, writing goals +2. **Editor** — Font, size, line height, editor mode +3. **Appearance** — Themes (10 built-in), custom CSS, auto-theme, icon glow, UI style + +**Key Sub-components:** +- `GeneralSettingsTab.tsx` — General preferences + Pomodoro settings +- `EditorSettingsTab.tsx` — Editor preferences +- `ThemeGallery.tsx` — Visual theme browser +- `PinnedVaultsSettings.tsx` — Manage pinned sidebar vaults +- `QuickActionsSettings.tsx` — Configure AI quick actions +- `ProjectTemplates.tsx` — Project type templates +- `SettingsToggle.tsx` — Reusable toggle switch (WCAG accessible) +- `SettingsSection.tsx` — Consistent section wrapper +- `ContextualHint.tsx` — Inline settings guidance + +**File:** `src/renderer/src/components/SettingsModal.tsx` (prop-based, used by App.tsx) +**Unused:** `src/renderer/src/components/Settings/SettingsModal.tsx` (store-based, not imported) --- @@ -477,17 +460,33 @@ Search results display. --- -## Testing +## Additional Components (v1.16+) + +| Component | Purpose | +|-----------|---------| +| `EditorOrchestrator.tsx` | Routes to correct editor mode (source/live/reading) | +| `EditorTabs/EditorTabs.tsx` | Tab bar with pin, reorder, close, reopen | +| `PomodoroTimer.tsx` | Status bar Pomodoro timer (v1.19) | +| `GraphView.tsx` | D3 force-directed knowledge graph | +| `TerminalPanel.tsx` | Embedded xterm.js terminal | +| `ClaudePanel.tsx` / `ClaudeChatPanel.tsx` | AI chat integration | +| `QuickCaptureOverlay.tsx` | `⌘⇧C` quick note capture modal | +| `CreateProjectModal.tsx` | New project creation dialog | +| `EditProjectModal.tsx` | Project editing dialog | +| `ProjectsPanel.tsx` | Project management view | +| `WritingProgress.tsx` | Word count goal progress | +| `StreakDisplay.tsx` | Writing streak visualization | +| `QuickActions.tsx` | AI quick action commands | +| `SearchPanel.tsx` | Full search interface | +| `DashboardShell.tsx` | Dashboard layout container | +| `Toast.tsx` | Notification toasts | +| `IconPicker.tsx` | Icon selection UI | + +--- -All components have corresponding test files in `src/renderer/src/__tests__/`: +## Testing -| Component | Test File | Tests | -|-----------|-----------|-------| -| HybridEditor | HybridEditor.test.tsx | 37 | -| CommandPalette | CommandPalette.test.tsx | 24 | -| Tags | Tags.test.tsx | 52 | -| Components | Components.test.tsx | 16 | -| Integration | Integration.test.tsx | 32 | +76 test files with 2,280+ tests (Vitest + Testing Library + happy-dom). **Run tests:** ```bash diff --git a/docs/RELEASE.md b/docs/RELEASE.md index 7c815c2f..a4f0dd55 100644 --- a/docs/RELEASE.md +++ b/docs/RELEASE.md @@ -1,6 +1,6 @@ # Scribe Release Process -## Version: 0.4.0-alpha.1 +## Current Version: v1.20.0 This document describes the release process for Scribe. @@ -9,21 +9,22 @@ This document describes the release process for Scribe. ## Quick Release Checklist ```bash -# 1. Update version in all files +# 1. Update version in ALL files (they drift!) # - package.json # - src-tauri/Cargo.toml # - src-tauri/tauri.conf.json # - .STATUS +# Verify: grep for the old version across the entire repo # 2. Run tests npm test # 3. Build release -./scripts/build-release.sh +npm run tauri build # 4. Create GitHub release and upload DMG -# 5. Update Homebrew tap with SHA256 +# 5. Update Homebrew tap with SHA256 from CHECKSUMS.txt ``` --- @@ -42,10 +43,10 @@ src-tauri/target/release/bundle/ ### Current Build -- **Version**: 0.4.0-alpha.1 +- **Version**: v1.20.0 - **Architecture**: aarch64 (Apple Silicon) - **DMG Size**: ~5.5 MB -- **SHA256**: `a25e44a2ad3ff2b2659171d22693e593a7f70ccfb226d1f16eab23166d6571cf` +- **SHA256**: See `CHECKSUMS.txt` in the GitHub release assets --- @@ -104,14 +105,14 @@ Before releasing: 1. Create tag: ```bash - git tag v0.4.0-alpha.1 - git push origin v0.4.0-alpha.1 + git tag vX.Y.Z + git push origin vX.Y.Z ``` 2. Create release on GitHub: - Go to Releases → Draft a new release - - Select tag: `v0.4.0-alpha.1` - - Title: `Scribe v0.4.0-alpha.1` + - Select tag: `vX.Y.Z` + - Title: `Scribe vX.Y.Z` - Mark as pre-release - Upload DMG files @@ -119,7 +120,7 @@ Before releasing: ```bash cd ~/projects/dev-tools/homebrew-tap # Update Casks/scribe.rb with new SHA256 - git commit -am "Update Scribe to v0.4.0-alpha.1" + git commit -am "Update Scribe to vX.Y.Z" git push ``` @@ -128,8 +129,8 @@ Before releasing: Push a tag to trigger automated release: ```bash -git tag v0.4.0-alpha.1 -git push origin v0.4.0-alpha.1 +git tag vX.Y.Z +git push origin vX.Y.Z ``` The workflow will: @@ -144,10 +145,10 @@ The workflow will: | Type | Format | Example | |------|--------|---------| -| Alpha | `X.Y.Z-alpha.N` | `0.4.0-alpha.1` | -| Beta | `X.Y.Z-beta.N` | `0.4.0-beta.1` | -| Release Candidate | `X.Y.Z-rc.N` | `0.4.0-rc.1` | -| Stable | `X.Y.Z` | `0.4.0` | +| Stable | `X.Y.Z` | `1.20.0` | +| Patch | `X.Y.Z` | `1.20.1` | +| Minor | `X.Y.0` | `1.21.0` | +| Major | `X.0.0` | `2.0.0` | --- diff --git a/docs/SCRIBE-DOCUMENTATION.md b/docs/SCRIBE-DOCUMENTATION.md index 4e419791..c7bd49cc 100644 --- a/docs/SCRIBE-DOCUMENTATION.md +++ b/docs/SCRIBE-DOCUMENTATION.md @@ -1,8 +1,7 @@ # Scribe — Comprehensive Technical Documentation -**Version:** 1.19.1 (Settings Infrastructure) +**Version:** 1.20.0 **Last Updated:** 2026-02-24 -**Branch:** dev --- @@ -836,7 +835,7 @@ The `api` object is the single interface between the UI and the database. All me ### Project Structure ``` -pomodoro/ (worktree root = project root) +scribe/ (project root) ├── src/ │ ├── main.ts (Tauri main process entry) │ └── renderer/ @@ -975,16 +974,15 @@ Stores should not import from other stores directly. If cross-store coordination - **Props flow:** Pass props down through `App.tsx → EditorOrchestrator → HybridEditor → children`; do not skip levels - **Store access:** Access stores via hooks in components; do not call store methods from other stores -### Implementation Stats (v1.19 Pomodoro Release) +### Current Stats (v1.20.0) -| Metric | Before | After | -|--------|--------|-------| -| Total tests | 2190 | 2252 | -| New tests | — | 62 (35 store + 27 component) | -| Test files | — | 73 | -| New production files | — | 4 | -| Modified production files | — | 9 | -| Lines of production code added | — | 209 | +| Metric | Value | +|--------|-------| +| Total tests | 2,280+ | +| Test files | 76 | +| Components | 50+ | +| Zustand stores | 5 | +| Keyboard shortcuts | 27 | --- @@ -1006,10 +1004,13 @@ Stores should not import from other stores directly. If cross-store coordination | Version | Notable Changes | |---------|----------------| +| v1.20 | Release cleanup, documentation overhaul | | v1.19 | Pomodoro Timer (status bar, state machine, configurable, auto-save); new projects auto-pinned to sidebar | +| v1.17 | Three-tab sidebar state architecture | | v1.16 | Icon-centric sidebar redesign; pinned vaults; smart icons | +| v1.15 | Quarto enhancements, LaTeX completions | | Earlier | Knowledge graph (D3), AI integration (Claude + Gemini), terminal (xterm.js), academic citations (BibTeX) | --- -*This document is the authoritative technical reference for Scribe. For questions not covered here, see the source code in `/Users/dt/.git-worktrees/scribe/pomodoro/src/renderer/src/`.* +*This document is the authoritative technical reference for Scribe. For questions not covered here, see the source code in `src/renderer/src/`.* diff --git a/docs/planning/BUG-REPORT-E2E-TITLE-MISMATCH.md b/docs/archive/completed-2026-02/BUG-REPORT-E2E-TITLE-MISMATCH.md similarity index 100% rename from docs/planning/BUG-REPORT-E2E-TITLE-MISMATCH.md rename to docs/archive/completed-2026-02/BUG-REPORT-E2E-TITLE-MISMATCH.md diff --git a/docs/GIT-WORKFLOW.md b/docs/archive/completed-2026-02/GIT-WORKFLOW.md similarity index 100% rename from docs/GIT-WORKFLOW.md rename to docs/archive/completed-2026-02/GIT-WORKFLOW.md diff --git a/docs/HMR-TROUBLESHOOTING.md b/docs/archive/completed-2026-02/HMR-TROUBLESHOOTING.md similarity index 100% rename from docs/HMR-TROUBLESHOOTING.md rename to docs/archive/completed-2026-02/HMR-TROUBLESHOOTING.md diff --git a/docs/planning/IMPLEMENTATION-STATUS-2026-01-08.md b/docs/archive/completed-2026-02/IMPLEMENTATION-STATUS-2026-01-08.md similarity index 100% rename from docs/planning/IMPLEMENTATION-STATUS-2026-01-08.md rename to docs/archive/completed-2026-02/IMPLEMENTATION-STATUS-2026-01-08.md diff --git a/docs/INLINE-SEARCH.md b/docs/archive/completed-2026-02/INLINE-SEARCH.md similarity index 100% rename from docs/INLINE-SEARCH.md rename to docs/archive/completed-2026-02/INLINE-SEARCH.md diff --git a/docs/development/KEYBOARD-NAVIGATION.md b/docs/archive/completed-2026-02/KEYBOARD-NAVIGATION.md similarity index 100% rename from docs/development/KEYBOARD-NAVIGATION.md rename to docs/archive/completed-2026-02/KEYBOARD-NAVIGATION.md diff --git a/docs/MISSION-SIDEBAR-SUMMARY.md b/docs/archive/completed-2026-02/MISSION-SIDEBAR-SUMMARY.md similarity index 100% rename from docs/MISSION-SIDEBAR-SUMMARY.md rename to docs/archive/completed-2026-02/MISSION-SIDEBAR-SUMMARY.md diff --git a/docs/PLANNING-CONSOLIDATED.md b/docs/archive/completed-2026-02/PLANNING-CONSOLIDATED.md similarity index 100% rename from docs/PLANNING-CONSOLIDATED.md rename to docs/archive/completed-2026-02/PLANNING-CONSOLIDATED.md diff --git a/docs/PR-MERGE-GUIDE.md b/docs/archive/completed-2026-02/PR-MERGE-GUIDE.md similarity index 100% rename from docs/PR-MERGE-GUIDE.md rename to docs/archive/completed-2026-02/PR-MERGE-GUIDE.md diff --git a/docs/PROPOSAL-v1.17.0-three-tab-sidebar-state-architecture.md b/docs/archive/completed-2026-02/PROPOSAL-v1.17.0-three-tab-sidebar-state-architecture.md similarity index 100% rename from docs/PROPOSAL-v1.17.0-three-tab-sidebar-state-architecture.md rename to docs/archive/completed-2026-02/PROPOSAL-v1.17.0-three-tab-sidebar-state-architecture.md diff --git a/docs/development/RELEASE-CHECKLIST.md b/docs/archive/completed-2026-02/RELEASE-CHECKLIST.md similarity index 100% rename from docs/development/RELEASE-CHECKLIST.md rename to docs/archive/completed-2026-02/RELEASE-CHECKLIST.md diff --git a/docs/development/RELEASE-FIX-PLAN.md b/docs/archive/completed-2026-02/RELEASE-FIX-PLAN.md similarity index 100% rename from docs/development/RELEASE-FIX-PLAN.md rename to docs/archive/completed-2026-02/RELEASE-FIX-PLAN.md diff --git a/docs/ROADMAP-CONSOLIDATED-2026-01-08.md b/docs/archive/completed-2026-02/ROADMAP-CONSOLIDATED-2026-01-08.md similarity index 100% rename from docs/ROADMAP-CONSOLIDATED-2026-01-08.md rename to docs/archive/completed-2026-02/ROADMAP-CONSOLIDATED-2026-01-08.md diff --git a/docs/specs/SPEC-settings-enhancement-2025-12-31.md b/docs/archive/completed-2026-02/SPEC-settings-enhancement-2025-12-31.md similarity index 100% rename from docs/specs/SPEC-settings-enhancement-2025-12-31.md rename to docs/archive/completed-2026-02/SPEC-settings-enhancement-2025-12-31.md diff --git a/docs/specs/SPEC-smart-icons-permanent-folders-2026-01-08.md b/docs/archive/completed-2026-02/SPEC-smart-icons-permanent-folders-2026-01-08.md similarity index 100% rename from docs/specs/SPEC-smart-icons-permanent-folders-2026-01-08.md rename to docs/archive/completed-2026-02/SPEC-smart-icons-permanent-folders-2026-01-08.md diff --git a/docs/SUMMARY-AI-SIDEBAR-STATUS.md b/docs/archive/completed-2026-02/SUMMARY-AI-SIDEBAR-STATUS.md similarity index 100% rename from docs/SUMMARY-AI-SIDEBAR-STATUS.md rename to docs/archive/completed-2026-02/SUMMARY-AI-SIDEBAR-STATUS.md diff --git a/docs/TAURI-INTEGRATION-WIREFRAME.md b/docs/archive/completed-2026-02/TAURI-INTEGRATION-WIREFRAME.md similarity index 100% rename from docs/TAURI-INTEGRATION-WIREFRAME.md rename to docs/archive/completed-2026-02/TAURI-INTEGRATION-WIREFRAME.md diff --git a/docs/TEST-COVERAGE-SETTINGS.md b/docs/archive/completed-2026-02/TEST-COVERAGE-SETTINGS.md similarity index 100% rename from docs/TEST-COVERAGE-SETTINGS.md rename to docs/archive/completed-2026-02/TEST-COVERAGE-SETTINGS.md diff --git a/docs/TEST-PLAN-inbox-button.md b/docs/archive/completed-2026-02/TEST-PLAN-inbox-button.md similarity index 100% rename from docs/TEST-PLAN-inbox-button.md rename to docs/archive/completed-2026-02/TEST-PLAN-inbox-button.md diff --git a/docs/TESTS-phase2-inbox-button.md b/docs/archive/completed-2026-02/TESTS-phase2-inbox-button.md similarity index 100% rename from docs/TESTS-phase2-inbox-button.md rename to docs/archive/completed-2026-02/TESTS-phase2-inbox-button.md diff --git a/docs/THEME-AWARE-STATUS-DOTS.md b/docs/archive/completed-2026-02/THEME-AWARE-STATUS-DOTS.md similarity index 100% rename from docs/THEME-AWARE-STATUS-DOTS.md rename to docs/archive/completed-2026-02/THEME-AWARE-STATUS-DOTS.md diff --git a/docs/planning/TODO-DOCS.md b/docs/archive/completed-2026-02/TODO-DOCS.md similarity index 100% rename from docs/planning/TODO-DOCS.md rename to docs/archive/completed-2026-02/TODO-DOCS.md diff --git a/docs/UI-DESIGN-REVIEW-2026-01-09.md b/docs/archive/completed-2026-02/UI-DESIGN-REVIEW-2026-01-09.md similarity index 100% rename from docs/UI-DESIGN-REVIEW-2026-01-09.md rename to docs/archive/completed-2026-02/UI-DESIGN-REVIEW-2026-01-09.md diff --git a/docs/UI-IMPROVEMENTS-PROPOSAL.md b/docs/archive/completed-2026-02/UI-IMPROVEMENTS-PROPOSAL.md similarity index 100% rename from docs/UI-IMPROVEMENTS-PROPOSAL.md rename to docs/archive/completed-2026-02/UI-IMPROVEMENTS-PROPOSAL.md diff --git a/docs/UX-ANALYSIS-SMART-ICONS.md b/docs/archive/completed-2026-02/UX-ANALYSIS-SMART-ICONS.md similarity index 100% rename from docs/UX-ANALYSIS-SMART-ICONS.md rename to docs/archive/completed-2026-02/UX-ANALYSIS-SMART-ICONS.md diff --git a/docs/planning/WORKFLOW-PLANNING-DOCS.md b/docs/archive/completed-2026-02/WORKFLOW-PLANNING-DOCS.md similarity index 100% rename from docs/planning/WORKFLOW-PLANNING-DOCS.md rename to docs/archive/completed-2026-02/WORKFLOW-PLANNING-DOCS.md diff --git a/docs/WORKTREE-SUMMARY-2026-01-08.md b/docs/archive/completed-2026-02/WORKTREE-SUMMARY-2026-01-08.md similarity index 100% rename from docs/WORKTREE-SUMMARY-2026-01-08.md rename to docs/archive/completed-2026-02/WORKTREE-SUMMARY-2026-01-08.md diff --git a/docs/mission-sidebar-phase1-guide.md b/docs/archive/completed-2026-02/mission-sidebar-phase1-guide.md similarity index 100% rename from docs/mission-sidebar-phase1-guide.md rename to docs/archive/completed-2026-02/mission-sidebar-phase1-guide.md diff --git a/docs/mission-sidebar-state-flow.md b/docs/archive/completed-2026-02/mission-sidebar-state-flow.md similarity index 100% rename from docs/mission-sidebar-state-flow.md rename to docs/archive/completed-2026-02/mission-sidebar-state-flow.md diff --git a/docs/development/architecture.md b/docs/development/architecture.md index 3995ede8..48b23193 100644 --- a/docs/development/architecture.md +++ b/docs/development/architecture.md @@ -9,11 +9,25 @@ Scribe is built with Tauri 2 + React, providing a native desktop experience with | **Framework** | Tauri 2 | Native desktop shell | | **Backend** | Rust | Performance, security | | **Frontend** | React 18 | UI components | -| **Editor** | HybridEditor | Markdown + preview | +| **Editor** | CodeMirror 6 | Source editor with extensions | | **Styling** | Tailwind CSS | Utility-first CSS | -| **State** | Zustand | Lightweight state management | -| **Database** | SQLite | Local data storage | -| **Testing** | Vitest | Fast unit tests | +| **State** | Zustand (5 stores) | Lightweight state management | +| **Database** | SQLite (Tauri) / IndexedDB (Browser) | Local data storage | +| **Terminal** | xterm.js | Embedded PTY shell | +| **Graph** | D3.js | Knowledge graph visualization | +| **Math** | KaTeX | LaTeX rendering | +| **Testing** | Vitest + Testing Library | Unit/integration tests | + +## Dual Runtime Architecture + +Scribe runs in two modes with a unified API: + +| Mode | Database | Launch | Use Case | +|------|----------|--------|----------| +| **Tauri** | SQLite (Rust) | `npm run dev` | Full features, desktop app | +| **Browser** | IndexedDB (Dexie.js) | `npm run dev:vite` | Testing, demos, development | + +The API factory (`src/renderer/src/lib/api.ts`) auto-switches based on runtime detection via `platform.ts`. ## Project Structure @@ -23,24 +37,46 @@ scribe/ │ └── renderer/ # React frontend │ └── src/ │ ├── components/ # UI components +│ │ ├── sidebar/ # MissionSidebar system (25+ files) +│ │ ├── EditorTabs/ +│ │ ├── Settings/ # Settings subsystem (12 files) │ │ ├── HybridEditor.tsx +│ │ ├── CodeMirrorEditor.tsx +│ │ ├── EditorOrchestrator.tsx +│ │ ├── KeyboardShortcutHandler.tsx +│ │ ├── PomodoroTimer.tsx │ │ ├── CommandPalette.tsx -│ │ ├── SettingsModal.tsx -│ │ └── ... +│ │ └── ... # 50+ components total +│ ├── hooks/ +│ │ ├── usePreferences.ts +│ │ ├── useIconGlowEffect.ts +│ │ └── useForestTheme.ts │ ├── lib/ # Utilities +│ │ ├── api.ts # API factory (Tauri/Browser) +│ │ ├── browser-api.ts # IndexedDB API +│ │ ├── browser-db.ts # Dexie.js schema +│ │ ├── preferences.ts +│ │ ├── shortcuts.ts # 27-shortcut registry │ │ ├── themes.ts -│ │ └── api.ts -│ ├── store/ # Zustand state -│ │ └── useNotesStore.ts -│ ├── types/ # TypeScript types -│ └── App.tsx # Main app +│ │ ├── quarto-completions.ts +│ │ └── settingsSchema.ts +│ ├── store/ # Zustand state (singular) +│ │ ├── useNotesStore.ts +│ │ ├── useProjectStore.ts +│ │ ├── useAppViewStore.ts +│ │ ├── usePomodoroStore.ts +│ │ └── useSettingsStore.ts +│ └── __tests__/ # 76 test files │ ├── src-tauri/ # Tauri backend │ ├── src/ │ │ ├── lib.rs │ │ ├── main.rs │ │ ├── database.rs # SQLite operations -│ │ └── commands.rs # IPC handlers +│ │ ├── database/ # Database modules +│ │ ├── commands.rs # IPC handlers +│ │ ├── academic.rs # Citations + export +│ │ └── terminal.rs # PTY backend │ ├── Cargo.toml │ └── tauri.conf.json │ @@ -52,9 +88,10 @@ scribe/ ## Data Flow ``` -User Input → React Component → Zustand Store → Tauri IPC → Rust Backend → SQLite - ↓ - UI Re-render +User Input → React Component → Zustand Store → API Layer → Backend → Database + ↓ ↓ + UI Re-render SQLite (Tauri) or + IndexedDB (Browser) ``` ## Database Schema @@ -65,10 +102,28 @@ User Input → React Component → Zustand Store → Tauri IPC → Rust Backend CREATE TABLE notes ( id TEXT PRIMARY KEY, title TEXT NOT NULL, - content TEXT, + content TEXT DEFAULT '', folder TEXT DEFAULT 'inbox', - created_at TEXT, - updated_at TEXT + project_id TEXT REFERENCES projects(id), + created_at INTEGER DEFAULT (strftime('%s', 'now')), + updated_at INTEGER DEFAULT (strftime('%s', 'now')), + deleted_at INTEGER NULL +); +``` + +### Projects Table + +```sql +CREATE TABLE projects ( + id TEXT PRIMARY KEY, + name TEXT NOT NULL, + description TEXT, + type TEXT CHECK(type IN ('research','teaching','r-package','r-dev','generic')) DEFAULT 'generic', + color TEXT, + icon TEXT, + settings TEXT, + created_at INTEGER DEFAULT (strftime('%s', 'now')), + updated_at INTEGER DEFAULT (strftime('%s', 'now')) ); ``` @@ -105,30 +160,19 @@ CREATE TABLE links ( ## Theme System -Themes use CSS custom properties: - -```css -:root { - --nexus-bg-primary: #0a0c10; - --nexus-bg-secondary: #12161c; - --nexus-bg-tertiary: #1a1f26; - --nexus-text-primary: #e2e8f0; - --nexus-text-muted: #94a3b8; - --nexus-accent: #38bdf8; - --nexus-accent-hover: #7dd3fc; -} -``` - -Applied via JavaScript: +Themes use CSS custom properties applied to `:root`: ```typescript function applyTheme(theme: Theme): void { const root = document.documentElement; - root.style.setProperty('--nexus-bg-primary', theme.colors.bgPrimary); - // ... etc + Object.entries(theme.colors).forEach(([key, value]) => { + root.style.setProperty(`--nexus-${key}`, value); + }); } ``` +10 built-in themes (5 dark, 5 light) with keyboard shortcuts (`⌘⌥0`–`⌘⌥9`). + ## IPC Communication Frontend → Backend communication via Tauri commands: @@ -145,12 +189,12 @@ fn get_all_notes(db: State) -> Result, String> { } ``` -## Testing Strategy +## Testing | Level | Tool | Coverage | |-------|------|----------| -| Unit | Vitest | Components, utilities | +| Unit | Vitest | Components, utilities, stores | | Integration | Vitest + Testing Library | User flows | -| E2E | Planned | Full app testing | +| Store | Vitest | Zustand store state machines | -Current: **407 tests passing** +Current: **2,280+ tests passing** across 76 test files diff --git a/docs/development/sprints.md b/docs/development/sprints.md index fad60569..dd17eb15 100644 --- a/docs/development/sprints.md +++ b/docs/development/sprints.md @@ -1,179 +1,78 @@ -# Sprint Planning +# Sprint History Scribe follows a sprint-based development approach with ~4-8 hour sprints. ## Current Status -**Progress:** 92% complete -**Tests:** 483 passing -**Current Sprint:** 16 Complete -**Next Sprint:** 17 - Tags Visual Improvements - -## Sprint Overview - -| Phase | Sprint | Focus | Hours | Status | -|-------|--------|-------|-------|--------| -| **1** | 8 | Editor Foundation | 4h | ✅ Complete | -| 1 | 9 | Editor Enhancement | 4h | ✅ Complete | -| 1 | 10 | Hotkey + Commands | 6h | ✅ Complete | -| 1 | 10.5 | Theme & Font System | 4h | ✅ Complete | -| **2** | 11 | Academic Features | 8h | ✅ Complete | -| 2 | 12 | UI Polish & Micro-interactions | 4h | ✅ Complete | -| **3** | 13 | Preferences & Keyboard | 4h | ✅ Complete | -| 3 | 14 | Knowledge Graph & Templates | 6h | ✅ Complete | -| **4** | 15 | Tags Panel Quick Wins | 4h | ✅ Complete | -| 4 | 16 | Tags Panel Core Features | 4h | ✅ Complete | -| **5** | 17 | Tags Visual Improvements | 4h | ○ Next | - -## Completed Sprints - -### Sprint 16: Tags Panel Core Features ✅ - -- Orphan tag detection (scans notes for unregistered `#tags`) -- Unregistered Tags section with warning styling -- Register single/all tags buttons -- Right-click context menu (Rename/Delete) -- Tag-YAML sync (inline #tags sync to properties.tags) -- Hierarchical tag regex fix (supports `/` in paths) - -### Sprint 15: Tags Panel Quick Wins ✅ - -- Search/filter bar with real-time filtering -- Recent tags section (tracks last 8, shows top 5) -- Compact mode toggle (reduces padding/fonts) - -### Sprint 14: Knowledge Graph & Templates ✅ - -- Knowledge Graph visualization (D3 force-directed) -- Daily Notes templates (5 built-in + custom) -- Markdown export with frontmatter -- Tag hierarchy (path notation: `research/statistics`) -- Backlinks panel improvements - -### Sprint 13: Preferences & Keyboard ✅ - -- User preferences system (localStorage) -- Writing streak tracking -- Enhanced keyboard shortcuts -- Zotero citation integration -- Export improvements - -### Sprint 12: UI Polish & Micro-interactions ✅ - -- EmptyState component with animated pen icon -- Button press feedback (scale animations) -- Sidebar tooltips with keyboard shortcuts -- `prefers-reduced-motion` support -- Daily note template fix (HTML → Markdown) - -### Sprint 11: Academic Features ✅ - -- KaTeX for math rendering (replaced MathJax) -- Theme colors apply to editor area -- 10 built-in themes (5 dark, 5 light) -- 14 ADHD-friendly font recommendations - -### Sprint 10.5: Theme & Font System ✅ - -- 10 built-in themes (5 dark, 5 light) -- Auto-theme by time of day -- Custom theme creator -- Theme import/export (JSON + Base16 YAML) -- Theme keyboard shortcuts (Cmd+Alt+0-9) -- Font settings (family, size, line height) -- 14 ADHD-friendly font recommendations -- One-click Homebrew font installation -- **101 new tests** → 407 total - -### Sprint 10: Global Hotkey + Commands ✅ - -- Global hotkey ⌘⇧N opens app -- Command palette ⌘K with 6 actions -- Autocomplete cursor positioning -- Accessibility improvements -- **31 new tests** → 300 total - -### Sprint 9: Editor Enhancement ✅ - -- Wiki-link autocomplete -- Tag autocomplete -- Live highlighting -- Cursor-following popups - -### Sprint 8: Editor Foundation ✅ - -- HybridEditor with write/preview modes -- Focus mode (⌘⇧F) -- Word count -- Auto-save - -## Upcoming Sprints - -### Sprint 17: Tags Visual Improvements - -- [ ] Tag cloud view (size-based frequency visualization) -- [ ] Tag icons/emoji (optional per tag) -- [ ] Connecting lines (tree view indentation guides) -- [ ] Color picker (click dot to change tag color) - -### Sprint 18: Power User Features +**Version:** v1.20.0 (stable release) +**Tests:** 2,280+ passing (76 files) +**Architecture:** Tauri 2 + React 18 + CodeMirror 6 -- [ ] Bulk operations (multi-select tags for batch operations) -- [ ] Keyboard shortcuts (`t` to focus panel, `/` to search) -- [ ] Tag merging (select multiple → merge into one) -- [ ] Exclusion filters (notes WITHOUT certain tags) +## Feature Tiers (All Shipped) -### Sprint 19: Advanced Features +### Tier 1: MVP -- [ ] AI tag suggestions (based on note content) -- [ ] Tag templates (preset groups for project types) -- [ ] Tag statistics (last used, growth over time) -- [ ] Tag relationships (often used together) - -## Feature Tiers - -### Tier 1: MVP ✅ - -- HybridEditor -- Focus Mode -- Dark Mode -- Auto-Save -- Wiki Links -- Tags (with panel, search, recent, orphan detection) -- Word Count -- Global Hotkey +- CodeMirror 6 editor (Source / Live Preview / Reading modes) +- Focus mode (`⌘⇧F`) +- Dark/Light themes (10 built-in) +- Auto-save +- Wiki links with autocomplete +- Tags with hierarchical support +- Word count +- Global hotkey (`⌘⇧N`) -### Tier 2: Core ✅ +### Tier 2: Core -- Claude CLI -- Gemini CLI -- Command Palette -- Writing goals & streaks +- Claude + Gemini CLI integration +- Command palette (`⌘K`) +- Writing goals and streaks +- Pomodoro focus timer (v1.19) +- Tabs with pin/reorder/close/reopen -### Tier 3: Academic ✅ +### Tier 3: Academic -- Zotero Integration -- Citation Autocomplete -- KaTeX Equation Blocks -- Export (LaTeX/PDF/Word) +- Zotero/BibTeX citations +- Citation autocomplete +- KaTeX math rendering +- LaTeX/PDF/Word export via Pandoc +- Quarto document support with completions -### Tier 4: Knowledge ✅ +### Tier 4: Desktop -- Knowledge Graph (D3) -- Daily Notes with Templates -- Backlinks Panel -- Tag Hierarchy +- Project system (5 typed archetypes) +- Icon-centric MissionSidebar (v1.16) +- Embedded xterm.js terminal +- D3 knowledge graph +- Daily notes with templates +- Backlinks panel -### Deferred to v2 +### Backlog (v2.0+) -- Terminal (xterm.js) -- Multi-tab Editing -- File Tree Browser -- Project System +- Live LaTeX editor (full TeX Live compilation) +- AI integration via Tauri backend (replacing CLI) ### Never Build -- API-based AI (no keys) +- API-based AI (CLI only, no keys) - Plugin system - Mobile app -- Cloud sync +- Cloud sync (proprietary) + +## Release History + +| Version | Highlight | +|---------|-----------| +| v1.20.0 | Release cleanup, documentation overhaul | +| v1.19.0 | Pomodoro focus timer, settings infrastructure | +| v1.18.0 | Sidebar vault expansion fix, DexieError2 race condition | +| v1.17.0 | Three-tab sidebar state architecture | +| v1.16.0 | Icon-centric sidebar redesign, tech debt remediation | +| v1.15.0 | Quarto autocomplete, LaTeX completions | +| v1.14.0 | WikiLink single-click navigation | +| v1.10.0 | CodeMirror 6 Live Preview, KaTeX math, three editor modes | +| v1.9.0 | Settings enhancement (fuzzy search, theme gallery) | +| v1.7.0 | Quick Actions, chat history, @ references | + +## Sprint Archive + +Detailed sprint plans from Sprints 8-36 are archived in `docs/archive/planning/` and `docs/archive/sprints/`. diff --git a/docs/guide/features.md b/docs/guide/features.md index 49b0737b..6b39f50c 100644 --- a/docs/guide/features.md +++ b/docs/guide/features.md @@ -159,7 +159,7 @@ Configure in Settings → Writing → Daily Note Template. --- -## Settings (v1.9.0+) +## Settings !!! tip "Quick Access" Press `⌘,` (Command-Comma) to open Settings. @@ -189,9 +189,8 @@ Search all settings instantly: **10 built-in themes** with visual previews: -**Favorites:** Slate, Nord, Dracula -**Dark:** Monokai, GitHub Dark -**Light:** Linen, Paper, Cream +**Dark:** Oxford Dark, Forest Night, Warm Cocoa, Midnight Purple, Deep Ocean +**Light:** Soft Paper, Morning Fog, Sage Garden, Lavender Mist, Sand Dune - **3-column grid** with hover effects - **Instant preview** - click to apply diff --git a/docs/guide/themes.md b/docs/guide/themes.md index c6a380b5..1868d1b8 100644 --- a/docs/guide/themes.md +++ b/docs/guide/themes.md @@ -1,6 +1,6 @@ # Themes -> 10 ADHD-friendly themes designed for extended writing sessions +> 10 ADHD-friendly themes designed for extended writing sessions (v1.20.0) --- @@ -128,6 +128,18 @@ Create your own theme in Settings → Themes: --- +## Settings Integration + +Themes are managed in **Settings → Appearance** tab: + +- Theme gallery with 3-column grid layout and color preview swatches +- Selected theme shows blue border + checkmark +- Auto-theme toggle for time-based switching +- Custom theme creator with real-time preview +- All theme preferences use the `usePreferences` hook for cached reads and cross-component sync (v1.19.1+) + +--- + ## ADHD-Friendly Design !!! tip "Why These Colors?" diff --git a/docs/index.md b/docs/index.md index 3605c68b..44e8c467 100644 --- a/docs/index.md +++ b/docs/index.md @@ -115,7 +115,7 @@ cd scribe && npm install && npm run dev | **Callouts** | 11 Obsidian-style callout types with color coding | | **Focus Mode** | Distraction-free, one note at a time | | **Settings** | Fuzzy search (⌘,), theme gallery, Quick Actions customization | -| **Themes** | 8 built-in themes with visual previews | +| **Themes** | 10 built-in themes with visual previews | | **Fonts** | 14 recommended fonts + Homebrew install | | **Quick Actions** | 5 default + 5 custom AI actions with drag-to-reorder | | **Wiki Links** | `[[link]]` to connect notes | @@ -168,7 +168,7 @@ cd scribe && npm install && npm run dev | Component | Technology | |-----------|------------| | Framework | Tauri 2 + React 18 | -| Editor | HybridEditor (ReactMarkdown) | +| Editor | CodeMirror 6 (Source / Live Preview / Reading) | | Styling | Tailwind CSS | | State | Zustand | | Database | SQLite (Tauri) / IndexedDB (Browser) | diff --git a/docs/installation/install.md b/docs/installation/install.md index ae5fb506..8a51fc92 100644 --- a/docs/installation/install.md +++ b/docs/installation/install.md @@ -10,19 +10,15 @@ The easiest way to install Scribe on macOS: # Add the tap brew tap data-wise/tap -# Install Scribe (dev channel - current) -brew install --cask data-wise/tap/scribe-dev - -# Or stable channel (when v1.0 releases) -# brew install --cask data-wise/tap/scribe +# Install Scribe +brew install --cask data-wise/tap/scribe ``` -### Release Channels +### Release Channel | Channel | Cask | Tracks | Status | |---------|------|--------|--------| -| **Dev** | `scribe-dev` | Alpha/beta releases | Current | -| **Stable** | `scribe` | v1.0+ releases | Coming soon | +| **Stable** | `scribe` | v1.x releases | Current (v1.20.0) | ## One-Line Install diff --git a/docs/planning/INDEX.md b/docs/planning/INDEX.md index 7f1bd70c..6cf585a4 100644 --- a/docs/planning/INDEX.md +++ b/docs/planning/INDEX.md @@ -2,7 +2,7 @@ > Active planning documents for Scribe development -**Last Updated:** 2026-02-22 | **Current Sprint:** 37 | **Version:** v1.16.2 +**Last Updated:** 2026-02-24 | **Version:** v1.20.0 --- @@ -10,18 +10,11 @@ | File | Purpose | Status | |------|---------|--------| -| [TEST-FILE-TYPESCRIPT-ERRORS-2026-01-24](TEST-FILE-TYPESCRIPT-ERRORS-2026-01-24.md) | 67 test file TS errors to fix | Active (~2.5h) | +| [TEST-FILE-TYPESCRIPT-ERRORS-2026-01-24](TEST-FILE-TYPESCRIPT-ERRORS-2026-01-24.md) | Test file TS errors to fix | Active | +| [E2E-SIMPLIFICATION-PROPOSAL](E2E-SIMPLIFICATION-PROPOSAL.md) | E2E test simplification | Proposal | +| [PROPOSAL-test-coverage-expansion-2026-01-10](PROPOSAL-test-coverage-expansion-2026-01-10.md) | Test coverage expansion plan | Proposal | | [PLAN-v2-latex-editor](PLAN-v2-latex-editor.md) | v2.0 LaTeX Editor Mode | Deferred (P3) | -| [PLAN-ai-integration](PLAN-ai-integration.md) | AI Integration - Tauri backend wiring | Backlog | -| [BUG-REPORT-E2E-TITLE-MISMATCH](BUG-REPORT-E2E-TITLE-MISMATCH.md) | E2E test bug investigation & fix documentation | - ---- - -## Workflow Guide - -| File | Purpose | -|------|---------| -| [WORKFLOW-PLANNING-DOCS](WORKFLOW-PLANNING-DOCS.md) | Document hierarchy, templates, Mermaid diagrams | +| [PLAN-ai-integration](PLAN-ai-integration.md) | AI Integration — Tauri backend wiring | Backlog | --- @@ -38,8 +31,10 @@ | Spec | Status | Target | |------|--------|--------| -| [Three-Tab Sidebar](../specs/SPEC-three-tab-sidebar-2026-01-10.md) | Design Approved | v1.17.0 | -| [Quarto Enhancements](../specs/SPEC-v115-quarto-enhancements-2026-01-07.md) | Partially Implemented | v1.15+ | +| [Quarto Code Chunks](../specs/SPEC-quarto-code-chunks-2026-02-24.md) | Active | v1.21+ | +| [MCP App Claude Desktop](../specs/SPEC-mcp-app-claude-desktop-2026-02-22.md) | Active | v1.21+ | +| [Settings Improvements](../specs/SPEC-settings-improvements-2026-02-23.md) | Active | v1.21+ | +| [Pomodoro](../specs/SPEC-pomodoro-2026-02-23.md) | Implemented | v1.19 | | [LaTeX Editor](../specs/SPEC-latex-editor-2026-01-07.md) | Proposal | v2.0 | --- @@ -50,13 +45,8 @@ Completed sprint plans, brainstorms, and historical planning docs have been move | Archive | Contents | |---------|----------| +| `archive/completed-2026-02/` | Recently archived docs (Feb 2026 cleanup) | | `archive/sprints/` | Sprint plans and summaries (Sprint 30+) | | `archive/brainstorms/` | Brainstorm and design exploration docs | | `archive/planning/` | Earlier sprint plans (Sprint 8-25) and v1.0 docs | | `archive/completed/` | Completed feature implementation docs | - -Moved to archive (2026-02-22): -- `PLAN-sidebar-v2-enhancement.md` — implemented in v1.16.0 -- `PROPOSAL-activity-bar.md` — implemented in v1.16.0 -- `LIVE-EDITING-NEXT-EVOLUTION.md` — stale (v1.12.0 era) -- Full `.STATUS` history → `STATUS-HISTORY-2025-2026.md` diff --git a/docs/reference/PROJECT-DEFINITION.md b/docs/reference/PROJECT-DEFINITION.md index 20ace1ae..f0c91218 100644 --- a/docs/reference/PROJECT-DEFINITION.md +++ b/docs/reference/PROJECT-DEFINITION.md @@ -1,32 +1,32 @@ # Scribe Project Definition -> **Version:** 1.3.0 | **Updated:** 2024-12-25 | **Status:** Active Development (70% Complete) +> **Version:** 1.20.0 | **Updated:** 2026-02-24 | **Status:** Stable Release --- -## 🎯 One Sentence +## One Sentence **Scribe = ADHD-friendly distraction-free writer + projects + academic features + CLI-based AI.** --- -## ⚡ TL;DR (30 seconds) +## TL;DR | What | How | |------|-----| - | **Editor** | HybridEditor (markdown + preview) | -| **Focus** | Distraction-free mode, global hotkey | +| **Editor** | CodeMirror 6 (Source / Live Preview / Reading) | +| **Focus** | Distraction-free mode, global hotkey, Pomodoro timer | | **Projects** | Research, Teaching, R-Package, R-Dev, Generic | | **Citations** | Zotero via Better BibTeX | -| **Export** | Markdown, LaTeX, PDF, Word, Quarto | +| **Export** | Markdown, LaTeX, PDF, Word via Pandoc | | **AI** | Claude + Gemini CLI (no API keys) | -| **Notes** | Wiki links, tags, daily notes | -| **Storage** | Local project folders + Obsidian sync | +| **Notes** | Wiki links, tags, daily notes, knowledge graph | +| **Storage** | SQLite (Tauri) / IndexedDB (Browser) | | **Design** | ADHD-first, minimal friction | --- -## 🧠 ADHD Design Principles +## ADHD Design Principles > **These override ALL feature decisions.** @@ -39,9 +39,9 @@ No dialogs. No choices. Just write. ### 2. One Thing at a Time -- Single note visible +- Single note in editor - Sidebar collapses in focus mode -- No tabs, no split views +- Tabs for multi-note workflows ### 3. Escape Hatches @@ -64,44 +64,57 @@ No dialogs. No choices. Just write. ### 6. Quick Wins - Milestone celebrations (100, 500, 1000 words) -- "Win" logging - Daily goal progress bar --- -## ✅ What Scribe IS +## What Scribe IS - | Principle | Implementation | +| Principle | Implementation | |-----------|----------------| | **Distraction-Free Writer** | Focus mode, minimal UI | -| **Markdown Editor** | Write/Preview mode with live markdown rendering | -| **Project Manager** | Local folders, project settings | +| **CodeMirror Editor** | Source/Live/Reading modes | +| **Project Manager** | 5 typed archetypes with scoped notes | | **Academic Writing Tool** | Zotero + LaTeX + Quarto | -| **Knowledge Notes** | Wiki links, tags, daily notes | -| **ADHD-Friendly** | Quick capture, low friction | +| **Knowledge Notes** | Wiki links, tags, daily notes, graph | +| **ADHD-Friendly** | Quick capture, low friction, Pomodoro | | **CLI-Based AI** | `claude` and `gemini` CLI | -| **Obsidian Companion** | Sync notes to vault | +| **Desktop App** | Tauri 2 with embedded terminal | --- -## ❌ What Scribe IS NOT +## What Scribe IS NOT | Avoid | Why | |-------|-----| | Full IDE | Use VS Code / Positron | -| Terminal emulator | Defer to v2 (use iTerm/Wezterm) | | Code editor | Use VS Code / RStudio | | Full PKM system | Obsidian does this | -| Graph view | Too complex, use Obsidian | | API-based AI | Requires keys, costs money | | Plugin system | Scope creep | -| Multi-tab editor | Breaks "one thing at a time" | --- -## 📁 Project System +## Technical Stack (Locked) -### Project Types +| Layer | Technology | +|-------|------------| +| Shell | Tauri 2 | +| UI | React 18 | +| Editor | CodeMirror 6 | +| Styling | Tailwind CSS | +| State | Zustand (5 stores) | +| Database | SQLite (Tauri) / IndexedDB (Browser) | +| AI | CLI only (no API) | +| Citations | Pandoc citeproc | +| Math | KaTeX | +| Terminal | xterm.js | +| Graph | D3.js | +| Testing | Vitest + Testing Library | + +--- + +## Project Types | Type | Use Case | Default Template | |------|----------|------------------| @@ -111,202 +124,9 @@ No dialogs. No choices. Just write. | **R-Dev** | Dev tools projects | README-first | | **Generic** | Everything else | Blank | -### Folder Structure - -``` -~/Projects/ -├── research-mediation/ -│ ├── .scribe/ -│ │ ├── project.json # Settings -│ │ └── templates/ # Custom templates -│ ├── paper-draft.md -│ ├── literature-notes.md -│ └── daily/ -│ ├── 2024-12-24.md -│ └── 2024-12-25.md -│ -├── teaching-stats-101/ -│ ├── .scribe/ -│ │ └── project.json -│ ├── lecture-01.md -│ └── assignments/ -│ -├── r-package-medfit/ -│ ├── .scribe/ -│ │ └── project.json -│ └── vignettes/ -│ -└── r-dev-aiterm/ - ├── .scribe/ - │ └── project.json - └── docs/ -``` - -### project.json Schema - -```json -{ - "name": "Mediation Paper", - "type": "research", - "created": "2024-12-24", - "bibliography": "~/Zotero/research.bib", - "obsidianVault": "~/vaults/research", - "exportDefaults": { - "format": "pdf", - "template": "academic", - "citationStyle": "apa7" - }, - "aiContext": "Causal inference, mediation analysis, sensitivity analysis", - "dailyNotes": { - "enabled": true, - "folder": "daily", - "template": "## {{date}}\n\n### Progress\n\n### Notes\n" - } -} -``` - -### Project Switcher UI - -``` -┌─────────────────────────────────────┐ -│ 📁 Projects [+] │ -├─────────────────────────────────────┤ -│ 🔬 research-mediation ← Active │ -│ 📚 teaching-stats-101 │ -│ 📦 r-package-medfit │ -│ 🔧 r-dev-aiterm │ -│ ───────────────────────────── │ -│ ⚙️ New Project... │ -└─────────────────────────────────────┘ -``` - --- -## 📝 Knowledge Management - -### Included (v1.0) - -| Feature | Description | -|---------|-------------| -| **Wiki Links** | `[[Note Title]]` with autocomplete | -| **Tags** | `#tag` with colored badges | -| **Backlinks** | Show notes linking to current | -| **Daily Notes** | Auto-create with template | -| **Note Search** | Search within project | - -### Excluded (Use Obsidian) - -| Feature | Why Exclude | -|---------|-------------| -| Graph view | Complex, Obsidian does better | -| Full-text search across projects | Use Obsidian | -| Spaced repetition | Use Obsidian plugin | -| Canvas/mind map | Use Obsidian | -| MOC auto-generation | Use Obsidian | - -### Daily Notes - -``` -Template: daily/{{date}}.md - -## 2024-12-24 - -### Progress -- [x] Reviewed VanderWeele paper -- [ ] Run sensitivity analysis - -### Notes -Working on [[Sensitivity Analysis]] section... - -### Tags -#research #mediation -``` - -**Hotkey:** ⌘D = Open/create today's daily note - ---- - -## 📦 Feature Tiers - -### Tier 1: MVP (Must Have) - -| Feature | Sprint | -|---------|--------| -| HybridEditor (markdown + preview) | 8 | -| Focus Mode | 8 | -| Dark Mode | 8 | -| Auto-Save | 8 | -| Wiki Links | 9 | -| Tags | 9 | -| Word Count | 8 | -| Global Hotkey (⌘⇧N) | 10 | - -### Tier 2: Core Features - -| Feature | Sprint | -|---------|--------| -| Claude CLI | 9 | -| Gemini CLI | 9 | -| Ecosystem Panel | 9 | -| Command Palette (⌘K) | 10 | -| Obsidian Sync | 11 | -| Pomodoro Timer | 9 | - -### Tier 3: Academic Features - -| Feature | Sprint | -|---------|--------| -| Zotero Integration | 12 | -| Citation Autocomplete | 12 | -| Equation Blocks (KaTeX) | 12 | -| LaTeX Export | 13 | -| PDF Export | 13 | -| Word Export | 13 | -| Quarto Render | 14 | - -### Tier 4: Project System - -| Feature | Sprint | -|---------|--------| -| Project Switcher | 15 | -| Project Settings | 15 | -| Project Templates | 16 | -| Local Folder Save | 15 | -| Daily Notes | 16 | -| Backlinks Panel | 16 | - -### Tier 5: Polish (v1.0) - -| Feature | Sprint | -|---------|--------| -| Writing Goals | 17 | -| Streak Tracking | 17 | -| Note Search | 17 | - -### Deferred to v2 - -| Feature | Reason | -|---------|--------| -| **Terminal (xterm.js)** | Complexity, external works | -| **Graph View** | Use Obsidian | -| **Multi-tab Editing** | Breaks ADHD focus | -| **File Tree Browser** | Complexity | -| **Git Integration** | Use external | -| **Code Execution** | Use RStudio/Positron | - -### Never Build - -| Feature | Reason | -|---------|--------| -| API-based AI | Keys + cost | -| Plugin system | Scope creep | -| Mobile app | Different product | -| Cloud sync (proprietary) | Use Obsidian | -| Real-time collaboration | Out of scope | - ---- - -## 🤖 AI Integration +## AI Integration ### Why CLI, Not API? @@ -317,128 +137,18 @@ Working on [[Sensitivity Analysis]] section... | Auto-updates | SDK management | | Zero config | Setup friction | -### AI Actions (5) +### Quick Actions (10 max) -| Action | Prompt | -|--------|--------| -| **Improve** | "Improve clarity and flow" | -| **Expand** | "Expand on this idea" | -| **Summarize** | "Summarize in 2-3 sentences" | -| **Explain** | "Explain this simply" | -| **Research** | "What does research say about..." | +5 default + 5 custom AI actions, configurable in Settings. --- -## 📚 Academic Stack - -### Citation Workflow - -``` -Zotero → Better BibTeX → .bib → Scribe → @cite autocomplete -``` - -### Export Pipeline - -```bash -# All via Pandoc -pandoc input.md -o output.{tex,pdf,docx} --citeproc --bibliography=refs.bib - -# Quarto -quarto render input.qmd -``` - ---- - -## 🔌 Ecosystem Integration - -### Read-Only Status - -| Project | What Scribe Reads | -|---------|------------------| -| flow-cli | Session, duration | -| aiterm | Claude quota | -| obs | Vault stats | -| mcp-servers | Server status | - ---- - -## 📐 Technical Stack - -### Locked - - | Layer | Technology | -|-------|------------| -| Shell | Tauri 2 | -| UI | React 18 | -| Editor | HybridEditor (ReactMarkdown) | -| Styling | Tailwind CSS | -| State | Zustand | -| Database | SQLite | -| AI | CLI only | -| Citations | Pandoc citeproc | -| Math | KaTeX | - -### Dependencies - -```bash -# User must have: -- Zotero + Better BibTeX -- Pandoc -- LaTeX (for PDF) -- Quarto (optional) -- claude CLI -- gemini CLI -``` - ---- - -## 🛤️ Sprint Roadmap - -### Phase 1: Editor (Weeks 1-2) ✅ COMPLETE - -| Sprint | Focus | Hours | Status | -|--------|-------|-------|--------| -| 8 | Editor Foundation | 4h | ✅ Complete | -| 9 | Editor Enhancement | 4h | ✅ Complete | -| 10 | Hotkey + Commands | 6h | ✅ Complete | - -### Phase 2: Integration (Weeks 3-4) ← CURRENT - -| Sprint | Focus | Hours | Status | -|--------|-------|-------|--------| -| 11 | Academic Features | 8h | 🔄 Next | -| 12 | Obsidian Sync | 8h | Pending | - -### Phase 3: Export (Week 5) - -| Sprint | Focus | Hours | Status | -|--------|-------|-------|--------| -| 13 | LaTeX/PDF/Word | 6h | Pending | -| 14 | Quarto | 6h | Pending | - -### Phase 4: Projects (Weeks 6-7) - -| Sprint | Focus | Hours | Status | -|--------|-------|-------|--------| -| 15 | Project System | 8h | Pending | -| 16 | Templates + Daily | 4h | Pending | - -### Phase 5: Polish (Week 8) - -| Sprint | Focus | Hours | Status | -|--------|-------|-------|--------| -| 17 | Search + Goals | 4h | Pending | - -**Progress: 42h / 60h (70%) — 300 tests passing** - ---- - -## 🚫 Scope Creep Prevention +## Scope Creep Prevention ### Before Adding Anything 1. **Does it help ADHD focus?** → If no, reject -2. **Is it in Tiers 1-5?** → If no, defer +2. **Is it in shipped tiers?** → If no, defer 3. **Does it need API keys?** → If yes, reject 4. **Does it add UI clutter?** → If yes, reconsider 5. **Can existing tools do it?** → If yes, integrate @@ -459,115 +169,24 @@ quarto render input.qmd --- -## 📁 Target Structure - - ``` - scribe/ - ├── src/ - │ ├── src-tauri/ - │ │ ├── src/ - │ │ │ ├── lib.rs - │ │ │ ├── main.rs - │ │ │ ├── database.rs - │ │ │ ├── commands.rs - │ │ │ ├── ai/ - │ │ │ │ ├── claude.rs - │ │ │ │ └── gemini.rs - │ │ │ ├── academic/ - │ │ │ │ ├── zotero.rs - │ │ │ │ ├── pandoc.rs - │ │ │ │ └── quarto.rs - │ │ │ ├── projects/ - │ │ │ │ ├── manager.rs # Project CRUD - │ │ │ │ ├── templates.rs # Project templates - │ │ │ │ └── settings.rs # project.json - │ │ │ ├── knowledge/ - │ │ │ │ ├── daily.rs # Daily notes - │ │ │ │ ├── backlinks.rs # Backlink tracking - │ │ │ │ └── search.rs # Note search - │ │ │ ├── ecosystem/ - │ │ │ │ ├── flow.rs - │ │ │ │ ├── obs.rs - │ │ │ │ └── aiterm.rs - │ │ │ └── sync/ - │ │ │ └── obsidian.rs - │ │ - │ └── renderer/ - │ └── src/ - │ ├── App.tsx - │ ├── components/ - │ │ ├── HybridEditor.tsx - │ │ ├── Sidebar/ - │ │ │ ├── ProjectSwitcher.tsx - │ │ │ ├── NoteList.tsx - │ │ │ ├── BacklinksPanel.tsx - │ │ │ └── EcosystemPanel.tsx - │ │ ├── AIPanel/ - │ │ ├── FocusMode/ - │ │ ├── DailyNotes/ - │ │ └── ExportDialog/ - │ │ ├── blocks/ - │ │ │ ├── WikiLink.tsx - │ │ │ ├── Tag.tsx - │ │ │ ├── Citation.tsx - │ │ │ └── Equation.tsx - │ │ └── store/ - │ - ├── PROJECT-DEFINITION.md - ├── README.md - └── package.json - ``` - ---- - -## 📊 Success Metrics - -### v1.0 Release - -| Metric | Target | Current | -|--------|--------|---------| -| Time to capture | < 3 seconds | ✅ Achieved | -| All Tier 1-5 features | Complete | 70% | -| Tests | 80+ passing | **300 passing** | -| App launch | < 2 seconds | ✅ Achieved | +## Success Metrics -### v2.0 Consideration (Terminal) - -Only after v1.0 is stable: - -- Evaluate xterm.js integration -- User feedback on external terminal -- ADHD impact assessment +| Metric | Target | Status | +|--------|--------|--------| +| Time to capture | < 3 seconds | Achieved | +| All core features | Complete | Shipped (v1.20.0) | +| Tests | 2,000+ passing | 2,280+ (76 files) | +| App launch | < 2 seconds | Achieved | --- -## 📝 Changelog +## Changelog | Date | Version | Changes | |------|---------|---------| -| 2024-12-25 | 1.3.0 | Sprint 10 complete, 300 tests, 70% progress | -| 2024-12-24 | 1.2.0 | Added project system, daily notes, backlinks | -| 2024-12-24 | 1.1.0 | Added academic features | +| 2026-02-24 | 1.20.0 | Documentation overhaul, release cleanup | +| 2026-02-23 | 1.19.0 | Pomodoro timer, settings infrastructure | +| 2026-01-10 | 1.16.0 | Icon-centric sidebar, tech debt remediation | +| 2026-01-07 | 1.15.0 | Quarto autocomplete, LaTeX completions | +| 2025-12-25 | 1.3.0 | Sprint 10 complete, theme system | | 2024-12-24 | 1.0.0 | Initial definition | - ---- - - ## 🎯 Summary - - ``` - Scribe v1.0 = - HybridEditor (markdown + preview) - + Focus Mode - + Projects (Research, Teaching, R-Package, R-Dev, Generic) - + Daily Notes - + Wiki Links + Tags + Backlinks - + Zotero + LaTeX + Quarto - + Claude/Gemini CLI - + Obsidian Sync - - Terminal = v2 (deferred) - Graph View = Never (use Obsidian) - BlockNote = Optional (deferred if HybridEditor works well) - - 64 hours. 10 sprints. ADHD-first. - ``` diff --git a/docs/reference/REFCARD-SETTINGS.md b/docs/reference/REFCARD-SETTINGS.md index ddccfb1b..9738e10b 100644 --- a/docs/reference/REFCARD-SETTINGS.md +++ b/docs/reference/REFCARD-SETTINGS.md @@ -1,6 +1,6 @@ # Settings Reference Card -> **Quick reference for Scribe Settings (v1.9.0+)** +> **Quick reference for Scribe Settings (v1.20.0)** --- @@ -78,21 +78,21 @@ Pomodoro preferences also sync to the `usePomodoroStore` Zustand store. ## Theme Gallery -### 8 Built-In Themes +### 10 Built-In Themes -**Favorites (⭐):** -- **Slate** - Professional dark blue-gray -- **Nord** - Arctic pastel dark -- **Dracula** - Vampire purple +**Dark (5):** +- **Oxford Dark** — Deep scholarly blue +- **Forest Night** — Nature-inspired dark green +- **Warm Cocoa** — Rich chocolate brown +- **Midnight Purple** — Elegant deep purple +- **Deep Ocean** — Calming dark teal -**Dark:** -- **Monokai** - Classic Sublime -- **GitHub Dark** - GitHub's dark mode - -**Light:** -- **Linen** - Warm cream -- **Paper** - Minimalist white -- **Cream** - Soft yellow-tinted +**Light (5):** +- **Soft Paper** — Warm cream paper +- **Morning Fog** — Subtle cool gray +- **Sage Garden** — Gentle green-tinted +- **Lavender Mist** — Light purple haze +- **Sand Dune** — Warm sandy beige ### Theme Selection @@ -322,6 +322,5 @@ Pomodoro preferences also sync to the `usePomodoroStore` Zustand store. --- -**Version:** v1.19.1+ +**Version:** v1.20.0 **Last Updated:** 2026-02-24 -**Changelog:** [v1.19.0 Release Notes](https://github.com/Data-Wise/scribe/releases/tag/v1.19.0) diff --git a/docs/reference/TESTS_SUMMARY.md b/docs/reference/TESTS_SUMMARY.md index fbc2944b..090e03c2 100644 --- a/docs/reference/TESTS_SUMMARY.md +++ b/docs/reference/TESTS_SUMMARY.md @@ -14,7 +14,7 @@ | **Themes.test.ts** | 101 | Theme system, fonts, import/export | | **Validation.test.ts** | 54 | Regex, data validation, security, performance | | **Tags.test.tsx** | 52 | Tag CRUD, colors, filtering | -| **BlockNoteEditor.test.tsx** | 35 | Legacy editor tests | +| **usePomodoroStore.test.ts** | 35 | Pomodoro timer state machine (v1.19) | | **Autocomplete.test.tsx** | 34 | Wiki-link/tag autocomplete, keyboard nav | | **HybridEditor.test.tsx** | 32 | Editor rendering, modes, highlighting | | **Integration.test.tsx** | 32 | Workflows, ADHD design verification | @@ -25,7 +25,7 @@ --- -## New in Sprint 10.5: Theme & Font Tests +## Theme & Font Tests ### Themes.test.ts (101 tests) @@ -331,7 +331,7 @@ ### Components.test.tsx (16 tests) -- Ribbon navigation +- Sidebar navigation - SearchBar input - TagFilter multi-select - PropertiesPanel CRUD @@ -424,11 +424,12 @@ npm test -- --reporter=verbose ## Test Architecture +76 test files in `src/renderer/src/__tests__/` and component co-located test directories. Key files: + ``` src/renderer/src/__tests__/ -├── Themes.test.ts # Theme & font system (NEW) +├── Themes.test.ts # Theme & font system ├── Autocomplete.test.tsx # Autocomplete components -├── BlockNoteEditor.test.tsx # Legacy editor ├── CommandPalette.test.tsx # Command palette ├── Components.test.tsx # UI components ├── HybridEditor.test.tsx # Main editor @@ -437,5 +438,9 @@ src/renderer/src/__tests__/ ├── Tags.test.tsx # Tag system ├── Validation.test.ts # Validation logic ├── WikiLinks.test.tsx # Wiki-link system -└── setup.ts # Test setup & mocks +├── usePomodoroStore.test.ts # Pomodoro state machine +├── PomodoroTimer.test.tsx # Pomodoro component +├── setup.ts # Test setup & mocks +└── testUtils.ts # Mock factories ++ 62 more files (settings, sidebar, vault wiring, tabs, etc.) ``` diff --git a/docs/specs/SPEC-left-sidebar-redesign-2026-01-08.md b/docs/specs/SPEC-left-sidebar-redesign-2026-01-08.md index e7be4461..73337401 100644 --- a/docs/specs/SPEC-left-sidebar-redesign-2026-01-08.md +++ b/docs/specs/SPEC-left-sidebar-redesign-2026-01-08.md @@ -5,7 +5,7 @@ **From Brainstorm:** [BRAINSTORM-left-sidebar-layouts-2026-01-08.md](../archive/brainstorms/BRAINSTORM-left-sidebar-layouts-2026-01-08.md) **Expert Analysis:** - UX: [UX-ANALYSIS-LEFT-SIDEBAR-2026-01-08.md](UX-ANALYSIS-LEFT-SIDEBAR-2026-01-08.md) -- Architecture: [mission-sidebar-state-flow.md](../mission-sidebar-state-flow.md) +- Architecture: `mission-sidebar-state-flow.md` (archived to `archive/completed-2026-02/`) --- diff --git a/docs/tutorials/settings.md b/docs/tutorials/settings.md index 520c97f3..238b7228 100644 --- a/docs/tutorials/settings.md +++ b/docs/tutorials/settings.md @@ -1,6 +1,6 @@ -# Settings Enhancement Tutorial +# Settings Tutorial -> **Learn how to customize Scribe with the new Settings system (v1.9.0)** +> **Learn how to customize Scribe with the Settings system (v1.20.0)** --- @@ -11,22 +11,23 @@ The fastest way to access settings is via the keyboard shortcut: **⌘, (Command-Comma)** - Opens the Settings modal Alternatively: -- Click the ⚙️ gear icon in the Mission Control sidebar +- Click the gear icon in the Mission Control sidebar - Use Command Palette (⌘K) → "Settings" --- ## Settings Overview -Settings are organized into **5 categories**: +Settings are organized into **6 tabs**: -| Category | What's Inside | -|----------|---------------| +| Tab | What's Inside | +|-----|---------------| +| **General** | Startup, ADHD features, Focus Timer (Pomodoro), identity, pinned vaults, terminal | | **Editor** | Font, spacing, line height, ligatures, focus mode | -| **Themes** | Visual theme selection with preview gallery | -| **AI & Workflow** | Quick Actions, chat history, @ references | -| **Projects** | Project templates, defaults, daily notes | -| **Advanced** | Performance, data management, debug | +| **Appearance** | Themes (10 built-in), auto-theme, custom themes, tab bar style, sidebar tabs | +| **Files** | Project templates, defaults, daily notes | +| **Academic** | Citations, Quarto, LaTeX, export settings | +| **Icon Bar** | Sidebar icon customization | --- @@ -35,7 +36,7 @@ Settings are organized into **5 categories**: The Settings modal includes **fuzzy search** to quickly find any setting: 1. Open Settings (⌘,) -2. Start typing in the search box (e.g., "font", "theme", "quick") +2. Start typing in the search box (e.g., "font", "theme", "pomodoro") 3. Results show matching settings with breadcrumb navigation 4. Click a result to jump to that setting's location @@ -43,188 +44,154 @@ The Settings modal includes **fuzzy search** to quickly find any setting: --- -## 🎨 Theme Gallery +## General Tab -### Viewing Themes +### Startup -1. Open Settings → **Themes** tab -2. Browse the visual gallery with **3-column grid layout** -3. Each theme card shows: - - Theme name - - Color preview swatches - - Star icon (for favorites) - - Selected indicator (blue border + checkmark) +| Setting | Description | Default | +|---------|-------------|---------| +| Open last page on startup | Return to exactly where you left off | On | -### Available Themes +### ADHD Features -**Favorites (3):** -- **Slate** - Professional dark blue-gray -- **Nord** - Arctic-inspired pastel dark theme -- **Dracula** - Popular vampire-themed purple +| Setting | Description | Default | +|---------|-------------|---------| +| Show writing streak milestones | Celebrate at 7, 30, 100, and 365 days | Off (to avoid anxiety) | -**Dark Themes (2):** -- **Monokai** - Classic Sublime Text dark -- **GitHub Dark** - GitHub's dark mode +### Focus Timer (Pomodoro) — *New in v1.19.0* -**Light Themes (3):** -- **Linen** - Warm cream with soft brown -- **Paper** - Minimalist white with subtle gray -- **Cream** - Soft yellow-tinted background +The Pomodoro timer appears in the status bar. Click to start, right-click to reset. -### Selecting a Theme +| Setting | Description | Default | Range | +|---------|-------------|---------|-------| +| Show pomodoro timer | Display focus timer in status bar | On | — | +| Work duration | Minutes per focus session | 25 | 1–120 | +| Short break | Minutes between work sessions | 5 | 1–30 | +| Long break | Minutes after every Nth session | 15 | 1–60 | +| Long break interval | Take a long break every N pomodoros | 4 | 2–10 | -1. Click any theme card -2. Theme applies immediately (no need to click "Save") -3. Selected theme shows **blue border + checkmark** -4. Hover effects: cards scale slightly with shadow +**How it works:** +1. Click the timer in the status bar to start a 25-minute focus session +2. When the timer completes, your word count is auto-saved and a gentle break toast appears +3. After the configured number of sessions, a longer break is suggested +4. Right-click the timer to reset it ---- - -## ⚡ Quick Actions Customization - -Quick Actions are **one-click AI prompts** that auto-include your note context. +### Pinned Vaults -### Default Quick Actions - -1. ✨ **Improve** - Enhance clarity and flow -2. 📝 **Expand** - Add more detail -3. 📋 **Summarize** - Create concise summary -4. 💡 **Explain** - Clarify complex concepts -5. 🔍 **Research** - Find related information - -### Customizing Quick Actions +Configure which project vaults appear as dots in the sidebar. Vaults are auto-pinned when you create a new project. -**Access:** Settings → **AI & Workflow** tab +### Terminal (Tauri only) -#### Drag-to-Reorder +Set the default terminal folder. Falls back to `~` when a project folder doesn't exist. -1. Hover over a Quick Action row -2. Click and hold the **drag handle** (⋮⋮ icon) -3. Drag to reorder (affects sidebar + context menu display order) -4. Release to save new order +### Browser Mode (Browser only) -#### Toggle Visibility +- View IndexedDB storage status +- Clear all data (notes, projects, tags) +- Restore demo data -- Click the **checkbox** next to any Quick Action -- Unchecked actions are hidden from sidebar/context menu -- Disabled actions remain in settings (can re-enable later) +--- -#### Edit Prompts +## Editor Tab -1. Click the **pencil icon** next to a Quick Action -2. Edit the prompt text in the modal -3. Prompt is auto-included with your note context -4. Click "Save" to apply changes +Font and editing preferences. All settings use the reusable `SettingsToggle` component with accessible `role="switch"` controls. -#### Assign Keyboard Shortcuts +| Setting | Description | +|---------|-------------| +| Font family | Choose from 14 recommended fonts | +| Font size | Editor text size (default: 15px) | +| Line height | Spacing between lines | +| Enable ligatures | Programming ligatures (e.g., Fira Code) | +| Show line numbers | Display line numbers in source mode | +| Word wrap | Wrap long lines | +| Focus mode | Dim everything except current paragraph | -1. Click the **keyboard icon** next to a Quick Action -2. Choose a shortcut: **⌘⌥1** through **⌘⌥9** -3. Shortcuts work globally when a note is open +--- -#### Choose AI Model +## 🎨 Appearance Tab -1. Click the **model dropdown** next to a Quick Action -2. Select **Claude** or **Gemini** -3. Each action can use a different model +### Themes -### Adding Custom Quick Actions +Scribe includes **10 ADHD-friendly themes** designed for extended writing sessions: -**Maximum:** 5 custom actions (total limit: 10 actions) +**Dark Themes (5):** -1. Click **"+ Add Custom"** button -2. Fill out the form: - - **Emoji:** Icon displayed in UI (e.g., 🚀) - - **Label:** Display name (e.g., "Proofread") - - **Prompt:** AI instruction (e.g., "Check for spelling and grammar errors") -3. Click **"Add Action"** -4. New action appears in the list (can be reordered/customized) +| Theme | Description | Accent | +|-------|-------------|--------| +| Oxford Dark | Cool academic blues (default) | Sky blue | +| Forest Night | Calming deep greens | Green | +| Warm Cocoa | Cozy warm browns | Warm tan | +| Midnight Purple | Gentle purples, dreamy | Purple | +| Deep Ocean | Navy blues, stable | Blue | -### Removing Custom Quick Actions +**Light Themes (5):** -1. Click the **trash icon** next to a custom Quick Action -2. Confirm deletion (cannot be undone) -3. Default actions **cannot be removed** (only hidden via checkbox) +| Theme | Description | Accent | +|-------|-------------|--------| +| Soft Paper | Warm off-white | Orange | +| Morning Fog | Cool grays, minimal | Gray | +| Sage Garden | Gentle greens | Green | +| Lavender Mist | Soft purples | Violet | +| Sand Dune | Warm neutrals | Amber | ---- +Themes apply **instantly** — no lag or reload. The gallery shows a 3-column grid with color preview swatches. -## 📁 Project Templates +### Auto-Theme -Project templates apply **preconfigured settings** for different workflows. +Scribe can automatically switch between light and dark themes: -### Available Templates +| Time | Theme Type | +|------|------------| +| 6am – 6pm | Light themes | +| 6pm – 6am | Dark themes | -**Research+ (🔬)** -- Quick Actions: Summarize, Explain, Research -- Daily note template: Literature review prompts -- Properties: `#status`, `#methodology`, `#findings` +Enable in **Settings → Appearance → Auto-theme by time**. -**Teaching+ (📚)** -- Quick Actions: Explain, Expand, Summarize -- Daily note template: Lesson planning prompts -- Properties: `#topic`, `#week`, `#assignment` +### Custom Themes -**Dev+ (💻)** -- Quick Actions: Explain, Improve, Research -- Daily note template: Code snippet templates -- Properties: `#lang`, `#status`, `#pr` +Create your own theme: +1. Click "Create Custom Theme" +2. Choose colors (background, text, accent) or generate from a single color +3. Preview in real-time +4. Save with a custom name -**Writing+ (✍️)** -- Quick Actions: Improve, Expand, Summarize -- Daily note template: Creative writing prompts -- Properties: `#genre`, `#wordcount`, `#draft` +Import/export themes as JSON or Base16 YAML. Import from URLs (GitHub Gists, raw files). -**Minimal (⚪)** -- No Quick Actions -- Basic daily note template -- No preset properties +### Tab Bar Style -### Applying a Template +Customize how editor tabs appear: +- Tab bar style (standard, compact) +- Border style +- Active tab indicator -1. Open Settings → **Projects** tab -2. Click **info icon** (ℹ️) to see template details -3. Review what will change -4. Click **"Apply"** -5. Confirm the action (shows what settings will be modified) -6. Wait for success animation (green checkmark, 2-second bounce) -7. Applied state resets after 2 seconds +### Sidebar Tab Order -**Templates modify:** -- Quick Actions configuration -- Daily note template -- Default note properties +Drag-to-reorder sidebar tabs (Properties, Backlinks, Tags, Stats, Claude, Terminal). --- -## 💾 Export/Import Settings - -### Export Settings - -1. Open Settings → **Advanced** tab (or any tab) -2. Click **"Export Settings"** button -3. Settings copied to clipboard as JSON -4. Paste into a file or share with others - -### Import Settings +## ⚡ Quick Actions Customization -1. Copy exported settings JSON to clipboard -2. Open Settings -3. Click **"Import Settings"** button -4. Paste JSON when prompted -5. Settings apply immediately +Quick Actions are **one-click AI prompts** that auto-include your note context. -**Note:** Import overwrites current settings. Export first if you want to revert. +### Default Quick Actions ---- +1. **Improve** — Enhance clarity and flow +2. **Expand** — Add more detail +3. **Summarize** — Create concise summary +4. **Explain** — Clarify complex concepts +5. **Research** — Find related information -## 🔄 Reset to Defaults +### Customizing Quick Actions -**Warning:** This action cannot be undone. +**Access:** Settings → **Files** tab (AI & Workflow section) -1. Open Settings → **Advanced** tab -2. Click **"Reset to Defaults"** button -3. Confirm the action in the dialog -4. All settings revert to defaults (defined in `settingsSchema.ts`) +- **Drag-to-reorder** — Click and hold the drag handle to reorder +- **Toggle visibility** — Checkbox to show/hide actions +- **Edit prompts** — Click pencil icon to customize the AI prompt +- **Assign shortcuts** — ⌘⌥1 through ⌘⌥9 +- **Choose AI model** — Claude or Gemini per action +- **Add custom** — Up to 5 custom actions (10 total limit) --- @@ -232,76 +199,34 @@ Project templates apply **preconfigured settings** for different workflows. | Action | Shortcut | |--------|----------| -| **Open Settings** | ⌘, | -| **Close Settings** | Esc | -| **Search Settings** | Just start typing | -| **Quick Action 1** | ⌘⌥1 | -| **Quick Action 2** | ⌘⌥2 | -| **...** | ... | -| **Quick Action 9** | ⌘⌥9 | - ---- - -## ♿ Accessibility - -The Settings system is **WCAG 2.1 AA compliant**: +| Open Settings | ⌘, | +| Close Settings | Esc | +| Search Settings | Just start typing | +| Quick Action 1–9 | ⌘⌥1–9 | -- **Screen readers:** Full ARIA labels on all controls -- **Keyboard navigation:** Tab through all settings -- **Focus indicators:** Visible focus states -- **Reduced motion:** Respects `prefers-reduced-motion` system setting -- **Semantic HTML:** Proper landmark roles - -**Keyboard Navigation:** -- `Tab` - Move to next control -- `Shift+Tab` - Move to previous control -- `Enter`/`Space` - Activate button or toggle -- `Esc` - Close Settings modal +The full keyboard shortcut registry (25 shortcuts) is defined in `src/renderer/src/lib/shortcuts.ts`. --- -## 🎯 Tips & Tricks - -### Fast Search - -Instead of scrolling through categories, use **fuzzy search**: -- Type partial words (e.g., "liga" finds "Enable Ligatures") -- Search by category (e.g., "AI" shows all AI settings) -- Search by description text - -### Theme Switching Speed - -Themes apply **instantly** - no lag or reload required. Great for: -- Switching light/dark based on time of day -- Testing different color schemes while writing -- Finding the most comfortable contrast for long sessions - -### Quick Actions Workflow - -**Recommended setup:** -1. Keep 3-5 actions enabled (prevents decision fatigue) -2. Assign shortcuts to your top 3 most-used actions -3. Use drag-to-reorder to prioritize frequent actions at the top -4. Review and remove unused custom actions monthly +## ♿ Accessibility -### Project Template Strategy +The Settings system follows accessibility best practices: -**When starting a new project:** -1. Apply the closest template (e.g., Research+ for a paper) -2. Customize Quick Actions for your specific needs -3. Export settings if you'll create similar projects later -4. Reuse exported settings for future similar projects +- **SettingsToggle** component uses `role="switch"`, `aria-checked`, and `aria-label` +- **Keyboard navigation** — Tab through all controls +- **Focus indicators** — Visible focus states on all interactive elements +- **Reduced motion** — Respects `prefers-reduced-motion` system setting --- -## 📊 Settings Persistence +## 💾 Settings Persistence All settings are **automatically saved** when you make changes: -- **Tauri mode:** SQLite database (`~/.scribe/scribe.db`) -- **Browser mode:** IndexedDB (localStorage fallback) -- **No "Save" button needed** - changes apply immediately -- **Settings sync** across app restarts +- **Tauri mode:** SQLite database via preferences system +- **Browser mode:** localStorage with `usePreferences` hook for cached reads and event-based cross-component sync +- **No "Save" button needed** — changes apply immediately +- **Store sync** — Zustand stores (e.g., `usePomodoroStore`) auto-sync via `syncPreferences()` when preferences change --- @@ -309,22 +234,18 @@ All settings are **automatically saved** when you make changes: ### Settings not persisting -**Check:** -- Database write permissions (`~/.scribe/scribe.db` should be writable) -- Browser localStorage not disabled (for browser mode) -- No errors in Developer Console (⌘⌥I) +- Check database write permissions (Tauri) or localStorage availability (browser) +- Open Developer Console (⌘⌥I) and check for errors ### Theme not applying -1. Check that theme is actually selected (blue border + checkmark) +1. Verify the theme is selected (blue border + checkmark in gallery) 2. Hard refresh (⌘⇧R in browser mode) -3. Check Developer Console for CSS errors -### Quick Actions not appearing +### Focus Timer not visible -1. Verify actions are **enabled** (checkbox checked) -2. Check that you have a note open -3. Verify Claude/Gemini CLI is installed (`which claude`) +1. Check **Settings → General → Focus Timer → Show pomodoro timer** is enabled +2. The timer appears in the status bar at the bottom of the window --- @@ -332,6 +253,7 @@ All settings are **automatically saved** when you make changes: - [Quick Actions Reference](../reference/REFCARD-QUICK-ACTIONS.md) - [Settings Reference Card](../reference/REFCARD-SETTINGS.md) +- [Themes Guide](../guide/themes.md) - [Features Overview](../guide/features.md) - [Keyboard Shortcuts](../guide/shortcuts.md) diff --git a/docs/tutorials/terminal.md b/docs/tutorials/terminal.md index 9f261c1d..be536fe0 100644 --- a/docs/tutorials/terminal.md +++ b/docs/tutorials/terminal.md @@ -24,9 +24,9 @@ Press **⌘⌥T** (Command + Option + T) from anywhere in Scribe. ### Method 2: Right Sidebar -1. Look at the right sidebar Activity Bar -2. Click the **Terminal** icon (bottom icon) -3. Terminal panel opens below +1. Look at the right sidebar tab bar +2. Click the **Terminal** tab +3. Terminal panel opens **Result:** You should see a zsh prompt with your project directory. diff --git a/docs/user/GETTING-STARTED.md b/docs/user/GETTING-STARTED.md index 5ed95718..73b4b5b0 100644 --- a/docs/user/GETTING-STARTED.md +++ b/docs/user/GETTING-STARTED.md @@ -21,22 +21,19 @@ A complete guide to using Scribe for ADHD-friendly writing. ## Installation -### Prerequisites +### Homebrew (Recommended) ```bash -# Required -node --version # 18+ -npm --version # 9+ - -# For Academic Features -pandoc --version # For export -quarto --version # For .qmd (optional) +brew tap data-wise/tap +brew install --cask data-wise/tap/scribe ``` -### Setup +### Build from Source ```bash -cd ~/projects/dev-tools/scribe +# Node.js 18+ and Rust required +git clone https://github.com/Data-Wise/scribe +cd scribe npm install npm run dev ``` @@ -45,44 +42,45 @@ npm run dev ## First Launch -1. **App Opens** — Dark mode, sidebar on left -2. **Create Note** — Click **+ New Note** or ⌘N +1. **App Opens** — Default theme, icon sidebar on left +2. **Create Note** — Click **+ New Note** or press `⌘N` 3. **Start Writing** — No setup needed -### Global Hotkey (Coming Sprint 10) +### Global Hotkey -**⌘⇧N** — Open Scribe from anywhere +**⌘⇧N** — Open Scribe from anywhere (requires Accessibility permissions) --- ## Writing Notes -### Block-Based Editor +### Three Editor Modes -Scribe uses a Notion-style block editor: +| Mode | Shortcut | Description | +|------|----------|-------------| +| **Source** | `⌘1` | Raw markdown with syntax highlighting (CodeMirror 6) | +| **Live Preview** | `⌘2` | Obsidian-style: formatting hides near cursor, LaTeX renders inline | +| **Reading** | `⌘3` | Fully rendered view with clickable links | -``` -Type / to see block options: -/heading → Create heading -/list → Bullet list -/todo → Checklist -/code → Code block -/quote → Blockquote -``` +Press `⌘E` to cycle between modes. ### Focus Mode -Press **⌘.** to enter distraction-free mode: +Press **⌘⇧F** to enter distraction-free mode: -- Sidebar hides -- Editor centers -- Background dims +- Sidebars collapse +- Editor centers on screen +- Only your words remain -Press **⌘.** again to exit. +Press **⌘⇧F** or `Escape` to exit. ### Word Count -Always visible in status bar at bottom. +Always visible in the status bar at the bottom. + +### Pomodoro Timer + +Click the timer in the status bar to start a 25-minute focus session. Right-click to reset. Configure durations in Settings > General > Focus Timer. --- @@ -100,38 +98,14 @@ Always visible in status bar at bottom. ### Creating a Project -1. Click **⚙️ New Project** in sidebar +1. Press **⌘⇧N** to open the Create Project modal 2. Choose project type 3. Name your project -4. Select folder location +4. Project is automatically pinned to the sidebar -### Project Structure +### Switching Projects -``` -~/Projects/my-research/ -├── .scribe/ -│ └── project.json # Settings -├── paper-draft.md -└── daily/ - └── 2024-12-24.md -``` - -### Project Settings - -Edit `.scribe/project.json`: - -```json -{ - "name": "My Research", - "type": "research", - "bibliography": "~/Zotero/research.bib", - "obsidianVault": "~/vaults/research", - "exportDefaults": { - "format": "pdf", - "citationStyle": "apa7" - } -} -``` +Click a project icon in the sidebar icon bar, or use **⌘⇧1** through **⌘⇧4** for quick-switch to typed project slots. --- @@ -141,34 +115,17 @@ Edit `.scribe/project.json`: Press **⌘D** to open/create today's note. -### Daily Note Template - -```markdown -## 2024-12-24 - -### Progress -- [ ] Task 1 -- [ ] Task 2 - -### Notes - -### Tags -#daily -``` - -### Customizing Template +### Built-in Templates -Edit project settings: +| Template | Use Case | +|----------|----------| +| **Minimal** | Just the date heading | +| **Journaling** | Gratitude, focus, reflections | +| **Research** | Notes, papers, ideas sections | +| **Meeting** | Attendees, agenda, action items | +| **Focus** | Single priority with blockers | -```json -{ - "dailyNotes": { - "enabled": true, - "folder": "daily", - "template": "## {{date}}\n\n### Progress\n\n### Notes\n" - } -} -``` +Configure in Settings > Writing > Daily Note Template. --- @@ -184,11 +141,11 @@ See [[My Other Note]] for more details. ### Navigation -Click a wiki link to jump to that note. +Click a wiki link in Live Preview or Reading mode to jump to that note. ### Backlinks -The sidebar shows notes that link to the current note. +The right sidebar Backlinks panel shows notes that link to the current note. --- @@ -202,19 +159,32 @@ Type `#` to trigger autocomplete: This is about #research and #causal-inference. ``` +### Hierarchical Tags + +```markdown +#research/statistics/mediation +#teaching/stat-440 +``` + ### Tag Colors Tags automatically get consistent colors based on their name. ### Filtering by Tag -Click a tag in the Tags panel to filter notes. +Click a tag in the Tags panel (right sidebar) to filter notes. --- ## AI Integration -### Available Actions +### Using AI + +1. Open the Claude panel in the right sidebar +2. Type your question — it automatically has context from your current note +3. Choose a Quick Action from the Command Palette for common tasks + +### Quick Actions | Action | What it does | |--------|--------------| @@ -224,13 +194,6 @@ Click a tag in the Tags panel to filter notes. | **Explain** | Simplify complex text | | **Research** | Find related information | -### Using AI - -1. Select text -2. Press **⌘⇧A** (or right-click → AI) -3. Choose action -4. Select provider (Claude or Gemini) - ### Requirements ```bash @@ -251,17 +214,16 @@ No API keys needed — uses your CLI subscriptions. | Format | Extension | Requirements | |--------|-----------|--------------| -| Markdown | .md | None | +| HTML | .html | None | | LaTeX | .tex | Pandoc | | PDF | .pdf | Pandoc + LaTeX | | Word | .docx | Pandoc | -| Quarto | .qmd | Quarto | ### Exporting -1. Open note -2. Press **⌘E** or File → Export -3. Choose format +1. Open a note +2. Press **⌘⇧E** to open the Export dialog +3. Choose format and options 4. Select location ### Citations @@ -282,34 +244,40 @@ If you have Zotero configured: |--------|----------| | New note | ⌘N | | Daily note | ⌘D | -| Focus mode | ⌘. | +| New project | ⌘⇧N | +| Quick capture | ⌘⇧C | +| Focus mode | ⌘⇧F | | Command palette | ⌘K | -| Close | ⌘W | -| Quit | ⌘Q | +| Settings | ⌘, | +| Close tab | ⌘W | -### Editing +### Editor | Action | Shortcut | |--------|----------| -| Bold | ⌘B | -| Italic | ⌘I | -| Link | ⌘K | -| Undo | ⌘Z | -| Redo | ⌘⇧Z | +| Source mode | ⌘1 | +| Live Preview | ⌘2 | +| Reading mode | ⌘3 | +| Cycle modes | ⌘E | +| Export | ⌘⇧E | ### Navigation | Action | Shortcut | |--------|----------| | Search notes | ⌘F | -| Back | ⌘[ | -| Forward | ⌘] | +| Knowledge graph | ⌘⇧G | +| Left sidebar toggle | ⌘B | +| Right sidebar toggle | ⌘⇧B | +| Terminal | ⌘⌥T | -### AI +### Tabs | Action | Shortcut | |--------|----------| -| AI panel | ⌘⇧A | +| Switch to tab N | ⌘1–⌘9 | +| Close tab | ⌘W | +| Reopen closed tab | ⌘⇧T | --- @@ -324,14 +292,10 @@ npm install npm run dev ``` -### Database Issues +### "App is damaged" Error ```bash -# Database location -~/.config/scribe/scribe.db - -# Reset (caution: deletes notes) -rm ~/.config/scribe/scribe.db +xattr -cr /Applications/Scribe.app ``` ### Export Fails @@ -348,6 +312,6 @@ pdflatex --version ## Getting Help -- **Project Definition:** [PROJECT-DEFINITION.md](../reference/PROJECT-DEFINITION.md) -- **Changelog:** [CHANGELOG.md](../reference/CHANGELOG.md) - **Quick Start:** [QUICKSTART.md](QUICKSTART.md) +- **Features Guide:** [Features Overview](../guide/features.md) +- **Changelog:** [CHANGELOG.md](../reference/CHANGELOG.md)