From d55bc28a8e4e94c1ed6c11f493ccceb5422ac4c1 Mon Sep 17 00:00:00 2001 From: Codeman maintainer Date: Thu, 24 Sep 2026 19:56:23 +0200 Subject: [PATCH] feat(mobile): search box in the Select Case picker The phone case picker had no way to narrow a long case list, so finding one meant scrolling a sheet that showed about six rows at a time. - A search field filters rows by name (every typed word must match, any order, case-insensitive), with a "No matching cases" state. Enter picks the case when exactly one row is left; Escape clears, then closes. - The field is not auto-focused, so opening the picker does not raise the keyboard. The list holds its unfiltered height while searching so the sheet does not jump, and the input is 16px so iOS Safari does not zoom. - Layout: the sheet padded the home-indicator inset on top of the footer already doing so, leaving a dead band under Create New Case; the sheet now grows to 80dvh and the list fills it instead of a separate 50vh cap. - Opening scrolls the list (its own box, not scrollIntoView) to the currently selected case. Co-Authored-By: Claude Opus 5.5 (1M context) --- src/web/public/i18n.js | 2 ++ src/web/public/index.html | 5 ++++ src/web/public/mobile.css | 6 ++-- src/web/public/session-ui.js | 55 ++++++++++++++++++++++++++++++++++++ src/web/public/styles.css | 51 ++++++++++++++++++++++++++++++++- 5 files changed, 116 insertions(+), 3 deletions(-) diff --git a/src/web/public/i18n.js b/src/web/public/i18n.js index 363fc253..82d6e6bb 100644 --- a/src/web/public/i18n.js +++ b/src/web/public/i18n.js @@ -106,6 +106,8 @@ 'Manage AI Coding tools in persistent tmux sessions.': '在持久化 tmux 会话中管理 AI 编程工具。', 'Select case': '选择案例', 'Select Case': '选择案例', + 'Search cases': '搜索案例', + 'No matching cases': '没有匹配的案例', 'All cases': '全部案例', 'No directory': '未选择目录', Run: '运行', diff --git a/src/web/public/index.html b/src/web/public/index.html index 40eb112f..321df793 100644 --- a/src/web/public/index.html +++ b/src/web/public/index.html @@ -3204,7 +3204,12 @@

Select Case

+
+
diff --git a/src/web/public/mobile.css b/src/web/public/mobile.css index f4588d21..5e0b4c48 100644 --- a/src/web/public/mobile.css +++ b/src/web/public/mobile.css @@ -2165,9 +2165,11 @@ html.mobile-init .file-browser-panel { background: rgba(0, 0, 0, 0.5); } + /* The footer already reserves the home-indicator inset; padding the sheet too + counted it twice and left a dead band under Create New Case. */ .mobile-case-picker-sheet { - max-height: 60vh; - padding-bottom: var(--safe-area-bottom); + max-height: 80vh; + max-height: 80dvh; animation: slideUp 0.2s ease-out; } diff --git a/src/web/public/session-ui.js b/src/web/public/session-ui.js index 7ee0e02f..4ca7774f 100644 --- a/src/web/public/session-ui.js +++ b/src/web/public/session-ui.js @@ -4506,6 +4506,7 @@ Object.assign(CodemanApp.prototype, { const isSelected = c.name === currentCase; html += `