[codex] Preserve DECCOLM width on row resizes#341
Conversation
Keep the VT width at the active 80/132-column DECCOLM size when Architect's target column count is unchanged. Row-only and pixel-only layout updates still refresh the terminal model. Addresses review comment 3524357836.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c63d6ce4a0
ℹ️ 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".
There was a problem hiding this comment.
Pull request overview
Adjusts Architect’s terminal resize pipeline to keep ghostty-vt’s active DECCOLM (80/132) column mode stable across row-only and pixel-only layout updates, preventing unintended reflows when the layout’s target column count hasn’t changed.
Changes:
- Refines DECCOLM preservation to depend on layout column-target changes (not full winsize equality), allowing row-only resizes without resetting DECCOLM width.
- Updates ghostty-vt pixel metadata on pixel-only layout updates and ensures in-band (DEC 2048) reports still reflect new pixel geometry.
- Adds regression tests for row-only and pixel-only layout changes, and updates the architecture documentation to match the behavior.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/app/layout.zig | Updates resize decision logic to preserve DECCOLM width across row/pixel-only changes; adds pixel-metadata update path and regression tests. |
| docs/ARCHITECTURE.md | Clarifies the terminal resize/DECCOLM preservation behavior in the architecture invariants section. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Use the VT model dimensions for DEC 2048 resize reports so row-only and pixel-only DECCOLM resizes report the preserved logical columns with updated pixels. Addresses review comment 3524372500.
what changed
why
The previous preservation check depended on the whole PTY winsize staying unchanged. A row-only or pixel-only layout update changed the winsize, so Architect resized ghostty-vt back to the computed grid/full column count and broke DECCOLM layouts like the vttest cursor movement table. DEC 2048 reports also need to describe the preserved VT model, not the PTY layout width.
checks
zig build testzig buildjust lint