waybetter/packages/shell
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
..
scripts shell: the panel, createPanel(site) (moved from wayBetter for X) 2026-09-30 07:03:40 +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 shell: the panel, createPanel(site) (moved from wayBetter for X) 2026-09-30 07:03:40 +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).