feat(mobile): add Shift arrows for Codex queued input and prompt navigation - #408
Conversation
|
Thanks for this. The mechanics are right and I checked the three things that usually go wrong here, all clean: One thing to change before I take it: gate them on Codex. They are Codex-specific, their own tooltips say so, and right now they ship on both agent layouts, so a claude, pi, grok, omp, deepseek or gemini session gets two keys that do nothing. On the default (non-extended) bar that is two of about eight slots spent on another CLI's binding. It is not only cosmetic, which is the part I would not have expected either. The repo already has the pattern, and it is a small change. 🧠 ships in both bar templates and is revealed by an Happy to merge once that is in. |
The two keys #408 adds to the mobile keyboard accessory bar send Shift+Left and Shift+Right, which are Codex bindings (edit the last queued message, step back through the prompt stack). They shipped on both agent layouts, so a claude, pi, grok, omp, deepseek or gemini session got two keys that do nothing. That was not only cosmetic: a tap goes through sendNavKey(), which adds the session to _echoPassthroughSessions and hands editing to plain PTY echo until Enter or Ctrl+C, so on a phone a dead key also switched off the local echo that makes typing feel instant there. The reveal now follows the shape the 🧠 key already uses. The buttons stay in both templates, carry an accessory-btn-codex marker class, and are display:none in styles.css until the bar element carries codex-enabled. The class has to live on the bar rather than on the keys because setMode() rebuilds the buttons' innerHTML on every layout switch. syncCodexKeys() toggles it from the active session's mode (the same lookup _isShellSession() uses) and is called at init and from refreshForActiveSession(), which selectSession() already invokes on every switch. A session's mode is readonly on the server and fixed at create, so no other event can change the answer; the welcome screen (no active session) reads as not codex and hides the keys. The frontend id-branching guard (test/cli-registry-no-id-branching.test.ts) scans only src/**/*.ts, so the mode comparison in a public JS file is in bounds, the same as the existing shell check beside it. Tests: the new describe block in test/mobile-shell-keyboard.test.ts pins the marker class in both templates, the CSS pair, the class for a codex session in both layouts, its absence for claude/shell/pi/omp/deepseek, the re-sync in both directions on a session switch, the no-session case, and the init + refresh wiring. All six positive assertions fail without the source change. README and the changeset now say the keys are Codex-only. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
|
Merged, and shipping in 1.29.0: https://github.com/Ark0N/Codeman/releases/tag/codeman@1.29.0 I added the Codex gate myself on master ( |
Phone users cannot invoke Codex's Shift+Left (edit the last queued message) or Shift+Right (prompt stack back) from the keyboard accessory bar. Add
⇧←and⇧→beside Tab in both default and extended agent layouts, with accessible labels describing the Codex defaults (verified in Codex 0.154.0/keymap).The buttons send the standard modified-arrow sequences through
sendNavKey, flushing any locally buffered draft before navigation and handing editing back to PTY echo. Taps refocus the terminal. The shell layout is unchanged.Validation:
Includes a patch changeset and README documentation. AI-assisted; implementation and validation reviewed locally.