Skip to content

fix(mobile): keep the new-session model chips above the keyboard - #6479

Merged
iscekic merged 3 commits into
mainfrom
kwf/explorer-new-session-the-mode-and-model-chips-code-deepse-9dfc1-4cee
Sep 23, 2026
Merged

iscekic merged 3 commits into
mainfrom
kwf/explorer-new-session-the-mode-and-model-chips-code-deepse-9dfc1-4cee

Conversation

@iscekic

@iscekic iscekic commented Sep 21, 2026 •

Copy link
Copy Markdown
Collaborator

Changelog for users

  • The mode and model selectors ('Code', 'DeepSeek V4.1 Flash · Low') now sit above the prompt input in the new-session composer, matching the session composer.
  • When the keyboard and bottom system bar leave little room, the prompt yields whole text lines so the whole composer card stays visible; no row is clipped.

Changelog for maintainers

  • NewSessionPrompt renders the mode/model toolbar, or the models-load error, at the top of the card above the input; the error keeps a bottom border.
  • The prompt's minimum height is now derived from the measured scroll frame instead of a fixed three-line floor.
  • resolveNewSessionPromptMinHeight returns the largest whole-line height that fits, clamped to the preferred floor and never below one line.
  • Unmeasured or invalid geometry (first layout pass, hidden frame) returns the preferred floor unchanged.
  • NewSessionConfigureForm reports its ScrollView height through onLayout and passes it as the optional frameHeight prop.
  • NewSessionPrompt measures the card's top offset and chrome (card height minus the measured input height) to size the space left for the input.
  • Review first: the chrome measurement depends on the measured input height; confirm the yielding re-render does not feed back into cardChromeHeight.
  • Tests cover the fit function, frame threading, and render order (toolbar and error precede the input).

E2E proof

/home/igor_kilocode_ai/.local/share/kwf/sections/kwf-fix-proof-b759321-6771/e2e-cli/cli-tests.log
error: Script not found "turbo"

[e1] Explorer finding: new-session — the mode/model chips must not be half-drawn at the keyboard edge (android) — e2e-mobile-app/e1.png

[e1] Explorer finding: new-session — the mode/model chips must not be half-drawn -> pass :: [android emulator-5554] SCENE e1 OK; the digest lists exactly one mode row 'Button Mode: Code tappable [68,281][301,354]' and one model row 'Button Auto Efficient tappable [319,281][623,354]' above the input 'EditText What would you like to work on? tappable [58,402][1024,633]', with the action row 'Add attachment [58,638][140,721]' / 'Paste from clipboard [150,638][232,721]' / 'Start voice input [931,633][1023,725]' below the input and no chip node below y=633, so the bottom chip row the finding reported is gone and every card row sits inside the 1080x2400 screen; UX audit of the new-session screen found no layout shift (Environment resolved busy -> Default environment at the same y), no du
/home/igor_kilocode_ai/.local/share/kwf/sections/kwf-fix-proof-b759321-6771/e2e-mobile-app/e1.log
android.widget.TextView Run on tappable [37,792][1045,838]
android.widget.Button Run on: Cloud Agent tappable [37,856][909,972]
android.widget.TextView Cloud Agent tappable [67,886][844,942]
android.widget.Button Refresh tappable [928,856][1043,972]
android.widget.TextView Run kilo remote on your computer, or /remote in a running CLI session, to control a local kilo process. tappable [36,991][1044,1065]
android.widget.TextView Repository tappable [37,1111][1045,1157]
android.widget.Button Repository: Select repository tappable [37,1175][1043,1291]
android.widget.TextView Select repository tappable [67,1205][978,1261]
android.widget.Button Connect GitLab tappable [76,1358][1004,1404]
android.widget.TextView Connect GitLab tappable [76,1358][944,1404]
android.widget.TextView Connect GitLab in your browser, then return here to pick a repository. tappable [76,1432][1004,1524]
android.widget.Button Open GitLab tappable [76,1552][870,1667]
android.widget.TextView Open GitLab tappable [175,1586][768,1632]
android.widget.Button Refresh repositories tappable [888,1552][1004,1667]
android.widget.TextView Changes tappable [37,1753][1045,1799]
android.view.View Changes tappable [37,1817][1043,1936]
android.widget.RadioButton Leave changes tappable [46,1826][540,1927]
android.widget.TextView Leave changes tappable [192,1853][393,1899]
android.widget.RadioButton Commit and push tappable [540,1826][1034,1927]
android.widget.TextView Commit and push tappable [668,1853][905,1899]
android.widget.TextView Environment tappable [37,1982][1045,2028]
android.widget.TextView Default environment tappable [37,2046][1045,2067]
android.widget.Button Start session [37,2122][1043,2237]
android.widget.TextView Start session tappable [442,2156][638,2202]
/home/igor_kilocode_ai/.local/share/kwf/sections/kwf-fix-proof-b759321-6771/e2e-mobile-app/e1.txt
<redacted>
                                    </android.view.ViewGroup>
                                  </android.widget.ScrollView>
<redacted>
<redacted>
                                  </android.widget.Button>
                                </android.view.ViewGroup>
                              </android.view.ViewGroup>
                            </android.widget.ScrollView>
                          </android.view.ViewGroup>
                        </android.view.ViewGroup>
                      </android.view.ViewGroup>
<redacted>
                    </android.view.ViewGroup>
                  </android.view.ViewGroup>
                </android.view.ViewGroup>
              </android.widget.FrameLayout>
            </android.widget.FrameLayout>
          </android.widget.FrameLayout>
        </android.widget.LinearLayout>
      </android.widget.FrameLayout>
    </android.widget.LinearLayout>
  </android.widget.FrameLayout>
</hierarchy>
## Follow-ups (not changed here) - not proved live: New session in the explorer's state: the whole composer card renders above the bottom bar - chip row, input and the attach/voice action row all drawn clear of the bar (the verifier judges the still for the clip); before this slice the action row is behind the bar (no capture cited it) - not proved live: New session with the keyboard up, the chip row is not covered: tapping the mode chip opens the mode picker ('Select mode'), so the pressable's centre is above the IME. Round need: the Android soft IME shown (KILO_E2E_IME=1, e2e/device-state.sh:30-34). (no capture cited it) - not proved live: New session with the keyboard up: the composer card draws the mode/model chip row above the input, the row clear of the keyboard (the verifier judges the still for the clip). Round need: the Android soft IME must be shown — export KILO_E2E_IME=1 before device-state (e2e/device-state.sh:30-34); without it a hardware-keyboard emulator hides the IME and the keyboard state cannot be judged. (platform:both — the prompt's keyboard path forks per OS: keyboardWillShow on iOS / keyboardDidShow on Android, new-session-prompt.tsx:166-167, and the IME covering the card's bottom edge is what the finding reports) (no capture cited it) - not proved live: New session: the action row's attach control is reachable at rest - tapping 'Add attachment' opens the source sheet, which only happens when the button is above the bottom bar (no capture cited it) - not proved live: New session: the chip row's pressable is reachable at rest - tapping the mode chip opens the mode picker (no capture cited it) - not proved live: ux-check: After adding one attachment, the whole card (chips row, attachment strip, input, action row) is still visible above the keyboard with no half-drawn row. (no capture cited it) - not proved live: ux-check: Explorer state (credits 30; reviews 5; org; density 560; uimode day; battery 18 discharging; light mode), open new-session on emulator-5602 with the keyboard up: the whole composer card renders above the keyboard — mode chip 'Code', model chip 'DeepSeek V4.1 Flash · Low', the prompt input, and the paperclip/paste/mic row are each fully drawn, with no row clipped by the keyboard or the bottom system bar. (no capture cited it)

Open findings (not fixed here)

  • [e10] spot check: no verdict: spot: no verdict — the frame got no usable verdict after one solo re-judge (evidence: /home/igor_kilocode_ai/.local/share/kwf/sections/explorer-new-session-the-mode-and-model-chips-code-deepse-9dfc1-4cee/e2e-mobile-app/e10-nokeyboard.png)
  • [e10] ux-check: Typing a multi-line prompt leaves the bottom action row either fully visible or reachable by scrolling the form; no row is left half-drawn at the keyboard edge.
  • not proved live: new-session.png is no longer on the host that took it, so no publish can carry it
  • the '## E2E proof' section carries no log excerpt, so nothing shows the change was driven end to end

e2

e2

e2

e1

@iscekic
iscekic marked this pull request as draft September 21, 2026 12:14
Comment thread apps/mobile/src/components/agents/new-session-prompt-fit.test.ts Outdated
@kilo-code-bot

kilo-code-bot Bot commented Sep 21, 2026 •

Copy link
Copy Markdown
Contributor

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Files Reviewed (10 files)
  • apps/mobile/plugins/branded-splash.test.ts
  • apps/mobile/src/app/(app)/(tabs)/tabs-layout.mounted.test.tsx
  • apps/mobile/src/components/agents/new-session-configure-form.mounted.test.tsx
  • apps/mobile/src/components/agents/new-session-configure-form.test.ts
  • apps/mobile/src/components/agents/new-session-configure-form.tsx
  • apps/mobile/src/components/agents/new-session-prompt-fit.test.ts
  • apps/mobile/src/components/agents/new-session-prompt-fit.ts
  • apps/mobile/src/components/agents/new-session-prompt-initial-prompt.test.ts
  • apps/mobile/src/components/agents/new-session-prompt-types.ts
  • apps/mobile/src/components/agents/new-session-prompt.tsx
Previous Review Summaries (2 snapshots, latest commit 11a48cc)

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

Previous review (commit 11a48cc)

Status: 1 Issue Found | Recommendation: Address before merge

Overview

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

WARNING

File Line Issue
apps/mobile/src/components/agents/new-session-prompt.tsx 324 cardTop is the card's offset inside its wrapper (always 0), not from the scroll frame, so the content container's pt-4 top gap is never subtracted and the fitted floor can still leave the card up to a whole line taller than the frame
Files Reviewed (7 files)
  • apps/mobile/src/components/agents/new-session-configure-form.test.ts
  • apps/mobile/src/components/agents/new-session-configure-form.tsx
  • apps/mobile/src/components/agents/new-session-prompt-fit.test.ts
  • apps/mobile/src/components/agents/new-session-prompt-fit.ts
  • apps/mobile/src/components/agents/new-session-prompt-initial-prompt.test.ts
  • apps/mobile/src/components/agents/new-session-prompt-types.ts
  • apps/mobile/src/components/agents/new-session-prompt.tsx - 1 issue

Fix these issues in Kilo Cloud

Previous review (commit b343a21)

Status: 1 Issue Found | Recommendation: Address before merge

Executive Summary

One non-blocking test-strength issue: the new resolveNewSessionPromptMinHeight error-row test passes only by equality and does not cover the chrome term it names. The production change itself (top-anchored mode/model toolbar plus the whole-line prompt floor) reviewed clean.

Overview

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

SUGGESTION

File Line Issue
apps/mobile/src/components/agents/new-session-prompt-fit.test.ts 108 withErrorRow === plain === 40 for the EXPLORER frame, so the assertion holds by equality and a regression dropping cardChromeHeight from available would still pass
Verified And Clean
  • handleCardLayout (cardChromeHeight = card height - promptMeasure.height) re-derives the true chrome from the same commit's props on every layout pass; the yielding re-render is monotone and cannot latch a stale chrome or oscillate.
  • resolveNewSessionPromptMinHeight keeps cardTop + cardChromeHeight + fitted <= frameHeight whenever one whole line fits (verified against the test fixture), handles non-finite/non-positive input, and the padding it derives equals PROMPT_INPUT_VERTICAL_PADDING at the call site.
  • frameHeight is the ScrollView's own frame and does shrink with the IME via AppAwareKeyboardPaddingView; cardTop is content-relative and correct in a flex-grow content container.
  • The toolbar/error move keeps a single XOR render path above the input, flips the separator to border-b, and leaves the clone-entry path unchanged.
  • No new subscriptions, listeners, or state that survives unmount; no memory-leak risk introduced.
Files Reviewed (7 files)
  • apps/mobile/src/components/agents/new-session-configure-form.test.ts
  • apps/mobile/src/components/agents/new-session-configure-form.tsx
  • apps/mobile/src/components/agents/new-session-prompt-fit.test.ts - 1 issue
  • apps/mobile/src/components/agents/new-session-prompt-fit.ts
  • apps/mobile/src/components/agents/new-session-prompt-initial-prompt.test.ts
  • apps/mobile/src/components/agents/new-session-prompt-types.ts
  • apps/mobile/src/components/agents/new-session-prompt.tsx

Fix these issues in Kilo Cloud


Reviewed by deepseek-v4.1-flash · Input: 0 · Output: 0 · Cached: 0

Review guidance: REVIEW.md from base branch main

@iscekic
iscekic force-pushed the kwf/explorer-new-session-the-mode-and-model-chips-code-deepse-9dfc1-4cee branch from 8309b14 to e13b8bf Compare September 21, 2026 13:32
@iscekic
iscekic force-pushed the kwf/explorer-new-session-the-mode-and-model-chips-code-deepse-9dfc1-4cee branch from e7138bd to 58c0b63 Compare September 21, 2026 22:19
@iscekic
iscekic force-pushed the kwf/explorer-new-session-the-mode-and-model-chips-code-deepse-9dfc1-4cee branch from a108113 to 11a48cc Compare September 22, 2026 00:10
@iscekic
iscekic marked this pull request as ready for review September 22, 2026 00:19
Comment thread apps/mobile/src/components/agents/new-session-prompt.tsx Outdated
@iscekic
iscekic marked this pull request as draft September 22, 2026 00:30
@iscekic
iscekic force-pushed the kwf/explorer-new-session-the-mode-and-model-chips-code-deepse-9dfc1-4cee branch from e707412 to b759321 Compare September 23, 2026 05:02
@iscekic
iscekic marked this pull request as ready for review September 23, 2026 05:15
@iscekic

iscekic commented Sep 23, 2026

Copy link
Copy Markdown
Collaborator Author

This description names a scenario the proof did not capture:

  • not proved live: New session in the explorer's state: the whole composer card renders above the bottom bar - chip row, input and the attach/voice action row all drawn clear of the bar (the verifier judges the still for the clip); before this slice the action row is behind the bar (no capture cited it)

A repeated proof run rebuilds the same evidence, so no proof run is dispatched for a named gap. Merging with this gap open is your decision.

@iscekic iscekic added the human-ready The PR is ready for human review. label Sep 23, 2026
@iscekic iscekic self-assigned this Sep 23, 2026
@iscekic
iscekic merged commit 8dd5c25 into main Sep 23, 2026
28 checks passed
@iscekic
iscekic deleted the kwf/explorer-new-session-the-mode-and-model-chips-code-deepse-9dfc1-4cee branch September 23, 2026 12:16
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.

2 participants