Repository navigation
fix(mobile): persist the new-session prompt and retry a failed repo prefill - #6771
Conversation
Code Review SummaryStatus: No Issues Found | Recommendation: Merge Files Reviewed (3 files)
Previous Review Summaries (2 snapshots, latest commit 4f66904)Current summary above is authoritative. Previous snapshots are kept for context only. Previous review (commit 4f66904)Status: No Issues Found | Recommendation: Merge Executive SummaryThe incremental commit resolves the previously flagged prompt-persistence defect: the draft-seed effect now preserves the route-owned prompt when the draft load re-settles on an identity change, so the persist effect saves the pre-identity text under the settled identity. No new issues found in the changed lines. Files Reviewed (2 files)
Previous review (commit 4c5d521)Status: 1 Issue Found | Recommendation: Address before merge Executive SummaryThe new prompt-persistence effect in the mobile new-session screen can still drop text typed before the account loads, because an earlier effect clears Overview
Fix these issues in Kilo Cloud Issue Details (click to expand)WARNING
Files Reviewed (2 files)
Notes: The Reviewed by deepseek-v4.1-flash · Input: 0 · Output: 0 · Cached: 0 Review guidance: REVIEW.md from base branch |
The seed effect cleared the route-owned prompt when the draft load re-settled on an identity change, even though a `settled` seed does not remount the uncontrolled input. That desynced the visible text from `promptRef`/hasPrompt: the prompt typed before the identity arrived was not persisted and Start stayed disabled. Preserve a non-empty route-owned prompt unless the input remounts (a `restore` seed).
The seed effect only preserved a pre-identity edit when the route-owned prompt was non-empty, so clearing the field to empty before the identity resolved let the identity-bound draft load remount the older saved draft over the clear. Track any pre-identity edit, including a clear, and settle the seed in place instead of restoring; persist the explicit empty edit on identity arrival so the stored draft cannot resurface. The decision is extracted to a pure helper with a regression test for typing, clearing, then resolving the identity with an existing saved draft.
Fix proof
A prompt typed on the new-session form before the
user.getMequery resolves is never persisted:handlePromptChangeskipssaveDraftwhileuserIdis undefined and no effect re-saves the currentAsserted value:
apps/mobile/src/components/agents/new-session-screen-body.tsx. Sense check (model): The changed lines add promptEditedRef and route the seed effect through resolveNewSessionPromptSeedDecision, so a prompt (or cleared prompt) typed before identity resolves gets a 'keep' decision and is what the identity-arrival persist saves, covering the pre-getMe window the claim names.The scripts were proven on an earlier base, so only the head ran.
Head
434c9a54a140Head log: backend-assert d71f5c5adb24 exited 0
A Continue deep-link repository prefill is consumed permanently when one provider's list errors:
reposSettledignoresisError, so with another provider's repositories present and the GitHub queryAsserted value:
apps/mobile/src/lib/use-new-session-repos.ts. Sense check (jev): probability 0.9The scripts were proven on an earlier base, so only the head ran.
Head
434c9a54a140Head log: backend-assert 3d2b9ad919fe exited 0
Fix proof
A prompt typed on the new-session form before the
user.getMequery resolves is never persisted:handlePromptChangeskipssaveDraftwhileuserIdis undefined and no effect re-saves the currentAsserted value:
apps/mobile/src/components/agents/new-session-screen-body.tsx. Sense check (jev): probability 0.9The scripts were proven on an earlier base, so only the head ran.
Head
4f669045d329Head log: backend-assert f196555728aa exited 0
A Continue deep-link repository prefill is consumed permanently when one provider's list errors:
reposSettledignoresisError, so with another provider's repositories present and the GitHub queryAsserted value:
apps/mobile/src/lib/use-new-session-repos.ts. Sense check (jev): probability 0.9The scripts were proven on an earlier base, so only the head ran.
Head
4f669045d329Head log: backend-assert 0e793876ab9c exited 0
Changelog for users
Changelog for maintainers
E2E proof
A prompt typed on the new-session form before the
user.getMequery resolves is never persisted:handlePromptChangeskipssaveDraftwhileuserIdis undefined and no effect re-saves the current prompt whenuserIdlater arrives, so backgrounding or killing the app in that window loses the text.Code trace:
apps/mobile/src/components/agents/new-session-screen-body.tsx:566 changed in 925b57d9959a85fa4e7da75ab9f8fc299e3380e2. Sense check (jev): probability 0.91Changed lines
A Continue deep-link repository prefill is consumed permanently when one provider's list errors:
reposSettledignoresisError, so with another provider's repositories present and the GitHub query failing it reads true,hasAppliedRepois set before the match is verified, the "repo unavailable" fallback fires, and the prefill is never applied even after the user retries and GitHub repositories load.Code trace:
apps/mobile/src/lib/use-new-session-repos.ts:39 changed in 925b57d9959a85fa4e7da75ab9f8fc299e3380e2. Sense check (model): The added!githubQuery.isError && !gitlabQuery.isError && !bitbucketQuery.isErrorguards inreposSettledat use-new-session-repos.ts:39 stop it reading true when GitHub errors, fixing the premature prefill consumption the claim describesChanged lines
Owner request