Repository navigation
fix(images): recover interrupted Kitty previews - #342
Conversation
|
@codex review |
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. |
|
Codex Review: Didn't find any major issues. Bravo. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
🛡️ Codex Security Review · Automatically triggeredSecurity review completed. No security issues were found in this pull request. Reviewed commit: Only the user who started this review can view the report in Codex. ℹ️ About Codex security reviews in GitHubThis is an experimental Codex feature. Security reviews are triggered when:
Once complete, Codex will leave suggestions, or a comment if no findings are found. |
Castiron custom codeEvaluated main: ✅ No new custom-code files detected. 6 mixed files remain; 0 existing customizations changed. Compared 6 existing customizations unchanged
A changed generated baseline means this report cannot reliably identify which handwritten lines changed. Inspect the custom-code diffDownload the exact patch produced by this run (requires repository access): gh run download 37155025937 --repo openai/openai-cli \
--name castiron-custom-code-37155025937-1 --dir /tmp/castiron-custom-code-37155025937-1
git apply --stat /tmp/castiron-custom-code-37155025937-1/custom-code.patch
cat /tmp/castiron-custom-code-37155025937-1/custom-code.patchOr reproduce it from an SDK checkout containing the vendored reporter: git fetch --no-tags origin 759464ea24c4cd86b6803c31361b83f43dfed3b9 ee7b882fb738589c5ecaf354071c72d8993ab941
python3 scripts/castiron/custom_code_report.py report \
--base 759464ea24c4cd86b6803c31361b83f43dfed3b9 \
--head ee7b882fb738589c5ecaf354071c72d8993ab941 --fetch --require-head-hash --public \
--out /tmp/castiron-custom-code-ee7b882fb738
cat /tmp/castiron-custom-code-ee7b882fb738/custom-code.patchThis is the current full custom patch for mixed files, not an attribution of only the handwritten lines changed by this PR. |
35fa12c to
9321b76
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 98e832772f
ℹ️ 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".
markstuart-oai
left a comment
There was a problem hiding this comment.
Reviewed ee7b882fb738589c5ecaf354071c72d8993ab941. No blocking findings in behavior or code structure.
The command owns its workers across input and API waits. Cancellation kills and reaps the active writer before the reset attempt. The picker reuses those workers after executable replacement. Fallback cleanup now honors cancellation. CodeQL still checks that published results belong to the current commit.
Verified passing CI, native shell help, and CodeQL checks on this head. I read the regression tests but did not run tests or builds locally. I did not independently verify native graphics in Kitty, Ghostty, or Windows terminals.
For people previewing images in Kitty or Ghostty, Ctrl-C during an image could dump encoded text into the terminal and break the next preview. This stops interrupted output safely, preserves saved images, and keeps repeated picker generations working when an update replaces the CLI.
What changes
catis no longer required.Commands
No new public commands or flags.
Inline settings, progress previews, explicit formats, extraction and piped output retain their behavior. Neither #360 nor #361 is required.
Code
pkg/customowns command and picker lifetime. The existinginternal/terminalimagepackage owns writer processes, cancellation and protocol recovery. Only those isolated workers change their SIGINT disposition.main.goadds early helper dispatch; generated commands and transformers are unchanged. No new packages or module dependencies.On macOS and Linux, two helpers remain resident during eligible command input and API waits. A failed worker is retired; the command reports the failure and exits after cleanup. Other platforms and custom writers use direct output: cancellation stops additional writes, but cannot interrupt an already blocked writer or guarantee protocol repair. Normal output has no new timeout or payload limit.
Tested
ee7b882. The fallback hang reproduces before the fix; six independent cancellation cases pass after it. Uncanceled cleanup errors and retry behavior remain covered.ee7b882, including artifact builds, tests and native shell checks. The trusted main budget passes at 435/1000.The scoped native Ghostty capture and two independent visual reviews pass. Mac Kitty and Windows native graphics remain unverified; the full platform campaign remains deferred. Required SDK CODEOWNER approval remains outstanding.
Demo
Ghostty 1.3.1 on macOS 26.6.2 arm64, using live CLI output and synthetic local PNGs. Before is current main
759464e; after is final commitee7b882. Two independent reviewers checked all eight original screenshots, raw output, unchanged image pixels and process cleanup. Picker return has separate PTY coverage.No GIF was recorded. These are unmodified native screenshots.
Before: Ctrl-C spills encoded text; the next preview fails to render.
After: cancellation leaves readable text and preserves the earlier image.
After retry: the new image renders and the earlier image remains.
Native evidence and reproducible recipe, capture run, helper lifecycle regression, picker and executable replacement recipe.