Skip to content

Fix companion install QR and chat/workspace UX - #10

Merged
MRL-00 merged 1 commit into
mainfrom
run-app-on-simulator
Jul 23, 2026
Merged

MRL-00 merged 1 commit into
mainfrom
run-app-on-simulator

Conversation

@MRL-00

@MRL-00 MRL-00 commented Jul 23, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • Fix LaunchAgent install so the companion server starts and prints the pairing QR/token (pi PATH resolution + agent PATH)
  • Name phone-created workspaces with Conductor-style city labels
  • Remove session tabs; move model picker under the composer for more typing room
  • Surface workspace-create errors in the app

Test plan

  • From a clean state: curl -fsSL https://raw.githubusercontent.com/MRL-00/pi-mobile/main/server/install.sh | bash prints listening line, auth token, and QR
  • Scan QR (or enter http://<mac>.local:8940 + token) pairs the phone
  • Create workspace from phone gets a city name (e.g. Lisbon)
  • Chat screen has no Untitled tabs; model pill sits under the composer

Made with Cursor

Summary by CodeRabbit

  • New Features
    • Workspace listings now display friendlier names, including labels for phone-created workspaces.
    • Server setup provides clearer pairing instructions when automatic startup is unavailable.
  • Bug Fixes
    • Improved API error messages for invalid URLs and server failures.
    • Workspace creation failures now show an alert instead of failing silently.
    • Improved server startup reliability and model discovery across platforms.
  • UI Updates
    • Updated chat layout and repositioned model selection controls.

LaunchAgents could not find `pi`, so the server died before printing the pairing QR. Resolve pi explicitly, set PATH in the LaunchAgent, and wait for the banner. Also assign Conductor-style city names on workspace create, drop session tabs, and move the model picker under the composer.

Co-authored-by: Cursor <cursoragent@cursor.com>
@cursor

cursor Bot commented Jul 23, 2026

Copy link
Copy Markdown

Bugbot is not enabled for your account, so this pull request was not reviewed.

Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs.

@MRL-00
MRL-00 merged commit c193014 into main Jul 23, 2026
1 check was pending
@coderabbitai

coderabbitai Bot commented Jul 23, 2026 •

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: a10056d9-1650-4332-9e8e-925c69b7bc60

📥 Commits

Reviewing files that changed from the base of the PR and between 15e99f1 and f7b9d05.

📒 Files selected for processing (6)
  • .gitignore
  • PiMobile/APIClient.swift
  • PiMobile/Views/ChatView.swift
  • PiMobile/Views/WorkspacesView.swift
  • server/install.sh
  • server/server.ts

📝 Walkthrough

Walkthrough

The server now resolves Pi executables, stores user-facing workspace names, and improves LaunchAgent startup reporting. The mobile app adds structured API errors, workspace creation alerts, and revised chat controls. Conductor local settings are ignored.

Changes

Server runtime and workspace flow

Layer / File(s) Summary
Pi command resolution and execution
server/server.ts
Model listing and turn execution use a resolved Pi executable, with model refresh failures preserving the existing cache.
LaunchAgent environment and startup detection
server/install.sh
The installer configures LaunchAgent PATH values, bootstraps the service, polls startup logs, and prints pairing details when required.
Persisted workspace names and listings
server/server.ts
Project metadata stores workspace names, phone-created worktrees receive city-based labels, and listing responses expose computed labels.

Mobile API and chat experience

Layer / File(s) Summary
Structured API error responses
PiMobile/APIClient.swift
Requests set JSON content types and convert invalid URLs and non-200 responses into localized API errors.
Workspace creation error presentation
PiMobile/Views/WorkspacesView.swift
Workspace creation failures are shown in a dismissible alert.
Chat control layout
PiMobile/Views/ChatView.swift
The model pill is repositioned, chat tab management is removed, and composer spacing is adjusted.

Local configuration exclusions

Layer / File(s) Summary
Conductor local settings ignores
.gitignore
Conductor local TOML and JSON settings files are excluded from version control.

Estimated code review effort: 4 (Complex) | ~45 minutes

Possibly related PRs

  • MRL-00/pi-mobile#8: Related backend implementation for persisted project metadata and workspace handling.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch run-app-on-simulator

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

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