Skip to content

research(ui): 几何切换与重绘配对 (#194) - #222

Merged
JavaZeroo merged 1 commit into
mainfrom
research/analyzer-resize
Oct 30, 2026
Merged

JavaZeroo merged 1 commit into
mainfrom
research/analyzer-resize

Conversation

@JavaZeroo

Copy link
Copy Markdown
Owner

内容

research/ui/analyze_output_trace.py 增加几何切换与重绘的配对:

resize term1 112x7 -> 112x7 at 224741015 | repaint +47ms 112x7, repaint +156ms 111x7

即每条 resize 记录后紧跟的重绘批次(含消费时刻网格与时间差)。这正是 #194 需要的判据:重绘的消费网格是否与切换目标一致。

实例(本地 test_actions 轨迹)

resize term1 80x24 -> 111x7 at 224739953 | repaint +968ms 112x7
resize term1 111x7 -> 112x7 at 224740875 | repaint +46ms 112x7
resize term1 112x7 -> 112x7 at 224741015 | repaint +47ms 112x7, repaint +156ms 111x7

第三条已经显示出"切换到 112x7 之后 156ms 出现按 111x7 消费的重绘"——正是错位方向。

边界

  • 只读分析;不运行 shell、不改判据;
  • 需要同时具备 termforge-resize-trace-v1 与 termforge-output-trace-v1(都由 TERMFORGE_OUTPUT_TRACE 产生)。

Refs #194

The analyzer now prints each resize together with the following repaint batches and their consumption grid, which is the direct evidence for a repaint consumed at the wrong geometry.
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 30, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-30T02:08:23.158223Z 7a25016 PR opened
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@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: 7a2501620d

ℹ️ 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".

for row in resizes:
terminal = row.get("terminal")
at = row.get("t_ms") or 0
after = [r for r in repaints if r.get("terminal") == terminal and (r.get("t_ms") or 0) >= at][:2]

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Use trace order to exclude repaints preceding the resize

When a repaint and a subsequent resize have the same t_ms, this filter incorrectly pairs the earlier repaint with the later resize. Both producers in experiments/shell/shell.cpp use GetTickCount64(), so equal timestamps do not establish event order; the JSONL record order distinguishes them. A synthetic trace containing an 80-column repaint, then an 80→112 resize at the same timestamp, produces resize ... -> 112x24 ... | repaint +0ms 80x24, falsely suggesting an old-grid repaint followed the geometry switch. Select repaint records occurring after the resize record, using timestamps only to calculate the elapsed time.

Useful? React with 👍 / 👎.

@JavaZeroo
JavaZeroo merged commit 42cdd13 into main Oct 30, 2026
6 checks passed
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.

1 participant