Repository navigation
research(ui): 1049 阶段的默认颜色与调色板(屏幕捕获)(#126) #182
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
41 changes: 41 additions & 0 deletions
41
research/ui/results/2026-10-29-session-1049-palette/README.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,41 @@ | ||
| # 原版会话 1049 阶段的默认颜色与调色板(屏幕捕获) | ||
|
|
||
| 本片用"合成会话 + 原生注入 + 屏幕捕获"读取原版 2.7.0 在 `1049h` 进入、重复进入与 `1049l` 退出时的**渲染颜色**,作为 [#126](../..#126) 与 [#123](../..#123) 的独立补充证据。它与 #126 合同要求的"应用内 QImage.pixel"是**不同的采集路径**,结论只在本路径与本配置内成立。 | ||
|
|
||
| ## 方法 | ||
|
|
||
| - 隔离 Windows 11 VM、固定官方 2.7.0 包(EXE 与 4,047 文件身份同其它记录),合成 profile 只有一个会话 `TF_UI_CMD`; | ||
| - 会话命令是一个极简原生程序:启用 `ENABLE_VIRTUAL_TERMINAL_PROCESSING` 后按阶段输出纯色块(`SGR0` 空空格、`SGR7` 反显空格、`SGR41/44/42` 背景空格,各 40 列),阶段之间等待外部触发文件; | ||
| - 四个阶段:主屏 → `1049h` 备用屏 → `1049l` 后再次 `1049h` → `1049l` 回主屏; | ||
| - 宿主在每阶段稳定时通过 QEMU agent 抓取 1024×768 截图;终端内容矩形由 UIA 取得(本次为 [255,196,497,236]),逐行取该矩形内的主导颜色。 | ||
|
|
||
| ## 结果 | ||
|
|
||
| | 色块 | 含义 | 像素颜色 | | ||
| |---|---|---| | ||
| | `SGR0` 空格 | 默认背景 | **#1C1C1C** | | ||
| | `SGR7` 反显空格 | 默认前景(填成背景) | **#E3E3DD** | | ||
| | `SGR41` | 调色板红 | **#C4265E** | | ||
| | `SGR44` | 调色板蓝 | **#3465A4** | | ||
| | `SGR42` | 调色板绿 | **#86B42B** | | ||
|
|
||
| 四个阶段(主屏 / alt / 重进 alt / 回主屏)的五行颜色**完全一致**。 | ||
|
|
||
| 阶段确实发生了推进(终端矩形裁切图的 SHA-256 前 16 位): | ||
|
|
||
| | 阶段 | 裁切 SHA-16 | | ||
| |---|---| | ||
| | 主屏 | `e7dd9042d1ecbb16` | | ||
| | alt | `f38a0bcbfe1a2f5e` | | ||
| | 重进 alt | `f38a0bcbfe1a2f5e`(与首次 alt 相同) | | ||
| | 回主屏 | `d518513bb5fc5040`(内容不同,颜色相同) | | ||
|
|
||
| ## 解释与边界 | ||
|
|
||
| - 在这套固定配置里,`1049` 的进入/重复进入/退出**不改变**默认前景/背景,也不改变所测的三个调色板颜色;备用屏重进渲染与首次进入一致。 | ||
| - 采集是**操作系统屏幕捕获**,不是应用内 `QImage::pixel`;不覆盖 ClearType 文本、完整样式、非颜色属性、字体/DPI 差异、其他调色板项或 SGR 变更后的 alt 状态。 | ||
| - 未测 #126 合同要求的 `isAltScreen/isMainScreen` 调用与 QPainter 颜色;本片不关闭 #126/#123/#27,也不构成原版行为等价声明。 | ||
|
|
||
| ## 复现要点 | ||
|
|
||
| 合成会话命令与四阶段触发协议、终端矩形获取与逐行颜色统计脚本见本目录说明;触发文件、截图与私有路径留在本地,仅发布本摘要与标量结果。 | ||
52 changes: 52 additions & 0 deletions
52
research/ui/results/2026-10-29-session-1049-palette/validation.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,52 @@ | ||
| { | ||
| "schema": "termforge-ui-1049-palette-capture-v1", | ||
| "issues": [ | ||
| 126, | ||
| 123 | ||
| ], | ||
| "method": "synthetic session + native SGR blocks + QEMU-agent screenshots + UIA terminal rect + per-row dominant color", | ||
| "environment": { | ||
| "platform": "Windows 11 VM (isolated)", | ||
| "display": "1024x768", | ||
| "dpi": "fixed 96 (guest setting)" | ||
| }, | ||
| "terminal_rect": [ | ||
| 255, | ||
| 196, | ||
| 497, | ||
| 236 | ||
| ], | ||
| "colors": { | ||
| "default_background": "1C1C1C", | ||
| "default_foreground_via_reverse": "E3E3DD", | ||
| "palette_red_sgr41": "C4265E", | ||
| "palette_blue_sgr44": "3465A4", | ||
| "palette_green_sgr42": "86B42B" | ||
| }, | ||
| "phases": { | ||
| "main": { | ||
| "crop_sha16": "e7dd9042d1ecbb16", | ||
| "colors_identical": true | ||
| }, | ||
| "alternate": { | ||
| "crop_sha16": "f38a0bcbfe1a2f5e", | ||
| "colors_identical": true | ||
| }, | ||
| "alternate_reentry": { | ||
| "crop_sha16": "f38a0bcbfe1a2f5e", | ||
| "colors_identical": true | ||
| }, | ||
| "restored_main": { | ||
| "crop_sha16": "d518513bb5fc5040", | ||
| "colors_identical": true | ||
| } | ||
| }, | ||
| "limitations": [ | ||
| "OS screen capture, not the application QImage grab required by #126", | ||
| "ClearType text rendering not studied; only space-filled SGR blocks", | ||
| "single VM, single fixed DPI, one package identity", | ||
| "no SGR-changed alternate state, no non-colour attributes, no font study", | ||
| "does not close #126/#123/#27" | ||
| ], | ||
| "performance_claim": false | ||
| } |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
按第 9 行的实际协议,第三阶段先执行
1049l,再执行1049h,测到的是退出后重新进入,而不是已处于备用屏时重复发送1049h。docs/research/windterm-1049-raster-plan.md的阶段 3 明确要求后一种转换,两者不能互相证明。因此这里关于“重复进入不改变颜色”的结论没有对应观测,可能被后续实现或差分测试误用为原版行为依据。请将结论限定为退出后重新进入,并保留连续1049h的颜色行为为未知。根目录 AGENTS.md 要求未知目标行为保留为调查项,而不是已通过的比较。AGENTS.md reference: AGENTS.md:L25-L25
Useful? React with 👍 / 👎.