Repository navigation
fix(mobile): require a prompt or a file before starting on a remote computer - #8481
Conversation
…omputer The remote-computer target issued a spawn from an empty composer: no share payload was built, so the new session had nothing to run and Start stayed busy until the SDK timeout, with no error and no way forward. - Gate the remote Start on the same condition that builds a payload: prompt text or at least one attachment. The destination keeps an attachment-only delivery in its own composer for the user to send. - Name the empty composer in the blocked-reason line: "Add a prompt or a file to start." for the remote computer and "Add a prompt to start." for Cloud Agent, which does not accept an attachment without text. - Add both copy keys to the English catalog and every locale catalog. - Unit tests for the new predicate and for both reason branches.
Code Review SummaryStatus: No Issues Found | Recommendation: Merge Executive SummaryCommit Assumptions: Files Reviewed (3 files)
Previous Review Summaries (2 snapshots, latest commit b961d07)Current summary above is authoritative. Previous snapshots are kept for context only. Previous review (commit b961d07)Status: 1 Issue Found | Recommendation: Address before merge Executive SummaryThe new remote-start content gate mirrors Assumptions: Overview
Issue Details (click to expand)WARNING
Files Reviewed (90 files)
Previous reviewStatus: 1 Issue Found | Recommendation: Address before merge Executive SummaryThe new remote-start content gate and both blocked-reason branches match Assumptions: Overview
Issue Details (click to expand)WARNING
Files Reviewed (90 files)
Reviewed by deepseek-flash-latest · Input: 64.1K · Output: 6.6K · Cached: 979.6K Review guidance: REVIEW.md from base branch |
|
bot: End-to-end captures from the Android emulator against the local dev stack, with a fake account and a fake connected CLI registered through the local session-ingest worker. Observed on the new-session form with the remote computer selected:
The screenshots show the two composer states; the button state comes from the accessibility dump recorded beside each capture. |
A selected repository key that no longer resolves to a picker row blocks Start on its own. The prompt reason would name the wrong blocker there, so the helper now takes the picker's real resolution state and stays silent for a stale selection.


Change
The new-session form let the remote-computer target start with an empty composer. The form then built no share payload, so the spawn carried nothing, and Start stayed busy until the client SDK timeout with no error and no way forward.
resolveRemoteStartMissingContent(apps/mobile/src/lib/new-session-submit.ts) is the new pure gate: content is missing only when there is no prompt and no attachment, the exact condition under whichbuildComposerSharePayloadreturnsnull. The remote branch ofresolveStartDisabled(new-session-screen-body.tsx) now blocks Start on it. An attachment alone stays a valid start: the destination keeps an attachment-only delivery in its own composer for the user to send.resolveNewSessionStartBlockedReasonnow names the empty composer instead of returningnull:enter-prompt-or-file→ "Add a prompt or a file to start."enter-prompt→ "Add a prompt to start." (Cloud Agent does not accept an attachment without text, so it never claims one helps). It is emitted only when the prompt is the remaining blocker after the repository is chosen.No behavior change for the Cloud Agent gate, the clone entries, the share gate, or the spawn/retry classification.
End-to-end evidence (Android emulator, local stack, fake account)
Ran the real app against the local dev stack on this VM (Next.js on 3000, session-ingest worker on 8800, Metro on 8081) with a fake account, and registered a fake connected CLI through the real local session-ingest worker (
/api/user/cliheartbeat), soactiveSessions.listInstancesreturned one remote row.uiautomator dumpon the new-session form:enabled="false".enabled="true".enabled="false".The fake CLI deliberately answers no
command, so the spawn settles through the client timeout; the UI behavior above is what was observed. No Cloud Agent or real-CLI session was created by this run.Checks on this VM:
pnpm exec vitest run src/lib/new-session-submit.test.ts: 53 passed (new cases cover the predicate with prompt, file, both and neither, plus both reason branches).pnpm exec tsc --noEmitinapps/mobile: clean.oxlintover the three changed source files: 0 warnings, 0 errors.pnpm --filter kilo-app check:i18n(87 catalogs matchen.json) andcheck:plurals: pass.Proxy answers
The owner's proxy gave these answers in the owner's place.
Answer: Prompt or attachment
Confidence: 0.60 · Precedent: Trust the code over documents: session 269375d6e466, "only trust code". The brief asks to match what the remote spawn accepts, and the code shows it accepts attachments-only.
Answer: Both targets
Confidence: 0.70 · Precedent: Fix the class of the issue on every affected surface: session 00eb2a1d3e4b, "if anything repeats the same mistake over and over again, fix the class".
Answer: Add a prompt or a file to start.
Confidence: 0.50 · Precedent: Follows the content-rule answer. Localize the string: session dcb3f9170164, "the mobile app always must respect i18n".
Answer: Per-target wording
Confidence: 0.60 · Precedent: UX and design quality: never show a false or redundant reason, keep similar elements consistent (a247f3c19b1e: "remove the redundant 'context' copy"); Git and PRs: put each separate concern in its own PR (debabfb38c82: "in a separate PR"). Localize both keys (dcb3f9170164: "the mobile app always must respect i18n").