Commit graph

7 commits

Author SHA1 Message Date
enzotar
c6ce0b24d5 feat: Introduce integrity checks, backups, bookmarks, trash, quick capture, audit logs, and backend enhancements for notes, git, crypto, and SRS. 2026-03-11 18:11:09 -07:00
enzotar
d639d40612 harden: atomic writes, path validation, and save pipeline integrity
Backend (lib.rs):
- Add atomic_write/atomic_write_bytes helpers (write→fsync→rename→fsync parent)
- Apply safe_vault_path() to all 20 file-access commands (was 3)
- Apply safe_name() to workspace/canvas/attachment filename params
- Fix 2 silent error swallowing sites (let _ = fs::write)
- Fix git_status/git_commit/git_init error handling (check exit codes)
- Migrate all Regex::new() to LazyLock statics (10 total)
- Use ~tmp suffix for atomic writes (not extension replacement)
- Replace 2 unwrap() panic sites with unwrap_or_default()
- Skip ~tmp files in export_vault_zip

Frontend (Editor.tsx):
- Fix critical note-switch race: capture note path at call time,
  not when debounced timer fires (prevented old content → new note)
- Clear pending save timeout on note switch (defense-in-depth)
- Fix handleSlashSelect: route through debounced saveContent pipeline
  with domToMarkdown() instead of direct writeNote() with innerText
- Fix handlePaste stale closure (add saveContent to deps)
2026-03-11 11:00:58 -07:00
enzotar
0d26e63c9a v1.0.0: security fixes, code review cleanup, release prep
Security:
- Add path traversal protection (safe_vault_path) for all file operations
- Sanitize markdown preview with DOMPurify to prevent XSS
- Fix encryption: decrypted content no longer written back to disk
- Harden CSP for Tauri v2 production mode

Code quality:
- Remove dead code (cache.rs, NoteView, unused tabs/activeTab state)
- Fix stale closure in debounced save using refs
- Fix image paste to use domToMarkdown instead of innerText
- Single-pass widget rendering (was 3 sequential innerHTML clobbers)
- Move snapshot logic into save callback
- Remove no-op updateWikilinks in drag-and-drop
- Wire CSS editor to Cmd+U shortcut
- Replace hardcoded vault path with portable fallback

Performance:
- LazyLock static regexes for WIKILINK_RE and TAG_RE
- Fix duplicate dirs_config_path, update CSS commands

Release:
- Bump version to 1.0.0
- Rewrite README with project documentation
- Update CHANGELOG with 1.0.0 entry
- Update .gitignore for build artifacts and vault data
- Update canvas dependency path
- Fix canvas API compatibility (onSelectionChange, removed props)
2026-03-09 18:15:39 -07:00
enzotar
c1f556b86b feat: v0.7–v0.9 — canvas, whiteboard, database, git sync, timeline, analytics, import/export, shortcuts, table editor
v0.7: GraphView rewrite (@blinksgg/canvas), WhiteboardView, DatabaseView (table/gallery/list), GitPanel, backlink context, dataview queries
v0.8: OutlinePanel, TimelineView, StatusBar (doc stats), TableEditor, RandomNote, link suggestions
v0.9: ImportExport (ZIP/folder), ShortcutsEditor (rebind+persist), GraphAnalytics (orphans/most-connected), note pinning

Backend: 15 new Rust commands, zip crate, rand crate
Frontend: 18 new components, ~1400 lines CSS
Dependencies: @blinksgg/canvas, jotai, graphology, d3-force
2026-03-08 23:10:18 -07:00
enzotar
d174c7f26d feat: v0.3 + v0.4 — frontmatter, templates, outline panel, vault cache
v0.3: Core file reading & markdown infrastructure
- Rust: read_note_with_meta, list_templates, save_attachment commands
- TypeScript: frontmatter.ts (parse/serialize YAML, extract headings)
- OutlinePanel with click-to-scroll headings + tabbed right panel
- CommandPalette: New from Template with {{title}}/{{date}} replacement
- Editor: image drag-and-drop to attachments/
- 130 lines of CSS for outline panel and right panel tabs

v0.4: File reading & caching
- Rust: VaultCache (cache.rs) with mtime-based invalidation
- Rewrote read_note, read_note_with_meta, build_graph, search_vault to use cache
- init_vault_cache (eager scan on startup), get_cache_stats commands
- Frontend LRU noteCache (capacity 20, stale-while-revalidate)
- notify crate added for filesystem watching foundation
2026-03-07 09:54:08 -08:00
enzotar
2041798048 feat: v0.2.0 — command palette, full-text search, note management, editor improvements, graph filtering
- Add search_vault and rename_note Rust backend commands
- Add CommandPalette component with fuzzy search and keyboard nav (Ctrl+K)
- Add ContextMenu component with rename/delete actions
- Add global keyboard shortcuts (Ctrl+N/G/D)
- Rebuild Sidebar with debounced full-text search results
- Add Editor heading scaling (h1-h3), interactive task checkboxes, inline code
- Add GraphView filter bar (folder dropdown, min links slider)
- Add 440+ lines of CSS for all new components
- Update CHANGELOG.md with v0.2.0 entry
2026-03-07 08:40:16 -08:00
enzotar
706c7ac5ad feat: Graph Notes app with semantic zoom graph, wikilink tokens, and shadcn-inspired UI
- Tauri v2 desktop app with React, TypeScript, Tailwind CSS v4
- Contenteditable editor with [[wikilink]] token chips (compact pills, unwrap on backspace/delete)
- Wikilink autocomplete: type [[ to search and link notes
- Force-directed graph view with semantic zoom (circle→card morph)
- Single-click zooms into node, double-click opens note
- shadcn-inspired design system: zinc neutrals, purple accents, gradient buttons
- Sidebar with search, file tree, active indicators, daily note shortcut
- Backlinks panel showing linked mentions with context
- File-based vault stored in local filesystem via Tauri FS plugin
2026-03-07 00:21:49 -08:00