feat: add reminders, auto-delete, cross-device sync, dark mode, and rediscovery spotlight
- Rename extension from Shelf to "Read it later" - Add reminder settings: highlight and pin overdue unarchived items - Add auto-delete with a hard safety rule requiring its period to exceed the reminder period - Add cross-device sync via chrome.storage.sync (lightweight per-item metadata, no thumbnails) - Add light/dark/system theme support - Fix list-view Archive/Delete button alignment (card-perf wasn't filling the row) - Add "Worth a second look" spotlight: proactively resurfaces old, forgotten items with automatic backoff so repeatedly-ignored items are shown less often, never permanently
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
# Shelf — Read Later
|
||||
# Read it later
|
||||
|
||||
A new-tab page that shows everything you've saved to read later, as a
|
||||
sortable grid or list. No account, no server — everything lives in your
|
||||
@@ -26,12 +26,48 @@ Thumbnails are captured automatically when you save the *current* page
|
||||
(a screenshot of what's on screen). Links saved via right-click show a
|
||||
favicon instead, since the browser hasn't loaded that page yet.
|
||||
|
||||
## Reminders and auto-delete
|
||||
|
||||
The gear icon opens a settings panel (also home to the light/dark/system
|
||||
theme picker) with two optional timers, both off by default:
|
||||
|
||||
- **Remind me after** — items older than this get pinned to the top of the
|
||||
shelf and highlighted, so they don't get buried.
|
||||
- **Delete unarchived items after** — silently removes items you never
|
||||
came back to. Archiving an item takes it out of consideration entirely.
|
||||
|
||||
The delete period must be longer than the reminder period — enforced both
|
||||
in the settings panel (an inline error if you try to set it shorter) and as
|
||||
a hard rule in the deletion logic itself, so you're always warned before
|
||||
anything is removed. Auto-delete runs on an hourly background alarm (so it
|
||||
still works even if you never open the new tab page), and again whenever
|
||||
the shelf page is open; when the shelf page does the deleting, it shows a
|
||||
courtesy toast with an **Undo**.
|
||||
|
||||
## Worth a second look
|
||||
|
||||
Above the shelf, a small strip proactively surfaces 2–3 old, forgotten,
|
||||
unarchived items each time you open a new tab — on by default, toggleable
|
||||
in the settings panel. Unlike a notification, it doesn't nag: the more
|
||||
times an item gets shown without you opening/archiving/deleting it, the
|
||||
less often it's picked again (backing off from every few days out to every
|
||||
couple of months), so nothing gets shown forever, but nothing gets shown
|
||||
*so* rarely that it's effectively forgotten again either. Archiving or
|
||||
deleting an item removes it from the strip immediately with no replacement
|
||||
until the next refresh — no whack-a-mole.
|
||||
|
||||
"Old enough to matter" uses the same period as the reminder setting above
|
||||
when reminders are on, or a 14-day default when they're off. It's fine (and
|
||||
expected) for the same item to show up both pinned/highlighted in the main
|
||||
shelf *and* in this strip at once — they're not trying to be non-overlapping,
|
||||
just two different nudges.
|
||||
|
||||
## Install — Chrome / Edge (unpacked)
|
||||
|
||||
1. Go to `chrome://extensions` (or `edge://extensions`).
|
||||
2. Turn on **Developer mode** (top right).
|
||||
3. Click **Load unpacked** and select this folder.
|
||||
4. Open a new tab — you should see the Shelf page.
|
||||
4. Open a new tab — you should see the Read it later page.
|
||||
|
||||
## Install — Firefox (temporary, for testing)
|
||||
|
||||
@@ -47,13 +83,26 @@ favicon instead, since the browser hasn't loaded that page yet.
|
||||
> [Developer Edition / Nightly build](https://www.mozilla.org/firefox/developer/)
|
||||
> with `xpinstall.signatures.required` set to `false`.
|
||||
|
||||
## Syncing across devices
|
||||
|
||||
Read it later keeps full items (including screenshot thumbnails) in
|
||||
`chrome.storage.local`, and also mirrors a lightweight copy of each item
|
||||
(url, title, domain, favicon, dates, archived state, spotlight backoff
|
||||
counters — no images) to
|
||||
`chrome.storage.sync`, one entry per item so each stays well under the
|
||||
8KB-per-item sync limit. On another device signed into the same browser
|
||||
account, opening the shelf pulls those in automatically; thumbnails just
|
||||
aren't part of what syncs, so items saved elsewhere show a favicon instead
|
||||
until re-saved on that device. Archiving and deleting also sync. This is
|
||||
all best-effort — offline, not signed in, or over the (~100KB / 512-item)
|
||||
sync quota just means that device keeps working from local storage alone.
|
||||
|
||||
Note: `chrome.storage.sync` needs a stable extension ID to work, which
|
||||
only applies to a permanently installed, signed add-on — not a Firefox
|
||||
"temporary add-on" loaded via `about:debugging` (see install notes above),
|
||||
which won't persist sync identity across restarts.
|
||||
|
||||
## Notes / things you might want to change
|
||||
|
||||
- Storage uses `chrome.storage.local`, so saved links stay on the device
|
||||
you saved them on. Swapping the `chrome.storage.local` calls for
|
||||
`chrome.storage.sync` in `background.js` and `newtab.js` would sync
|
||||
small link lists across your signed-in browsers, but `sync` storage
|
||||
has a much smaller quota (~100KB) and doesn't handle thumbnails well —
|
||||
not recommended once you have images in the mix.
|
||||
- Icons in `icons/` are placeholders — swap them for your own artwork
|
||||
any time; sizes 16/32/48/128 are already wired up in `manifest.json`.
|
||||
|
||||
Reference in New Issue
Block a user