// COMPLETE REFERENCE
Settings architecture
How the single Settings page decides which sections exist, which of them a person may open, and which of them only make sense on a machine that is the whole operating system. Reader-facing guidance is in Settings.
Authority: botui/ui/suite/settings/ (index.html, nav-registry.js,
main/02_edition.js, partials/), the window-manager registry
(botui/ui/suite/js/window-manager/), and the server routes in
botserver/crates/botsettings/src/{os,os_appliance}.rs.
One page, one registry
/suite/settings/index.html loads every section as an HTMX partial at page load
(hx-get="/suite/settings/partials/NN_*.html" hx-trigger="load"). Sections are
plain #id-section blocks; the sidebar anchors are handled locally by
settings-nav.js, which calls history.replaceState only when the document is
the standalone Settings page, so the desktop shell’s URL is never rewritten.
The nav is declared once in nav-registry.js (NODES, lines 22-66). Each node
carries:
| Field | Values | Effect |
|---|---|---|
group |
personal, workspace, admin, system |
sidebar grouping |
depth |
essential, advanced |
advanced nodes require Preview mode |
editions |
cloud, desktop, os |
deployment gate |
scope |
personal, admin |
hides admin nodes from non-admins |
control |
shell |
requires a shell edition |
requires |
p2p |
hidden while peer networking is off |
Adding or renaming a section is a change to that table; the legacy patchers in
main/02_edition.js and main/08_preview.js are adapters over the same rules.
The “admin” entry is a deep link, not a second registry entry
The window manager registers only settings
(js/window-manager/01_registry.js:7). There is no admin app entry: the
deep-link resolver rewrites admin to settings with {view: "admin"}
(06_deeplinks.js:13-16), and /suite/admin/index.html is a meta-refresh stub
that redirects to /suite/settings/index.html?view=admin. The standalone
/suite/admin/* pages (users, groups, roles, DNS, …) still exist and are opened
from the Settings administration partial.
When ?view=admin (or __gbAppParams__.view) is present,
settings-preferences.js clicks the first visible
.nav-item[data-admin-only="true"], falling back to Profile when the visitor is
not an administrator. The hiding is a UI convenience: the APIs behind the
admin sections enforce authorization themselves.
Which edition is this?
main/02_edition.js resolves the edition in this order:
- the explicit
editionkey in the product file (cloud,desktoporos); GBNavRegistry.edition()when the registry is loaded;- Tauri (
window.GBTAURI/__TAURI_INTERNALS__) →desktop; shell_modeorno_securityin the product config →os;- otherwise
cloud.
isShellMode(config) is the gate for host-level settings; it is true only for
the Tauri app, the desktop-local build and the OS kiosk image. isSlimEdition
no longer infers the edition from the app list — #3087 made the declared edition
win, so a cloud deployment whose apps happen to be chat,drive keeps its
admin sections.
Operating System panel
partials/07_os.html loads settings-os.js. The section is marked
data-admin-only and data-shell-only, and stays hidden until shell mode
unlocks it.
| Route | Purpose |
|---|---|
GET /api/system/os |
hostname, OS, kernel, architecture, uptime, timezone |
GET /api/system/os/logs |
log tail |
GET /api/system/os/logs/download |
log download |
POST /api/system/os/services/restart |
restart one service |
GET /api/system/os/power/status, GET /api/system/power/status |
battery/AC telemetry |
POST /api/system/power |
power action |
Every route is gated three ways server-side (os.rs:104-145): shell mode must
be on, the caller must be an administrator (the single-user desktop owner
counts), and the request must arrive through a loopback host header. Hiding the
panel in the browser is not the security boundary. Restart is the only
mutating control in the panel, requires the typed service name, and writes an
os_service_restart entry to the audit log (os.rs:339). Hostname and timezone
are read-only.
OS appliance pages
nav-registry.js registers the appliance nodes (os-network, os-power,
os-display, os-sound, os-keyboard, os-storage-reset, os-users,
os-diagnostics) with editions: ["os"], scope: "admin", control: "shell",
plus the sidebar-only os-peripherals, os-firmware and os-accessibility.
They are rendered by settings-os-appliance.js from
partials/15_os_appliance.html.
Unlike the earlier phase documented in this book, the backing routes now exist
(botsettings/src/os_appliance.rs:33-52): /api/os/network, /display,
/sound, /input, /storage, /users, /diagnostics,
/diagnostics/bundle, /removable, /removable/eject,
/network/lan-exposure, /display/controls, /time, /firmware,
/power-profile, /sound/controls, /network/wifi, /update/status,
/peripherals and /session. Each page still degrades to an explicit
unavailable state when its backend probe fails.
Wallpaper
The picker lives in main/01_state.js (WALLPAPER: "gb-wallpaper") and
main/07_appearance.js. Applying a wallpaper sets the class on the desktop root,
persists the name in localStorage, and dispatches a gb-wallpaper-changed
event that the desktop listens for
(desktop-inline/04_auth_fullscreen_a.js:320-386). The old inline picker in
settings-preferences.js was removed (#1339) because it overwrote
window.setWallpaper without firing the event.
Removed pages
settings/security.html, settings/profile.html and settings/wallpapers.html
no longer exist; their content is the security, profile and appearance
sections. admin/index.html remains as the redirect stub described above.
Related
- Settings — what a person finds in each section
- Window Manager — how apps, including Settings, are opened
- General Bots OS (laptop appliance) — the edition that unlocks the OS panels
- Product configuration —
edition,shell_modeand app visibility