feat: add tags/labels for saved items

- Add free-form tags per item: chip display with remove, inline add (comma-separated, grid view only), and a toolbar tag-filter popover listing every tag in use
- Search now also matches tags; tags sync across devices like every other item field
- Fix Firefox manifest.json compliance for AMO submission: replace the placeholder gecko id with a real UUID, add the now-required data_collection_permissions (bookmarksInfo, since synced items are personal browsing/bookmark data), and bump strict_min_version to 140.0 (142.0 for gecko_android) to match
- Add description.md (elevator pitch / short / detailed descriptions for store listings), PRIVACY.md, and .gitignore for the dist/ packaging output
- Reword all em-dash punctuation across docs and code comments per user preference
This commit is contained in:
2026-07-14 12:44:17 +10:00
parent c5bd7e38bf
commit 232524ad97
10 changed files with 446 additions and 49 deletions
+6 -5
View File
@@ -1,4 +1,4 @@
// Read it later background service worker
// Read it later: background service worker
// Works under both the `chrome` namespace (Chrome/Edge) and Firefox's
// chrome.* alias for WebExtensions.
@@ -36,9 +36,9 @@ async function getPrefs() {
}
// Runs on an hourly alarm so overdue items get cleaned up even when the
// shelf page is never opened. Silent no one's necessarily watching, so
// unlike the newtab-page sweep there's no toast/undo here; the newtab page
// runs its own courtesy-toast sweep whenever it's open.
// shelf page is never opened. Silent, since no one's necessarily watching,
// so unlike the newtab-page sweep there's no toast/undo here; the newtab
// page runs its own courtesy-toast sweep whenever it's open.
async function sweepAutoDelete() {
const prefs = await getPrefs();
if (!prefs.autoDeleteEnabled) return;
@@ -70,6 +70,7 @@ async function addItem({ url, title, favIconUrl, image }) {
updatedAt: now,
surfaceCount: existingIndex >= 0 ? items[existingIndex].surfaceCount || 0 : 0,
lastSurfacedAt: existingIndex >= 0 ? items[existingIndex].lastSurfacedAt || 0 : 0,
tags: existingIndex >= 0 ? items[existingIndex].tags || [] : [],
};
if (existingIndex >= 0) items.splice(existingIndex, 1);
@@ -141,7 +142,7 @@ chrome.contextMenus.onClicked.addListener(async (info, tab) => {
if (info.menuItemId === "save-link-later") {
if (!info.linkUrl) return;
const linkTitle = info.linkText && info.linkText.trim() ? info.linkText.trim() : info.linkUrl;
// No screenshot for links we haven't navigated to favicon/title only.
// No screenshot for links we haven't navigated to: favicon/title only.
await addItem({ url: info.linkUrl, title: linkTitle, favIconUrl: "", image: "" });
if (tab && tab.id) flashBadge(tab.id, "✓");
}