poli0981andClaude Opus 5 121a5a6957 feat(settings): make two Manager tabs agree with each other
docs/15 recorded this as a known v1 limitation, and with real users it is a
one-star review waiting to happen: `save()` writes the whole settings object
rather than a patch, so a tab opened before the language changed reverted that
change the moment its own theme toggle fired. From the user's side that reads as
"I changed it and it didn't stick" — unfalsifiable, and indistinguishable from
a bug. Accepting the legal terms in one tab likewise left the other padlocked
until reload.

The adoption rule is field equality plus an in-flight guard, and between them
they solve the echo problem and the debounce problem at once:

1. If this context has an unflushed write, ignore the incoming change entirely.
   It is about to overwrite that value anyway, and adopting first would clobber
   the choice the user just made — in the UI *and* in what gets persisted 200 ms
   later. That is last-write-wins, exactly the semantic docs/15 documented, and
   it converges because our write fires the same event in the other tab.
2. Otherwise adopt only fields that actually differ. Our own write always
   matches what we already hold, so self-echo suppression falls out for free —
   no `lastWritten` snapshot to keep in step and go stale, and no dependence on
   key order, which a $state spread and coerceSettings do not agree on.

The fake-timer test covering rule 1 is the one that matters; without it the
guard is an unverified assertion about a race.

Legal acceptance is adopted **one way only, toward accepted.** App.svelte
renders the gate in place of the tab body, so an externally-raised gate would
unmount ImportTab mid-write and strand the import it was driving — recreating,
through a third door, the deadlock the routing guard and the store-held
attestation resolver were just written to close. Clearing storage elsewhere
therefore does nothing; a reload re-evaluates it, and a reload has no in-flight
work to strand. Three tests pin that asymmetry so a future simplification that
makes it symmetrical fails loudly.

subscribeStorage coerces through the same functions the read path uses — a
second tab is not a more trustworthy source than disk, it is the same disk — and
swallows a throwing handler, because an exception inside a chrome.* listener
surfaces in chrome://extensions and docs/11 §5 counts that as a failed QA pass.

Verified before writing any of it that WXT's fakeBrowser does implement
storage.onChanged (unlike bookmarks.*), so no injectable event source was
needed.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-03 19:11:32 +07:00
2026-07-25 19:21:07 +07:00

BookmarkMagic

License: GPL-3.0-or-later CI CodeQL Runtime dependencies: 0

Move your bookmarks between browsers the simple way: with a file. No account, no cloud sync, 100% offline.

A Chrome (MV3) extension for importing, exporting and editing bookmarks and folder trees. English · Tiếng Việt · 日本語.

Screenshots

Edit Export
The edit tree, showing bookmarks with their domains The export tab: folder picker on the left, format cards on the right
Settings About
Settings: language, theme, and four defaults About: version, links, third-party statement, donate links and the legal block

What it does

  • Import HTML, JSON or CSV bookmark files, with a full preview first — counts, folders, depth, duplicates and warnings before anything is written.
  • Choose how: into a new dated folder (the safe default), merged into your existing folders, or replacing everything. Replace saves a JSON safety backup first and deletes nothing until that backup is proven.
  • Export everything, or just the folders you pick, to HTML (Chrome, Edge, Brave, Firefox, Safari, Vivaldi, Opera), JSON, CSV or Markdown.
  • Edit the tree: search, rename, drag & drop, create folders, delete, and find duplicate links — every action reachable from the keyboard.

Privacy

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. A grep gate (npm run guard) fails the build if anyone adds fetch, XMLHttpRequest, WebSocket, EventSource or sendBeacon.
  • 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 built manifest.json — because a build can add what the config never asked for.
  • Zero runtime dependencies. Nothing third-party ships in the extension.
  • Settings use chrome.storage.local, never storage.sync, so even your preferences stay off any vendor cloud.

Full policy: legal/PRIVACY.md.

Honest limitations

  • Favicons cannot be imported — the bookmarks API has no favicon field.
  • Imported bookmarks get today's date. Chrome does not let an extension set a bookmark's original creation date. Your exported files keep the real ones.
  • CSV is a flattened view: empty folders and "which folder is the toolbar" are not preserved. Use HTML or JSON for a faithful backup.
  • Markdown is share-only — BookmarkMagic cannot read it back.

Install

From the Chrome Web Store: here

From source:

npm ci && npm run build

Then load .output/chrome-mv3/ at chrome://extensions with Developer mode on.

Development

npm run dev

npm run verify is the gate everything else answers to — lint, type-check, knip, the grep gate and the test suite, in that order. It must be green before every commit.

The docs/ directory is the binding specification, not notes: where code and docs disagree, the docs win. Start with CLAUDE.md, then docs/00–docs/02.

Contributing

Bug reports and translation fixes are welcome — the issue forms ask for what is needed, and none of them requires you to write code.

If a bookmark file will not import, that is the most useful report there is, because the sample becomes a permanent test. Sanitize it first:

node scripts/sanitize-bookmarks.mjs your-bookmarks.html

That strips every address and title but keeps the structure, encoding and timestamps a parser bug depends on — so the sanitized file still reproduces the problem without handing over your browsing history.

CONTRIBUTING.md has the rest: the setup, the rules that are not negotiable, and how a reported file becomes a regression test.

Security issues: please follow SECURITY.md rather than opening a public issue.

Support development

Entirely optional — BookmarkMagic is free software either way.

GitHub Sponsors · Ko-fi · Buy Me a Coffee · Patreon · PayPal

Licence

GPL-3.0-or-later. Also see legal/EULA.md, legal/DISCLAIMER.md and legal/THIRD_PARTY_NOTICES.md.

Not affiliated with or endorsed by Google, Chrome, or any browser vendor. Browser names are trademarks of their respective owners.

S
Description
No description provided
Readme GPL-3.0
3 MiB
0 Stars 1 Watchers 0 Forks
Languages
TypeScript 75.8%
Svelte 14.5%
JavaScript 9.2%
CSS 0.4%