30 lines
2.9 KiB
Markdown
30 lines
2.9 KiB
Markdown
## Why
|
|
|
|
Notes about a specific web page (research, follow-ups, half-finished thoughts) currently have nowhere to live that's actually attached to that page. They end up scattered across separate notes apps, disconnected from the URL they're about, and lost between browser restarts. A browser extension that keeps a markdown note per page, available instantly from a side panel and persisted locally, solves this directly — and if the underlying data model is shaped correctly from day one, it also sets up a path to sync notes across devices/browsers later without a rewrite.
|
|
|
|
## What Changes
|
|
|
|
- New Chrome (Manifest V3) extension with a `chrome.sidePanel`-based UI, opened per tab via toolbar icon or keyboard shortcut.
|
|
- One markdown note per page, keyed by a normalized URL (configurable key-derivation, SPA-aware), edited in a plain `<textarea>` for fully native copy/paste/select/undo behavior.
|
|
- In-panel find (Ctrl/Cmd+F intercepted while the panel has focus) that highlights matches via the textarea's native text selection.
|
|
- Local persistence in IndexedDB with a data model (`id`, `url`, `pageTitle`, `favIconUrl`, `content`, `createdAt`, `updatedAt`, `deletedAt`) designed to be sync-ready, though sync itself is out of scope for this change.
|
|
- Live refresh across side panel instances that are open on the same note key (e.g. the same URL open in two tabs), so edits made in one aren't silently clobbered by a stale save from another.
|
|
- A dedicated notes-list extension page, styled after `chrome://history` / `brave://history`: entries grouped by day and sorted by `updatedAt`, showing favicon + page title. Clicking an entry focuses an already-open tab showing that page if one exists, otherwise navigates the current tab to it — then opens the side panel with that note.
|
|
- Dark theme by default.
|
|
|
|
Out of scope for this change (explicitly deferred): remote/multi-device sync, search and delete within the notes-list page, markdown syntax highlighting, modifier-click (new-tab) handling on notes-list entries.
|
|
|
|
## Capabilities
|
|
|
|
### New Capabilities
|
|
- `notes-storage`: Local persistent storage of one note per normalized page URL, including the URL-key derivation rules (default and configurable) and a data model shaped for future sync.
|
|
- `note-editor`: The side-panel markdown editor scoped to a browser tab — native text editing, in-panel find, autosave, and live consistency when the same note is open in multiple panels.
|
|
- `notes-list`: A dedicated page listing all notes grouped by day/sorted by recency, and the navigation behavior (focus-existing-tab vs. navigate-current-tab) when an entry is clicked.
|
|
|
|
### Modified Capabilities
|
|
(none — this is the first change in the project)
|
|
|
|
## Impact
|
|
|
|
- New codebase: extension manifest (permissions: `sidePanel`, `tabs`; IndexedDB needs no manifest permission), background service worker, side panel page, notes-list page.
|
|
- No existing code or specs affected (repository currently has no application code).
|