github / github/copilot-cli

Terminal output is clipped after resize/reflow and hidden text is not reachable via scrollbar

未关闭
#3,497 0 条评论 11 个 reaction 已指派 0 人 在 GitHub 查看
area:terminal-rendering
主要语言
Shell
星标
11.2k
派生
1.9k
平均合并
14 小时 16 分钟
30 天内合并 PR
6

描述

### Describe the bug

### Description

In recent versions of GitHub Copilot CLI, long responses are sometimes not fully visible in the terminal. The missing text is not reachable using the terminal scrollbar.

The issue appears to be related to terminal resizing / reflow. When I resize the terminal window, the same response is rendered differently: sometimes more text is visible, sometimes less. In some layouts, parts of the final response are clipped even though they become visible after resizing to a different width.

### Expected behavior

All generated output should remain accessible after rendering.

If the response is longer than the visible terminal area, I should be able to reach the hidden text through normal terminal scrolling. Resizing the terminal should reflow the output without losing or hiding any content.

### Actual behavior

Parts of the generated response become hidden or clipped.

The hidden text cannot be reached with the terminal scrollbar. Resizing the terminal changes which parts of the response are visible, but does not reliably make the full output accessible.

### Example

Copilot CLI produced a response containing multiple sections/options. Earlier in the output, I could see that the response included “Option C”. However, in the final rendered summary, the text was cut off and only part of the options were visible.

After resizing the terminal:
- in one width, the final summary was cut off after the first option
- in another width, it was cut off differently
- in a narrower width, almost the full summary became visible

This makes it look like the content is present internally but is being clipped or incorrectly reflowed by the terminal UI.

### Notes

This seems related to terminal rendering, wrapping, or scrollback handling. The main problem is not just that the response is long, but that some text becomes unreachable after rendering.

### Affected version

GitHub Copilot CLI 1.0.53-1

### Steps to reproduce the behavior

1. Open Copilot CLI in an interactive terminal.
2. Ask for a response that produces a longer structured answer or final task summary.
3. Wait until the response is complete.
4. Resize the terminal window wider or narrower.
5. Observe that the visible text changes depending on the terminal width.
6. Try to use the terminal scrollbar to access the missing text.

### Expected behavior

All generated output should remain accessible after rendering.

If the response is longer than the visible terminal area, I should be able to reach the hidden text through normal terminal scrolling. Resizing the terminal should reflow the output without losing or hiding any content.

### Additional context

_No response_

贡献指南

打开贡献指南

调研方向

使用 Copilot CLI 1.0.53-1 从 issue 中的复现步骤开始,然后跟踪终端渲染、换行、调整大小/reflow 以及 scrollback 的行为。当一段较长的结构化响应能够通过滚动始终完整访问,并且在不同的终端宽度下进行 reflow 时不会被截断,即表示完成。

由索引模型根据 Issue 内容生成。

评估

技术栈
shell
领域
cli
Issue 类型
缺陷
难度
4/5
预计耗时
3-5 天
活跃度
冷清
描述清晰度
需要澄清
新手友好度
42/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。