Settings — REST surface and mobile UI

Overview

Two surfaces in this commit. The REST surface is the endpoints the mobile UI calls; the mobile UI is the panel at / that lets a user edit app-level settings, provider connections, and raw project settings without curl.

The endpoints build on App and project settings. The current UI manages app-level provider connections and project settings.

Project settings use a simple mobile-first list. Technical details (the raw .mouaif.json editor and resolved values) are on a dedicated page linked at the very bottom. Every agent row also opens a dedicated configuration page for its instructions, model, tools, and deletion action.

Usage

Mobile UI

The mobile UI exposes a Settings destination in the bottom tab bar at /. The screen is a stack of focused sub-views, each with its own back link; the bottom tab bar is hidden on the sub-views so the content owns the full viewport height. Project settings carries an explicit from route when opened from either project list, so Back returns to that list; chat links carry chatId and return to the chat, while direct links safely fall back to Settings home. The from origin is threaded through the Agents list and agent editor too, so Back from an agent returns to the project-settings page that opened it, and then onward to the originating project list.

The home screen groups cards by scope so app-level and project-level settings never sit in the same list. Rather than repeat "overrides / wins / shadows" on every row, the layering is stated plainly and once: the App defaults group title notes it applies to every project, the This project footer says a project can change any default for its own folder, and the project page has a "Inherit app default" option where it matters. The mental model is two layers — app defaults apply everywhere; a project can change them for its own folder — not a chain of winners and losers.

Behavior