Skip to content

[codex] Preserve DECCOLM width on row resizes#341

Merged
forketyfork merged 2 commits into
mainfrom
fix/preserve-deccolm-row-resizes
Jul 5, 2026
Merged

[codex] Preserve DECCOLM width on row resizes#341
forketyfork merged 2 commits into
mainfrom
fix/preserve-deccolm-row-resizes

Conversation

@forketyfork

@forketyfork forketyfork commented Jul 5, 2026

Copy link
Copy Markdown
Owner

what changed

  • Preserve the active 80/132-column DECCOLM width when Architect's target column count has not changed.
  • Let row-only updates resize the VT rows without resetting the DECCOLM width.
  • Update VT pixel metadata on pixel-only layout updates.
  • Send DEC 2048 resize reports with the VT model's logical rows/columns and the latest pixel fields.
  • Add regression coverage for row-only and pixel-only layout changes, plus the architecture note.

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 test
  • zig build
  • just lint

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.
@forketyfork forketyfork marked this pull request as ready for review July 5, 2026 05:36
@forketyfork forketyfork requested a review from Copilot July 5, 2026 05:36

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

Copy link
Copy Markdown

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: 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".

Comment thread src/app/layout.zig

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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.
@forketyfork forketyfork merged commit 99c23e7 into main Jul 5, 2026
4 checks passed
@forketyfork forketyfork deleted the fix/preserve-deccolm-row-resizes branch July 5, 2026 06:05
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