Skip to content

feat: Chrome extension#8

Draft
specbug wants to merge 2 commits into
mainfrom
chrome-extension-feature
Draft

feat: Chrome extension#8
specbug wants to merge 2 commits into
mainfrom
chrome-extension-feature

Conversation

@specbug
Copy link
Copy Markdown
Owner

@specbug specbug commented Oct 18, 2025

No description provided.

specbug and others added 2 commits October 18, 2025 16:35
## Backend Changes
- Refactored PDFFile model → generic Source model
- Added support for both PDFs and web pages
- Added /sources/webpage endpoint for creating webpage sources
- Migrated database with backwards compatibility
- All existing PDF functionality preserved

## Chrome Extension
- Manifest V3 configuration with side panel support
- Simple homegrown highlighting system (no external library)
  - Text selection detection with tooltip
  - Best-effort fuzzy re-highlighting using text + context
  - Stores highlights with prefix/suffix for matching
- Side panel React app with Odyssey design
  - NoteEditor component with LaTeX support (KaTeX)
  - NotesList component with formatted dates
  - Same fonts, colors, and aesthetic as webapp
- Background service worker for API communication
- Full CRUD operations for notes tied to URLs

## Technical Details
- Build: Vite with vite-plugin-web-extension
- Highlighting: XPath + text context for anchoring
- API: Reuses existing backend (localhost:8000 for dev)
- Graceful degradation: If highlight fails to restore, notes still accessible by URL

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Remove vite-plugin-web-extension (was causing module issues)
- Configure proper bundling for content and background scripts
- Add build script to copy manifest and CSS files
- Remove 'type: module' from manifest for compatibility
- Extension now builds properly bundled scripts

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant