Restyle chat bar with Ask UI, approvals, and markdown - #12
Conversation
…own. Bring the chat bar in line with a Codex-style Ask UI, wire model/thinking and tool approval from the phone, and fix scroll/markdown so replies stay readable on device. Co-authored-by: Cursor <cursoragent@cursor.com>
|
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. |
|
Warning Review limit reached
Next review available in: 19 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (7)
📝 WalkthroughWalkthroughThe PR adds richer model and prompt contracts, phone-based approval handling, image and dictation input, Markdown rendering, revised chat scrolling and optimistic updates, approval-extension installation, and related privacy and README updates across the iOS client and companion server. ChangesChat platform capabilities
Estimated code review effort: 4 (Complex) | ~60 minutes Sequence Diagram(s)sequenceDiagram
participant User
participant ChatView
participant APIClient
participant Server
participant PiRPC
User->>ChatView: choose model, attach image, or send text
ChatView->>APIClient: send structured prompt
APIClient->>Server: POST /sessions/:id/send
Server->>PiRPC: start configured Pi turn
PiRPC-->>Server: messages, activity, or approval request
Server-->>ChatView: status with messages and pending_ui
ChatView->>APIClient: submit approval response
APIClient->>Server: POST /sessions/:id/ui-response
Server->>PiRPC: write approval response
Possibly related PRs
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
Greptile SummaryThis PR expands the mobile chat experience and companion server. The main changes are:
Confidence Score: 5/5This looks safe to merge.
Important Files Changed
Reviews (4): Last reviewed commit: "Fix image-only turn pinning and scroll t..." | Re-trigger Greptile |
There was a problem hiding this comment.
Actionable comments posted: 2
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
PiMobile/Views/ChatView.swift (1)
455-506: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick winAttached images are lost when
send()fails.
pendingImagesis cleared at Line 459 before the request, but neither the missing-session guard (485-491) nor thecatch(501-507) restores it — onlydraftis restored. On any send failure the user's attachments silently disappear. Capture the images and restore them alongsidedrafton both failure paths.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@PiMobile/Views/ChatView.swift` around lines 455 - 506, Preserve the attached images before clearing pendingImages in the send flow, then restore that captured collection alongside draft when session creation fails in the guard and when api.send throws in the catch. Update the failure cleanup around the existing sid guard and catch without changing successful-send behavior.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@PiMobile/SpeechDictation.swift`:
- Around line 136-149: Update the final-result handling in the recognition
callback so the latest transcript is committed to draft before calling stop(),
or ensure ChatView’s listening guard accepts final-result finalization. Preserve
the existing transcript composition and stop behavior while preventing the final
refined dictation text from being dropped.
In `@server/install.sh`:
- Around line 33-36: Update the remote-download branch of the install script to
fetch the bundled pi-mobile-approval directory alongside server.ts into LOG_DIR,
preserving the expected pi-mobile-approval path used by sendMessage and the
approval-extension install endpoint; if the directory cannot be downloaded or
installed, fail before launching the LaunchAgent.
---
Outside diff comments:
In `@PiMobile/Views/ChatView.swift`:
- Around line 455-506: Preserve the attached images before clearing
pendingImages in the send flow, then restore that captured collection alongside
draft when session creation fails in the guard and when api.send throws in the
catch. Update the failure cleanup around the existing sid guard and catch
without changing successful-send behavior.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: ed5e5e47-dbc4-4f31-9ab6-933766eb0583
📒 Files selected for processing (13)
Config/Info.plistPiMobile/APIClient.swiftPiMobile/CameraPicker.swiftPiMobile/MarkdownText.swiftPiMobile/Models.swiftPiMobile/SpeechDictation.swiftPiMobile/Views/ChatView.swiftPiMobile/Views/ModelPickerSheet.swiftREADME.mdserver/install.shserver/pi-mobile-approval/extension.tsserver/pi-mobile-approval/package.jsonserver/server.ts
Ask mode now refuses to start without the approval extension, failed Pi spawns no longer leave a stuck running turn, optimistic/image pins ignore older same-text messages, polling clears stale approval UI, table cells keep escaped/code pipes, and remote install ships the approval package. Co-authored-by: Cursor <cursoragent@cursor.com>
Image-only sends now get a Photo placeholder on client and server so the active turn can pin, and opening a session always lands on the most recent messages. Co-authored-by: Cursor <cursoragent@cursor.com>
Summary
/models, image prompts, bundledpi-mobile-approvalAsk mode with pending UI, and quieter turn activity copy.Test plan
Made with Cursor
Summary by CodeRabbit