docs: sync for the review fixes; regenerate the screenshots
- docs/03 §3: one bulk command at a time, focus that stays on a rendered row, the search that remembers closed folders, the new-folder path. - docs/05 §9: the 500-row window around the focus replaces the growing prefix; measured numbers in place of the old "not done". - docs/06: rename focus, the pinned failure toast, step-heading focus and the import's live region, dialog naming, the new component names. - docs/02 layout, docs/07 plurals (eighteen since v1.1.0), docs/08 §3 CSP with default-src 'none' and the wider bundle gate, docs/09 §7 typed diagnostics, docs/12 the Sonar job split and the ops build job's plain `npm ci`, docs/15 decision rows and the review's backlog. - README and PRIVACY say what the CSP refuses instead of "any request". - capture/: the README set regenerated by `screenshots.mjs --shoot` from neutral sample data, lowercase names as the harness writes them; the 1.0.0 shots are gone. store/screenshots/: 1280×800 dark candidates. - CHANGELOG [1.1.0] Fixed; CLAUDE.md size figures. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
No files matched your search
@@ -68,8 +68,9 @@ itself. **Needs Chrome 136 or later.**
|
||||
- Error messages stay on screen until you dismiss them.
|
||||
- The popup opens an already-open manager on the page you clicked, and its
|
||||
folder count no longer includes the three built-in root folders.
|
||||
- Very large folders show 500 items at a time, with "Show more", so expanding
|
||||
everything no longer freezes the tab.
|
||||
- Very large folders and trees show 500 rows at a time, with "Show more" (and
|
||||
"Show earlier" in the edit tree), so expanding everything no longer freezes
|
||||
the tab.
|
||||
- Two manager tabs can no longer write bookmarks at the same time — the second
|
||||
one is told to wait, and nothing is changed.
|
||||
|
||||
@@ -110,6 +111,28 @@ itself. **Needs Chrome 136 or later.**
|
||||
rows highlighted. Pressing Esc while renaming no longer saves the new name.
|
||||
- The edit tree no longer collapses or loses your place after a failed edit,
|
||||
and focus moves to the next row after a delete.
|
||||
- Renaming from the keyboard works: F2 and New folder put the cursor in the
|
||||
name box, and Enter or Esc returns you to the tree. A folder created while
|
||||
searching no longer disappears and locks the keyboard.
|
||||
- The edit tree keeps your place when the row you were on is collapsed, moved
|
||||
or deleted elsewhere — focus goes to the nearest folder still on screen —
|
||||
and a folder you close during a search stays closed.
|
||||
- While a sort or a duplicate clean-up runs, the other edit actions wait for
|
||||
it, instead of starting and failing with misleading messages.
|
||||
- End and type-ahead on a very large tree no longer freeze the tab.
|
||||
- An error message no longer holds back the messages after it.
|
||||
- The import preview shows its "new" and "dup" badges again. Keyboard and
|
||||
screen-reader users now land on each step of an import, and hear how it
|
||||
ended.
|
||||
- Dialogs name their close button "Dismiss", and screen readers read the
|
||||
confirmation's details with its title.
|
||||
- At narrow widths the edit toolbar wraps instead of pushing the page sideways,
|
||||
and titles keep their room before the domain beside them.
|
||||
- Wording: an untitled item is named by its address in dialogs, plurals read
|
||||
correctly ("1 extra copy", "Show 1 more row"), and the Japanese text spells
|
||||
ブラウザ and フォルダ one way throughout.
|
||||
- The header logo's animation stops after two pulses instead of running
|
||||
forever, and the popup now switches only the Manager tab it brings forward.
|
||||
- The About tab and the third-party notices now name the small MIT-licensed
|
||||
pieces the build has always compiled in (the Svelte runtime with its `clsx`
|
||||
helper, and WXT's browser shim), instead of saying there were none.
|
||||
|
||||
@@ -112,11 +112,12 @@ clean-install test. Also carried in from the Phase 4 review:
|
||||
- ✔ About's "Changelog" link now targets `CHANGELOG.md`, pinned by
|
||||
`tests/unit/links.test.ts`;
|
||||
- ✔ `EditTab.svelte` split (589 → 459, under the hard limit). It grew back to
|
||||
481, and in v1.1.0 its state and commands moved to
|
||||
`src/lib/stores/edit-session.svelte.ts` — the component is now ~295 lines of
|
||||
wiring and markup. The store itself (364) and `TreeRow.svelte` (353) sit
|
||||
between the 300 target and the 500 hard limit: split them before adding to
|
||||
them;
|
||||
481, and in v1.1.0 its state and commands moved into three stores —
|
||||
`edit-view` (181 lines), `edit-commands` (226), `edit-session` (133) — and
|
||||
its key handling into `src/lib/edit/tree-keys.ts`. As of the 1.1.0 review the
|
||||
component is 259 lines with a 144-line script, `TreeRow.svelte` 276,
|
||||
`ImportTab.svelte` 266 and the Manager's `App.svelte` 237: every file is under
|
||||
the 300 target again. Extract before adding;
|
||||
- ✔ contrast tokens fixed, and `tests/unit/styles/contrast.test.ts` now fails
|
||||
the build on any text pair under 4.5:1. Two blind spots to know about: it is
|
||||
token-level, so it cannot see the `opacity`-on-text bypass it was written to
|
||||
|
||||
@@ -16,13 +16,16 @@ folder trees. English · Tiếng Việt · 日本語.
|
||||
|
||||
## Screenshots
|
||||
|
||||
| Edit | Export |
|
||||
| Import | Edit |
|
||||
|---|---|
|
||||
|  |  |
|
||||
|  |  |
|
||||
|
||||
| Settings | About |
|
||||
| Export | Settings |
|
||||
|---|---|
|
||||
|  |  |
|
||||
|  |  |
|
||||
|
||||
Taken with neutral sample data by `node scripts/screenshots.mjs --shoot`, never
|
||||
from anyone's real profile.
|
||||
|
||||
## What it does
|
||||
|
||||
@@ -47,10 +50,12 @@ folder trees. English · Tiếng Việt · 日本語.
|
||||
This is the whole point of the project, so it is worth being precise.
|
||||
|
||||
- **No network access at all.** Not analytics, not telemetry, not update pings.
|
||||
There is no server. The browser enforces it: the extension's content security
|
||||
policy sets `connect-src 'none'`, so Chrome itself refuses any request an
|
||||
extension page tries to make. On top of that, `npm run check:manifest` scans
|
||||
the shipped bundle for network APIs and `npm run guard` scans the source.
|
||||
There is no server, and the code makes no network calls. The browser backs
|
||||
that up: the extension's content security policy makes Chrome refuse fetch,
|
||||
XHR, WebSocket, EventSource and beacon requests, and remote images, fonts,
|
||||
media and frames. On top of that, `npm run check:manifest` scans the shipped
|
||||
bundle for network APIs (WebRTC included, which no CSP directive covers) and
|
||||
`npm run guard` scans the source.
|
||||
- **Exactly two permissions**: `bookmarks` and `storage`. No host permissions,
|
||||
no content scripts, no background worker. Two gates enforce it: a unit test
|
||||
over `wxt.config.ts`, and `npm run check:manifest`, which CI runs against the
|
||||
|
||||
|
Before Width: | Height: | Size: 73 KiB |
|
Before Width: | Height: | Size: 90 KiB |
|
Before Width: | Height: | Size: 97 KiB |
|
Before Width: | Height: | Size: 163 KiB |
|
After Width: | Height: | Size: 78 KiB |
|
After Width: | Height: | Size: 58 KiB |
|
Before Width: | Height: | Size: 69 KiB After Width: | Height: | Size: 58 KiB |
|
After Width: | Height: | Size: 40 KiB |
|
After Width: | Height: | Size: 20 KiB |
|
After Width: | Height: | Size: 57 KiB |
@@ -165,10 +165,10 @@ Derived identifiers (canonical across docs and code):
|
||||
than a placeholder. Regenerate with `npm run icons` after any change.
|
||||
⚠️ **Store assets are unreconciled.** The listing is live, so whatever
|
||||
`13 §2` requires was supplied — but nothing in the repo records what, or
|
||||
where the originals live. `capture/` holds five README screenshots at
|
||||
2512×1440 / 2560×1440, which are *not* the five 1280×800 store screenshots
|
||||
`13 §2` specifies, and there is no 440×280 promo tile of any size. Owner:
|
||||
either record where the submitted assets live, or correct `13 §2`.
|
||||
where the originals live. Since 1.1.0 the screenshot harness writes
|
||||
1280×800 candidates to `store/screenshots/` (`13 §2`); there is still no
|
||||
440×280 promo tile of any size. Owner: record where the submitted assets
|
||||
live, or correct `13 §2`.
|
||||
4. ✔ Donate URLs resolved from `.github/FUNDING.yml` (`14 §5`).
|
||||
✔ Contact addresses: since v1.1.0, one alias per purpose (`privacy@` in
|
||||
`legal/PRIVACY.md`, `security@`, `legal@`, `dmca@`, `copyright@`,
|
||||
|
||||
@@ -113,7 +113,9 @@ bookmarkmagic/
|
||||
│ │ ├── import/run-import.ts # the import pipeline (03 §1)
|
||||
│ │ ├── export/run-export.ts # the export pipeline (03 §2)
|
||||
│ │ ├── edit/ # edit-node, patch-tree, move-target (incl. planDrop),
|
||||
│ │ │ # tree-keyboard, sort, live-sync, search-expansion (03 §3)
|
||||
│ │ │ # tree-keyboard, tree-keys, sort, live-sync,
|
||||
│ │ │ # search-expansion, focus-repair, row-window (03 §3)
|
||||
│ │ ├── import/folder-name.ts # the new-folder import's date (07 §3)
|
||||
│ │ ├── settings/options.ts # the six Settings choice tables (06 §3.4)
|
||||
│ │ ├── links.ts # repo / legal / donate URLs (14 §4, §5)
|
||||
│ │ ├── stores/ # Svelte 5 runes state (.svelte.ts)
|
||||
@@ -122,13 +124,16 @@ bookmarkmagic/
|
||||
│ │ │ ├── toast.svelte.ts # transient status queue + its timers (06 §4)
|
||||
│ │ │ ├── route.svelte.ts # location.hash + hashchange wrapper (§5)
|
||||
│ │ │ ├── import-session.svelte.ts
|
||||
│ │ │ └── edit-session.svelte.ts # the #edit tab's state + commands (03 §3)
|
||||
│ │ │ ├── edit-view.svelte.ts # #edit: what the tree shows (03 §3)
|
||||
│ │ │ ├── edit-commands.svelte.ts # #edit: single-item writes, extends the view
|
||||
│ │ │ └── edit-session.svelte.ts # #edit: duplicates + bulk commands, extends both
|
||||
│ │ ├── i18n/ # runtime UI i18n (see 07_I18N.md)
|
||||
│ │ │ ├── index.svelte.ts
|
||||
│ │ │ ├── format.ts # pure Intl number/date helpers (07 §3)
|
||||
│ │ │ ├── resolve-locale.ts
|
||||
│ │ │ └── locales/{en,vi,ja}{,-notices,-import}.ts # split by namespace (07 §2)
|
||||
│ │ └── components/ # Svelte components (see 06_UI.md); icons/Icon.svelte
|
||||
│ │ └── components/ # Svelte components (see 06_UI.md); icons/Icon.svelte,
|
||||
│ │ # focus-heading.ts (the step-heading focus attachment)
|
||||
│ └── styles/
|
||||
│ ├── tokens.css # CSS custom properties, themes
|
||||
│ └── base.css
|
||||
|
||||
@@ -162,7 +162,9 @@ fine at our size cap (strings of a few MB).
|
||||
|
||||
State and commands live in `stores/edit-session.svelte.ts` (`EditSession`, one
|
||||
per tab mount, with the bookmarks API injected so every command is tested
|
||||
against the in-memory fake); `EditTab.svelte` is markup and wiring. Rename,
|
||||
against the in-memory fake), built in three layers — `edit-view` (what the tree
|
||||
shows), `edit-commands` (single-item writes), `edit-session` (duplicates and the
|
||||
two bulk commands); `EditTab.svelte` is markup and wiring. Rename,
|
||||
move and delete are applied to the local tree optimistically; bulk commands
|
||||
update it after each call the browser accepts; the live events below confirm
|
||||
both. A command the browser refuses **re-reads the tree** instead of restoring
|
||||
@@ -170,13 +172,27 @@ a snapshot — a snapshot would resurrect rows an earlier step of a bulk command
|
||||
legitimately deleted — and the re-read keeps whatever is still open and
|
||||
focused.
|
||||
|
||||
**One bulk command at a time.** While Sort A→Z or "keep first in each group"
|
||||
runs (`busy`), every other write — a second bulk command, rename, delete, move,
|
||||
drag, new folder — is refused by the session itself, not only greyed out in the
|
||||
toolbar; only the command that set `busy` clears it. 1.1.0's first cut guarded
|
||||
the toolbar alone, so a row's Sort button started a second sort that failed with
|
||||
two false messages and re-enabled the toolbar mid-sort.
|
||||
|
||||
**Focus stays on a rendered row.** When the focused row leaves the screen — a
|
||||
collapse, a move into a closed folder, a search, a delete in another tab — focus
|
||||
moves to its nearest visible folder (`edit/focus-repair.ts`; a row deleted
|
||||
elsewhere is climbed with the tree as it was), and a rename whose row is hidden
|
||||
is dropped. Without this `aria-activedescendant` pointed at nothing and every
|
||||
tree key was ignored.
|
||||
|
||||
| Action | Path |
|
||||
|---|---|
|
||||
| Search | input (debounced 150 ms) → core filter on title+URL → tree shows matches with ancestors expanded |
|
||||
| Rename | F2 or the row button → inline input; Enter or blur commits, Esc cancels (a blur after Esc does not commit) → trimmed; blank or unchanged → nothing; else `bookmarks.update(id, { title })` |
|
||||
| Search | input (debounced 150 ms) → core filter on title+URL → tree shows matches with ancestors expanded; a folder the user collapses during the search stays collapsed until the search text changes |
|
||||
| Rename | F2 or the row button → inline input, focused with its text selected; Enter or blur commits, Esc cancels (a blur after Esc does not commit), and after Enter or Esc focus returns to the tree → trimmed; blank or unchanged → nothing; else `bookmarks.update(id, { title })` |
|
||||
| Move | drag & drop onto a row — before, after or into (`planDrop`, `05 §10`) → `bookmarks.move(id, { parentId, index })`, or `{ parentId }` alone into a folder; "Move to…" (row button, menu key / Shift+F10) → modal folder list with a filter → `bookmarks.move(id, { parentId })`, appended |
|
||||
| Delete | Del or the row button → confirm dialog (folder shows descendant count) → `removeTree` / `remove`; focus moves to the next row, else the previous |
|
||||
| New folder | toolbar button → `bookmarks.create({ parentId, title })` in the focused folder, beside a focused bookmark, else in the first writable root → parent opened, a search that would hide it cleared → inline rename |
|
||||
| Delete | Del or the row button → confirm dialog (folder shows descendant count) → `removeTree` / `remove`; when the deleted row had focus, focus moves to the next row, else the previous. A copy deleted from the duplicate panel leaves the tree's focus where it was |
|
||||
| New folder | toolbar button → `bookmarks.create({ parentId, title })` in the focused folder, beside a focused bookmark, else in the first writable root → inserted at once (the live event then finds it present), a search that would hide it cleared, and every folder above it opened as the user's own — so clearing the search cannot close them again → inline rename |
|
||||
| Sort A→Z | toolbar (the focused folder, or the focused bookmark's folder) or a folder row's button → `planSort` (`05 §10`) → confirm stating how many items move → one awaited `bookmarks.move(id, { parentId, index })` per planned move, yielding every 25, under the write lock (§5). Refused part-way → "moved d of t" and a re-read: there is no undo |
|
||||
| Open bookmark | Enter, double-click, or the row's Open button → `tabs.create({ url })` for `http:`/`https:` only (`09` T3); anything else is refused with a toast |
|
||||
| Copy link | the row button, or Ctrl/⌘+C on the focused row → `navigator.clipboard.writeText` (`09` T8) |
|
||||
|
||||
@@ -304,10 +304,10 @@ is fine ≤ 100k nodes. No fuzzy search in v1 (zero-dep rule).
|
||||
|
||||
## 9. Tree rendering scale strategy
|
||||
|
||||
**Bounded, not virtualized.** Every tree surface mounts at most 500 rows at a
|
||||
time and adds 500 more per "Show more" ("Show n more rows · m not shown").
|
||||
There is no virtual list — no dependency for one, and none hand-written — and a
|
||||
row, once mounted, stays mounted.
|
||||
**Bounded, not virtualized.** Every tree surface mounts a bounded number of
|
||||
rows: 500 to start, 500 more per "Show more" ("Show n more rows · m not
|
||||
shown"). There is no virtual list — no dependency for one, and none
|
||||
hand-written; #edit mounts a **window** of rows around the focus instead.
|
||||
1.0.x documented chunking for very wide folders and never built it: #edit
|
||||
rendered every visible row in one pass, so "Expand all" on a large profile
|
||||
froze the tab.
|
||||
@@ -315,19 +315,23 @@ froze the tab.
|
||||
- **#edit** (`TreeList.svelte`). `visibleRows` (`edit/tree-keyboard.ts`)
|
||||
flattens the tree into the rows actually showing — roots open on first load,
|
||||
every other folder closed until opened — and computes each row's
|
||||
`aria-posinset`/`aria-setsize` on the way. The list mounts the first 500.
|
||||
When focus moves past the mounted range (↓, End, type-ahead), the limit grows
|
||||
to the chunk holding the focused row: `aria-activedescendant` and
|
||||
scroll-into-view both need that row in the DOM.
|
||||
`aria-posinset`/`aria-setsize` on the way. The list mounts a window of 500
|
||||
rows (`edit/row-window.ts`) that always holds the focused row:
|
||||
`aria-activedescendant` and scroll-into-view both need it in the DOM. When
|
||||
focus leaves the window (End, type-ahead, Home), a fresh window is centred on
|
||||
it; "Show earlier" and "Show more" grow it by 500 either way. 1.1.0's first
|
||||
cut grew a prefix from row 0 instead, so End on 20 000 rows mounted all of
|
||||
them — 3.9 s, then ~200 ms per arrow key.
|
||||
- **Import preview and export picker** (`TreePreviewNode`, `FolderPickNode`):
|
||||
nested lists. The top level starts open and everything deeper closed; a
|
||||
folder's children mount only once it is opened, then 500 at a time with a
|
||||
per-folder "Show more". The picker lists folders only.
|
||||
- **What is not done.** `visibleRows` re-walks every visible node on each change
|
||||
— O(visible) per keystroke or toggle, acceptable at the 100k cap. The 500 is a
|
||||
step, not a ceiling: "Expand all" then End mounts every row up to the last.
|
||||
Windowing — mounting only what is on screen — would close that; it was the
|
||||
plan, and is in the `15` backlog instead (decision log, 2026-10-29).
|
||||
- **What is not done.** `visibleRows` re-walks every visible node on each tree
|
||||
change — O(visible) per change, acceptable at the 100k cap; a key press only
|
||||
looks the focused row up. Mounting exactly what is on screen (true
|
||||
virtualization) would bring a jump from 500 row mounts down to a screenful;
|
||||
measured in the harness, Home/End on 3 000 rows takes ~0.4 s in a background
|
||||
page and arrows 2–6 ms, so it stays in the `15` backlog.
|
||||
|
||||
## 10. Reordering — `edit/sort.ts`, `edit/move-target.ts`
|
||||
|
||||
|
||||
@@ -283,13 +283,18 @@ the focused row: **Open** and **Copy link** (bookmarks), **Sort A→Z**
|
||||
never the permanent roots or a policy-managed node). No remote favicons.
|
||||
Search matches render bold in the accent colour.
|
||||
|
||||
- **Rename:** an inline input (F2 or the button). Enter or leaving the field
|
||||
commits, trimmed — a blank or unchanged title does nothing; Esc cancels.
|
||||
- **Delete:** a confirmation naming the item, with the descendant count for a
|
||||
folder; focus then moves to the next row (else the previous).
|
||||
- **Rename:** an inline input (F2 or the button), focused with its text
|
||||
selected. Enter or leaving the field commits, trimmed — a blank or unchanged
|
||||
title does nothing; Esc cancels. After Enter or Esc, focus is back on the
|
||||
tree.
|
||||
- **Delete:** a confirmation naming the item (an untitled bookmark by its
|
||||
address), with the descendant count for a folder; when the deleted row had
|
||||
focus, focus moves to the next row (else the previous).
|
||||
- **New folder:** created in the focused folder, beside a focused bookmark,
|
||||
else in the first writable root, and opened in rename; a search that would
|
||||
hide it is cleared.
|
||||
else in the first writable root, and opened in rename with every folder above
|
||||
it open; a search that would hide it is cleared.
|
||||
- **While a bulk command runs** (Sort A→Z, keep-first), every row action that
|
||||
writes is disabled and its keys do nothing, and drag is off.
|
||||
- **Sort A→Z** (`05 §10`): planned first, so the confirmation states how many
|
||||
items move and that the browser has no undo; an already sorted folder gets a
|
||||
toast instead of a dialog.
|
||||
@@ -306,7 +311,8 @@ Search matches render bold in the accent colour.
|
||||
Picking one appends the item there. The list renders only while the dialog
|
||||
is open.
|
||||
- **`<DuplicatePanel>`**, in the side column: "n duplicated links · m extra
|
||||
copies", then each group under its normalized URL, largest first. Every copy
|
||||
copies" (each count pluralized on its own), then each group under its
|
||||
normalized URL, largest first. Every copy
|
||||
shows its title and the folder it lives in; the first is marked "kept", the
|
||||
others get a delete button; "Keep the first of each, delete m copies" sits
|
||||
behind a danger confirmation with that number.
|
||||
@@ -387,9 +393,9 @@ widened in v1.1.0 from `links.ts` alone.
|
||||
`FolderPickTree` · `StatsCard` · `WarningList` · `ImportOptions` ·
|
||||
`FormatSelect` · `ProgressBar` · `ResultCard` · `SearchInput` ·
|
||||
`DuplicatePanel` · `Modal` (native `<dialog>`; every dialog is built on it) ·
|
||||
`ConfirmDialog` · `Toast` (one at a time, up to three queued; info and success
|
||||
auto-dismiss after 4 s, **failures stay until dismissed**; polite and assertive
|
||||
live regions) · `SettingRow` · `AboutCard` · `LegalGate` · `Button` ·
|
||||
`ConfirmDialog` · `Toast` (info and success one at a time, up to three queued,
|
||||
auto-dismissed after 4 s; **the latest failure pinned above them until
|
||||
dismissed**; polite and assertive live regions) · `SettingRow` · `AboutCard` · `LegalGate` · `Button` ·
|
||||
`Callout` · `ErrorCallout` (localized message + technical detail) · `Icon`
|
||||
(§6).
|
||||
|
||||
@@ -402,18 +408,21 @@ read as a list of missing files:
|
||||
| Inventory name | Realized as |
|
||||
|---|---|
|
||||
| `AboutCard` | `AboutTab.svelte`, for symmetry with the other four tab shells |
|
||||
| `TreeView` | `TreeList.svelte` (the `role="tree"` list, mounted in chunks) + `TreeRow.svelte` (one row). State and commands live in `stores/edit-session.svelte.ts`, the flattening in `edit/tree-keyboard.ts`; `EditTab.svelte` is markup and wiring |
|
||||
| `TreeView` | `TreeList.svelte` (the `role="tree"` list, a window of rows around the focus) + `TreeRow.svelte` (one row) with `RowActions.svelte` and `RenameInput.svelte`. State and commands live in `stores/edit-{view,commands,session}.svelte.ts`, the flattening in `edit/tree-keyboard.ts`, the key handling in `edit/tree-keys.ts`; `EditTab.svelte` is markup and wiring |
|
||||
| `TreeNode` | `TreePreviewNode.svelte` (import preview) + `FolderPickNode.svelte` (export picker) |
|
||||
| `ResultCard` | `ImportReport.svelte` |
|
||||
| `ResultCard` | `ImportReport.svelte` (step 05, with its actions); step 04 is `ImportProgress.svelte`, and `ImportAnnouncer.svelte` is the import's one live region |
|
||||
| `SearchInput` | inside `EditToolbar.svelte` |
|
||||
| `Icon` | `icons/Icon.svelte` |
|
||||
| — | plus `SettingsTab.svelte` (the fifth tab shell), `EditToolbar.svelte` and `MoveToDialog.svelte` |
|
||||
| — | plus `SettingsTab.svelte` (the fifth tab shell), `EditToolbar.svelte`, `MoveToDialog.svelte` and `StatusBar.svelte` (the Manager's footer) |
|
||||
|
||||
`Toast`'s queue and timers live in `stores/toast.svelte.ts`, not the component:
|
||||
one `<Toast>` mounts at the App root while the route chain below it unmounts on
|
||||
every navigation, so component-owned timers would leak by construction. A
|
||||
`danger` toast never starts its timer (since v1.1.0): four seconds is too short
|
||||
to read a failure, let alone act on it.
|
||||
`danger` toast has a slot of its own, above the queue, and no timer (since
|
||||
v1.1.0): four seconds is too short to read a failure, let alone act on it. A
|
||||
newer failure replaces it; a repeat of the same one keeps it. 1.1.0's first cut
|
||||
held failures at the head of the one queue instead, and every later toast —
|
||||
"Link copied", "Saved" — waited unseen behind it.
|
||||
|
||||
## 5. Accessibility & keyboard
|
||||
|
||||
@@ -426,11 +435,22 @@ to read a failure, let alone act on it.
|
||||
runs. Tabbing in with nothing focused focuses the first row.
|
||||
- Keys on the tree (`edit/tree-keyboard.ts`): ↑/↓ move; → opens a closed folder
|
||||
or steps into an open one; ← closes it or steps out to the parent;
|
||||
Home/End; type-ahead by first letter, wrapping. Enter opens a bookmark or
|
||||
toggles a folder; F2 renames; Del asks to delete; the **menu key or
|
||||
Home/End; type-ahead by first letter, wrapping. → on an empty folder does
|
||||
nothing, even after "Expand all" put it in the open set. Enter opens a
|
||||
bookmark or toggles a folder; F2 renames; Del asks to delete; the **menu key or
|
||||
Shift+F10** opens "Move to…"; **Ctrl/⌘+C** copies the focused bookmark's
|
||||
link. Ctrl/⌘+F focuses search from anywhere in the tab. Keys typed into the
|
||||
rename input belong to it.
|
||||
- **Focus never dangles.** A focused row that leaves the screen hands focus to
|
||||
its nearest visible folder (`03 §3`); a step that replaces another (the
|
||||
import's preview, progress and result) moves focus to its own heading
|
||||
(`components/focus-heading.ts`) — only when focus was lost or already inside
|
||||
that tab, never stolen from elsewhere — and the import's outcome is spoken by
|
||||
one always-present live region (`ImportAnnouncer`).
|
||||
- **Dialogs** (`Modal`): the × is named "Dismiss" — it was named after the
|
||||
dialog, so a screen reader announced the cancel button as "Delete this
|
||||
item?" — and a confirmation's body is its `aria-describedby`, so the counts
|
||||
are read with the title.
|
||||
- **Row buttons are not tab stops** (`tabindex="-1"`; the disclosure is
|
||||
`aria-hidden`). They are mouse shortcuts, and each has a key above — Open
|
||||
(Enter), Copy link (Ctrl+C), Rename (F2), Move to… (menu key), Delete (Del);
|
||||
|
||||
@@ -156,11 +156,13 @@ stay raw.
|
||||
interpolate no count, because `ParseWarning` always carries one and a uniform
|
||||
shape lets `WarningList` call `tPlural` unconditionally instead of
|
||||
maintaining a list of which codes count things — then `import.warnings.title`
|
||||
and, since v1.1.0, fourteen more: `popup.bookmarks`/`folders`;
|
||||
and, since v1.1.0, eighteen more: `popup.bookmarks`/`folders`;
|
||||
`export.start`; `import.start`, `countBookmarks`/`countFolders`, `reused`,
|
||||
`cancelledSummary`, `partialCreated`/`partialCleared`;
|
||||
`edit.deleteFolderBody`, `keepFirst`/`keepFirstBody` and `sortBody`.
|
||||
Anything else stays a plain string.
|
||||
`edit.deleteFolderBody`, `keepFirst`/`keepFirstBody`, `sortBody`,
|
||||
`showMore`/`showEarlier` and `duplicateLinks`/`extraCopies` (the duplicate
|
||||
summary was one string with two counts, so it read "1 duplicated links · 1
|
||||
extra copies"). Anything else stays a plain string.
|
||||
|
||||
⚠️ **No non-plural key may be named `one` or `other`.** The second test reads
|
||||
any branch holding either key as a plural and fails it unless it has exactly
|
||||
|
||||
@@ -66,16 +66,19 @@ object-src 'self';`) restricts code execution only; it has no `connect-src` or
|
||||
the product and its zero-network claim. The production manifest now declares:
|
||||
|
||||
```
|
||||
script-src 'self'; object-src 'none'; connect-src 'none'; img-src 'self' data: blob:;
|
||||
style-src 'self' 'unsafe-inline'; font-src 'self'; media-src 'none'; frame-src 'none';
|
||||
worker-src 'self'; form-action 'none'; base-uri 'none'
|
||||
default-src 'none'; script-src 'self'; object-src 'none'; connect-src 'none';
|
||||
img-src 'self' data: blob:; style-src 'self' 'unsafe-inline'; font-src 'self';
|
||||
media-src 'none'; frame-src 'none'; worker-src 'self'; form-action 'none'; base-uri 'none'
|
||||
```
|
||||
|
||||
`connect-src 'none'` makes Chrome refuse every fetch, XHR, WebSocket,
|
||||
EventSource and beacon from an extension page; the rest closes remote images,
|
||||
stylesheets, fonts, media, frames and form posts. `style-src` keeps
|
||||
`'unsafe-inline'` because Svelte sets `style` attributes; there is **no
|
||||
`default-src`**, on purpose, because it would govern every unlisted directive. User-initiated
|
||||
stylesheets, fonts, media, frames and form posts, and `default-src 'none'`
|
||||
closes everything left unlisted (web app manifests, prefetches). Every directive
|
||||
the pages use is listed explicitly, so `default-src` changes nothing for them.
|
||||
`style-src` keeps `'unsafe-inline'` because Svelte sets `style` attributes.
|
||||
**WebRTC is not governed by any CSP directive Chrome enforces**, so it is held
|
||||
by the other two layers: both scan for `RTCPeerConnection`. User-initiated
|
||||
navigation — an About link, or "Open" on a bookmark via `tabs.create` — is not
|
||||
governed by a page CSP and is not a request the extension makes (`09 §1`).
|
||||
|
||||
@@ -92,10 +95,12 @@ governed by a page CSP and is not a request the extension makes (`09 §1`).
|
||||
#### Layer 2 — the built-artifact gate
|
||||
|
||||
`npm run check:manifest` (`scripts/check-manifest.mjs`) scans every `.js` file
|
||||
in `.output/chrome-mv3` for network APIs — including code that arrived through
|
||||
a dependency, which no source gate can see — and pins the manifest: MV3, the
|
||||
permission list, the exact key set, the Chrome floor, the exact CSP, and that
|
||||
every file the manifest and pages reference exists.
|
||||
in `.output/chrome-mv3` for the network identifiers the source gate bans, as
|
||||
bare words — including code that arrived through a dependency, which no source
|
||||
gate can see — and pins the manifest: MV3, the permission list, the exact key
|
||||
set, the Chrome floor, the exact CSP, that every file the manifest and the
|
||||
built pages reference exists, and that no page loads anything from outside the
|
||||
package.
|
||||
|
||||
#### Layer 3 — the source gate
|
||||
|
||||
|
||||
@@ -206,8 +206,12 @@ page loaded.
|
||||
|
||||
- `DiagEvent` is a closed union with no field for a title, an address or a
|
||||
path — adding one is a type change under review, not a call site — and every
|
||||
string field it has is filled from a fixed identifier: a phase name, an i18n
|
||||
code, an error's `name`. The copied report adds only the extension version, the language and
|
||||
string field is itself a **union of fixed values**: the import phases,
|
||||
`FileFormat`, the `ErrorKey`s `describeError` can return, the two edit
|
||||
actions, the three storage issues, and an allowlist of error names (anything
|
||||
else is logged as `'other'`, since a name is just a string property). 1.1.0's
|
||||
first cut typed them all `string`; the test file now carries
|
||||
`@ts-expect-error` cases, so a title stops compiling, not just reviewing. The copied report adds only the extension version, the language and
|
||||
theme *preferences*, and Chrome's major version from the user agent.
|
||||
- Never written to `storage`, never sent (the CSP would refuse it anyway,
|
||||
`08 §3`), gone when the tab closes. The log is per page: the popup installs
|
||||
|
||||
@@ -48,7 +48,11 @@ Common to every job since v1.1.0:
|
||||
- `npm ci --ignore-scripts`, then `npx --no-install wxt prepare`. No dependency
|
||||
gets to run code at install time (SonarCloud S6505); our own `postinstall` is
|
||||
the one script we need, so it runs explicitly, from the local binary, never
|
||||
fetched. A local `npm ci` still runs `postinstall` normally.
|
||||
fetched. A local `npm ci` still runs `postinstall` normally. **One exception
|
||||
we do not control:** the `build` job delegates to the ops reusable, which runs
|
||||
a plain `npm ci`, so install scripts do run there. That job holds a read-only
|
||||
token and no secrets; an ops-repo input to skip install scripts is on the
|
||||
`15` backlog.
|
||||
- Reusable workflows get **named** secrets, never `secrets: inherit`: they are
|
||||
pinned to the ops repo's moving `main`, so each one receives only what it
|
||||
declares.
|
||||
@@ -182,14 +186,18 @@ Added 2026-10-28, replacing SonarCloud's Automatic Analysis so the project gets
|
||||
- **A separate workflow, not a job in `ci.yml`:** a Sonar outage or a
|
||||
quality-gate opinion must never turn CI red. The verdict reaches PRs as the
|
||||
SonarCloud GitHub App's own check. It is not a required check.
|
||||
- Steps: full-history checkout (`fetch-depth: 0`, for new-code detection), the
|
||||
common install, `npm run coverage` (which writes `coverage/lcov.info`), then the
|
||||
scan with `-Dsonar.projectVersion=<package.json version>`, so "new code" means
|
||||
"since the last release".
|
||||
- **Two jobs, so the token never shares a runner with dependency code.** A
|
||||
job's secrets are loaded into its runner for the whole job, and any step can
|
||||
read them from the runner process whatever its own `env:` says (the shape of
|
||||
the March 2025 tj-actions compromise). `coverage` does the common install and
|
||||
`npm run coverage` with **no secret**, and uploads `coverage/lcov.info` as a
|
||||
one-day artifact; `scan` installs nothing — full-history checkout
|
||||
(`fetch-depth: 0`, for new-code detection), the artifact, then the scan with
|
||||
`-Dsonar.projectVersion=<package.json version>`, so "new code" means "since
|
||||
the last release".
|
||||
- The scan action is **pinned to a commit** (`v8.3.0`): it is the step that
|
||||
holds `SONAR_TOKEN`, and the token is scoped to the two steps that need it.
|
||||
Dependabot and fork PRs get no repository secrets, so the scan is skipped with
|
||||
a notice instead of failing.
|
||||
holds `SONAR_TOKEN`. Dependabot and fork PRs get no repository secrets, so the
|
||||
scan is skipped with a notice instead of failing.
|
||||
- Coverage: `vitest.config.ts` measures every `src/**/*.ts` module and reports
|
||||
`text` + `lcov`; the CI *gate* is still the core-only glob threshold of
|
||||
`11 §1`. `sonar.coverage.exclusions` drops components, entrypoints and
|
||||
|
||||
@@ -111,12 +111,13 @@ what the dashboard really required.
|
||||
|
||||
### README screenshots (not store assets — do not confuse them)
|
||||
|
||||
`capture/` holds five PNGs at 2512×1440 / 2560×1440 used by `README.md`, taken
|
||||
of the 1.0.0 UI on 2026-07-26. They are the wrong dimensions for the store and
|
||||
cover only four of the five subjects first planned for it. `capture/Edit.png` is committed
|
||||
but unreferenced. `--shoot` writes into `capture/` as well — read the script's
|
||||
header for which files before running it in a checkout whose README images you
|
||||
mean to keep.
|
||||
`capture/` holds the README set — `import`, `export`, `edit`, `settings`,
|
||||
`about` (light, English, 1280×800) and `popup` (360×420) — regenerated for
|
||||
1.1.0 by `node scripts/screenshots.mjs --shoot` from neutral sample data. The
|
||||
1.0.0 shots (2512×1440, a real profile) are gone. `store/screenshots/` holds
|
||||
the dark 1280×800 store candidates (`edit`, `export`, `import`); which of them
|
||||
to upload, alongside or instead of what the listing has now, is the owner's
|
||||
call (⚠️ `13 §1b`).
|
||||
|
||||
## 3. Store listing — EN (canonical)
|
||||
|
||||
|
||||
@@ -150,10 +150,16 @@ independently of the package (`13 §5`), though the copy should still go through
|
||||
Items found by the 2026-10-28 audit and not closed in v1.1.0, with their IDs:
|
||||
cL6 non-UTF-8 charsets in HTML imports; cL9 an extension allowlist on drop
|
||||
(content sniffing is the gate, so not planned); cL13 a newline inside a title
|
||||
for Chrome's line-based importer; sA8.1 Biome does not lint `.svelte`; uH4's
|
||||
windowed renderer (500-row chunking shipped instead); the edit-session store
|
||||
(364 lines) and TreeRow (353) sit between the 300-line target and the 500 hard
|
||||
limit and should be split before they grow.
|
||||
for Chrome's line-based importer; sA8.1 Biome does not lint `.svelte`. From
|
||||
the post-implementation review: a keyboard way to place an item before or after
|
||||
a sibling (drag has it; "Move to…" only appends); true virtualization of the
|
||||
edit tree (a 500-row window around the focus shipped — `05 §9`); a
|
||||
`require-trusted-types-for 'script'` CSP, which would make Chrome itself
|
||||
enforce the raw-HTML ban (the Svelte runtime already creates the policy;
|
||||
untested in extension pages); an input on the ops repo's reusable workflow to
|
||||
skip install scripts in the `Build + package` job (`12 §2`); whether a
|
||||
screen reader reads a focused row's button labels with its name (unconfirmed
|
||||
without one).
|
||||
|
||||
## v1.2 — resilience
|
||||
|
||||
@@ -285,4 +291,8 @@ limit and should be split before they grow.
|
||||
| 2026-10-29 | **About and THIRD_PARTY_NOTICES stop saying "no third-party code"** — the build always compiled in the Svelte runtime, its `clsx` helper and WXT's browser shim (all MIT; `clsx` was found by the review, not by the first fix). The notices now ship as `THIRD_PARTY_NOTICES.txt`, required by `check:manifest`, and `wxt.config.ts` fails the build when an uncredited package would ship | 14 §5 |
|
||||
| 2026-10-29 | **Contact aliases per purpose**: security@ (SECURITY.md), privacy@ (PRIVACY), legal@ and dmca@ (EULA, DISCLAIMER), copyright@ (licensing), takedown@ (impersonating copies), code@ (CoC, contributing, issue chooser), sponsor@/collab@/press@ (README); contact@ retired. Still none inside the product — `links.test.ts` now scans all of `src/` | 14 §3.1, 09 §6 |
|
||||
| 2026-10-29 | **Legal clarifications, no `LEGAL_VERSION` bump**: version/date headers, a copyright line, EULA clause 3 as a non-binding note (GPL §10), DISCLAIMER's Replace description, PRIVACY on diagnostics, the Web Store and opening a bookmark | 14 §3.1 |
|
||||
| 2026-10-29 | **`scripts/screenshots.mjs`** serves the built extension with a fake `chrome`, neutral sample data and the production CSP as a meta tag; `--shoot` drives headless Chrome for `capture/` and the store set. Visual QA and listing screenshots stop depending on anyone's real profile | 11 §5, 13 |
|
||||
| 2026-10-29 | **`scripts/screenshots.mjs`** serves the built extension with a fake `chrome`, neutral sample data and the production CSP as a meta tag; `--shoot` drives headless Chrome for `capture/` and the store set. Visual QA and listing screenshots stop depending on anyone's real profile. It listens on 127.0.0.1 only, and runs Chrome asynchronously — `execFileSync` blocked the very server Chrome was waiting on | 11 §5, 13 |
|
||||
| 2026-10-29 | **Review of the 1.1.0 UI, acted on before release**: the edit tree keeps focus on a rendered row and returns it from the rename box; a bulk command locks every other write in the session, not just the toolbar; a folder closed during a search stays closed; #edit mounts a 500-row window around the focus instead of a growing prefix; failures get a pinned toast slot so later toasts still show; the import moves focus to each step's heading and announces its outcome; dialogs name their × "Dismiss"; the import preview's new/dup badges show again (a deep `$state` proxy broke their WeakMap lookups — already broken in 1.0.x) | 03 §3, 05 §9, 06 §4–§5 |
|
||||
| 2026-10-29 | **The extension-page CSP gains `default-src 'none'`** — reversing the earlier "deliberately no default-src". Every directive the pages use is listed, so it changes nothing for them, and it closes what was left open (manifests, prefetch). WebRTC, which no CSP directive Chrome enforces governs, stays covered by the bundle and source scans | 08 §3 |
|
||||
| 2026-10-29 | **Diagnostics allowlist enforced by types**: every `DiagEvent` string field is a union of fixed values, error names pass through an allowlist (`'other'` otherwise), and `@ts-expect-error` tests keep a title from compiling | 09 §7 |
|
||||
| 2026-10-29 | **SonarCloud runs in two jobs**: coverage with no secret, then a scan that installs nothing and gets the lcov report as an artifact — a job's secrets are readable by every step on its runner | 12 §2.5 |
|
||||
@@ -21,8 +21,10 @@ contains no analytics, telemetry, or crash reporting.
|
||||
`chrome.storage.sync`, so even your settings stay off any vendor cloud.
|
||||
|
||||
The Extension requests no other permissions. It has no host permissions, no
|
||||
content scripts, and no background service worker. Its Content-Security-Policy
|
||||
forbids it from opening network connections at all.
|
||||
content scripts, and no background service worker. It contains no code that
|
||||
makes network requests, and its Content-Security-Policy additionally makes the
|
||||
browser refuse fetch, XHR, WebSocket, EventSource and beacon requests and
|
||||
remote images, fonts, media and frames from its pages.
|
||||
|
||||
- **Diagnostics** (no permission needed): while a BookmarkMagic tab is open,
|
||||
it keeps a short log of what it did — import steps, error codes, counts —
|
||||
|
||||
|
After Width: | Height: | Size: 58 KiB |
|
After Width: | Height: | Size: 58 KiB |
|
After Width: | Height: | Size: 40 KiB |