-
Notifications
You must be signed in to change notification settings - Fork 0
feat: Roadmap v0.2 - FTS5, Wikilink Anchors, Cloud Sync Foundation #71
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Conversation
- Add Zustand-based settings store with schema versioning - Add useTheme hook for dark/light/system theme + accent color - Add new settings components (SettingGroup, SettingRow, controls) - Add UpdatesSection for auto-update settings - Enhance AppearanceSection with theme picker and color presets - Add CSS variables for CodeMirror theme tokens - Remove separate settings.html (unified window approach) - Cross-window settings sync via IPC 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Remove all box-shadow effects for cleaner, flatter design: - Context menus (NoteList, Tags) - Modals (NotebookCreate, NotebookPicker, Settings) - Panels (Actions, Backlinks) - Editor header, toolbar, note-list - Lightbox and global styles 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Replace LIKE queries with SQLite FTS5 for fast, ranked search:
- Add migration 008_fts5_index with FTS5 virtual table
- Triggers keep FTS index in sync on INSERT/UPDATE/DELETE
- Use bm25() for relevance ranking
- Prefix matching for partial word search ("mark" finds "markdown")
- Porter tokenizer for stemming support
Closes #67
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add support for heading anchors in wikilinks: - Parse [[Note#Heading]] and [[Note#Heading|display]] syntax - Store anchor in links table (migration 009_link_anchors) - Pass anchor via data-anchor attribute to click handler - Add heading utilities: extractHeadings(), headingToSlug() Syntax now supported: - [[Note]] - basic wikilink - [[Note#Section]] - link to heading - [[Note|alias]] - aliased link - [[Note#Section|alias]] - heading with alias Closes #68 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add core infrastructure for cloud sync: ## New Package: @readied/sync-core - Types for sync entities, operations, conflicts - SyncQueue for offline change management - SyncEngine to orchestrate push/pull operations - SyncClient interface for API communication - Zod schemas for validation ## SQLite Migration (010_sync_fields) - Add device_id, sync_version, last_synced_at to notes/notebooks - Create sync_queue table for offline changes - Create sync_metadata table for sync state ## Desktop Components - syncStore (Zustand) for auth and sync state - SyncStatusIndicator component - LoginModal component for magic link auth Backend API (Hono + Neon) to be implemented separately. Refs #69 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 26512f1529
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| rollupOptions: { | ||
| input: { | ||
| index: resolve(__dirname, 'src/renderer/index.html'), | ||
| settings: resolve(__dirname, 'src/renderer/settings.html'), | ||
| }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Keep a settings entry point in the renderer build
Removing the settings.html entry from the renderer build means the production bundle no longer emits a settings page, but window:openSettings in apps/desktop/src/main/index.ts still calls loadFile('../renderer/settings.html') (and dev replaces the URL with /settings.html). That makes the settings window open to a missing file/404, so the Settings UI won’t render at all when users click the sidebar settings button. Either keep a settings.html build input or update the main-process loader to point at index.html?view=settings.
Useful? React with 👍 / 👎.
| // Escape FTS5 special characters: " * ^ - OR AND NOT ( ) | ||
| const escaped = query.replace(/["\*\^()]/g, ' ').trim(); | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Escape hyphens before building FTS5 queries
The FTS5 query sanitizer claims to escape - but the regex only strips " * ^ ( ). If a user searches for a hyphenated term like foo-bar, prepareFtsQuery produces "foo-bar"*, which SQLite parses as foo - bar and throws no such column: bar, causing the search call to error. This makes search fail for common hyphenated inputs; consider stripping or splitting on - before composing the MATCH query.
Useful? React with 👍 / 👎.
Summary
This PR implements the first phase of the v0.2 roadmap:
1. Full-Text Search (FTS5) 🔍
markfindsmarkdown)bm25()relevance ranking2. Wikilinks with Heading Anchors 🔗
[[Note#Heading]]syntax[[Note#Heading|display]]syntax3. Cloud Sync Foundation ☁️
@readied/sync-corepackage with types, queue, and engineFiles Changed
New Packages
packages/sync-core/- Pure TypeScript sync logicMigrations
008_fts5_index.ts- FTS5 virtual table009_link_anchors.ts- Link anchor column010_sync_fields.ts- Sync metadata tablesDesktop Components
stores/syncStore.ts- Sync state managementcomponents/sync/- Sync UI componentsTest Plan
Next Steps
@readied/api(Hono + Neon backend)Closes #67, #68
Refs #69
🤖 Generated with Claude Code