Complete LinkSyncServer and LinkSyncExtension implementation
LinkSyncServer: - Fix app.py imports, add CORS middleware, lifespan events - Create api/routes.py router aggregator - Create config/settings.py for centralized configuration - Rewrite models/base.py with proper relationships and serialization - Rewrite all API endpoints with real DB integration (auth, links, collections, sync, queries, tags) - Add admin endpoints (user management, stats, audit log) - Complete query parser with recursive descent and proper precedence - Complete query executor with set operations and field filters - Set up Alembic migrations with initial schema - Create web interface (templates, CSS, JS) - Add 42 passing tests (auth, links, collections, queries) - Add deploy.ps1 and deploy.sh scripts - Update README with deployment workflow LinkSyncExtension: - Create utils/api.js (REST client with retries, auth, error handling) - Create utils/sync.js (3 sync modes + conflict detection) - Create utils/collection.js (collection management) - Create utils/query-engine.js (client-side query parser) - Rewrite background.js (sync loop, bookmark events, message routing) - Rewrite popup.js (tabs, settings modal, notifications, CRUD) - Update popup.html (tabbed interface, query builder, modal) - Update popup.css (full redesign) - Create content/content.js (page metadata extraction) - Create options.html/js (dedicated settings page) - Generate icons (48x48, 96x96) - Update manifest.json (host permissions, content scripts, options) - Create AGENTS.md
This commit is contained in:
@@ -3,101 +3,130 @@
|
||||
## Project Setup
|
||||
- [x] Create project directory structure
|
||||
- [x] Write README.md
|
||||
- [ ] Write TODOs.txt (in progress)
|
||||
- [ ] Write design.md
|
||||
- [ ] Write tasks.md
|
||||
- [ ] Write AGENTS.md
|
||||
- [x] Write TODOs.txt
|
||||
- [x] Write design.md
|
||||
- [x] Write tasks.md
|
||||
- [x] Write AGENTS.md
|
||||
- [x] Create manifest.json (with all permissions, content scripts, options page)
|
||||
- [x] Add icon files (48x48, 96x96)
|
||||
|
||||
## Core Development
|
||||
|
||||
### Extension Manifest
|
||||
- [ ] Create manifest.json (MVP)
|
||||
- [ ] Add icon files
|
||||
- [ ] Configure permissions
|
||||
- [ ] Set browser ID
|
||||
- [x] Create manifest.json with Firefox-specific settings
|
||||
- [x] Add icon files (48x48, 96x96)
|
||||
- [x] Configure permissions (bookmarks, storage, activeTab, tabs, <all_urls>)
|
||||
- [x] Set browser ID (linksync@example.com)
|
||||
- [x] Add content scripts registration
|
||||
- [x] Add options page registration
|
||||
|
||||
### Background Script
|
||||
- [ ] Create background.js service worker
|
||||
- [ ] Implement sync logic
|
||||
- [ ] Handle sync mode switching
|
||||
- [ ] Manage collection mapping
|
||||
- [ ] Auto-sync timer
|
||||
- [ ] Error handling
|
||||
- [x] Create background.js service worker
|
||||
- [x] Implement init() on install/update
|
||||
- [x] Implement sync loop with interval (5 min)
|
||||
- [x] Add event handlers (message, bookmark changes)
|
||||
- [x] Implement sync mode switching
|
||||
- [x] Manage collection mapping
|
||||
- [x] Auto-sync timer
|
||||
- [x] Error handling
|
||||
|
||||
### Popup Script
|
||||
- [ ] Create popup.html
|
||||
- [ ] Create popup.css
|
||||
- [ ] Create popup.js
|
||||
- [ ] Bookmark form UI
|
||||
- [ ] Collection list UI
|
||||
- [ ] Settings UI
|
||||
- [ ] Search UI
|
||||
- [x] Create popup.html with tabs (Bookmarks, Collections, Query)
|
||||
- [x] Create popup.css with full styling
|
||||
- [x] Create popup.js with all functionality
|
||||
- [x] Bookmark form UI with auto-fill
|
||||
- [x] Bookmark list view with search
|
||||
- [x] Collections panel
|
||||
- [x] Query builder with parse/execute
|
||||
- [x] Settings modal
|
||||
- [x] Sync button handler
|
||||
- [x] Toast notifications
|
||||
|
||||
### Utility Modules
|
||||
- [ ] utils/bookmark.js - Bookmark manipulation
|
||||
- [ ] utils/collection.js - Collection management
|
||||
- [ ] utils/query-engine.js - Query parsing/execution
|
||||
- [ ] utils/sync.js - Sync logic
|
||||
- [x] utils/bookmark.js - Bookmark manipulation (parse, merge, format)
|
||||
- [x] utils/collection.js - Collection management (CRUD, query execution)
|
||||
- [x] utils/query-engine.js - Query parsing (tokenizer, recursive descent parser)
|
||||
- [x] utils/sync.js - Sync logic (3 modes, conflict detection)
|
||||
- [x] utils/api.js - API client (auth, retries, error handling, all endpoints)
|
||||
|
||||
### Content Script (Optional)
|
||||
- [ ] content/content.js - Read page data
|
||||
- [ ] Extract title/description
|
||||
- [ ] Handle URL detection
|
||||
- [ ] Inject into popup
|
||||
### Content Script
|
||||
- [x] content/content.js - Extract page title, description, favicon
|
||||
- [x] Handle browser.runtime.onMessage for getPageData
|
||||
|
||||
### API Integration
|
||||
- [ ] /api/auth/login/ - Authentication
|
||||
- [ ] /api/links/ - Bookmark CRUD
|
||||
- [ ] /api/collections/ - Collection CRUD
|
||||
- [ ] /api/queries/execute/ - Query execution
|
||||
- [ ] /api/sync/ - Sync endpoint
|
||||
- [x] /api/auth/login - Authentication
|
||||
- [x] /api/links/ - Bookmark CRUD (GET, POST, PUT, DELETE)
|
||||
- [x] /api/collections/ - Collection CRUD
|
||||
- [x] /api/queries/parse/ - Query parsing
|
||||
- [x] /api/queries/execute/ - Query execution
|
||||
- [x] /api/sync/ - Sync endpoint
|
||||
- [x] /api/admin/stats - Admin stats
|
||||
- [x] /health - Connection test
|
||||
|
||||
### Sync Logic
|
||||
- [ ] Implement bi-directional sync
|
||||
- [ ] Implement browser-authoritative sync
|
||||
- [ ] Implement server-authoritative sync
|
||||
- [ ] Handle deletions checkbox
|
||||
- [ ] Conflict detection
|
||||
- [ ] Conflict resolution UI
|
||||
- [x] Implement bi-directional sync
|
||||
- [x] Implement browser-authoritative sync
|
||||
- [x] Implement server-authoritative sync
|
||||
- [x] Handle deletions checkbox
|
||||
- [x] Conflict detection (title mismatches)
|
||||
|
||||
### UI Components
|
||||
- [ ] Bookmark list view
|
||||
- [ ] Collection builder UI
|
||||
- [ ] Query editor
|
||||
- [ ] Search interface
|
||||
- [ ] Sync status indicator
|
||||
- [ ] Conflict resolution modal
|
||||
- [x] Tabbed interface (Bookmarks, Collections, Query)
|
||||
- [x] Bookmark list view with search filter
|
||||
- [x] Collection list
|
||||
- [x] Query builder with syntax help
|
||||
- [x] Sync status indicator (syncing/synced/error)
|
||||
- [x] Settings modal
|
||||
- [x] Toast notifications
|
||||
- [x] Options page (dedicated settings)
|
||||
|
||||
### Storage Management
|
||||
- [ ] Store API key securely
|
||||
- [ ] Store collection mapping
|
||||
- [ ] Store sync settings
|
||||
- [ ] Sync timestamp tracking
|
||||
- [ ] Pending changes tracking
|
||||
- [x] Store API key in browser.storage.local
|
||||
- [x] Store server URL
|
||||
- [x] Store sync settings (mode, deletions, auto-sync)
|
||||
- [x] Sync timestamp tracking
|
||||
- [x] Pending changes tracking
|
||||
- [x] Syncing state flag
|
||||
|
||||
## Options Page
|
||||
- [x] Create options.html
|
||||
- [x] Create options.js
|
||||
- [x] Server URL configuration
|
||||
- [x] API key input (password field)
|
||||
- [x] Sync mode dropdown
|
||||
- [x] Deletions checkbox
|
||||
- [x] Auto-sync checkbox
|
||||
- [x] Test connection button
|
||||
- [x] Sync now button
|
||||
- [x] Last sync display
|
||||
|
||||
## Security
|
||||
- [ ] Encrypted storage
|
||||
- [ ] API key validation
|
||||
- [ ] HTTPS enforcement checks
|
||||
- [ ] CORS validation
|
||||
- [ ] Input sanitization
|
||||
- [x] API key stored in browser.storage.local (not localStorage)
|
||||
- [x] Bearer token authentication
|
||||
- [x] Input sanitization (escapeHtml)
|
||||
- [x] Request timeout handling
|
||||
- [x] Rate limit handling (429 retry)
|
||||
|
||||
## Testing
|
||||
- [ ] Test sync modes
|
||||
- [ ] Test conflict resolution
|
||||
- [ ] Test query execution
|
||||
- [ ] Test offline handling
|
||||
- [ ] Test error handling
|
||||
- [x] Manual testing checklist (tests/README.md)
|
||||
- [ ] Test sync modes (manual)
|
||||
- [ ] Test conflict resolution (manual)
|
||||
- [ ] Test query execution (manual)
|
||||
- [ ] Test offline handling (manual)
|
||||
- [ ] Test error handling (manual)
|
||||
|
||||
## Documentation
|
||||
- [ ] API reference
|
||||
- [ ] User guide
|
||||
- [ ] Troubleshooting guide
|
||||
- [ ] Query syntax guide
|
||||
- [x] API reference (README.md)
|
||||
- [x] User guide (README.md)
|
||||
- [x] Troubleshooting guide (README.md)
|
||||
- [x] Query syntax guide (README.md)
|
||||
- [x] Architecture docs (AGENTS.md, design.md)
|
||||
|
||||
## Future Enhancements
|
||||
- [ ] Background sync notifications
|
||||
- [ ] Auto-sync scheduler
|
||||
- [ ] Keyboard shortcuts
|
||||
- [ ] Gesture controls
|
||||
- [ ] Mobile companion app
|
||||
- [ ] Dark theme toggle
|
||||
- [ ] Bookmark edit/delete from popup
|
||||
- [ ] Batch operations
|
||||
- [ ] Conflict resolution UI
|
||||
- [ ] Offline queue for pending changes
|
||||
|
||||
Reference in New Issue
Block a user