feat: add add project to mobile and use lazyvstack#27
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
Pull request overview
This PR adds “Add Project” support to the mobile app by introducing a remote folder picker backed by new RxCodeSync payloads and desktop-side handlers, and it updates the macOS chat message list to use ScrollView + LazyVStack (plus some theme/style tweaks).
Changes:
- Add a mobile remote folder picker UI and wiring to create projects from a selected desktop folder.
- Extend the sync protocol and desktop/mobile services to support folder tree requests and create-project requests/results.
- Replace macOS chat
ListwithScrollView/LazyVStack, and adjust related row styling/cursor behavior.
Reviewed changes
Copilot reviewed 15 out of 15 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| RxCodeMobile/Views/RemoteFolderPickerView.swift | New SwiftUI view for browsing remote folders and triggering project creation. |
| RxCodeMobile/Views/ProjectsSidebar.swift | Adds toolbar button + sheet to present the remote folder picker; selects newly created project. |
| RxCodeMobile/Views/MobileChatView.swift | Updates plan banner styling to use glassEffect. |
| RxCodeMobile/State/MobileAppState.swift | Adds published state + request/response handlers for remote folder tree + create-project flows. |
| RxCode/Views/Sidebar/ProjectListView.swift | Sidebar styling tweaks (selection-aware icon color, text colors). |
| RxCode/Views/Sidebar/ProjectChatRow.swift | Adjusts timestamp foreground style. |
| RxCode/Services/MobileSyncService.swift | Routes new payloads to NotificationCenter observers. |
| RxCode/App/AppState.swift | Implements desktop handlers for folder tree requests and create-project requests; builds RemoteFolderNode trees. |
| Packages/Tests/RxCodeSyncTests/PayloadTests.swift | Adds round-trip JSON tests for new payload types. |
| Packages/Sources/RxCodeSync/Protocol/Payload.swift | Defines new payload cases and Codable structs for folder tree + create-project. |
| Packages/Sources/RxCodeCore/Views/SessionSidebarRow.swift | Theme color adjustments. |
| Packages/Sources/RxCodeChatKit/MessageListView.swift | Switches macOS message list to ScrollView + LazyVStack. |
| Packages/Sources/RxCodeChatKit/MessageBubble.swift | Refines streaming cursor placement logic across render blocks. |
| Packages/Sources/RxCodeChatKit/MarkdownView.swift | Forces markdown view identity updates via .id(renderedMarkdown). |
| Packages/Sources/RxCodeChatKit/ChatMessageListView.swift | Adjusts row styling to work with ScrollView on macOS (padding added). |
Comments suppressed due to low confidence (1)
RxCode/App/AppState.swift:1657
MobileFolderPickerError.notFolderuses the message “Folder does not exist on the desktop.” but it can be thrown for any requested path (including non-desktop locations, permission failures, etc.). Use a location-agnostic description (or differentiate not-found vs not-a-directory vs permission).
private enum MobileFolderPickerError: LocalizedError {
case notFolder
var errorDescription: String? {
switch self {
case .notFolder:
return "Folder does not exist on the desktop."
}
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+423
to
+433
| func createProjectFromRemoteFolder(path: String) async { | ||
| guard isPaired else { return } | ||
| let trimmed = path.trimmingCharacters(in: .whitespacesAndNewlines) | ||
| guard !trimmed.isEmpty else { return } | ||
| let request = CreateProjectRequestPayload(path: trimmed) | ||
| pendingCreateProjectRequestID = request.clientRequestID | ||
| remoteProjectCreateInFlight = true | ||
| remoteProjectCreateError = nil | ||
| do { | ||
| try await client.send(.createProjectRequest(request), toHex: pairedDesktopPubkey) | ||
| } catch { |
Comment on lines
+1449
to
+1466
| private func handleMobileFolderTreeRequest(_ request: FolderTreeRequestPayload, fromHex: String) async { | ||
| let result: FolderTreeResultPayload | ||
| do { | ||
| let root = try mobileFolderTreeRoot(for: request) | ||
| result = FolderTreeResultPayload( | ||
| clientRequestID: request.clientRequestID, | ||
| requestedPath: request.path, | ||
| ok: true, | ||
| root: root | ||
| ) | ||
| } catch { | ||
| result = FolderTreeResultPayload( | ||
| clientRequestID: request.clientRequestID, | ||
| requestedPath: request.path, | ||
| ok: false, | ||
| errorMessage: mobileFolderErrorMessage(error) | ||
| ) | ||
| } |
| name: Host.current().localizedName ?? "Mac", | ||
| path: "", | ||
| isSelectable: false, | ||
| children: mobileFolderPickerRoots(depth: 1, includeHidden: request.includeHidden) |
| requestID: request.clientRequestID, | ||
| ok: false, | ||
| project: nil, | ||
| errorMessage: "Folder does not exist on the desktop.", |
Contributor
Author
|
🎉 This PR is included in version 1.7.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
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.
No description provided.