Skip to main content
The Settings screen edits the live settings store on the device, and its baseUrl field is the recovery path when a phone cannot reach the default engine.

Quick Start

1

Open Settings from the top bar

The Settings screen renders one editable row per value setting. On a fresh phone install, the Engine address field shows the default http://127.0.0.1:8765 β€” the phone itself, which nothing answers.
2

Change the Engine address

Edit Engine address to a reachable host β€” your dev machine on the LAN, for example:
3

Blur the field or press Enter

The write commits on change, not per keystroke. On blur or Enter the value is validated, then persisted through facade.set.
4

Relaunch

The app boots against the new address. A persisted baseUrl is read by enginesFor at boot and outranks the compiled-in default.

How It Works

Every value row is an editable control wired to the same pure validateInput the store would run. The four input paths and their outcomes:

Configuration Options

SETTING_DEFS ships exactly two editable settings today (source: app/src/registry.ts).
The store’s coercion and validation machinery stays intact for any future setting, but only engineId and baseUrl are read by the shipping app today. See Storage & Secrets β†’ Shipped defaults are valid.

Common Patterns

Recover from an unreachable engine on a phone β€” the golden path this change unblocks.
A refused change never shows a phantom value β€” a value the store rejects snaps the field back.
A storage failure stays LOCAL β€” the QuotaExceededError / SecurityError pathologies mobile webviews raise on device are caught at the field.

Best Practices

validateInput runs before set, so an invalid input is rejected at the input rather than accepted into the UI and dropped by set. The screen never offers a value the store then silently refuses.
The control listens on change, not input, so a half-typed address is never stored and set is not hit per keystroke.
The field resets to settings.get(key) ?? def.default, so a value that never persisted cannot linger in memory. A rolled-back write leaves the field showing what the next launch will actually read.
SettingsFacade has no getSecret; secret rows stay presence-only. Editing a secret from the Settings screen is not possible β€” rotate secrets through SecretsPort. See Storage & Secrets.

Storage & Secrets

The persist-before-mutate contract behind set.

Errors & Recovery

Where an unreachable engine routes the user.

Engines

How engineId and baseUrl pick and reach an engine.

Boot Failures

The warning notice a phone sees before editing the address.