Skip to content

fix(gui,os): harden terminal input handling and isolate background commands - #23

Merged
Blankeos merged 1 commit into
mainfrom
fix/input-escape-reassembly
Jul 27, 2026
Merged

fix(gui,os): harden terminal input handling and isolate background commands#23
Blankeos merged 1 commit into
mainfrom
fix/input-escape-reassembly

Conversation

@Blankeos

Copy link
Copy Markdown
Owner
  • add async InputReader with per-keystroke sequence reassembly and bounded batch delivery - move fragmented escape/Cursor/report parsing logic and tests into new src/gui/input.rs - refactor main loop to consume event batches and centralize resize reflow handling - make spawned commands non-interactive (GIT_TERMINAL_PROMPT=0, SSH_ASKPASS_REQUIRE=never, optional GIT_SSH_COMMAND, setsid, stdin null) - add libc dependency for session-detaching background processes

…mmands

- add async `InputReader` with per-keystroke sequence reassembly and bounded batch delivery - move fragmented escape/Cursor/report parsing logic and tests into new `src/gui/input.rs` - refactor main loop to consume event batches and centralize resize reflow handling - make spawned commands non-interactive (`GIT_TERMINAL_PROMPT=0`, `SSH_ASKPASS_REQUIRE=never`, optional `GIT_SSH_COMMAND`, `setsid`, stdin null) - add `libc` dependency for session-detaching background processes
Repository owner deleted a comment from cursor Bot Jul 27, 2026
@Blankeos

Copy link
Copy Markdown
Owner Author

this apparently fixed it. grok 4.5 btw

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

πŸ’‘ Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 95d3fe723f

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with πŸ‘.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/os/cmd.rs
cmd.env(key, value);
}

make_non_interactive(&mut cmd);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Restrict non-interactive mode to background commands

When a foreground remote operation needs an HTTPS credential or an SSH key passphrase, this unconditional call makes it fail instead of prompting: GitCommands::fetch, pull, and push in src/git/remote.rs all use this same builder, while only fetch_all_background was previously marked non-interactive. Applying GIT_TERMINAL_PROMPT=0, SSH batch mode, setsid, and null stdin in every CmdBuilder::run also affects foreground custom commands; make this behavior opt-in for the actual background jobs.

Useful? React with πŸ‘Β / πŸ‘Ž.

Comment thread src/gui/input.rs
}
}
}
Err(_) => return,

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Propagate input-reader failures to the main loop

If event::poll or event::read returns an error in the new reader thread, this branch silently terminates the worker; the channel then disconnects, but wait_batch treats disconnection exactly like an ordinary timeout. The main loop consequently keeps rendering forever while ignoring all keyboard and mouse input, so the user cannot quit or restore the terminal normally. Send the error through the channel or otherwise make disconnection terminate main_loop with an error.

Useful? React with πŸ‘Β / πŸ‘Ž.

@Blankeos
Blankeos merged commit 6a873a1 into main Jul 27, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant