waybetter/crates/waybetter-host/src
CRT 30cc85f3ff Safe mode: one run with only the shell working (the app menu, --safe-mode, Shift at launch on Windows)
Host: `safe.rs` is a flag in this process's memory, never written to disk, so the next normal start is back to the owner's setup. While it is on a site tab gets the tab bridge and nothing of the app's page layers: its document-start scripts are `SiteHooks::safe_init_scripts` (default: the bridge alone) instead of `init_scripts`; `site_page_loaded`, `tab_placed` and `tab_background` are not called; `page_scripts` is empty; `eval_in_site_tabs` does nothing. So no page runtime, plugins, theme, custom CSS, feature flags, fixes, hotfix data or words reach a page: the site runs as in a browser, and only the shell is the app's. It starts from the launch argument `--safe-mode` (for when the interface itself is broken), from Shift held while the app starts (Windows), or from the shell: `safe_mode_get` / `safe_mode_set {on}` (shell-only), where a switch rebuilds every tab webview (profiles marked stale, `tabs-rebuild` asks the shell for its layout) so document-start scripts change too. Tests: the argument, the flag, and that app.rs and host.rs gate every layer.

Frame: the app menu's "Restart in safe mode…" says what it does before anything reloads; while on, the titlebar shows an amber "Safe mode | Leave" chip (one click leaves) and the row reads "Leave safe mode"; the chrome drops its theme (and pane themes) and takes it back on leaving, without touching the first-frame cache. `features.safeMode` (on by default).
2026-09-30 23:13:03 +07:00
..
media host: gallery folders and the opt-in clipboard history 2026-09-29 11:13:01 +07:00
plugins Host: 256 feature flags, the onboarding mode (mode_get/mode_set, shell-only), and the one-time move of replaced plugin files to feature flags 2026-09-30 18:34:13 +07:00
store Host: 256 feature flags, the onboarding mode (mode_get/mode_set, shell-only), and the one-time move of replaced plugin files to feature flags 2026-09-30 18:34:13 +07:00
alerts.rs host: keyword alerts and native notifications 2026-09-29 11:05:49 +07:00
app.rs Safe mode: one run with only the shell working (the app menu, --safe-mode, Shift at launch on Windows) 2026-09-30 23:13:03 +07:00
backup.rs host: settings backup envelope and encrypted folder sync 2026-09-29 10:58:15 +07:00
bridge.rs Find in page: the shell's find bar per pane (Ctrl+F, the app menu, the palette) over the engine's own find 2026-09-30 22:34:48 +07:00
commands.rs Safe mode: one run with only the shell working (the app menu, --safe-mode, Shift at launch on Windows) 2026-09-30 23:13:03 +07:00
devloop.rs Dev loop: debug-only page scripts from disk + tab rebuild on change (waybetter-host devloop, page_script!), generic devmode watcher, waybetter dev, buildRuntime watch, template scripts 2026-09-30 22:20:22 +07:00
devmode.rs Dev loop: debug-only page scripts from disk + tab rebuild on change (waybetter-host devloop, page_script!), generic devmode watcher, waybetter dev, buildRuntime watch, template scripts 2026-09-30 22:20:22 +07:00
find.rs Find in page: the shell's find bar per pane (Ctrl+F, the app menu, the palette) over the engine's own find 2026-09-30 22:34:48 +07:00
fonts.rs host: self-hosted Google Fonts (gfonts) and the font cache (fonts) 2026-09-29 11:15:10 +07:00
gfonts.rs host: self-hosted Google Fonts (gfonts) and the font cache (fonts) 2026-09-29 11:15:10 +07:00
host.rs Safe mode: one run with only the shell working (the app menu, --safe-mode, Shift at launch on Windows) 2026-09-30 23:13:03 +07:00
hotfix.rs Extract the wayBetter framework core from wayBetter for X 2026-09-28 03:01:33 +07:00
i18n.rs host: run_app — the window, shell, tab webviews and generic commands for every app 2026-09-29 11:51:24 +07:00
layout.rs fix(shell): coordinate startup cover and tab stills 2026-09-30 12:25:46 +07:00
lib.rs Safe mode: one run with only the shell working (the app menu, --safe-mode, Shift at launch on Windows) 2026-09-30 23:13:03 +07:00
media.rs host: gallery folders and the opt-in clipboard history 2026-09-29 11:13:01 +07:00
modes.rs Host: 256 feature flags, the onboarding mode (mode_get/mode_set, shell-only), and the one-time move of replaced plugin files to feature flags 2026-09-30 18:34:13 +07:00
plugins.rs Host: 256 feature flags, the onboarding mode (mode_get/mode_set, shell-only), and the one-time move of replaced plugin files to feature flags 2026-09-30 18:34:13 +07:00
policy.rs Extract the wayBetter framework core from wayBetter for X 2026-09-28 03:01:33 +07:00
profiles.rs Extract the wayBetter framework core from wayBetter for X 2026-09-28 03:01:33 +07:00
safe.rs Safe mode: one run with only the shell working (the app menu, --safe-mode, Shift at launch on Windows) 2026-09-30 23:13:03 +07:00
settings.rs Host: 256 feature flags, the onboarding mode (mode_get/mode_set, shell-only), and the one-time move of replaced plugin files to feature flags 2026-09-30 18:34:13 +07:00
site.rs Extract the wayBetter framework core from wayBetter for X 2026-09-28 03:01:33 +07:00
sync.rs host: settings backup envelope and encrypted folder sync 2026-09-29 10:58:15 +07:00
tabs.rs Dev loop: debug-only page scripts from disk + tab rebuild on change (waybetter-host devloop, page_script!), generic devmode watcher, waybetter dev, buildRuntime watch, template scripts 2026-09-30 22:20:22 +07:00
testkit.rs host: plugins, custom CSS, feature flags, settings and open_panel are host commands 2026-09-30 14:28:52 +07:00
theme.rs runtime + host: the theme engine (theme documents, choice catalog, page runtime, fonts; native theme state) 2026-09-29 13:07:59 +07:00
update.rs App menu: "Check for updates" is a real check, once, now, and says what came of it calmly 2026-09-30 22:54:51 +07:00
updater.rs App menu: "Check for updates" is a real check, once, now, and says what came of it calmly 2026-09-30 22:54:51 +07:00
workspaces.rs host: saved workspaces validation 2026-09-29 10:59:20 +07:00
zoom.rs App menu: the titlebar's "Settings and more" (Alt+F, F10, the palette, the account menu's last row) with rows from the site config; page zoom per tab in the host 2026-09-30 21:52:51 +07:00