Skip to content

feat(mobile): persist last Run-on destination - #5988

Merged
iscekic merged 1 commit into
mainfrom
feat/mobile-persist-run-on-destination
Sep 9, 2026
Merged

iscekic merged 1 commit into
mainfrom
feat/mobile-persist-run-on-destination

Conversation

@iscekic

@iscekic iscekic commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

The last Run-on pick on the new-agent page is now the default.

  • Persist the chosen connection id. Empty means Cloud Agent.
  • After instances load, restore that pick.
  • If the stored instance is gone, use Cloud Agent.
  • Clear the pick on sign-out.

Restore the last new-agent destination after instances load.
If that destination is gone, use Cloud Agent.
@iscekic iscekic self-assigned this Sep 9, 2026
@iscekic
iscekic enabled auto-merge (squash) September 9, 2026 09:41
key: LAST_RUN_ON_DESTINATION_KEY,
defaultValue: null,
parse: parseStoredRunOnDestination,
serialize: value => value ?? '',

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WARNING: Empty SecureStore values fail on iOS, so picking Cloud Agent will not persist

serialize writes '' when the user selects Cloud Agent (saveRunOn(null)). iOS Keychain / expo-secure-store reject empty values, so the write fails (error toast) and the previous CLI connection id stays on disk. On the next visit, restore still selects that CLI.

Use a non-empty sentinel, or store.clear() when the destination is Cloud Agent.


Reply with @kilocode-bot fix it to have Kilo Code address this issue.

@kilo-code-bot

kilo-code-bot Bot commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

Code Review Summary

Status: 1 Issue Found | Recommendation: Address before merge

Overview

Severity Count
CRITICAL 0
WARNING 1
SUGGESTION 0
Issue Details (click to expand)

WARNING

File Line Issue
apps/mobile/src/lib/hooks/use-persisted-run-on-destination.ts 11 Empty SecureStore values fail on iOS, so picking Cloud Agent will not persist
Files Reviewed (8 files)
  • apps/mobile/src/components/agents/new-session-screen-body.tsx - 0 issues
  • apps/mobile/src/lib/auth/auth-context.test.tsx - 0 issues
  • apps/mobile/src/lib/auth/auth-context.tsx - 0 issues
  • apps/mobile/src/lib/auth/credentials.test.ts - 0 issues
  • apps/mobile/src/lib/hooks/use-persisted-run-on-destination.ts - 1 issue
  • apps/mobile/src/lib/run-on-destination.test.ts - 0 issues
  • apps/mobile/src/lib/run-on-destination.ts - 0 issues
  • apps/mobile/src/lib/storage-keys.ts - 0 issues

Fix these issues in Kilo Cloud


Reviewed by grok-4.6 · Input: 254.8K · Output: 15.1K · Cached: 648.2K

Review guidance: REVIEW.md from base branch main

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.

2 participants