Expand description
Browser pane start page — a single URL, deliberately stored under
shared_dir (~/.agentmux/shared/browser-start-page.json) for the same
reason bookmarks are (bookmarks_store.rs): settings.json isolation is
whole-file only (docs/specs/SPEC_SETTINGS_ISOLATED_BY_CHANNEL_2026_08_19.md
§6), so a value that must stay global across channels can’t live inside
it.
Unlike bookmarks, this value also rides inside FullConfigType — see
docs/specs/SPEC_BROWSER_PANE_START_PAGE_2026_09_16.md §3.1 for why a
second on-demand RPC (bookmarks’ .list pattern) was rejected in favor
of piggybacking on GetFullConfig, which the frontend already awaits
before its very first render. That means this module does two things
bookmarks_store.rs doesn’t: it plugs into ConfigState
(load_start_page_from_disk) and it watches its own file for changes
(spawn_start_page_watcher), mirroring config_watcher_fs.rs’s
settings watcher exactly so an edit from any window — or an external
process — reaches every connected client via the same live broadcast
settings.json changes already use, not just the window that made it.
Structs§
Constants§
Functions§
- is_
start_ 🔒page_ file_ event - Whether a raw fs_watch event refers to
browser-start-page.jsonspecifically — mirrorsconfig_watcher_fs::is_settings_file_eventexactly, including excludingRemoved(an external delete must not reset a configured start page back to “unset” and broadcast that). - load_
start_ page_ from_ disk - Load
browser-start-page.jsonfrom disk into theConfigState. Called once at startup, mirroringconfig_watcher_fs::load_settings_from_disk. An unresolvableshared_diror a missing file both leave the config’sbrowser_start_pageat its default (None) rather than failing boot — a start page is a convenience, never a startup precondition. - read_
start_ page - Read the configured start page. A missing file, or a present file with
no
urlset yet, isOk(None)— “nothing configured”, not an error, same as bookmarks’ missing-file case. A present-but-unparseable file IS an error: silently treating it as unset would look exactly like the user’s setting vanished (same reasoningbookmarks_store::read_bookmarksalready documents). - spawn_
start_ page_ watcher - Subscribe to
browser-start-page.jsonvia the sharedFsWatchPool(the SAME pool instance the settings watcher uses — no new watcher subsystem) and broadcast the updated config to every connected client on change. Mirrorsconfig_watcher_fs::spawn_settings_watcherexactly. - start_
page_ file_ path - Resolves the shared, cross-channel start-page file path. Returns
NonewhenDataPathscan’t resolve (CI / unusual env) — same best-effort posture asbookmarks_store::bookmarks_file_path(). - write_
start_ page - Write the start page, replacing whatever was there before. Same
temp-file-then-rename crash safety as
bookmarks_store::write_bookmarks. Two windows writing at the same instant still race at the whole-file level — last write wins — the same accepted limitation every other single-JSON-file store in this app has.