[PR #163] [CLOSED] feat(ios): RalphMobile full API coverage + SSE event stream fix #177

Closed
opened 2026-02-27 10:22:36 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/mikeyobrien/ralph-orchestrator/pull/163
Author: @krzemienski
Created: 2/7/2026
Status: Closed

Base: mainHead: feat/ios-api-coverage-clean


📝 Commits (10+)

  • 5c94386 Ralph checkpoint 45
  • 6e9df3e feat(ralph-mobile): Create Expo project structure with NativeWind
  • c68224f feat(ralph-mobile): add API client and secure storage utilities
  • 3464e62 Ralph checkpoint 48
  • 722c3c1 feat(ralph-mobile): add AuthContext with login/register/logout flow
  • 88f213c feat(ralph-mobile): add authentication screens with login and register flow
  • 403fa72 feat(ralph-mobile): add tab navigation with core screens
  • a36bc70 feat(ralph-mobile): add session detail view with controls
  • e9d33db feat(ralph-mobile): add WebSocket client for real-time updates
  • 1a7355c feat(ralph-mobile): add push notification service with TDD

📊 Changes

100 files changed (+0 additions, -0 deletions)

View changed files

📝 .gitignore (+16 -0)
.prompts/001-rop-self-improvement-do/001-rop-self-improvement-do.md (+238 -0)
.prompts/001-rop-self-improvement-do/SUMMARY.md (+34 -0)
.prompts/002-orchestration-sdk-fix-plan/SUMMARY.md (+64 -0)
.prompts/002-orchestration-sdk-fix-plan/completed/002-orchestration-sdk-fix-plan.md (+329 -0)
.serena/.gitignore (+1 -0)
.serena/project.yml (+84 -0)
apps/mobile/.expo/README.md (+13 -0)
apps/mobile/.expo/devices.json (+3 -0)
apps/mobile/.expo/prebuild/cached-packages.json (+4 -0)
apps/mobile/.expo/types/router.d.ts (+14 -0)
apps/mobile/.expo/web/cache/production/images/android-adaptive-foreground/android-adaptive-foreground-5f4c0a732b6325bf4071d9124d2ae67e037cb24fcc9c482ef82bea742109a3b8-cover-transparent/icon_108.png (+0 -0)
apps/mobile/.expo/web/cache/production/images/android-adaptive-foreground/android-adaptive-foreground-5f4c0a732b6325bf4071d9124d2ae67e037cb24fcc9c482ef82bea742109a3b8-cover-transparent/icon_162.png (+0 -0)
apps/mobile/.expo/web/cache/production/images/android-adaptive-foreground/android-adaptive-foreground-5f4c0a732b6325bf4071d9124d2ae67e037cb24fcc9c482ef82bea742109a3b8-cover-transparent/icon_216.png (+0 -0)
apps/mobile/.expo/web/cache/production/images/android-adaptive-foreground/android-adaptive-foreground-5f4c0a732b6325bf4071d9124d2ae67e037cb24fcc9c482ef82bea742109a3b8-cover-transparent/icon_324.png (+0 -0)
apps/mobile/.expo/web/cache/production/images/android-adaptive-foreground/android-adaptive-foreground-5f4c0a732b6325bf4071d9124d2ae67e037cb24fcc9c482ef82bea742109a3b8-cover-transparent/icon_432.png (+0 -0)
apps/mobile/.expo/web/cache/production/images/android-standard-circle/android-standard-circle-5f4c0a732b6325bf4071d9124d2ae67e037cb24fcc9c482ef82bea742109a3b8-cover-#0a0a0a/icon_144.png (+0 -0)
apps/mobile/.expo/web/cache/production/images/android-standard-circle/android-standard-circle-5f4c0a732b6325bf4071d9124d2ae67e037cb24fcc9c482ef82bea742109a3b8-cover-#0a0a0a/icon_192.png (+0 -0)
apps/mobile/.expo/web/cache/production/images/android-standard-circle/android-standard-circle-5f4c0a732b6325bf4071d9124d2ae67e037cb24fcc9c482ef82bea742109a3b8-cover-#0a0a0a/icon_48.png (+0 -0)
apps/mobile/.expo/web/cache/production/images/android-standard-circle/android-standard-circle-5f4c0a732b6325bf4071d9124d2ae67e037cb24fcc9c482ef82bea742109a3b8-cover-#0a0a0a/icon_72.png (+0 -0)

...and 80 more files

📄 Description

Summary

  • API Coverage: Expand RalphMobile iOS client from 20/40 to 40/40 backend route coverage
  • SSE Fix: Fix event stream gate — isSessionActive now checks backend mode ("live") instead of always-nil status field
  • New Views: Tasks, Loops, Robot, Memories, Hats, Presets — all wired to real backend APIs
  • Server Onboarding: Health-check based first-run flow replaces blank screen on fresh install
  • UX Polish: Read-only completed sessions, library tab cleanup, SpawnLoopSheet for loop creation
  • .gitignore: Exclude Xcode user state, validation screenshots, and .omc/ ephemeral files

Key Changes

SSE Event Stream Fix (P0)

Root cause: isSessionActive checked session.status (always nil — never populated from API) instead of session.mode ("live"/"complete" from backend). SSE stream was never started for any session.

Fix (SessionViewModel.swift):

var isSessionActive: Bool {
    guard let session = currentSession else { return false }
    if session.mode == "live" { return true }
    if let status = session.status {
        return status == "running" || status == "paused"
    }
    return false
}

Backend (ralph-mobile-server)

New API handlers: iterations, merge-queue, config-export/import, robot, tasks, memories, loops management — completing the full 40-route API surface.

iOS App

  • 12 new Swift files (views + view models)
  • Navigation updates for new sidebar sections
  • Library view with Configs, Prompts, Skills, Hats, Presets, Memories tabs

Test plan

  • cargo test -p ralph-mobile-server — 179 tests pass
  • xcodebuild build — BUILD SUCCEEDED (zero errors)
  • Real backend integration verified via simulator screenshots
  • SSE connection state shows "Connected" for live sessions (was always "Disconnected")
  • 10-minute SSE video validation (deferred — requires active ralph loop)

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/mikeyobrien/ralph-orchestrator/pull/163 **Author:** [@krzemienski](https://github.com/krzemienski) **Created:** 2/7/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `feat/ios-api-coverage-clean` --- ### 📝 Commits (10+) - [`5c94386`](https://github.com/mikeyobrien/ralph-orchestrator/commit/5c9438609b895a98fca1b753c582a98e20a39d88) Ralph checkpoint 45 - [`6e9df3e`](https://github.com/mikeyobrien/ralph-orchestrator/commit/6e9df3e96fbd7b963098ab5793143efdf1069f02) feat(ralph-mobile): Create Expo project structure with NativeWind - [`c68224f`](https://github.com/mikeyobrien/ralph-orchestrator/commit/c68224f770067c1ebc3ddd52e56e01edbe4a6a7a) feat(ralph-mobile): add API client and secure storage utilities - [`3464e62`](https://github.com/mikeyobrien/ralph-orchestrator/commit/3464e62f8f471b81fb56b16fbcf3bea2dcd8cdfe) Ralph checkpoint 48 - [`722c3c1`](https://github.com/mikeyobrien/ralph-orchestrator/commit/722c3c1f98aa814095a448babdc524f0e7f8146e) feat(ralph-mobile): add AuthContext with login/register/logout flow - [`88f213c`](https://github.com/mikeyobrien/ralph-orchestrator/commit/88f213c6eb0ebe54365b27a7fc341a447008032b) feat(ralph-mobile): add authentication screens with login and register flow - [`403fa72`](https://github.com/mikeyobrien/ralph-orchestrator/commit/403fa72647ecbdbf1e62f0d0ec7ae94564c36ee9) feat(ralph-mobile): add tab navigation with core screens - [`a36bc70`](https://github.com/mikeyobrien/ralph-orchestrator/commit/a36bc70a189d1ab3f1489f89a1b51505c7df6b72) feat(ralph-mobile): add session detail view with controls - [`e9d33db`](https://github.com/mikeyobrien/ralph-orchestrator/commit/e9d33db70816d3aacd13a9cb00a563e311d8d3a0) feat(ralph-mobile): add WebSocket client for real-time updates - [`1a7355c`](https://github.com/mikeyobrien/ralph-orchestrator/commit/1a7355c4bc05240b33870b8dd4769ad45bf63e9f) feat(ralph-mobile): add push notification service with TDD ### 📊 Changes **100 files changed** (+0 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `.gitignore` (+16 -0) ➕ `.prompts/001-rop-self-improvement-do/001-rop-self-improvement-do.md` (+238 -0) ➕ `.prompts/001-rop-self-improvement-do/SUMMARY.md` (+34 -0) ➕ `.prompts/002-orchestration-sdk-fix-plan/SUMMARY.md` (+64 -0) ➕ `.prompts/002-orchestration-sdk-fix-plan/completed/002-orchestration-sdk-fix-plan.md` (+329 -0) ➕ `.serena/.gitignore` (+1 -0) ➕ `.serena/project.yml` (+84 -0) ➕ `apps/mobile/.expo/README.md` (+13 -0) ➕ `apps/mobile/.expo/devices.json` (+3 -0) ➕ `apps/mobile/.expo/prebuild/cached-packages.json` (+4 -0) ➕ `apps/mobile/.expo/types/router.d.ts` (+14 -0) ➕ `apps/mobile/.expo/web/cache/production/images/android-adaptive-foreground/android-adaptive-foreground-5f4c0a732b6325bf4071d9124d2ae67e037cb24fcc9c482ef82bea742109a3b8-cover-transparent/icon_108.png` (+0 -0) ➕ `apps/mobile/.expo/web/cache/production/images/android-adaptive-foreground/android-adaptive-foreground-5f4c0a732b6325bf4071d9124d2ae67e037cb24fcc9c482ef82bea742109a3b8-cover-transparent/icon_162.png` (+0 -0) ➕ `apps/mobile/.expo/web/cache/production/images/android-adaptive-foreground/android-adaptive-foreground-5f4c0a732b6325bf4071d9124d2ae67e037cb24fcc9c482ef82bea742109a3b8-cover-transparent/icon_216.png` (+0 -0) ➕ `apps/mobile/.expo/web/cache/production/images/android-adaptive-foreground/android-adaptive-foreground-5f4c0a732b6325bf4071d9124d2ae67e037cb24fcc9c482ef82bea742109a3b8-cover-transparent/icon_324.png` (+0 -0) ➕ `apps/mobile/.expo/web/cache/production/images/android-adaptive-foreground/android-adaptive-foreground-5f4c0a732b6325bf4071d9124d2ae67e037cb24fcc9c482ef82bea742109a3b8-cover-transparent/icon_432.png` (+0 -0) ➕ `apps/mobile/.expo/web/cache/production/images/android-standard-circle/android-standard-circle-5f4c0a732b6325bf4071d9124d2ae67e037cb24fcc9c482ef82bea742109a3b8-cover-#0a0a0a/icon_144.png` (+0 -0) ➕ `apps/mobile/.expo/web/cache/production/images/android-standard-circle/android-standard-circle-5f4c0a732b6325bf4071d9124d2ae67e037cb24fcc9c482ef82bea742109a3b8-cover-#0a0a0a/icon_192.png` (+0 -0) ➕ `apps/mobile/.expo/web/cache/production/images/android-standard-circle/android-standard-circle-5f4c0a732b6325bf4071d9124d2ae67e037cb24fcc9c482ef82bea742109a3b8-cover-#0a0a0a/icon_48.png` (+0 -0) ➕ `apps/mobile/.expo/web/cache/production/images/android-standard-circle/android-standard-circle-5f4c0a732b6325bf4071d9124d2ae67e037cb24fcc9c482ef82bea742109a3b8-cover-#0a0a0a/icon_72.png` (+0 -0) _...and 80 more files_ </details> ### 📄 Description ## Summary - **API Coverage**: Expand RalphMobile iOS client from 20/40 to 40/40 backend route coverage - **SSE Fix**: Fix event stream gate — `isSessionActive` now checks backend `mode` ("live") instead of always-nil `status` field - **New Views**: Tasks, Loops, Robot, Memories, Hats, Presets — all wired to real backend APIs - **Server Onboarding**: Health-check based first-run flow replaces blank screen on fresh install - **UX Polish**: Read-only completed sessions, library tab cleanup, SpawnLoopSheet for loop creation - **.gitignore**: Exclude Xcode user state, validation screenshots, and `.omc/` ephemeral files ## Key Changes ### SSE Event Stream Fix (P0) Root cause: `isSessionActive` checked `session.status` (always `nil` — never populated from API) instead of `session.mode` (`"live"`/`"complete"` from backend). SSE stream was **never started** for any session. **Fix** (`SessionViewModel.swift`): ```swift var isSessionActive: Bool { guard let session = currentSession else { return false } if session.mode == "live" { return true } if let status = session.status { return status == "running" || status == "paused" } return false } ``` ### Backend (ralph-mobile-server) New API handlers: iterations, merge-queue, config-export/import, robot, tasks, memories, loops management — completing the full 40-route API surface. ### iOS App - 12 new Swift files (views + view models) - Navigation updates for new sidebar sections - Library view with Configs, Prompts, Skills, Hats, Presets, Memories tabs ## Test plan - [x] `cargo test -p ralph-mobile-server` — 179 tests pass - [x] `xcodebuild build` — BUILD SUCCEEDED (zero errors) - [x] Real backend integration verified via simulator screenshots - [x] SSE connection state shows "Connected" for live sessions (was always "Disconnected") - [ ] 10-minute SSE video validation (deferred — requires active ralph loop) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-27 10:22:36 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/ralph-orchestrator#177
No description provided.