Compare commits

...

3 Commits

Author SHA1 Message Date
Michael Bolin
d8856d77ec Release 0.28.0 2025-09-02 15:08:53 -07:00
Jeremy Rose
60fdfc5f14 tui: catch get_cursor_position errors (#2870)
still seeing errors with reading back the cursor position in some cases;
adding catches everywhere we might run into this.
2025-09-02 14:32:42 -07:00
Michael Bolin
13e5b567f5 fix: install zstd on the windows-11-arm image used to cut a release (#3066)
https://github.com/openai/codex/pull/3062 added `windows-11-arm` to the
list of images used for building, but the job to build an alpha just
failed:

https://github.com/openai/codex/actions/runs/17415565601

with this error:

```
Creating archive: codex-aarch64-pc-windows-msvc.exe.zip

Add new data to archive: 1 file, 20484096 bytes (20 MiB)


Files read from disk: 1
Archive size: 7869619 bytes (7686 KiB)
Everything is Ok
C:\a\_temp\0e71926f-4d8a-42ae-a337-a9627acc9c57.sh: line 34: zstd: command not found
```

so allegedly this should fix it? I'm surprised this was not necessary
for the `windows-latest` image, though.
2025-09-02 14:23:51 -07:00
3 changed files with 13 additions and 4 deletions

View File

@@ -111,6 +111,11 @@ jobs:
cp target/${{ matrix.target }}/release/codex "$dest/codex-${{ matrix.target }}"
fi
- if: ${{ matrix.runner == 'windows-11-arm' }}
name: Install zstd
shell: powershell
run: choco install -y zstandard
- name: Compress artifacts
shell: bash
run: |

View File

@@ -22,7 +22,7 @@ members = [
resolver = "2"
[workspace.package]
version = "0.0.0"
version = "0.28.0"
# Track the edition for all workspace crates in one place. Individual
# crates can still override this value, but keeping it here means new
# crates created with `cargo new -w ...` automatically inherit the 2024

View File

@@ -403,7 +403,10 @@ impl Tui {
) -> Result<Option<PreparedResumeAction>> {
match action {
ResumeAction::RealignInline => {
let cursor_pos = self.terminal.get_cursor_position()?;
let cursor_pos = self
.terminal
.get_cursor_position()
.unwrap_or(self.terminal.last_known_cursor_pos);
Ok(Some(PreparedResumeAction::RealignViewport(
ratatui::layout::Rect::new(0, cursor_pos.y, 0, 0),
)))
@@ -496,8 +499,9 @@ impl Tui {
let terminal = &mut self.terminal;
let screen_size = terminal.size()?;
let last_known_screen_size = terminal.last_known_screen_size;
if screen_size != last_known_screen_size {
let cursor_pos = terminal.get_cursor_position()?;
if screen_size != last_known_screen_size
&& let Ok(cursor_pos) = terminal.get_cursor_position()
{
let last_known_cursor_pos = terminal.last_known_cursor_pos;
if cursor_pos.y != last_known_cursor_pos.y {
let cursor_delta = cursor_pos.y as i32 - last_known_cursor_pos.y as i32;