Skip to content

feat(mobile): align settings navigation and color themes - #245

Merged
nixuuu merged 1 commit into
devfrom
feat/mobile-settings-1
Nov 6, 2026
Merged

nixuuu merged 1 commit into
devfrom
feat/mobile-settings-1

Conversation

@nixuuu

@nixuuu nixuuu commented Nov 6, 2026 •

Copy link
Copy Markdown
Member

Mobile Settings used a different palette and a flat list that left several sections empty. This adds the web section registry and order, phone list-to-section navigation, a two-pane layout from 600 dp, shared theme tokens, and Appearance with System/Light/Dark plus the same seven light/dark previews.

The full web-versus-baseline-mobile inventory below records the fields, actions, BFF routes and RPCs. Subsequent draft layers implement the remaining sections. No gateway access changes in this layer.

Security follow-up: layer 3 now drains port changes safely and persists the phone's replacement routes. The independent refused-move metadata fix is #257, based on origin/dev; it must land before layer 3 exposes move administration to phones. All nine layers were restacked on current dev. Device tokens remain valid until revoked; pairing codes expire.

Validation: install, generated contracts, repository typecheck, lint, formatting and Expo lint pass for this layer. Cumulative Android checks cover light/dark, phone/wide layouts and short/long labels. The final spacing refinements are in layer 9.

Platform choices: Electron-only Desktop and App updates follow remote web visibility; remote updates live under Workers. Native fonts use platform fallbacks. Render math and animated mascots are explicitly unavailable on native.

Copy audit (§8): “Accent color” → “Light theme” / “Dark theme”, matching the web concepts. Checked sentence case, glossary, action verbs, loading/empty/error text, non-color labels and long names. No “soul” copy.

Web → mobile Settings inventory

Source: packages/ui/src/settings.ts, apps/web/src/lib/features/settings/settings-sections.svelte.ts, all /settings pages and their feature components; baseline mobile e2a4a019. Groups and ordering follow the web registry (Providers is rendered under Connections).

Section Web fields and actions BFF → gateway Mobile at baseline / gap
General Notifications: Thread notifications (Off/Notifications/with sound), In-app notifications; Sidebar: Group by project, Project order (activity/name/newest), Working section; Confirm unpin/archive/delete; Display: Time format, account Time zone; restore device defaults and per-field resets; Electron-only Quit shortcut /api/settings, /api/settings/user → GetSettings, UpdateUserSettings; browser preferences local Empty
Appearance Colors: System/Light/Dark; independent Light and Dark theme previews (Birch/Fern/Lagoon/Cedar/Heather/Blossom/Ash); Contrast; Effort display; Render math; Animated mascots; Thread width; Typography: Interface font/size, Monospace font/size, Wrap code blocks/diffs; message/diff/terminal previews; resets settings routes → GetSettings, UpdateUserSettings; device preferences local Old zinc palette and six accent orbs; no full themes or device preferences; time zone in wrong section
Keybindings Search; command catalogue grouped Navigation/Threads/Composer/Messages/Models/Appearance/Settings; add/edit/record/remove up to five bindings, contextual conflicts, resets; when-context and unassigned states Browser/device local; no RPC Empty. Mobile uses a read-only web shortcut reference; web keyboard dispatcher and shortcut recorder are device-specific
Threads Show finished subagents; Turn activity: While working, After the turn; New threads: Project and worker, Agent, Profile, Model per provider, Permissions (Full access confirmation); restore/reset fields. Running delivery lives in composer menu settings routes → GetSettings, UpdateUserSettings Workspace/agent/permissions editable; model read-only, no profile; working-fold controls assigned to concurrent mobile agent
Text generation Text generation model (provider/profile/model), effort; Automatic explanation; reset model/effort; Advanced: Thread title instructions and reset settings routes → GetSettings, ListModels, UpdateUserSettings Model read-only; instructions editable; missing effort/provider/profile controls
Scheduled tasks Upcoming/Finished with counts; target thread or new thread, name, prompt, once/recurring, date/time/cron, timezone, worker/project/model/permissions for new thread; preview occurrences; pause/resume/edit/cancel, last/next run and result /api/schedules/** → ListSchedules, CreateSchedule, UpdateSchedule, PreviewSchedule, SetScheduleStatus Names/status/cron only; no changes
Projects Add project: worker, browse existing directory, create Git directory, clone Git URL or GitHub owner/repo using the worker's own Git sign-in, name; project list by merged Git origin and computer; Workspaces: worker, root path, label, add/edit/remove; per-project thread defaults with inheritance /api/projects/**, form actions, /api/settings/projects/:id, /api/workspaces/** → AddProject, ListDirectory, CreateWorkspace, UpdateWorkspace, RemoveWorkspace, UpdateProjectSettings Lists names and paths; redirects management to web
Worktrees Project/computer scope; location, Start from remote, advanced Remote; Branch naming (semantic/prefix; Thread title Soon), Branch prefix; Default workspace; Cleanup: deleted/merged/settled/unchanged, inactive days, Keep local changes Soon, Delete safe local branches; inherited/overridden states and resets; list/status/path, inspect/remove, cleanup dry run/confirm /api/worktrees/** → GetWorktreeSettings, UpdateWorktreeSettings, ListWorktrees, CleanupWorktrees, RemoveWorktree, RevealWorktree Empty
Diffs Diff layout (stacked/split), Hide whitespace changes, Default file state (expanded/collapsed), Diff colors (red-green/blue-orange), live preview, resets Device preferences; no RPC Empty
Agent environment Instruction library: name, ordered fragments (title/content/harnesses), enabled/tag targeting, device CLI target, create/edit/delete; Skills: folder/ZIP or Git/command source, source account/ref/path, preview files, versions/pin/auto-update, worker overrides, upstream check/review/apply; Marketplaces: source/account/catalog snapshot; Plugins: code/diff, checksum consent, assignment/version/overrides; computer picker, automatic/manual tags, target paths/status, preview composed instructions/skills/plugins, sync and drift adopt/restore/keep-both /api/agent-environment/** → GetAgentEnvironment; Save/DeleteInstructionDocument; SetEnvironmentTags; PreviewAgentEnvironment; ResolveEnvironmentDrift; Save/DeleteLibrarySkill; ResolveSkillDrift; Preview/Add/Check/ApplySkillSource; Preview/Save/DeleteMarketplace; Save/DeleteLibraryPlugin; ResolvePluginDrift Empty
Providers All workers/per-worker scope; refresh and CLI updates; instances create/delete; Identity: display name, fixed ID, accent; Connection: proxy/device login, saved proxy, Codex own login; Runtime: CLI path, CLI home, shadow home, launch arguments; environment variables with public/secret state (keep/replace/remove); move connection variables to proxy; all/future or individual worker enablement; per-worker inherited overrides; model list/search/favorites/custom/hidden/shown, defaults; worker account/login status, ChatGPT login /api/providers/**, /api/models → List/Save/DeleteProviderInstance, SetInstanceWorkers/Worker/Models, GetInstanceWorker, ListModels, RefreshProviders, StartProviderLogin, MoveInstanceToProxy Lists labels and enabled-worker counts; no changes
Connectors Catalog/add account; type/name/endpoint/transport/auth method; write-only token/headers; OAuth scopes, OAuth app issuer/client ID/write-only secret/redirect, sign in and paste code; account identity/status/local error details/tool list; rename/reconnect/test/disconnect/delete; all/future or selected workers and bots with access inheritance /api/connectors/** → ListConnectors, SaveConnectorAccount, SetConnectorAccess, DisconnectConnector, DeleteConnectorAccount, TestConnector, SaveConnectorOAuthApp, BeginConnectorOAuth, CompleteConnectorOAuth Lists account names/status; no changes
Proxies Name, Kind (CLIProxyAPI/Anthropic/OpenAI), Base URL, write-only Secret keep/replace; Codex Responses wire API, Supports WebSockets, public Extra headers; agent URL mappings; secret presence/usage, test connection/model count, edit/delete with revision/use guard /api/proxies/** → ListProxies, SaveProxy, TestProxy, DeleteProxy Empty
Workers Local and linked-computer groups; machine status/name/host/OS/arch/version/config status; rename/revoke/archive/credential rotation; manual/automatic tags with revision; Add worker: name/tags/gateway origin, install script/Docker/manual/SSH, one-time enrollment, check/reissue/finish; pending enrollment revoke; gateway origin; SSH public key/install trust; Agent CLI versions/path/alternatives/install/update/check (account/per-worker frequency and last/next checks); Updates center (gateway/desktop/linked computers/workers, channel/update/rollback/restart/progress) /api/workers/**, /api/updates/**, /api/settings/user → GetWorkerSetup, Create/RevokeWorkerEnrollment, Rename/Rotate/Revoke/ArchiveWorker, WorkerSsh, FetchWorkerInstall, SetEnvironmentTags, InstallCli, CheckCliUpdates, SetWorkerCliUpdateSettings, Get/ManageUpdates, UpdateUserSettings Lists worker names/online/hostname/OS; no management
Network access Let devices/workers connect (or phones/computers per gateway capability); state/error/note; detected addresses/kind/interface and custom hostnames add/remove; port/fixed-port state/change/free port; certificate fingerprint; Tailscale status/DNS/IPs/refresh, HTTPS switch/URL/port; Attachments: per-file MiB, per-message MiB, file count /api/network-access, /api/settings/user → GetNetworkAccess, UpdateNetworkAccess, UpdateUserSettings Web-only management notice
Devices Pair phone/desktop (enable network access as needed); one-time code/QR, addresses, fingerprint, expiry/used state/revoke on close; paired devices platform/name/last seen/revoked/pair-again; revoke access; pending code expiry/revoke /api/mobile-devices/** → GetMobileDevices, CreateMobilePairing/CreateDesktopPairing, RevokeMobilePairing/Device Current gateway/name and self-unpair only; missing owner management
Linked computers Capability-gated; self identity/name/version/fingerprint/routes; LAN discovery; network summary; generate/enter pairing with Share configuration; peer identity/status/last seen/version/connection direction/fingerprint; rename/unlink/add/remove routes; onward sharing; configuration sync/clock/update alternatives; configuration notices with restore/delete/dismiss; move everything with preview and project workspace mapping /api/computers/** → GetComputers, CreateComputerPairing, LinkComputer, ManageComputer, ManageConfigNotice, PreviewMove, StartMove, GetMoves Web-only notice; shown even on server gateway that cannot link computers. Get/ManageSharedConfig are deprecated, unimplemented RPCs and are not used by the current web or final mobile UI
Desktop (Electron only) Local/remote mode, local worker/CLI status, change mode Local Electron IPC Hidden, as in remote web; mobile does not own Electron services
App updates (Electron only) Installed shell version/channel/check frequency, last/next check, check/download/restart/release notes; linked computers read-only channel/frequency with update controls Local Electron updater IPC + Get/ManageUpdates Hidden, as in remote web; remote gateway/worker updates belong to Workers

Access and secret boundaries

Web uses its server-side service token over gRPC; mobile uses its revocable device token over Connect/protobuf on the pinned TLS Network access listener. Both resolve to the same gateway owner. No service token enters mobile. The baseline interceptor denies phones device administration, worker enrollment/rotation/SSH/download, computer/config/move administration, network settings and updates. Owner-scoped core services already implement these actions. Stored secrets are write-only DTOs; clients submit replacements or omit unchanged values. Pairing/enrollment codes are newly issued, short-lived credentials and must only be held in the open form.

@nixuuu
nixuuu added this pull request to stack #254 November 6, 2026 08:35
@nixuuu
nixuuu force-pushed the feat/mobile-settings-1 branch from 240f237 to f3b6528 Compare November 6, 2026 09:10
@nixuuu
nixuuu marked this pull request as ready for review November 6, 2026 09:22
@nixuuu
nixuuu force-pushed the feat/mobile-settings-1 branch from f3b6528 to 57f425e Compare November 6, 2026 09:24
@nixuuu
nixuuu merged commit 3f4365d into dev Nov 6, 2026
9 checks passed
@nixuuu
nixuuu deleted the feat/mobile-settings-1 branch November 6, 2026 09:33
nixuuu added a commit that referenced this pull request Nov 8, 2026
Settings now covers the workspace with an opaque native transition. Back
gestures return from a Settings section to its list before dismissing
Settings.

### Causes and changes

- The wide root stack faded Settings over the thread while also
removing/recreating the workspace sidebar. Move workspace routes into
`(main)` and present Settings above that complete, stable surface.
Android slides from the bottom; iOS uses its native stack transition.
Reduced motion disables navigation animation. Wide thread/bot changes
still swap in place inside the clipped panel, preserving #234's sidebar
protection.
- Settings sections lived in component state, so iOS only knew about the
outer Settings route. Give sections their own native stack and disable
the outer iOS gesture while a section owns Back. Shortcuts anchor the
Settings list beneath their section; X dismisses all Settings.
- Split view: Back from a selected section returns to the list +
General, then closes Settings. Selecting another section replaces the
current section, so sidebar browsing does not accumulate history.
Documented in `docs/mobile.md`.
- Audit: side threads opened from thread details/subagent panels and bot
exchanges already push real routes. Bot settings/details sheets already
unwind through `onRequestClose`; Android device checks confirm settings
→ details → chat. Fix the pairing scanner's missing Android Back
handling and protect paired/unpaired route history. No dependency
changes.

### Device evidence

Recorded before and after with T3 device tools on Android 16 phone and
unfolded Fold, in light and dark mode. Extracted transition frames show
Settings sliding as a solid surface, with no thread/settings text double
exposure and no sidebar resize. Before/after recordings and frame sheets
are retained in the implementation worktree under
`.tmp/mobile-settings/`; they are deliberately not committed and are not
hosted GitHub attachments:

| Check | Evidence |
| --- | --- |
| Before, phone/Fold × light/dark |
`before-{phone,fold}-{light,dark}.mp4` and corresponding `*-frames.png`
|
| Final open/close, phone/Fold × light/dark |
`final-{phone,fold}-{light,dark}.mp4` and `*-open.png` / `*-close.png` |
| Android section → Settings root → thread, button + edge gesture |
`after-phone-light.mp4`, `after-fold-light.mp4`, dark counterparts |
| iOS General → list → thread, left-edge swipe | `ios-final-swipe.mp4`
(fresh simulator dev client) |
| Side thread → parent by gesture | `android-nested-back.mp4`,
`ios-nested-back.mp4` |
| Bot settings → details → chat; scanner → form | `android-nested-back`
recording chunks, `android-pairing-back.mp4` |
| Reduced motion | `android-reduced-motion.mp4` |

Cold starts on Android and iOS were checked after removing unused
explicit workspace screen ordering; no route-reconciliation warning
remained. Native clients were built locally (private Linux Android
SDK/Gradle, arm64, two workers, 3 GB heap; private Mac simulator build
with ≥12 GB free at build start). No store/EAS builds.

Device recordings/native builds precede an unchanged rebase onto
`61882593` (#357). Installation and static checks were repeated
afterward; this PR changes no dependencies or workflows.

### Verification and gaps

- Passed: `bun install`, `bun run gen:check`, `bun run typecheck`, `bun
run lint`, `bun run format:check`, web build, mobile typecheck and `bunx
expo lint`. No UI tests added.
- Full `bun run check:tmp` did not finish cleanly: it ended with signal
143 during worker tests, after three linked-project failures and one
shell timeout. Targeted rerun: shell passed; the same three project
assertions failed identically on untouched base `f583c5ca` (10 passed /
3 failed across the three files). Both targeted runs reported nothing
left in their temp dir. Separate worker run passed: 264 passed, 19
skipped, 0 failed across 47 files; temp cleanup passed.
- The three baseline failures are `add-project.test.ts` (local folder
unexpectedly attached) and `linked-projects.test.ts` (owner-scoped
origin metadata and shutdown-home merged identity). They are outside the
mobile change. Full-suite gate remains unverified/failed; this PR stays
draft for that gap.
- Device checks used emulators/simulator, not physical hardware. iOS
split-width gestures, an actual fold/rotation during navigation, and
frame-by-frame predictive-back progress were not separately verified;
completed Android edge gestures and Back events were verified. The split
behavior uses the same documented native section history on both
platforms.

Copy audit: no UI text changed.

Fixes: #234
Related: #245
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant