waybetter/packages/shell
CRT 3079933452 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 16:13:03 +00:00
..
scripts shell: the panel, createPanel(site) (moved from wayBetter for X) 2026-09-30 07:03:40 +00:00
src Safe mode: one run with only the shell working (the app menu, --safe-mode, Shift at launch on Windows) 2026-09-30 16:13:03 +00:00
tests Safe mode: one run with only the shell working (the app menu, --safe-mode, Shift at launch on Windows) 2026-09-30 16:13:03 +00:00
package.json shell: the Store view and install screen as framework React components, strings in the framework catalogs 2026-09-29 04:08:04 +00:00
README.md docs: the panel in the framework (what an app supplies, which sections it gets, words, native commands) 2026-09-30 07:03:41 +00:00
tsconfig.build.json shell: the panel, createPanel(site) (moved from wayBetter for X) 2026-09-30 07:03:40 +00:00

shell (internal)

Sources of waybetter/shell/*: the shell models, the Store screens, the shell frame (src/frame, createShell) and the panel (src/panel, createPanel: the app's own tab). Published as part of the waybetter package; not published on its own. The repository README's "The shell frame" and "The panel" sections describe what an app supplies.

The panel is here rather than in a package of its own because it is drawn inside the frame and shares its state: the frame's profile, deck, theme, sync and developer-mode stores, its native bridge and its language. It imports the theme document model from ../runtime by source path; the package build (packages/waybetter/scripts/build.mjs) points those imports at dist/runtime.

scripts/google-fonts-catalog.mjs regenerates the font browser's offline Google Fonts list (src/panel/fonts/googleFontsCatalog.json).