waybetter/crates/waybetter-host
CRT ee3692e143 host: plugins, custom CSS, feature flags, settings and open_panel are host commands
run_app now keeps and serves what every app's panel and page need, with the same caller checks
as the rest (commands::SHELL: shell_only first; testkit::assert_host_guards covers them):

- app.rs: PageState (the plugin store in app data `plugins`, the feature flags, ShellSettings)
  managed by the host; commands plugins_list, plugin_set_enabled, plugins_open_folder,
  custom_css_get/set, features_get/set, settings_get/set (moved from wayBetter for X). The app
  reads the state through app::page(), gets a loaded document's scripts from app::page_scripts()
  (flags, links, custom CSS, plugins) and writes through set_features/set_settings/set_custom_css
  (a backup import). AppConfig takes the app's PluginHost (AppConfig::new(site, title, plugins))
  and an optional home_url. SiteHooks::navigation_started and new_window_mode default to the
  owner's link settings.
- settings.rs (pure, tested): ShellSettings { homeUrl, externalLinks, siteLinks, restoreTabs }
  with its input form (missing fields take the defaults; `xLinks`, the name wayBetter for X used,
  is read as siteLinks), links_script ({ site: mode }), feature validation and features_script.
- commands::SITE + open_panel: a tab on the site's origin asks the shell to open the app's panel
  (site_tab_only first). testkit: assert_site_only(command, site) checks that every capability
  granting a site command is a tab capability limited to the site's URLs; assert_host_commands and
  assert_host_guards include the site commands.
- shell frame backupModel: a settings section that still says xLinks compares as siteLinks.
2026-09-30 07:28:52 +00:00
..
examples create-waybetter: npm create waybetter scaffolds plugins (JS/TS), themes and whole apps 2026-09-28 16:17:32 +00:00
src host: plugins, custom CSS, feature flags, settings and open_panel are host commands 2026-09-30 07:28:52 +00:00
tests host: self-hosted Google Fonts (gfonts) and the font cache (fonts) 2026-09-29 04:15:10 +00:00
Cargo.lock host: run_app — the window, shell, tab webviews and generic commands for every app 2026-09-29 04:51:24 +00:00
Cargo.toml host: run_app — the window, shell, tab webviews and generic commands for every app 2026-09-29 04:51:24 +00:00
tab-bridge.js host: the tab bridge ships from waybetter-host; create-waybetter uses it 2026-09-29 04:22:54 +00:00