qwen-code/patches
Joey e88f37f85d
fix(cli): keep hardware cursor aligned after layout changes (#10417)
* fix(cli): keep hardware cursor aligned after layout changes

Read the input cursor position after Ink recomputes layout so history growth and shrinkage cannot leave stale terminal coordinates.

Keep clear-and-sync output geometry consistent when leaving fullscreen, preventing an extra upward cursor move during overflow recovery.

Co-Authored-By: GPT-5.6 Codex <codex@openai.com>

* perf(cli): snapshot lazy cursor coordinates per flush

Resolve active cursor coordinates once at the start of each output flush and reuse the numeric snapshot throughout change detection and rendering.

Discard the snapshot after every flush so later layout changes still resolve against fresh Yoga coordinates. Add coverage for repeated reads within a flush and freshness across consecutive flushes.

Co-Authored-By: GPT-5.6 Codex <codex@openai.com>

* test(cli): consolidate cursor regression fixtures

Reuse one shared lazy-cursor fixture across the fullscreen-exit and layout-reflow regressions.

Document why prepared cursor snapshots must be invalidated at every output-state reset.

Co-Authored-By: GPT-5.6 Codex <codex@openai.com>

* chore(cli): clarify cursor patch invariants

Document that lazy cursor getters depend on non-null nodes always resolving coordinates.

Normalize generated-side hunk offsets after the snapshot protocol comment so the Ink patch remains internally consistent.

Co-Authored-By: GPT-5.6 Codex <codex@openai.com>

---------

Co-authored-by: GPT-5.6 Codex <codex@openai.com>
2026-09-01 12:58:54 +00:00
..
ink+7.0.3.patch fix(cli): keep hardware cursor aligned after layout changes (#10417) 2026-09-01 12:58:54 +00:00