Repository navigation
Conversation
|
The following comment was made by an LLM, it may be inaccurate: |
There was a problem hiding this comment.
The fix works. I ran the reproduction script from #54620 with opencode-drive on the base and on this branch. On the base, typing abc, Ctrl+B, X in a session prompt gives abcX, both idle and while a reply streams. With this change it gives abXc in both cases, and the home screen is unchanged. I also ran a session with a long blocking shell command: Ctrl+B still moves it to the background (the follow-up reply appeared in about 350 ms), with a single background request, and the cursor now moves one character left at the same time. Keymap and mini footer tests pass, and typecheck passes in packages/tui.
Public API: unchanged. The only change is the built-in default for session.background, which goes from "ctrl+b" to { key: "ctrl+b", fallthrough: true }. Users who set their own binding for it keep exactly what they set.
No blocking concerns. While an editor has focus, backgrounding now goes only through the prompt's binding, which is on only during a running turn. That is the only time there is blocking work to move, and on the base the prompt's guards already stopped the session binding from running in that case, so nothing is lost.
Related: #49216


Issue for this PR
Closes #54620
Type of change
What does this PR do?
Let the default background binding fall through so Ctrl+B also moves the composer cursor left. Keep the shortcut unchanged. The session route binds backgrounding only without a focused editor; the prompt owns it while editing, avoiding duplicate background requests on fallthrough.
How did you verify your code works?
abc→ Ctrl+B →XproducesabXc, with one background invocation.git diff --checkpassed. Existing keymap-scope/composer checks passed; session-home fixtures failed on sandbox data directories, then hit frame/time limits with isolated data directories.bun run checkreached typechecks after lint, then failed in the unrelated changelog package because@tsconfig/node22/tsconfig.jsonwas missing. Lint needed Node's experimental type stripping for its TypeScript plugin.Screenshots / recordings
Key dispatch only; the shortcut and its displayed hint stay unchanged.
Checklist
Added by the opencode bot (AI-generated).
Related: #49216