Files
bookmarkmagic/docs/06_UI.md
T
poli0981andClaude Opus 5.5 355443ef6b docs: specify Firefox (AMO) and Edge Add-ons support for v1.3.0
Docs first, as CLAUDE.md requires; the code follows in this branch.

- 08: the manifest per target (two packages from one source, MV3 for
  both); Firefox's gecko id, data-collection declaration, floor 140 and
  source-code submission; Edge takes the Chrome package unchanged.
- 02 §4, 03 §1/§3, 04, 05 §10: Firefox's GUID roots and fourth root, the
  Bookmarks Menu (`root: "menu"`, unmarked entries routed into it on
  Firefox); separators recognised by type, kept out of the file model and
  shown as untouchable lines in #edit; the move index sent by each browser's
  own rule and checked against the reply; addresses Firefox refuses dropped
  before planning; separators a file holds counted.
- 06/07: the About link follows the install; three strings that blamed
  Chrome for what every browser does are reworded; new keys listed.
- 11: a Firefox flavour of the fake, and a manual pass on real Firefox and
  Edge (including Edge signed in with sync) before the first submissions.
- 12/13: three store jobs, each in its own environment with only its own
  secrets and a four-package install; CWS API v2 (v1.1 died 2026-10-15);
  AMO and Edge runbooks for the first, manual uploads.
- 09/14 and legal/: three stores named; a clarification, not a
  LEGAL_VERSION bump.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-18 22:10:35 +07:00

40 KiB
Raw Blame History

06 — UI Specification

Two surfaces: Popup (launcher) and Manager (full-tab SPA, 5 tabs). Svelte 5 runes, scoped styles, CSS custom properties for theming. No CSS framework.

1. Design tokens — src/styles/tokens.css

The look since v1.1.0 is "technical": a cool neutral ramp, a monospace face for labels and readouts, a faint grid, square-ish corners and quick, small motion. No font is bundled — both stacks are system ones.

:root {
  color-scheme: light;  accent-color: var(--accent);   /* native controls follow the theme */
  --bg: #fbfbfd;  --bg-raised: #f2f3f7;  --bg-sunken: #eceef3;   /* page · panel · well */
  --border: #dde1e8;            /* decorative dividers only */
  --border-strong: #7b8496;     /* every interactive boundary — ≥ 3:1 */
  --fg: #151821;  --fg-muted: #535d6e;
  --accent: #6447f0;  --accent-fg: #ffffff;  --accent-subtle: #ece7ff;   /* violet — "magic" */
  --danger: #c22f3e;  --danger-fg: #ffffff;  --success: #15733c;  --warn: #8a5a12;
  --grid: rgb(21 24 33 / 4.5%);
  --radius: 6px;  --radius-sm: 4px;
  --font: system-ui, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-mono: ui-monospace, 'Cascadia Code', 'SF Mono', Menlo, Consolas, 'Liberation Mono', monospace;
  --fs-0: 12px; --fs-1: 13.5px; --fs-2: 15px; --fs-3: 18px; --fs-4: 24px;
  --sp-1: 4px; --sp-2: 8px; --sp-3: 12px; --sp-4: 16px; --sp-5: 24px; --sp-6: 32px;
  --shadow-1: …;  --shadow-2: …;          /* resting raise · floating (toasts, dialogs) */
  --z-dialog: 40;  --z-toast: 50;
  --width-page: 1040px;  --width-side: 360px;
  --dur-1: 120ms; --dur-2: 200ms; --dur-3: 320ms;  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
}
[data-theme='dark'] {           /* repeated verbatim under prefers-color-scheme: dark */
  color-scheme: dark;
  --bg: #0e1015; --bg-raised: #161a22; --bg-sunken: #0a0c10;
  --border: #262b35; --border-strong: #5f697c;
  --fg: #e6e9f0; --fg-muted: #9aa4b5;
  --accent: #9a80ff; --accent-fg: #0e1015; --accent-subtle: #241c44;
  --danger: #ff6b7d; --danger-fg: #0e1015; --success: #3ecf8e; --warn: #e2b93b;
  --grid: rgb(230 233 240 / 3.5%);  /* plus darker --shadow-1/-2 */
}

The roles matter more than the values, because the new surfaces are easy to misuse:

  • Three surfaces. --bg is the page and the inside of lists and cards; --bg-raised is a panel (callouts, dialog header and footer, the duplicate panel, row hover); --bg-sunken is a well — inputs, readouts (StatsCard, the popup counts), the TabBar track, the status bar. --accent-subtle tints what is selected: the focused tree row, the chosen mode or format card, a drop-into target.
  • Two borders. --border only divides. Anything that marks an interactive boundary — inputs, cards, the drop zone, the tree frame — uses --border-strong, which clears 3:1 (WCAG 1.4.11).
  • color-scheme makes scrollbars and native form controls follow the theme; accent-color tints checkboxes and radios. base.css draws the 24px body grid from --grid (a few percent alpha: texture, never content), and sets machine-shaped text — counts, versions, paths, addresses (.mono, code, kbd) — and the numbered step labels (.eyebrow, 01 · SOURCE) in the mono stack.
  • --z-dialog is defined but nothing reads it: Modal opens with showModal(), whose top layer sits above any z-index. --z-toast places the toast.
  • Motion tokens (--dur-*, --ease): anything that moves uses them only inside @media (prefers-reduced-motion: no-preference) (§5). Colour and opacity fades are not motion and may use them anywhere — Button's hover does.

⚠️ --accent-fg and --danger-fg must be redefined in the dark block, in the opposite direction to the colour they sit on. Dark mode lightens --accent and --danger for contrast against --bg, which is exactly what breaks white ink on them — the original palette measured 3.67:1 and 2.74:1 there, against the 4.5:1 §5 requires.

The light --danger/--success/--warn are darker than an eyeball would pick because all three are rendered as text — StatsCard's duplicate count, the preview badges, DuplicatePanel's "kept", the status bar's "local only" — and every text token is held to 4.5:1 on every surface, the sunken and tinted ones included.

None of these numbers is a matter of taste: tests/unit/styles/contrast.test.ts parses tokens.css and, for light and for both dark blocks, fails the build if any of the six text tokens (--fg, --fg-muted, --accent, --danger, --success, --warn) drops below 4.5:1 on any of the four surfaces (--bg, --bg-raised, --bg-sunken, --accent-subtle); if ink on a filled control (--accent-fg on --accent, --danger-fg on --danger) does; if --border-strong or --accent (the focus ring) falls under 3:1 on --bg or --bg-raised; or if the two dark blocks drift apart. Re-run it after changing a colour. It is token-level: an opacity on text, a hardcoded colour or a pair nobody added to its list gets past it — the contrast item in 11 §5 is the backstop.

Theme: data-theme on <html> — set for Light and Dark, removed for System, so the prefers-color-scheme block decides (applyTheme in stores/settings.svelte.ts); the manual override persists in Settings. Focus rings are always visible (:focus-visible, a 2px --accent outline).

The extension icon does not read these tokens: scripts/gen-icons.mjs hardcodes the 1.0 accent, #6d4aff, so the toolbar icon kept its violet when the UI moved to #6447f0.

2. Popup (340 px × auto)

┌──────────────────────────────────┐
│ ◆ BookmarkMagic           v1.x.y │   mark + name + version (mono)
├────────────────┬─────────────────┤
│ BOOKMARKS      │ FOLDERS         │   readout: what lives INSIDE the roots
│ 1 284          │ 96              │
├────────────────┴─────────────────┤
│ [⬆ Import bookmarks…           ›]│   tile + one-line hint → manager#import
│ [⬇ Export bookmarks…           ›]│   → manager#export
│ [✎ Open manager                ›]│   → manager#edit
├──────────────────────────────────┤
│ ● local only                   ⚙ │   ⚙ → manager#settings
└──────────────────────────────────┘

The counts walk the tree once and leave out the three permanent roots — 1.0.x counted them, so an empty profile read "0 bookmarks · 3 folders". A failed read shows —. Each tile hands its route to openManager (browser/open-manager.ts): an open Manager tab is focused and asked over a BroadcastChannel to switch to that route — refused, with the busy toast, while an import is writing (03 §5) — and otherwise a new tab opens at the hash. 1.0.x only focused the open tab, so "Export" landed wherever it had been.

Legal not yet accepted → the tiles still open the Manager (the gate lives there). No heavy work in the popup, ever.

3. Manager layout

┌──────────────────────────────────────────────────────────────────────────────────────────┐
│ ◆ BookmarkMagic  ~/edit      [⬆ Import][⬇ Export][✎ Edit]       [◍ English ▾] [▭|☀|☾]    │  header
├──────────────────────────────────────────────────────────────────────────────────────────┤
│                                   <active tab content>                                   │
├──────────────────────────────────────────────────────────────────────────────────────────┤
│ ● local only │ bookmarks, storage │ v1.x.y │ GPL-3.0 │ GitHub ↗     ⚙ Settings │ ⓘ About │  status bar
└──────────────────────────────────────────────────────────────────────────────────────────┘
  • Header (sticky, translucent over the content): the brand mark (an accent tile whose logo spark pulses), the name, and the route as a mono crumb ~/<route> (hidden under 640px); TabBar — Import/Export/Edit as icon + label in a sunken track, with one raised pill that slides to the active tab (labels collapse to icons under 560px; no pill on #settings/#about); then the compact language select and theme control.
  • Status bar (IDE-style: mono, sunken, sticky at the bottom): local only (a green dot; its title says the extension cannot send anything) · bookmarks, storage, the only two permissions · v<version> · GPL-3.0 · GitHub ↗ · and, right-aligned, Settings and About. The page is a flex column at least the window's height, so the bar sits at the bottom even under a short tab.

Max content width --width-page (1040px), centered. The side column of #import, #export and the duplicate panel is --width-side (360px); two-column layouts stack under 820px. Settings/About open as tabs too (the status-bar buttons = same routes, and both are disabled while an import is writing — see 03 §5). The version is read from the manifest at runtime (browser/app-info.ts), never hardcoded. Every route sets the document title, <Route> · BookmarkMagic.

The theme control is a three-way segmented control (System · Light · Dark — monitor/sun/moon icons in the header, words in #settings), not a cycling ◐ glyph. Rationale: one code path shared with the #settings row, and the current choice is visible rather than inferred — a cycling button conflates "what am I" with "what will I become", which fights §5.

<LegalGate> fills the content region, not the viewport. docs/14 §2 (echoed in 03 §4 and the 15 decision log) requires #settings and #about to stay reachable while the gate is up, and a literal inset: 0 scrim would bury the status-bar links that get you there. So: a full-bleed panel inside <main>, with the header and status bar still live. TabBar's blocked prop marks the three gated tabs with a lock icon and an "accept the terms" title, but they stay clickable — the gate renders in their place, and inert buttons stranded a first-run user who had gone to #settings first. A side effect worth keeping — the Import/Export/Edit tabs never mount before acceptance, so nothing touches chrome.bookmarks until the user has agreed to the terms.

3.1 #import

Numbered mono step labels (01 · SOURCE … 04 · WRITING) head each stage.

  1. Idle — 01 · Source: <DropZone>, a single button-shaped target (so the keyboard gets the file picker for free) with a marching-ants border that travels on hover and dragover: "Drop a bookmark file or click to browse · max 25 MB", and a line naming what it reads — browser HTML exports, CSV, BookmarkMagic and Firefox JSON backups, Chrome's own Bookmarks file. The picker has no accept filter (03 §1 step 1); only the first file of a multi-file drop is read. While reading: "Reading …".
  2. Parsed: two columns.
    • Left, 02 · Preview, with the file name and the detected format as pills, then <TreePreview> (read-only nested lists, §5): new/dup badges, a child count on every folder, and on a top-level folder the file marks as a browser root a → bar / → Other / → Mobile pill — where Merge and Replace unwrap it (03 §1).
    • Right, 03 · Options: <StatsCard> readout (bookmarks · folders · max depth · duplicates, the last in --warn when non-zero) + <WarningList> (collapsible, one plural line per code) + <ImportOptions>:
      • Merge mode as three cards with an icon and a one-line note (New folder ▸ default · Merge · Replace all). Replace shows a danger callout: "This deletes ALL current bookmarks. A JSON safety backup is saved first, and nothing is deleted until that succeeds."
      • [x] Skip duplicates already in this browser (n found) — disabled and unchecked when Replace is selected, with the note "Not applicable: Replace deletes your current bookmarks first." Skipping against a tree that is about to be deleted would silently drop everything (03 §1, 05 §3).
      • The today's-date notice, then the primary button Import n bookmarks, danger-styled for Replace. n comes from a preview plan — previewPlan runs buildImportPlan against the preview-time snapshot with the chosen mode and dedupe — so links the user chose to skip are not counted; the write re-plans against a fresh read at Start (03 §1 step 7). The progress bar uses stats.toCreate (folders included) — two different numbers by design (02 §4).
    • Replace asks first. A danger ConfirmDialog (focus on Cancel) states both sides exactly: "n bookmarks and m folders in this browser will be deleted, after a safety backup is saved. Then n′ bookmarks and m′ folders from are written." The current counts are everything inside the writable roots, from the preview-time read (prepareImport's current); the incoming ones are the preview plan's. Confirm reads "Back up and replace" (09 T4).
  3. Backing up → attesting → clearing (Replace only, 03 §1 step 6b): a warning while the save dialog is open; on the fallback path a blocking confirmation ("I have the backup — delete and replace" / Cancel); then a danger callout while the tree is deleted, with no Cancel.
  4. Writing — 04 · Writing: striped determinate <ProgressBar> (the stripes travel only when motion is allowed) + "Importing… done / total" + the current path + "Keep this tab open" + Cancel. The first create already reports, so the bar moves at once rather than after 50 items.
  5. Report (<ImportReport>). Done: a success callout "Done — n bookmarks and m folders created.", then what was skipped (already in this browser vs repeated in the file), how many existing folders Merge reused (when any), where it all went (the new folder's name under Other bookmarks / appended to the folders it belongs in / now exactly what the file holds), and the today's-date notice. A cancelled or failed run says how many items were created and — when something was written outside Replace — where; after a Replace has cleared the tree it names the backup as the user saved it. Failures add an <ErrorCallout> (localized message + technical detail). Actions: [Open Edit tab] (done only) · [Import another file].

3.2 #export

Two columns, like #import.

  • 01 · What to export: <FolderPickTree> — an "Everything" master checkbox, indeterminate while a partial selection exists, over nested lists of folder checkboxes with tri-state (checked / indeterminate / unchecked, from one checkStates pass over the tree — core/select.ts). Folders only: a bookmark travels with its folder, and each folder shows how many bookmarks it holds directly. The top level starts open, deeper levels closed, and children mount 500 at a time (05 §9). Not role="tree" (§5).
  • 02 · Format: <FormatSelect> — radio cards HTML · JSON · CSV · Markdown, each with an icon, its extension and a one-line note; then the per-format extras: Markdown says it is share-only (BookmarkMagic cannot import it back), CSV says empty folders and the toolbar are not preserved and offers the delimiter, Markdown offers its layout. Defaults come from Settings.
  • Export n bookmarks, disabled at zero. Success is a toast "Download started: " — started, because the anchor download gives no completion signal and the browser may still ask where to save (03 §2). A failure stays on screen as an <ErrorCallout> with its technical detail.

3.3 #edit

Toolbar (EditToolbar, role="toolbar"): search (⌘/Ctrl-F focuses it from anywhere in the tab) · New folder · Sort A→Z · Find duplicates (a toggle, aria-pressed) · icon-only Expand all / Collapse all. Sort acts on the focused folder, or the folder holding the focused bookmark, and is disabled unless that folder has two or more children and is not policy-managed. New folder, Sort and the duplicate panel's deletes are disabled while a bulk command runs.

Tree (TreeList + TreeRow): one flat role="tree" list in a fixed-height scroller, mounted 500 rows at a time with a "Show more" row (05 §9); the roots start open. A row: disclosure chevron · glyph (folder, open folder, link — a lock for a policy-managed node) · title (an untitled bookmark shows its address, muted, in mono) · host · a child count on folders · ⚠ on an address Open refuses (09 T3) · action buttons, shown on hover and on the focused row: Open and Copy link (bookmarks), Sort A→Z (sortable folders), Rename, Move to…, Delete (editable nodes only — 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), 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 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.
  • Drag & drop, from any editable row not being renamed: the row under the pointer shows where the item will land — a line along its top (upper quarter: before), along its bottom (lower quarter: after), or a dashed outline (the middle half of a folder: into). A bookmark row splits at the half. An illegal drop — onto itself, into its own subtree, beside a permanent root, into a managed folder — shows nothing and does nothing; a cancelled drag clears every highlight.
  • Alt+↑ / Alt+↓ (since v1.2.1) is the keyboard's before/after: the focused row changes places with the sibling shown above or below it — under a search, the nearest one the search still shows. It is the same planDrop a drag resolves through (05 §10), so legality is one rule: nothing happens at either end of a folder, on a permanent root, on a policy-managed node or while a bulk command runs. Focus stays on the row, and the new position is spoken (§5).
  • Move to… (MoveToDialog, built on Modal): a filter box over every folder the item may move into, each as its full path, indented — the item itself, its subtree, its current parent and managed folders left out. 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" (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.

A failed command shows above the tree as an <ErrorCallout> (localized message, technical detail), plus "moved / deleted d of t" when a bulk command stopped part-way; the tree is then re-read. Empty states are text only: "Reading your bookmarks…", "No bookmarks yet — import some to get started.", "Nothing matches that search."

3.4 #settings

Single column of six <SettingRow>s: Language · Theme (System/Light/Dark segmented) · Default export format · Default import mode · CSV delimiter · Markdown layout.

  • The Language select offers six options — one per shipped locale plus "Automatic": Settings.locale is 'auto' | Locale (en, vi, ja, zh-CN, ro — 07 §2) and DEFAULT_SETTINGS.locale === 'auto', so "Automatic (follow the browser)" has to be selectable or the default is unreachable. The options are built from LOCALES, in that order. The language labels are endonyms, identical in every dictionary — a Japanese user hunting for Vietnamese looks for "Tiếng Việt", a Romanian one for "Română" — and dictionaries.test.ts enforces that they match.
  • Romanian runs roughly a third longer than English, and Chinese far shorter. Neither may truncate a control, wrap a tab label or push the popup past its 340 px width — the visual sweep (11 §5) photographs every route in both, and that sweep, not a test, is where overflow is caught.
  • Markdown layout is the sixth row because markdownStyle is a persisted field; without it the only place to change it was a transient #export control that never wrote back.
  • Four of the six rows reuse the Export/Import tabs' own i18n keys rather than inventing parallel wording, so the two surfaces cannot describe the same choice differently.

Auto-save + saved toast — the toast reports the resolved SaveOutcome, so a failed write says so rather than claiming success. Footer: "Reset to defaults", behind a <ConfirmDialog> (six preferences is enough to be worth a confirm).

3.5 #about

<AboutCard>: logo, name, version (from manifest at runtime), tagline; links: GitHub repo ↗ · Report an issue ↗ · Changelog ↗ · Accessibility ↗ · Store listing ↗; Third-party code: no runtime dependencies are installed, and the two MIT-licensed pieces the build compiles in are named — the Svelte runtime and WXT's one-line browser shim — with their notices shipped in the package as THIRD_PARTY_NOTICES.txt (since v1.1.0; it used to say "Third-party dependencies: None", which was never true of the bundle); Donate: all five handles from 14 §5 / .github/FUNDING.yml — GitHub Sponsors · Ko-fi · Buy Me a Coffee · Patreon · PayPal (platform names are brand names and stay untranslated, 07 §4); Legal block: EULA · License (GPL-3.0) · Disclaimer · Privacy Policy — each → GitHub legal/ file; "Legal terms accepted on · version n" — where n is the version the user accepted, from the stored record, not the current LEGAL_VERSION constant. Reachable before acceptance (14 §2), so it also has a not-yet-accepted state, and a dateless variant for a stored record whose timestamp is missing or unparseable; Diagnostics: a one-line note and Copy diagnostics, which puts this tab's local event log on the clipboard on an explicit click (09 §7).

"Changelog" points at CHANGELOG.md on main. (It pointed at the repo's releases page until Phase 5 wrote that file — an empty releases page beats a 404 opened from a legal surface. tests/unit/links.test.ts now pins both the URL shape and the file's existence, so the fallback cannot silently return.)

"Accessibility" (since v1.2.1) points at ACCESSIBILITY.md on main — the statement, the full key list and how to report a barrier. Someone who cannot use a screen has no other route from inside the product to either, and the tree's keys are shown nowhere in the UI. The same test pins its URL and the file's existence.

"Store listing" points at the listing the running copy came from — it is the only route a user has from inside the product to rate or review it, which 13 §6 depends on. Since v1.3.0 one package serves the Chrome Web Store and Edge Add-ons, so the link is chosen at run time (links.ts storeUrlFor): the Firefox build → the AMO listing, addressed by the gecko id; a Chromium copy whose runtime.id is the Chrome Web Store item id (00 §9) → that listing; anything else — an Edge Add-ons install, an unpacked build → the README's install section, which lists every store. The label was "Chrome Web Store" until then.

No email address appears anywhere in the product. Since v1.1.0 the project's addresses are per purpose (security@ in SECURITY.md, privacy@ in legal/PRIVACY.md, accessibility@ in ACCESSIBILITY.md, the rest in the legal files and the README's contact table; contact@ is retired), and none of them is inside the extension. An address on an in-product surface invites users to mail their real bookmark file, and receiving unsanitized personal URLs is exactly what 09 and the privacy policy are written to avoid (15 decision log, 2026-08-03). tests/unit/links.test.ts fails on a mailto: or an @poli0981.dev address anywhere under src/ — widened in v1.1.0 from links.ts alone.

4. Component inventory (src/lib/components/)

TabBar · LanguageSwitcher · ThemeToggle · DropZone · TreePreview · TreeView · TreeNode (recursive, {#await}-free, lazy children) · FolderPickTree · StatsCard · WarningList · ImportOptions · FormatSelect · ProgressBar · ResultCard · SearchInput · DuplicatePanel · Modal (native <dialog>; every dialog is built on it) · 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).

Rule: components follow 10 §1 (300 lines soft, 500 hard); recursive tree logic stays in the node components.

As built, some inventory names map differently — recorded so the list is not 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, 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 (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, 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 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

  • #edit is the one ARIA tree (TreeList): role="tree" on a focusable <ul> — one tab stop — with roving focus through aria-activedescendant. Rows are treeitems with aria-level, aria-expanded (expandable rows only), aria-selected and explicit aria-setsize/aria-posinset: the rows render flat, so the browser cannot count siblings, and without them a screen reader said "1 of 1" on every row. aria-busy while a bulk command 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. → 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…"; Alt+↑ / Alt+↓ moves the row one place up or down among its siblings (§3.3); 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. ACCESSIBILITY.md carries the same list for users, and the About tab links to it — apart from "Ctrl F" on the search box, nothing in the UI shows these keys yet. Tabbing in with nothing focused focuses the first row; a mouse press does not (since v1.2.1): the press focuses the list too, and choosing the first row then scrolled a long tree to the top under the pointer.
  • Focus never dangles. A focused row that leaves the screen hands focus to its nearest visible folder (03 §3). After a delete, focus goes back where the delete was asked for — the tree, or in the duplicate panel the next copy's delete button, else the panel's close button — because the dialog cannot return it to a button that went with what it deleted. 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; inside step 04, a phase change that removes the focused control (confirming the backup) hands focus to the step's heading again. The import's outcome is spoken by one always-present live region (ImportAnnouncer). Since v1.2.1 three more places that dropped focus on <body> are closed. A route change whose control went with the old route ("Open in Edit" on the import report) moves focus to <main> — only when focus was lost, and never on the first load. After "Keep the first of each" focus lands on the panel's close button, the delete buttons having gone with the copies. After a confirmed Sort A→Z from the toolbar — whose button is disabled while the sort runs, which is what dropped it — focus goes to the tree.
  • Separators (Firefox, since v1.3.0) render as a line inside a role="none", aria-hidden list item between the treeitems, so the tree still owns only tree items. They take no focus, so ↑/↓, Home/End and type-ahead pass over them, and aria-posinset/aria-setsize count the items around them, not the separators. Alt+↑/↓ does step past one, one place at a time, as a drag would — and since the separator is not counted, the spoken "position n of m" does not change on that step. A known limitation (ACCESSIBILITY.md): a screen reader is not told where the separators are.
  • The tree says what Alt+↑/↓ did. One always-present polite live region in the tab speaks "