feat(mobile): preserve provider launch and recent identity - #5711
Closed
iscekic wants to merge 8 commits into
Closed
feat(mobile): preserve provider launch and recent identity#5711iscekic wants to merge 8 commits into
iscekic wants to merge 8 commits into
Conversation
This was referenced Aug 29, 2026
Contributor
Code Review SummaryStatus: 1 Issue Found | Recommendation: Address before merge Overview
Issue Details (click to expand)WARNING
Files Reviewed (22 files)
Fix these issues in Kilo Cloud Reviewed by grok-4.6 · Input: 214.5K · Output: 26.5K · Cached: 1.3M Review guidance: REVIEW.md from base branch |
This was referenced Aug 30, 2026
This was referenced Aug 30, 2026
Contributor
Author
|
Closing: the owner stopped this workflow section. The branch is retained. |
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.
Summary
mobile-provider-parity-1d93-s6...mobile-provider-parity-1d93-s7.Kilo-Org/cloud; worktree:/Users/igor/Projects/.worktrees/mobile-provider-parity-1d93.ProviderLaunchSelectionpairs a requiredLaunchRepositoryReferencewith optionalupstreamBranch;resolveProviderLaunchInputreturnsProviderPrepareInputfor exactly one provider.When
launchSelectionis supplied,ProviderLaunchContextrejects null selections, absent accounts, mismatched owners, blank branches, and personal Bitbucket launches.provider-launch:v1fingerprints include the account, owner, integration, repository, and selected branch; omittedlaunchSelectionpreserves legacy payloads and fingerprint bytes.Files
apps/mobile/src/components/agents/provider-launch-input.ts— validates provider/name agreement and Bitbucket identifiers, maps integration pins, and preserves the selected branch. (Source; A; +128/-0 lines.)apps/mobile/src/components/agents/provider-launch-input.test.ts— adds shared launch mapping and compatibility tests. (Test; A; +246/-0 lines.)PrepareInputadds optionalbitbucketRepo,githubIntegrationId,gitlabIntegrationId,gitlabInstanceUrl, andbitbucketIntegrationId.createSessionManagerforwards these fields without requiring them, so older Cloud Agent software development kit (SDK) callers remain valid.The authorized server lookup stays until old callers and records disappear and the 30-day ledger window expires.
Files
packages/cloud-agent-sdk/src/session-manager.ts— extends the public prepare contract without changing the existingcreateAndStartforwarding. (Source; M; +7/-0 lines.)packages/cloud-agent-sdk/src/session-manager.test.ts— extends prepare forwarding and legacy payload compatibility tests. (Test; M; +77/-0 lines.)UseNewSessionCreatorInputandContinueDestinationaccept optionallaunchSelection;PrepareSessionInputandContinuePrepareInputshare the provider mapping.Both creators bind pending work to the account and organization; ordinary creation also tracks the repository and branch.
Retired work cannot clear the form, report errors, or navigate, and an older Continue completion cannot reset a replacement request's busy state.
Files
apps/mobile/src/components/agents/use-new-session-creator.ts— uses shared fingerprints and checks request ownership around uploads, persistence, cleanup, and navigation. Keeps bare-name GitHub retry bytes only without normalized input and writes the replacement row before removing the legacy row. (Source; M; +87/-76 lines.)apps/mobile/src/components/agents/use-continue-cloud-create.ts— shares provider/branch mapping, keeps clone-only requests without a synthetic prompt, and ignores retired results through retry cleanup and navigation. (Source; M; +79/-80 lines.)apps/mobile/src/components/agents/new-session-screen-body.tsx— checks account/organization scope before starting Continue, reporting errors, or clearing the shared busy state. (Source; M; +20/-1 lines.)apps/mobile/src/components/agents/use-new-session-creator.test.ts— extends ordinary-creation contract tests. (Test; M; +156/-7 lines.)apps/mobile/src/components/agents/use-new-session-creator.mounted.test.tsx— adds mounted coverage for ordinary creation, retries, and request retirement. (Test; A; +717/-0 lines.)apps/mobile/src/components/agents/use-continue-cloud-create.test.ts— extends Continue input compatibility tests. (Test; M; +95/-0 lines.)apps/mobile/src/components/agents/use-continue-cloud-create.mounted.test.tsx— adds mounted coverage for Continue retries and request retirement. (Test; A; +474/-0 lines.)apps/mobile/src/components/agents/new-session-screen-body.mounted.test.tsx— adds the screen regression for overlapping Continue requests with both creators mounted. (Test; A; +394/-0 lines.)resolveNewSessionStartDisabledandresolveContinueStartDisablednow acceptProviderLaunchContextand reject stale normalized selections before cloud submission.isProviderLaunchSelectionCurrentapplies the shared owner and branch checks; omitted selections and remote Continue admission keep their previous behavior.Files
apps/mobile/src/lib/new-session-submit.ts— adds normalized selection checks to both cloud Start guards while retaining existing prompt, profile, model, attachment, and remote checks. (Source; M; +41/-28 lines.)apps/mobile/src/lib/new-session-submit.test.ts— extends submit readiness tests for normalized selections. (Test; M; +53/-0 lines.)useMutationOutboxupdates its in-memory rows after successfulwriteSafeRetryandwriteReconcileFirstwrites, keeping savedoperationKeyvalues available to later retries.Generation checks prevent late writes or removals from changing another account's state, and identity changes clear cached rows before reload.
Persistence ordering,
safe-retryandreconcile-firstrules, and terminal-failure handling stay unchanged.Files
apps/mobile/src/lib/persist/use-mutation-outbox.ts— updates local rows after persistence, clears rows on identity changes, and applies write/remove results only to the current generation. (Source; M; +27/-6 lines.)apps/mobile/src/lib/persist/use-mutation-outbox.test.ts— extends persisted key reuse and account-isolation coverage. (Test; M; +105/-0 lines.)cliSessionsV2.recentRepositoriesadds account-scopedRecentRepositoryIdentity, andRecentAgentRepositoryexposes it without removinggitUrlorlastUsedAt.History remains unique by URL, ordered by latest use, and limited to ten rows; discovery runs once per owner within each request.
Only one authorized provider/host/path match resolves; mixed owners, competing integrations, and incomplete discovery retain
legacy-unresolvedrows instead of guessing.Files
apps/web/src/routers/cli-sessions-v2-router.ts— groups by URL before the limit and aggregates owner/provider evidence. Resolves authorized HTTP(S)/SSH matches, folds GitHub path case only, and retains ambiguous, not-found, or unavailable identities. Rejects URL queries/fragments and reuses discovery per owner. (Source; M; +145/-5 lines.)apps/mobile/src/lib/hooks/use-agent-sessions.ts— exports the inferredRecentAgentRepositorytype without changing query inputs or legacy result fields. (Source; M; +4/-0 lines.)apps/web/src/routers/cli-sessions-v2-router.test.ts— extends identity resolution and URL-unique recent-history coverage. (Test; M; +374/-1 lines.)fetchAllGitHubRepositoriesForOrganizationandfetchGitHubRepositoriesForUseraddrequireComplete, which defaults to false.When true, discovery gathers all healthy integrations and rejects failed or unconfigured installations instead of resolving against partial results.
Organization browsing still accepts partial results, and personal browsing still uses one integration; recent lookups require complete discovery.
Files
apps/web/src/lib/cloud-agent/github-integration-helpers.ts— adds complete personal discovery and the shared completeness check, while preserving existing cached/fresh browsing behavior. (Source; M; +31/-10 lines.)apps/web/src/lib/cloud-agent/github-integration-helpers.test.ts— extends complete-discovery and legacy browsing coverage. (Test; M; +104/-0 lines.)FetchedSessionDatanow derivesrepositoryfrom runtime or stored Git URLs whengithubRepois absent.gitUrlfalls back to the runtime URL when the stored URL is missing, so older GitLab and Bitbucket sessions keep repository metadata.Files
apps/mobile/src/components/agents/mobile-session-manager.ts— reconstructs repository display names across providers and supplies the runtime URL fallback; existing branch precedence stays unchanged. (Source; M; +6/-2 lines.)Contract flow
ProviderLaunchSelection,ProviderLaunchContextresolveProviderLaunchInputProviderPrepareInputand repository fingerprintuseNewSessionCreator,useContinueCloudCreateoperationKeyprepareSessionPrepareInputcreateSessionManagerand the mobile prepare adaptercliSessionsV2.recentRepositoriesRecentRepositoryIdentityplus legacy URL fieldsuseRecentAgentRepositories,RecentAgentRepositoryTests: 11 files changed (4 added, 7 modified; +2,795/-8 lines):
new-session-screen-body.mounted.test.tsx,provider-launch-input.test.ts,use-continue-cloud-create.mounted.test.tsx,use-continue-cloud-create.test.ts,use-new-session-creator.mounted.test.tsx,use-new-session-creator.test.ts,new-session-submit.test.ts,use-mutation-outbox.test.ts,github-integration-helpers.test.ts,cli-sessions-v2-router.test.ts, andsession-manager.test.ts.Generated: 0 files changed.
Visual Changes
Visual Changes: N/A
Verification
Reviewer Notes
Human steps
The bot owns remaining verification.
Automated evidence
Notes
Runtime verification is pending for the cumulative stack; this level does not add the branch-selection UI.
Stacked PRs — merge bottom to top. Each level shows only its own diff.
Runtime verification (E2E, user advocacy, simplify) runs on the tip PR over every level.
Every level keeps its own checks, its own bot review, and its own threads; each one is answered on its own PR.
Each level is its own deliverable: it builds and passes its own checks alone.
A finding on a level is repaired on that level, then carried upward with stack.sh forward.
mobile-provider-parity-1d93-s1— feat(provider-review): add shared identity and stack checks #5663mobile-provider-parity-1d93-s2— feat(provider-review): define review contracts and vocabulary #5665mobile-provider-parity-1d93-s3— feat(provider-review): add safe provider SDK boundaries #5689mobile-provider-parity-1d93-s4— feat(git-token): authorize exact provider review resources #5692mobile-provider-parity-1d93-s5— feat(cloud-agent): preserve provider identity through checkout #5700mobile-provider-parity-1d93-s6— feat(provider-review): expose exact repositories and branches #5705mobile-provider-parity-1d93-s7— feat(mobile): preserve provider launch and recent identity #5711 ← this PRmobile-provider-parity-1d93-s8— feat(mobile): select exact provider repositories and branches #5729mobile-provider-parity-1d93-s9— feat(provider-review): add authorized GitLab review reads #5738mobile-provider-parity-1d93-s10— feat(provider-review): add authorized Bitbucket review reads #5745mobile-provider-parity-1d93-s11— feat(provider-review): add reconciled GitLab review actions #5748mobile-provider-parity-1d93-s12— feat(provider-review): add Bitbucket review actions and recovery #5756mobile-provider-parity-1d93-s13— feat(provider-review): expose the neutral review facade #5763 (tip)