Repository navigation
fix: disable Windows console QuickEdit mode on startup - #115
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Clicking inside the console window starts a text selection, which blocks writes to stdout and silently freezes the service until a key is pressed. Clear ENABLE_QUICK_EDIT_MODE at startup so a stray click cannot pause it.
b3b701f to
25b916d
Compare
Treat INVALID_HANDLE_VALUE as 'no console', log and continue if the Win32 calls raise OSError instead of aborting startup, and route the croupier logger to ~/.croupier.log so the warning is persisted.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: de5f964628
ℹ️ 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".
SetConsoleMode returns zero on failure instead of raising, so the failure went unnoticed and QuickEdit stayed enabled. Check the result and raise OSError with the last error code so it is logged.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 8cb3957970
ℹ️ 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".
GetStdHandle returns the redirected file or pipe when stdin is redirected, so open CONIN$ explicitly instead. The console input mode is shared with the parent shell, so remember the original mode and restore it via atexit.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: efe7976303
ℹ️ 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".
Once CONIN$ opened, a zero return from GetConsoleMode is an API failure on an attached console, not a windowless process. Raise so it is logged.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 2195482414
ℹ️ 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".
Sweep the helper against the full API contract instead of patching one call at a time: failure returns of CreateFileW, GetConsoleMode, SetConsoleMode and CloseHandle are all checked, and error reporting goes through one helper. CreateFileW failures other than the no-console errors now raise instead of being treated as windowless.
Summary
Testing
Note: this does not hide the console window; a windowless build would be a separate change.