Skip to content

fix(mobile): offer Cancel on the repository picker sheet - #11244

Open
iscekic wants to merge 4 commits into
mainfrom
drain/repo-picker-cancel
Open

iscekic wants to merge 4 commits into
mainfrom
drain/repo-picker-cancel

Conversation

@iscekic

@iscekic iscekic commented Nov 16, 2026 •

Copy link
Copy Markdown
Collaborator

Evidence

Evidence: demonstrated — on the Android emulator at head e14566f37 the four composer picker sheets that the New session flow opens render Cancel at the leading edge and Done at the trailing edge of the sheet header, and tapping Cancel closes the sheet while the row keeps the value it had; the repository picker rendered only Done on the base revision of the prepared pair.

What changed

Cancel now calls the same dismiss Done calls on every composer picker, so Cancel closes the sheet and leaves the current selection untouched. A picker commits a choice on the row tap and reports it through the picker bridge; the header controls only pop the route. Six files, 37 mounted tests, all passing.

  • repo-picker.tsx: the live list arm and the dead-bridge "Options expired" shell.
  • branch-picker.tsx: the dead-bridge shell; the live list arm already had Cancel.
  • mode-picker.tsx, instance-picker.tsx: every arm, through one shared close function.
  • profile-picker.tsx: the expired shell.
  • folder-picker.tsx: the expired shell. Its live arm keeps the leading Back frame on purpose: there the leading control drills out of a nested folder, it does not abandon the pick.

One mounted test per screen asserts that Cancel pops the route once and reports no pick; the mode and profile tests also assert that the picker slot is not cleared.

Live walkthrough at this head

Signed in on the Android emulator with the fake seeded account and drove the New session composer; every control placement below is a uiautomator node with real bounds.

Sheet Leading control Trailing control After Cancel
Select repository Cancel [37,174][188,300] Done [918,174][1044,300] Row value unchanged, both with no value and with GitHub · picker-lab/private-repo selected
Select mode Cancel [37,1237][188,1363] Done [918,1237][1044,1363] Mode: Code unchanged
Run on Cancel [37,1237][188,1363] Done [918,1237][1044,1363] Run on: Cloud Agent unchanged
Pick a profile Cancel [37,1237][188,1363] Done [918,1237][1044,1363] Pick a profile: Default environment unchanged

Selecting GitHub picker-lab/private-repo, reopening the sheet, then tapping Cancel keeps the row's value exactly (Repository: GitHub · picker-lab/private-repo before and after).

Design gate

Prepared pair, five screen-file diagnostic targets (repo-picker, branch-picker, mode-picker, instance-picker, profile-picker), base cb91de0fa and head e14566f37, four standard cells per revision, 5/5 targets captured on both revisions. compare reports status: comparable; it lists 20 finding groups as introduced, all one rule on the diagnostic sheet header, and all explained by the fixture rather than the change:

  • Every finding on both revisions is safe-area on the diagnostic sheet header (View[0] measured against the top inset, and the title's paragraph): a diagnostic route renders the sheet bare under (auth), not inside a presented form sheet, so the header row reads as reaching into the top system inset. In the real presented sheet, the walkthrough's own dumps show the same header starting lower on screen, inside the sheet.
  • The base run reports the same finding instances on the same nodes; the compare flags each group as introduced only because the new leading Cancel control joins that row's group and raises its count. The control that existed before (Done) keeps a byte-identical rect on both revisions, so nothing moved in the row.
  • The base revision shows the identical header-row geometry in all four cells, which is what lets the preexisting finding stand rather than block this change.

Design gate: 4 cells, 40 errors, 0 warnings

One screen in this flow cannot be a diagnostic target at all: folder-picker.tsx calls a hook that only the signed-in shell provides, and a diagnostic route renders signed out. That screen's expired-arm Cancel is covered by its mounted test.

Branch sheet coverage

The live branch list could not be opened against the seeded fixture: the fixture's placeholder installation mints no credentials, so the branches query fails (listRepositoryBranches returns an internal error), the row shows the failure and a retry that does not recover it, and the sheet's trigger never renders on screen. The branch picker's live arm already showed Cancel before this change; its expired arm — the arm this change adds the control to — is proven by the gate pair's branch-picker target and the mounted test.

The folder picker trigger does not exist in this state either: it is only rendered for a connected CLI instance target.

Production prerequisites

None.

A prerequisite pull request for the design-gate tooling made the prepared pair in this pull request possible; it landed before this branch's gate run (#11215, cb91de0fa).

Proxy answers

The owner's proxy gave these answers in the owner's place.

  1. Question: Scope: The repository picker sheet has no Cancel control; the branch picker in the same composer has Cancel and Done. The brief says to pass onCancel to both PickerSheet uses in repo-picker.tsx only. The mode picker, the instance picker, and the profile picker's expired arm also omit Cancel. Which scope?
    Answer: All four composer pickers
    Confidence: 0.60 · Precedent: Fix the root cause and the class of the issue on every affected surface: owner wrote "fix this for all shared services model pickers on all surfaces" (session 75f8833fe8c1)
  2. Question: Branch expired arm: The branch picker passes Cancel only in its live list arm (branch-picker.tsx:51-54). Its expired arm (branch-picker.tsx:41-44, dead bridge, 'Options expired') still shows Done only, so the sheet the finding compares against keeps that gap after the other four are fixed.
    Answer: Add it to branch-picker too
    Confidence: 0.75 · Precedent: Fix the root cause and the class of the issue on every affected surface: session 00eb2a1d3e4b, "if anything repeats the same mistake over and over again, fix the class"
  3. Question: Folder picker: folder-picker.tsx (the launch-folder picker) also omits Cancel: its expired arm at 110-117, and its non-nested arm, where the leading control is deliberately a Back frame (onCancel only when isNested, folder-picker.tsx:176-181). Include it?
    Answer: Add Cancel to its expired arm
    Confidence: 0.50 · Precedent: Fix the class on every affected surface: session 75f8833fe8c1, "fix this for all shared services model pickers on all surfaces"; balanced against rejecting changes to deliberate behavior (PR fix(core): apply global permission rules after repository rules kilocode#15356)
  4. Question: Design gate: The design gate cannot target route files, and this change is only in route files. How do I unblock the required prepared pair?
    Answer: Separate prerequisite PR
    Confidence: 0.55 · Precedent: Git and pull requests: 'Put each separate concern in its own PR, including a fix for a CI blocker that many PRs share' (session a3cb05d9ad53, owner chose 'Fix it separately'). The route-file gap blocks every route-only mobile change, not just this one. 'Keep each PR diff to files that the feature needs' (session 12a6ef34f658, owner dropped out-of-scope CI files).

@iscekic iscekic added drain Work item from the findings drain explorer:android Finding surfaced by the Android explorer labels Nov 16, 2026
@iscekic

iscekic commented Nov 16, 2026

Copy link
Copy Markdown
Collaborator Author

bot: Live proof and the design-gate comparison for this pull request, run on the emulator at this head.

Design-gate contact sheet for the five picker targets (base vs head cells side by side; the header row gains the leading Cancel control on the head revision):

Exercised on the real New session composer, signed in with a fake seeded account:

  • Select repository: leading Cancel, trailing Done; selecting GitHub picker-lab/private-repo, reopening the sheet and tapping Cancel returns to a row whose value is unchanged.
  • Select mode, Run on, Pick a profile: the same header placement; Cancel closed each sheet and each row kept its value.

The remaining unreadable pixel text on the sheet headers is the rule reporting on the diagnostic fixture, not on the product fix; the live dump already proves the placement.

Design gate contact sheet, base and head picker cells

Repository picker sheet with Cancel and Done headers

Repository picker sheet after selection

Mode picker sheet with Cancel and Done

Run on picker sheet with Cancel and Done

Profile picker sheet with Cancel and Done

@kilo-code-bot

kilo-code-bot Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Executive Summary

The incremental change only tidies the two mounted tests flagged previously: the mode-picker Cancel test now unmounts and asserts the Back listener is released, and the folder-picker expired-arm test restores the bridgeGone flag, so both prior suggestions are resolved and nothing new is introduced.

Assumptions: none.

Files Reviewed (2 files)
  • apps/mobile/src/app/(app)/agent-chat/mode-picker.back.mounted.test.tsx
  • apps/mobile/src/app/(app)/agent-chat/folder-picker.mounted.test.tsx
Previous Review Summary (commit e14566f)

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

Previous review (commit e14566f)

Status: 2 Issues Found | Recommendation: Address before merge

Executive Summary

The production change is a small, consistent one: every composer picker shell now wires onCancel to the same dismiss-only router.back() path as Done, with no state mutation, and the two findings are limited to test hygiene in the new mounted tests.

Assumptions: [INFERENCE] The model picker route (agent-chat/model-picker → ModelPickerContent, reachable from the composer's model selector) is another composer picker that still renders only Done; it is outside this PR's enumerated scope, so it is noted rather than flagged.

Overview

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

SUGGESTION

File Line Issue
apps/mobile/src/app/(app)/agent-chat/mode-picker.back.mounted.test.tsx 177 New test mounts the screen but never unmounts, leaving the shell's hardware-Back listener registered
apps/mobile/src/app/(app)/agent-chat/folder-picker.mounted.test.tsx 286 bridgeGone.gone is set but never reset, leaking into any later test in the file
Files Reviewed (12 files)
  • apps/mobile/src/app/(app)/agent-chat/repo-picker.tsx - 0 issues
  • apps/mobile/src/app/(app)/agent-chat/repo-picker.mounted.test.tsx - 0 issues
  • apps/mobile/src/app/(app)/agent-chat/branch-picker.tsx - 0 issues
  • apps/mobile/src/app/(app)/agent-chat/branch-picker.mounted.test.tsx - 0 issues
  • apps/mobile/src/app/(app)/agent-chat/mode-picker.tsx - 0 issues
  • apps/mobile/src/app/(app)/agent-chat/mode-picker.back.mounted.test.tsx - 1 issue
  • apps/mobile/src/app/(app)/agent-chat/instance-picker.tsx - 0 issues
  • apps/mobile/src/app/(app)/agent-chat/instance-picker.mounted.test.tsx - 0 issues
  • apps/mobile/src/app/(app)/agent-chat/profile-picker.tsx - 0 issues
  • apps/mobile/src/app/(app)/agent-chat/profile-picker.mounted.test.tsx - 0 issues
  • apps/mobile/src/app/(app)/agent-chat/folder-picker.tsx - 0 issues
  • apps/mobile/src/app/(app)/agent-chat/folder-picker.mounted.test.tsx - 1 issue

Fix these issues in Kilo Cloud


Reviewed by deepseek-flash-latest · Input: 39.2K · Output: 2.9K · Cached: 170.4K

Review guidance: REVIEW.md from base branch main

@iscekic iscekic added merge:blocked:insufficient-e2e Verification does not cover the change merge:blocked:kilobot-not-ready Review bot has not recommended merge at this head merge:bot Bot-owned review; merge when ready once readiness passes and a review approves. labels Nov 16, 2026
The mode-picker cancel test now unmounts like its neighbours, and the
folder-picker cancel test restores the flag it flips. Behavior of the
fix is unchanged.
@iscekic iscekic added merge:blocked:insufficient-e2e Verification does not cover the change merge:bot Bot-owned review; merge when ready once readiness passes and a review approves. and removed merge:blocked:kilobot-not-ready Review bot has not recommended merge at this head merge:bot Bot-owned review; merge when ready once readiness passes and a review approves. merge:blocked:insufficient-e2e Verification does not cover the change labels Nov 16, 2026
@iscekic

iscekic commented Nov 16, 2026

Copy link
Copy Markdown
Collaborator Author

bot: Final-head proof, at 8bf063f8f. Reopened the New session composer fresh from Metro, and every remaining sheet still shows the same header placement, plus Cancel keeps each selection unchanged on dismissal. The earlier captures in this pull request are the same behavior at the head of the design gate; these are the last screenshots of the same flows.

Repository picker sheet with Cancel and Done at final head

Mode picker sheet with Cancel and Done at final head

Run on picker sheet with Cancel and Done at final head

Profile picker sheet with Cancel and Done at final head

@iscekic iscekic added needs:prod-action Prod prerequisite (env var, secret, firewall rule, config) needed before merge merge:blocked:design-review Design review has not cleared this change labels Nov 16, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

drain Work item from the findings drain explorer:android Finding surfaced by the Android explorer merge:blocked:design-review Design review has not cleared this change merge:blocked:insufficient-e2e Verification does not cover the change merge:bot Bot-owned review; merge when ready once readiness passes and a review approves. needs:prod-action Prod prerequisite (env var, secret, firewall rule, config) needed before merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants