fix(web): scroll to the prompt on toolbar Enter, retire app.sendInput (#830)

submitFromToolbar() puts the CR on the FIFO, bypassing xterm scrollOnUserInput; scroll the focused pane before sending.
Remove app.sendInput(), which has no production caller; update @dependency headers and test stubs.
Retarget the codex predictive-echo recorders to _enqueueReliableInput.
Correct the docs and the _sendInputAsync JSDoc for the session FIFO; drop stale _pendingInput stubs.
This commit is contained in:
Hadrien Kerlero committed 2026-11-21 01:34:27 +01:00
1 parent ddb5a647ba
commit 05fc2f990b
16 files changed
+86 -95

No files matched your search

+4 -5
View File
@@ -7,7 +7,7 @@
*
* For drag-and-drop: listens on the terminal container for file drops.
*
* @dependency app.js (uses global `app` for sendInput, activeSessionId, showToast)
* @dependency app.js (uses global `app` for _sendInputAsync, _prepareExternalInput, activeSessionId, showToast)
* @dependency panels-ui.js (provides showToast)
*/
@@ -397,10 +397,9 @@ Object.assign(CodemanApp.prototype, {
const paths = results.filter(Boolean);
if (paths.length > 0 && options.insert !== false) {
// Insert all paths in one shot, space-separated, in selection order, into
// the session the batch was uploaded TO. Not sendInput(): it re-reads
// activeSessionId, and after the awaits above that is whatever tab the
// user switched to mid-upload, so the paths landed in the wrong session.
// Same delivery sendInput() uses (durable queue, useMux for the POST path).
// the session the batch was uploaded to, captured before the awaits above,
// not the active tab the user may have switched to mid-upload.
// Delivery uses the durable session-bound path, with useMux for the POST fallback.
const pane = this._paneForSession?.(sessionId);
if (pane) this._prepareExternalInput?.(pane, 'upload-insert', { flushEcho: true });
this._sendInputAsync(sessionId, paths.join(' '), { useMux: true });