Repository navigation
CI run: feat/mobile-clone-from-url tree (mirrors stablyai/orca#21698) - #9
Merged
Merged
Conversation
…ion / create parent Move the clone-default-parent helper into shared code and add two host-side default resolvers (clone destination, create parent) that both the desktop IPC handlers and the runtime controllers now share, so mobile callers can omit destination/parentPath and get the same defaults the desktop flows use. repo.clone's destination and repo.create's parentPath become optional (a wire loosening), and a repo.add-project-mobile.v1 runtime capability is declared for mobile gating.
Add repo.add, repo.create, and repo.clone to the mobile RPC allowlist and let the runtime controllers resolve the clone destination and create parent from host settings when the caller omits them, so a paired phone can add a project (clone from URL, create empty, add existing path) without typing host paths. The desktop create-default IPC handler now delegates to the same shared policy.
…e + sheet The + button now opens a two-choice sheet — New workspace / Add project — mirroring the desktop + area's two buttons. Hosts without the repo.add-project-mobile.v1 capability skip the sheet and open the create form directly, as before. Add project mirrors the desktop start steps minus the SSH row: Browse folder (repo.add with a typed host path), Clone from URL (repo.clone with the host-side default destination, 10-minute budget), and Create new project (repo.create, git init + initial commit). A successful add closes the sheet and opens the New workspace form with the new repo upserted and selected — the handoff fires from the drawer's onAfterClose so iOS never presents two native modals in the same beat. The worktree-actions recording mount adapter passes no capabilities (hostCapabilities: []), so the + entry falls back to the create form in recordings, matching legacy hosts.
The standalone Add project flow opened the create-worktree sheet after a clone because it reused the composer-nested flow's continuation, which returns to the composer with the new repo selected. The desktop standalone Add project instead opens the added repo's default checkout (main worktree) session. Await the refreshed worktree catalog and find the repo's main worktree, then open its session; with no main row for the repo, stay on the refreshed host list. On upstream's query-backed catalog this awaits the refetch (joining any read in flight, then reading once more so the rows cannot predate the call), and the handoff plus the + sheet's openers live in host-project-admission-actions to keep the actions hook under the max-lines ratchet.
Upstream moved under this branch again: the low-value test sweeps deleted the five harness files this commit used to re-fit, and what survives is the Add project handoff test — its graph now reaches the host-catalog removal lifecycle and haptics (both stubbed), the actions hook reads the shared query client (the probe mounts inside a QueryClientProvider with a minimal connection surface), and its state fake carries the empty server-workspace list the handoff's session open consults.
…iled The awaited fetchWorktrees dropped the pre-rebase guards when it moved onto the query-backed catalog: it would fire a doomed read while the host is not connected, and a failed read answered with the cache's last good rows, which can predate the change the read was for — a weaker promise than the "confirmed rows" the handoff lands on. Skip the read while no client or the connection is down, and answer undefined when the query settled in error, so the handoff stays on the list exactly where it used to. Prove the join-then-read-again ordering (the rows cannot predate the call), the single idle read, and both stays-put answers with the catalog hook's first direct test — the ones covering the old in-flight dedup went with upstream's test sweeps.
…superseded The Add project flow first landed by opening the create-workspace sheet with the added repo upserted and selected; landing on the repo's default checkout replaced that path, but the plumbing stayed — openNewWorktreeModal's optional repo, the preselected sheet state, and upsertRepo's list-and-catalog write-through had no caller passing a repo anymore. Delete the chain outright rather than keep lines a reviewer must prove unused: the sheet still reopens on the last-visited default, and its own repo.list read now carries the added repo either way.
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.
Fork-internal PR created only to run the pull_request workflows (PR Checks / Mobile Checks) on the exact tree of stablyai#21698 against its rebase base a6b2a08. Not for merging; close after the runs report.