Skip to content

fix(mobile): match the new session run-location hint and sheet to the target - #7909

Merged
iscekic merged 4 commits into
mainfrom
drain/new-session-run-target-hint-sheet
Oct 22, 2026
Merged

iscekic merged 4 commits into
mainfrom
drain/new-session-run-target-hint-sheet

Conversation

@iscekic

@iscekic iscekic commented Oct 17, 2026 •

Copy link
Copy Markdown
Collaborator

Change

Two fixes in the new-session run-location flow:

  1. The local-run helper text now matches the selected target (apps/mobile/src/components/agents/new-session-configure-form.tsx). The sentence describing how to run a session on your own computer rendered under the Run-on selector for every target, including the Cloud Agent default, where it does not apply. It now renders only when the selected target is a computer or CLI instance.

  2. The run-location sheet clears the Android navigation bar (apps/mobile/src/app/(app)/agent-chat/instance-picker.tsx). The sheet rides the full detent over the gesture bar, but its list padded by the raw bottom inset alone, which is zero on devices that report no inset, leaving the sheet's bottom refresh action flush against the screen bottom with its tap target covered. The sheet now uses the app's non-tab detail floor (useDetailScreenBottomPadding), keeping the action visible and tappable on every device.

End-to-end evidence (Android emulator, gesture navigation, navigation_mode=2)

Run on this work VM: Android emulator omp36 (1080×2400, gesture navigation), the local dev stack (Next.js + Metro, local Postgres), and the dev client built for this branch's native fingerprint. The app loaded a fresh full bundle from Metro — Android Bundled apps/mobile/index.js (8263 modules) — and was signed in as a throwaway local test account.

Both findings were exercised on the same screens, in this order:

  1. Run on a computer target (tour computer hand-off, no CLI connected). Under the selector the form renders the helper sentence "To run on your computer, start Kilo there and leave it running." and the Folder field. Dump node [36,1477][1044,1514].
  2. Run on: Cloud Agent, selected from the same sheet. The helper sentence is absent from the accessibility dump and from the capture; the form goes straight from the Run on selector to the Repository section, and no Folder field is rendered.
  3. Run-location sheet opened from Run on, empty state (No CLI instances connected). The sheet's whole surface sits over the gesture bar (the bar region is [0,2337][1080,2400]). The Refresh action reports bounds=[371,2135][707,2250], clickable=true, enabled=true: its bottom edge is 2250, i.e. 87 px above the gesture-bar top and clear of the bar's tap surface. Tapping it at the reported centre (539, 2192) reached the control and issued the request — the dev server logged POST /api/trpc/activeSessions.listInstances?batch=1 200 immediately after the tap.
  4. The zero-reported-inset fallback of that padding (32 px floor, versus 50 px above a 34 px inset) is covered by the mounted sheet test listed under Tests; this emulator reports a 63 px inset, so the device run exercises the inset-driven path.

Captures for steps 1–3 are attached to the bot comment on this pull request.

Tests

  • new-session-configure-form.test.ts: the helper sentence renders for a remote target and never for the cloud target.
  • instance-picker.mounted.test.tsx: the sheet's list bottom padding is the detail floor (32 with a zero reported inset, 50 with a 34px inset) instead of the raw inset.

Both files pass on this VM (45 tests, 2 files), and oxlint reports 0 warnings and 0 errors on the two changed source files.

Proxy answers

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

  1. Question: Finding 1: the remoteHint text currently shows under "Run on" even when Cloud Agent is selected. How should it behave?
    Answer: Hide unless isRemote (Recommended)
    Confidence: 0.88 · Precedent: Speed and least work: do the least amount of work possible, with no drop in quality; the brief specifies hiding the hint for Cloud Agent.
  2. Question: Finding 2: the run-location sheet's bottom action sits under the Android gesture bar. The picker already pads by insets.bottom; how much clearance should it use?
    Answer: Detail-screen floor (Recommended)
    Confidence: 0.80 · Precedent: UX and design quality: clearance from rounded corners and system elements and fix the whole class of each defect; fix the root cause and the class.

… target

The local-run helper text under the Run-on selector rendered for every
target, including the Cloud Agent default, where the instruction to run
kilo remote on your own computer does not apply. It now renders only
when the selected target is a computer or CLI instance.

The run-location sheet's bottom action could sit under the Android
gesture navigation bar: the sheet rides the full detent over the bar,
but the list padded by the raw bottom inset alone, which is zero on
devices that report no inset. The sheet now clears the bar with the
app's non-tab detail floor, so the refresh action stays visible and
tappable on every device.
@iscekic iscekic added drain Work item from the findings drain explorer:android Finding surfaced by the Android explorer labels Oct 17, 2026
@kilo-code-bot

kilo-code-bot Bot commented Oct 17, 2026 •

Copy link
Copy Markdown
Contributor

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Executive Summary

Both targeted mobile fixes are correct and covered: the run-location helper is now gated on a remote target, and the picker sheet pads with useDetailScreenBottomPadding() instead of the raw inset, with tests asserting 32/50 for zero/34 insets.

Files Reviewed (4 files)
  • apps/mobile/src/components/agents/new-session-configure-form.tsx - helper text now gated on isRemote; consistent with existing remote-only branch and no unused imports
  • apps/mobile/src/components/agents/new-session-configure-form.test.ts - expectations updated for both cloud (false) and remote (true) targets; no other test relied on the old behavior
  • apps/mobile/src/app/(app)/agent-chat/instance-picker.tsx - useSafeAreaInsets/bottom replaced by useDetailScreenBottomPadding() in both the loading skeleton and the FlashList contentContainerStyle; hook stays at top level, no leftover references
  • apps/mobile/src/app/(app)/agent-chat/instance-picker.mounted.test.tsx - mock now forwards props to the FlashList host so tests can read contentContainerStyle; new assertions match Math.max(bottom, 16) + 16

Reviewed by deepseek-v4.1-flash · Input: 70.8K · Output: 7.6K · Cached: 455.6K

Review guidance: REVIEW.md from base branch main

@iscekic iscekic added merge:bot Bot-owned review; merge when ready once readiness passes and a review approves. merge:blocked labels Oct 19, 2026
@iscekic

iscekic commented Oct 20, 2026 •

Copy link
Copy Markdown
Collaborator Author

bot: Verified the run-location flow on the Android emulator (gesture navigation, navigation_mode=2) against the local dev stack with a throwaway test account.

  • New session, Run on: Cloud Agent — the local-run helper sentence no longer renders under the selector; the Repository section follows directly.
  • Run-location sheet opened from Run on — the Refresh action is fully above the gesture navigation bar instead of being covered by it: on a 2400 px tall screen the clickable button node spans y 2135–2250 and reports clickable=true, enabled=true, so the whole target sits clear of the system bar.

Attached captures are from that run.

…-target-hint-sheet

# Conflicts:
#	apps/mobile/src/app/(app)/agent-chat/instance-picker.mounted.test.tsx
@iscekic
iscekic disabled auto-merge October 21, 2026 16:18
@iscekic iscekic removed merge:bot Bot-owned review; merge when ready once readiness passes and a review approves. merge:blocked labels Oct 21, 2026
@iscekic

iscekic commented Oct 21, 2026

Copy link
Copy Markdown
Collaborator Author

bot: Re-verified the run-location flow on the merged head (d38e647) with the Android emulator in gesture navigation (navigation_mode=2, gestural navbar overlay enabled) against the local dev stack, after merging main and rebuilding the JS bundle (fresh apps/mobile/index.js bundle, 8263 modules).

  • Run on: Cloud Agent — under the selector the form goes straight to the Repository section; the local-run helper sentence is absent.
  • Run on: a computer target (no CLI connected) — the helper sentence is present, so the hint is hidden only for the Cloud target and kept for a computer target.
  • Run-location sheet — the Refresh action renders at y 2135–2250; the system gesture pill is drawn at y 2364–2372, so the action sits 114 px above it and its tap target is unobstructed. Tapping it fired activeSessions.listInstances in the dev server log (request count 32 → 34).

Unit coverage re-run on the merged tree: new-session-configure-form.test.ts and instance-picker.mounted.test.tsx, 45 tests passing. The merge kept both sides of the mounted-test conflict: the sheet bottom-padding tests and main's pending-computer test.

Captures are from a throwaway account on the local stack.

New session form with Run on Cloud Agent selected, no local-run helper under the selector

Run-location sheet with the Refresh action clear of the system gesture pill

New session form on a computer target showing the local-run helper

@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. labels Oct 21, 2026
@iscekic

iscekic commented Oct 22, 2026

Copy link
Copy Markdown
Collaborator Author

bot: Screenshots from the Android emulator run described in the pull request body: local dev stack, throwaway test account, gesture navigation (bar region [0,2337][1080,2400]).

  1. Run on a computer target (no CLI connected): the helper sentence renders directly below the run-location selector, together with the Folder field.

    Computer target selected: helper sentence below the run-location selector

  2. Run on: Cloud Agent, selected from the same sheet: the helper sentence is gone and the form goes from the selector straight to the Repository section.

    Cloud target selected: no helper sentence below the run-location selector

  3. Run-location sheet: the Refresh action reports bounds=[371,2135][707,2250], clickable=true, enabled=true, so its bottom edge sits 87 px above the gesture-bar top; tapping it issued POST /api/trpc/activeSessions.listInstances?batch=1 200 in the dev server log.

    Run-location sheet with the Refresh action clear of the gesture bar

@iscekic iscekic removed the merge:blocked:insufficient-e2e Verification does not cover the change label Oct 22, 2026
@iscekic
iscekic added this pull request to the merge queue Oct 22, 2026
Merged via the queue into main with commit 311bac4 Oct 22, 2026
46 checks passed
@iscekic
iscekic deleted the drain/new-session-run-target-hint-sheet branch October 22, 2026 02:42
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:bot Bot-owned review; merge when ready once readiness passes and a review approves.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants