You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This document is the canonical implementation plan for shipping CodexMonitor on iOS using Orbit on Cloudflare as the relay/control plane to a macOS runner.
3
+
This document is the canonical implementation plan for shipping CodexMonitor on iOS with a Tailscale-first bootstrap path and Orbit on Cloudflare as the production relay/control plane to a macOS runner.
4
4
5
5
## Scope
6
6
7
7
- Build and ship a real iOS app (Tauri mobile target).
8
8
- Keep macOS as the execution host (Codex binary, repos, git, terminals, files).
9
+
- Provide a low-friction self-host bootstrap path via Tailscale + TCP daemon for early end-to-end mobile testing.
9
10
- Use Orbit on Cloudflare as secure relay/realtime bridge between iOS and macOS.
10
11
- Make macOS setup manageable from CodexMonitor Settings: authenticate, pair device, launch/stop runner, inspect status/logs.
11
12
- Keep one backend logic path (shared core + daemon). Do not duplicate backend behavior in iOS UI.
@@ -53,6 +54,10 @@ This document is the canonical implementation plan for shipping CodexMonitor on
53
54
-`terminal-exit`
54
55
- Mobile UI scope is the existing app layout in mobile form-factor (no separate mobile-only feature surface).
55
56
- Shared-core parity refactor is in place for prompts, local usage, codex utility helpers, git/github UI helpers, and workspace actions.
57
+
- Tailscale setup helper is implemented for TCP remote mode:
Copy file name to clipboardExpand all lines: memory/decisions.md
+7Lines changed: 7 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -267,3 +267,10 @@ Type: decision
267
267
Event: Product direction is now self-hosted Orbit only; app should not present hosted Orbit mode or imply CodexMonitor-hosted relay/auth services.
268
268
Action: Removed `orbitDeploymentMode` from frontend/backend settings models and defaults, removed deployment mode selector from Settings UI, and updated mobile Orbit blueprint/setup language to self-host-only.
Context: Tailscale bootstrap path for mobile remote onboarding
273
+
Type: decision
274
+
Event: Added end-to-end Tailscale setup support so users can self-host remote TCP access before iOS Orbit UX is finalized.
275
+
Action: Implemented desktop `tailscale_status` and `tailscale_daemon_command_preview` commands, wired Settings helpers (detect, suggested host, daemon command), and updated blueprint docs to include the Tailscale bootstrap flow.
276
+
Rule: Keep Tailscale as the first-run self-host bootstrap path for TCP remote setup while Orbit remains the production relay path.
Copy file name to clipboardExpand all lines: memory/mistakes.md
+30Lines changed: 30 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -81,3 +81,33 @@ Rule: Any settings update that changes remote transport config must invalidate t
81
81
Root cause: Remote client cache lifecycle was only tied to disconnect/errors, not to transport settings mutations.
82
82
Fix applied: Updated `src-tauri/src/settings/mod.rs` to compare previous vs updated transport settings and reset cached remote backend when they differ; added predicate unit tests.
83
83
Prevention rule: Treat transport-config settings as cache keys and invalidate on change at the backend boundary, not only from UI handlers.
84
+
85
+
## 2026-02-07 20:36
86
+
Context: Orbit token sync persistence retry behavior in Settings
87
+
Type: mistake
88
+
Event: `syncRemoteBackendToken` updated `latestSettingsRef` before settings persistence succeeded, so a failed save could make later retries no-op.
89
+
Action: Moved `latestSettingsRef` mutation to after successful `onUpdateAppSettings` completion and added a regression test for retry-after-failure.
90
+
Rule: In async settings flows, only advance local "latest" refs after persistence succeeds.
91
+
Root cause: Optimistically mutating in-memory settings state before awaiting durable save.
92
+
Fix applied: Updated `src/features/settings/components/SettingsView.tsx` token sync ordering and added `retries Orbit token persistence after a failed save` in `src/features/settings/components/SettingsView.test.tsx`.
93
+
Prevention rule: Keep optimistic UI drafts separate from persisted-settings refs and add explicit retry-path tests for async save failures.
Event: Tailscale daemon command preview did not auto-refresh after remote token changes, leaving `tokenConfigured` warning state stale until manual refresh.
99
+
Action: Added `appSettings.remoteBackendToken` as a dependency of the auto-refresh effect in `SettingsView` so preview data is recomputed after token edits.
100
+
Rule: Any derived helper output that depends on settings values must include those values in effect dependencies (or equivalent invalidation paths).
101
+
Root cause: The effect dependency list tracked provider/mode only and omitted token changes used by preview generation.
102
+
Fix applied: Updated `src/features/settings/components/SettingsView.tsx` effect dependencies and revalidated `SettingsView` tests.
103
+
Prevention rule: When adding helper panels, explicitly audit dependency arrays against all backend inputs shown in that panel (especially token/auth state).
Action: Added `isMobilePlatform` helper and gated auto preview fetch in `SettingsView` to desktop platforms only.
110
+
Rule: Do not auto-run desktop-only diagnostics on mobile surfaces; gate by platform first.
111
+
Root cause: Auto-refresh effect was scoped by provider/mode only and assumed desktop capabilities.
112
+
Fix applied: Updated `src/features/settings/components/SettingsView.tsx` effect logic and added `src/utils/platformPaths.test.ts` coverage for mobile detection.
113
+
Prevention rule: For any auto-run settings helper, explicitly classify desktop-only vs cross-platform behavior before wiring useEffect refreshes.
0 commit comments