Repository navigation
cmux NEXT bookmarks: the home daemon is the only writer (drop the bookmarks.json fallback) - #31832
Closed
lawrencecchen wants to merge 1 commit into
Closed
lawrencecchen wants to merge 1 commit into
lawrencecchen wants to merge 1 commit into
Conversation
…kmarks.json fallback BookmarkService wrote <Application Support>/<bundle id>/BrowserProfiles/ bookmarks.json and showed its trees whenever the home daemon did not serve bookmarks-v1: in the connect window at launch, while the daemon was down, and after a downgrade. That made a second writer whose edits only partly reached the daemon (the one-time copy replays creates, so moves, renames and deletes made in that window were lost). Now an edit before the daemon serves bookmarks is refused (DaemonError.notConnected, the existing "Bookmark error" text), and the trees stay as they were when the daemon goes. A file left by an older build is still copied into the daemon once (same ids) and then deleted, as before. BookmarkFileStore keeps only load and remove. migrateLegacyImports (earlier browser imports into bookmarks) ran at launch and wrote its done-marker even when its edits failed; it now runs once the daemon serves bookmarks and the trees are fetched, so it cannot fail on the connect window and never run again. Layer ownership V-11 (bead cx-e59e): this goes before the Swift half of the shared bookmark reducer, which has no local file mode to serve.
lawrencecchen
temporarily deployed
to
ci-routing-agent
November 2, 2026 04:55 — with
GitHub Actions
Inactive
Contributor
|
cmux status (one comment, edited in place; each line is updated by the job that owns it) Review App of this head (app.zip, kept 1 day)
|
lawrencecchen
temporarily deployed
to
ci-routing-agent
November 2, 2026 04:57 — with
GitHub Actions
Inactive
|
Found 6 test failures on Blacksmith runners: Failures
|
Contributor
Author
|
Replaced by #31842: the same fix, with the regression test committed before it (no force push on this branch). |
This branch was previously deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
![Fix with [code]smith](https://pr-comments-assets.blacksmith.sh/codesmith/fix-with-codesmith-light-3x.png)
The app had two bookmark writers. Besides the home daemon (
bookmarks-v1),BookmarkServicewrote<Application Support>/<bundle id>/BrowserProfiles/bookmarks.jsonand showed its trees whenever the daemon did not serve bookmarks: in the connect window at launch, while the daemon was down, and after a downgrade. Edits made there only partly reached the daemon later: the one-time copy replays creates by id, so a move, rename or delete made in that window was lost. The daemon has servedbookmarks-v1since the same day the file store landed (30b7258, 2026-09-30), so the fallback only ever covered the connect window and a broken daemon.Now the daemon is the only writer:
DaemonError.notConnected(the existing localized "Bookmark error: ..." text; no new strings).touch(last use) stays silent, as before.isLoadedis true only for a tree the daemon sent, so the Chromium bookmark sync andbookmark.list'sloadedfield wait for the daemon instead of trusting an empty file.migrateLegacyImports(earlier browser imports into bookmarks) ran at launch and wrote its done-marker even when its edits failed, so without the file it would have failed in the connect window and never run again. It now runs once the daemon serves bookmarks and the trees are fetched.BookmarkFileStorekeeps onlyloadandremove;saveis gone.What happens to existing
bookmarks.jsonfiles: nothing new. As before, when the daemon servesbookmarks-v1the app copies the file into it node by node with the same ids (an interrupted copy resumes) and then deletes the file. No build writes the file any more, so it is not created again. This PR adds no delete; the existing one is unchanged.Behavior change: a bookmark edit in the first moments after launch, before the home daemon connects, or while the daemon is unavailable, is refused with an error instead of saved to the local file.
Why now: layer-ownership.md V-11 (bead cx-e59e). The Swift half of the shared bookmark reducer (#31818 is the Rust half) shows pending edits over the daemon's confirmed tree and has no local file mode to serve.
Observed / Not run
Observed:
cmux-ci compile-check --app --package CmuxNext --recipe-version 2 --ref e10faeb324ad8897cbc638e2b4a9efa59d110d5a: job ff20deb8cbb2d857ab21d97e, RESULT_PENDING.scripts/cmux-next/prepush-gate.py: no new violations (arch-ratchet app_lines -36).Not run: no regression test. The CmuxNext unit suites were deleted (36f2381) and this has no Rust part; the change is a removal checked by compile and review. Not dogfooded in a tagged build.
Changelog
Changed: Bookmark edits made before the home daemon connects are refused instead of saved to a local file that the daemon only partly picked up.