Repository navigation
fix(computers): keep foreign names out of refused moves - #257
Merged
Merged
Conversation
This was referenced Nov 6, 2026
nixuuu
marked this pull request as ready for review
November 6, 2026 09:20
nixuuu
added a commit
that referenced
this pull request
Nov 6, 2026
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
added a commit
that referenced
this pull request
Nov 6, 2026
Paired phones could not administer Network access or Devices. Mobile now offers the web listener/address/port/Tailscale controls, attachment limits, pairing codes and QR, pending invitations and device revocation. Gateway access: the revocable phone credential now reaches the same existing owner-scoped administration services as paired desktop clients. It never receives the BFF service token. Token validation, revocation/stream cancellation, gateway-role restrictions and core ownership checks remain enforced. Proto documentation and generated contracts describe the shared owner UI scope; no wire fields or database schema change. Security coverage exercises phone pairing/revocation, network updates, worker enrollment and management, denial of desktop-only reporting, invalid/revoked credentials and foreign-owner device/code/worker/enrollment isolation. Paired phones also cannot list or change foreign computer and config-notice ids; tests confirm foreign rows remain unchanged and a notice owned by the caller can be dismissed. Existing desktop, gateway-role and Tailscale expectations reflect the authorized scope. Port changes now publish the new routes before gracefully draining the old listener. Existing HTTP/1.1 and HTTP/2 requests/overview streams get up to five seconds to finish and receive routes; shutdown or disabling Network access still closes all listeners immediately. Mobile saves routes from UpdateNetworkAccess as well as overview announcements, removes obsolete lastAddress values and keeps the same pin and pairing. Real TLS integration tests cover both fixed/free-port changes without overview, route persistence/restart, and overview delivery before retiring HTTP/1.1 and HTTP/2 connections. The seven-file focused integration suite passed: 45 tests, 256 assertions, no failures. Companion security fix: #257 owner-scopes the metadata stored for refused moves. That existing handler flaw predates this stack; the separate fix is based on origin/dev and must land before this layer exposes the handler to phones. Device tokens do not expire; one-time pairing codes do. This behavior is unchanged. Validation: install, generated contracts, repository typecheck, lint, formatting and Expo lint pass for this layer. Network and Devices were inspected on Android in light/dark at phone/wide widths. One-time pairing/enrollment credentials are shown only when newly issued; stored provider/proxy/connector secrets remain write-only. Copy audit (§8): “Manage mobile devices in web Settings” → actionable pairing/revocation controls and explicit loading/empty/error states. Confirmations repeat “Revoke”. Checked glossary, sentence case, concise states, long names and non-color labels. No “soul” copy.
nixuuu
added a commit
that referenced
this pull request
Nov 6, 2026
Settings cards and forms had inconsistent insets, stacked reset buttons and cramped text. Shared groups now own padding/dividers, fields avoid duplicate padding, switches stay inline, and reset/actions occupy compact reserved positions. Text generation has inset controls, a plain automatic explanation and a separate Save action. Sheets cap content width and long text wraps within fields. Workers follows the new flat web layout: computer headings, independent worker cards, one metadata/presence summary, then Agent CLIs, Configuration, Provider accounts and Tags. CLI alternatives/output use compact disclosures. Worker actions stay in the expanded card for touch access. Shared-configuration worker records remain visible when the home is offline; editable linked-worker tags use the same gateway forwarding as the web. Completes shared account resets, finished-subagent visibility, schedule calendar/time/timezone/recurrence/endings/occurrence previews and remote snapshot refresh. Hermes lacks Intl.supportedValuesOf, so web and mobile share an IANA timezone list without another native dependency. Account and overview snapshots reload on entry; this does not claim to fix Android's baseline streaming transport limitation. No additional gateway access or schema changes. Working-for preferences and all merged mobile features are retained. Stored secrets stay write-only. Native differences: read-only keyboard reference; unavailable math/mascots/system notifications are explicit; native font fallbacks; Electron-only sections follow remote web visibility; configuration notices are centralized under Linked computers. Security follow-up is included through amended layer 3: port changes announce routes before draining old HTTP/1.1 and HTTP/2 connections, and mobile persists the replacement routes without requiring overview. Foreign computer/config-notice/enrollment isolation is covered. The independent refused-move name/title fix is #257 and must land before this stack. Device tokens have no expiry; pairing codes do. These lifetimes are unchanged. The follow-up was checked with real TLS integration clients; the earlier Android visual coverage was not repeated for this transport-only change. Validation after the security follow-up and restack on current dev: install, gen:check, typecheck, lint, format:check and Expo lint pass for all nine layers. Cumulative check:tmp passed on this head: 1455 tests, 158 skipped, 0 failures, 9634 assertions; temp clean. Web build passed. Earlier emulator coverage includes every server-capable section in light/dark at phone/wide widths, long fixture names, a desktop-role Linked computers gateway, instruction assignment/sync and secret-presence states. The recurring schedule preview returned future occurrences on Android. Live OAuth/provider login, SSH installation, real update/rollback, cross-computer moves/drift and physical-device lifecycle remain unverified. Software-keyboard overlap remains unverified because the device input helper used an invisible IME. Copy audit (§8): full-width “Reset to default” / “Reset effort” stacks → labeled compact reset controls; “Model” → “Text generation model” and the web help text. Checked every changed label for sentence case, glossary, action/confirmation verbs, concise actionable errors, empty/disabled states and non-color cues. Short and long names were inspected at both widths. No “soul” copy.
This was referenced Nov 13, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Rejected move requests could copy another owner's bot name or thread title into the caller's move history. Both refused-move metadata lookups now require the caller's owner_user_id, so StartMove and subsequent GetMoves return an empty title for foreign UUIDs.
This is an independent fix based on origin/dev. The existing flaw is reachable through the owner UI services; mobile Settings layer 3 enables those services for paired phones. Merge this companion fix before exposing that layer. Authentication and move authorization remain unchanged. No schema, protocol or dependency changes.
Validation: computer-moves.test.ts passed (7 integration tests, 101 assertions), including foreign bot and thread UUIDs, empty returned titles, empty titles in later move history and no creation at the target. bun install, gen:check, repository typecheck, lint, format:check and mobile Expo lint passed.
Copy audit (§8): no UI copy changes. The existing refusal messages remain; foreign resources provide no display metadata.