Skip to content

feat(mobile): continue sessions with context - #4986

Open
iscekic wants to merge 5 commits into
mainfrom
continue-session-a789
Open

feat(mobile): continue sessions with context#4986
iscekic wants to merge 5 commits into
mainfrom
continue-session-a789

Conversation

@iscekic

@iscekic iscekic commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Summary

What

  • Add a bounded continuation seed from read-only remote CLI conversation history.
  • Start cloud or remote destinations with the seed as the first message.
  • Preserve the existing prefilled configure-screen fallback.

Why

  • Continued sessions currently lose the prior conversation context.

How

  • Build a 3,800-character head-and-tail transcript seed.
  • Resolve direct cloud and remote destinations at tap time.
  • Auto-send the remote seed through the existing share payload path.
  • Keep the detail button single-flight while a continuation starts.

Validation

  • pnpm run test:db passed.
  • pnpm run validate passed typecheck and lint.
  • pnpm run test:dev-local passed after the focused tmux target repair.
  • Cumulative implementation review: no findings.

Visual Changes

Cloud destination recall:
e2e-cont-a-final.png

Remote destination recall:
e2e-cont-b.png

E2E

  • iOS bot E2E passed for cloud and remote destinations.
  • Both destinations showed pineapple23 in the seeded first user message.
  • Both destination agents recalled pineapple23 after the follow-up probe.

@iscekic iscekic self-assigned this Aug 3, 2026
Comment thread apps/mobile/src/components/agents/use-continue-session.ts Outdated
@kilo-code-bot

kilo-code-bot Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Executive Summary

Incremental review of the new commits: the previous WARNING is resolved — remote continuation now validates the stored model/variant against the gateway catalog via resolveContinueRemoteModel and omits the override (CLI default) when it doesn't resolve; the new helper is pure, fully test-covered, and correctly wired into the spawn path and hook dependencies.

Files Reviewed (3 files, incremental)
  • apps/mobile/src/components/agents/continuation-seed.ts - 0 issues (resolveContinueRemoteModel catalog/variant validation verified against buildCreateRemoteSessionInput empty-string omission)
  • apps/mobile/src/components/agents/resolve-continue-remote-model.test.ts - 0 issues (all branches covered)
  • apps/mobile/src/components/agents/use-continue-session.ts - 0 issues (previous WARNING resolved; args.models added to execute deps)
Previous Review Summary (commit ab27bba)

Current summary above is authoritative. Previous snapshots are kept for context only.

Previous review (commit ab27bba)

Status: 1 Issue Found | Recommendation: Address before merge

Executive Summary

The remote continuation path forwards the source session's stored model id with a hardcoded kilo provider and no gateway-catalog validation, so continuing read-only CLI sessions that used a non-Kilo or stale model can spawn a session with an unresolvable model.

Overview

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

WARNING

File Line Issue
apps/mobile/src/components/agents/use-continue-session.ts 118 Remote spawn passes the session's stored model verbatim into buildCreateRemoteSessionInput (hardcoded providerID: 'kilo') without the catalog validation the cloud destination gets, so non-gateway/stale models produce a broken spawn
Files Reviewed (5 files)
  • apps/mobile/src/components/agents/continuation-seed.ts - 0 issues (truncation math, role labeling, and bounds verified against tests)
  • apps/mobile/src/components/agents/continuation-seed.test.ts - 0 issues
  • apps/mobile/src/components/agents/use-continue-session.ts - 1 issue
  • apps/mobile/src/components/agents/session-detail-content.tsx - 0 issues (import cleanup verified; button single-flight via isContinuing)
  • dev/local/tmux.ts - 0 issues (break-pane -t target fix is correct)

Fix these issues in Kilo Cloud


Reviewed by kimi-k3 · Input: 36.9K · Output: 6K · Cached: 406K

Review guidance: REVIEW.md from base branch main

@iscekic iscekic added the human-ready The PR is ready for human review. label Aug 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

human-ready The PR is ready for human review.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant