Repository navigation
diagnose(shell): flag resize repaint batches in the output trace (#194) - #198
Conversation
…194 A chunk containing the cursor-hide plus home prefix is marked repaint:true together with the grid it was consumed at, which is the missing input for deciding whether the repaint was generated before or after the resize.
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 2044049a7f
ℹ️ 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".
| // A resize repaint starts by hiding the cursor and homing it; | ||
| // flagging it lets the trace show whether the batch was built | ||
| // for the previous grid but consumed with the new one. | ||
| const bool repaint = bytes.find("\x1b[?25l\x1b[H") != std::string::npos; |
There was a problem hiding this comment.
Detect repaint prefixes across output chunk boundaries
When the repaint prefix straddles two consumed chunks, both trace records report repaint:false, hiding the repaint from the timing investigation. OutputQueue::take(8192) in experiments/shell/queues.hpp splits the byte stream without respecting escape-sequence boundaries: for example, 8,188 ordinary bytes followed by this prefix splits it across two chunks, neither of which matches this search. Retain the trailing prefix-length-minus-one bytes between searches, or use a streaming matcher, so detection does not depend on transport chunking.
Useful? React with 👍 / 👎.
内容
输出轨迹增加
repaint标记:当被消费的输出块包含 resize 重绘前缀ESC[?25l ESC[H时标为 true。{"schema":"termforge-output-trace-v1","terminal":1,"t_ms":...,"offset":3301,"bytes":210,"columns":112,"rows":7,"repaint":true}用途(#194 可行性实验)
文档 conpty-resize-repaint-timing.md 固定了实施前必须确认的问题:重绘批次是"resize 前生成、resize 后到达"还是相反。有了
repaint标记,就可以把每次重绘的消费时刻尺寸与进度记录的geometry-*阶段直接对齐,不必再靠推断。本地验证
边界
TERMFORGE_OUTPUT_TRACE时不写文件;Refs #194