Skip to content

[codex] Fix Codex resize output holds#305

Merged
forketyfork merged 2 commits into
mainfrom
fix/codex-grid-toggle-freeze
May 5, 2026
Merged

[codex] Fix Codex resize output holds#305
forketyfork merged 2 commits into
mainfrom
fix/codex-grid-toggle-freeze

Conversation

@forketyfork
Copy link
Copy Markdown
Owner

What changed

This keeps Architect rendering while a terminal session is settling after a resize or while it is in DEC synchronized output mode.

Instead of blocking the whole frame present path, the renderer now reuses the affected session's last texture until that session's repaint output goes quiet. There is still a hard timeout for stuck sessions.

Why

PR #303 held rendering globally while any visible session had mode 2026 set. Codex uses mode 2026 heavily during resize repaints, and its repaint can outlive the previous 1000 ms fallback. That produced a whole-window freeze followed by the same top-to-bottom repaint the hold was meant to hide.

New-session grid resizes also had a short unbracketed repaint window before Codex entered mode 2026, so this adds a terminal-resize settle hold too.

Validation

  • nix develop -c zig build test --summary all
  • nix develop -c zig build --summary all
  • nix develop -c just lint

Manual check still needed in the app: Codex grid/full toggle, Codex resize via new-session creation, and Claude grid/full toggle.

Keep rendering the Architect scene while a resized or synchronized session is settling. Reuse that session's previous texture until repaint output goes quiet, with a hard timeout for stuck sessions.
@forketyfork forketyfork requested a review from Copilot May 5, 2026 09:49
@forketyfork forketyfork marked this pull request as ready for review May 5, 2026 09:49
Copy link
Copy Markdown

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

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: 299f31b734

ℹ️ 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/session/state.zig Outdated
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR changes Architect’s resize/synchronized-output rendering behavior from a global present freeze to a per-session hold that reuses cached terminal textures while a session’s repaint settles. It fits into the rendering/runtime pipeline by coordinating session state tracking, render-cache reuse, and layout-driven resize handling.

Changes:

  • Added per-session tracking for synchronized-output quiet windows and a new terminal-resize hold window.
  • Updated the renderer to reuse cached session textures during active output holds instead of blocking the whole frame.
  • Wired the runtime/layout paths to start, expire, and document the new hold behavior, with targeted unit tests.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
src/session/state.zig Adds session-level timers/state for synchronized-output and terminal-resize holds, plus related expiry logic and tests.
src/render/renderer.zig Reuses cached textures while a session is under an output hold and adds a helper/test for the hold predicate.
src/app/runtime.zig Treats visible output holds as active-frame pacing signals and expires the new resize hold during the frame loop.
src/app/layout.zig Starts the new resize hold when terminal cell dimensions change during layout application.
docs/ARCHITECTURE.md Updates architecture notes to describe the new per-session hold/rendering behavior.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/render/renderer.zig Outdated
Comment thread src/session/state.zig
Comment thread src/render/renderer.zig
Comment thread src/session/state.zig Outdated
Comment thread src/session/state.zig Outdated
@forketyfork forketyfork merged commit ab016ad into main May 5, 2026
4 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.

2 participants