Skip to content

fix(core): keep hidden retained cells across height-only resizes (#27) - #311

Merged
JavaZeroo merged 3 commits into
mainfrom
agent/continuation/resume-issue-27-500634dea299
Nov 4, 2026
Merged

JavaZeroo merged 3 commits into
mainfrom
agent/continuation/resume-issue-27-500634dea299

Conversation

@JavaZeroo-Bot

Copy link
Copy Markdown
Collaborator

背景

继续 #27(接续已合并的 #308/#309/#310)。本轮处理 #27 剩余清单中的「隐藏帧/保存光标交叉」:正式 Qt 路径在 #310 接入 Screen::resize_preserving 后,备用屏(TUI)活动期间只调整窗口高度会触发隐藏主屏高度事务。

缺陷与修复

修复前,resize_preserving 不论宽度是否变化,都把隐藏帧的 live 行和移入历史的行裁剪到当前协议宽度。隐藏主屏若在先前缩宽后保留了宽于当前宽度的源行(如固定 75 B 样本的 89 空格 + uvw 尾),随后仅改变高度就会永久丢失右尾;返回主屏后正文、选择与 Find 源文本随之缺失。该行为与 ADR-0010 已确认的正文保留方向冲突,且在当前正式 Qt 路径可达。

修复:隐藏帧只在宽度实际改变时适配到新协议足迹(沿用既有隐藏宽度证据策略);纯高度变化保留隐藏 live 与追加历史的源 Cell。活动帧不受影响。

改动

  • 0f4b4d1:迁移暂停分支的隐藏主屏高度原版探针工具(冻结探针、导出器、离线测试与 CTest 注册;不发布原版结果)。
  • 6158f1b:Screen::resize_preserving 修复 + 新 resize_hidden_height_test(隐藏 live 保留、历史前缀保留、隐藏宽度变化仍适配足迹)+ retained_resize_hidden_height_core 门禁。
  • df1c32c:结果报告、validation.json、FEATURES/EVIDENCE 更新(同时修正 Qt 已接入保留事务的过期描述)。

验证(本工作树实测)

入口 结果
RED:修复前新测试 hidden/height-only 失败:隐藏 live 行丢失保留尾;返回主屏正文丢失
GREEN:修复后 3/3 场景通过,退出 0
组合字面回放 20/20 阶段、0/560;映射/选择 20/20、0/744(未放宽)
事务检查 通过(151/42 次注入失败后重试一致等,断言未改)
核心 CTest 37/37 通过,4.78 秒(新增隐藏高度门禁)
Qt 正式路径 CTest 5/5 通过,9.72 秒(含 qt_terminal_modes_retained 12/12)
隐藏高度探针离线 CTest 3/3 通过,65.76 秒,不启动原版
旧六阶段 --resize 诊断 exit 1,失败保留,未弱化

环境:Windows 11 x64、VS 2022 17.12.6、MSVC 19.42.34433.0、Qt 6.10.3 offscreen、固定 ConPTY 1.25.260930003、Release。身份与哈希见 validation.json。

边界

  • 这是 ADR-0010 方向下的工程保留不变量,不是原版隐藏主屏高度行为对照通过。原版七阶段记录仍是严格审计失败;归档记录缺少取证运行时的完整发行物/profile,本工作区无法完成严格导出复核,未重跑、未改写原失败、未分类原版隐藏高度策略。
  • 隐藏帧在宽度改变时仍按单独记录的隐藏宽度策略适配足迹;纯高度变化后隐藏行可宽于当前协议宽度,沿用既有保留/投影表示。
  • 未覆盖备用屏活动期间后续输出、保存光标交叉、Unicode/宽字/结合字、历史淘汰、Qt 物理呈现/DPI、选择/Find 用户流程或性能。
  • 旧六阶段 native-sync 差异与同时缩宽+缩高原版视口/滚动/CUP 证据仍由 [R2-06][终端] 定义并验证 resize、逻辑行与历史语义 #29 继续;[R2-04][终端] 实现备用屏、滚动区域及关联模式 #27/[R2-06][终端] 定义并验证 resize、逻辑行与历史语义 #29 保持 OPEN。不声明完整 reflow 或 WindTerm 等价。
  • 不自动合并、不提前关闭 issue、不触发 Codex 自动 review。

JavaZeroo-Bot and others added 3 commits November 4, 2026 14:54
resize_preserving fitted the hidden frame to the current protocol width on
every height transaction, so a hidden primary that retained a wider source
row after an earlier width shrink lost its right tail when only the height
changed. Fit the hidden frame only when the width itself changes; keep the
separately recorded hidden-width policy unchanged.

The engineering test covers hidden live rows, rows appended to primary
history and the unchanged hidden-width behavior. It is not an original
behavior oracle; the preserved hidden-height recording still fails its
strict audit.

Co-authored-by: JavaZeroo <[email protected]>
Record the RED/GREEN height-only retention checks, the unchanged
combined and transaction results, and the blocked original hidden-height
audit so the engineering invariant is not mistaken for original evidence.

Co-authored-by: JavaZeroo <[email protected]>
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