Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

Preflight terminal size gating does not trigger resize warning

未关闭
#10 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
3/5
预计耗时
1-2 天
新手友好度
52/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
冷清
技术栈
python
领域
cli

调研方向

从 preflight_ui.py 中的 _terminal_size_ok() 和 _wait_for_terminal_size() 开始,然后跟踪 _arrow_select() 路径和编号菜单 fallback。将阈值与渲染后的 preflight 内容进行比较,并检查 Rich wrapping 或跳过 gating 是否解释了这一行为。完成标准是:尺寸过小的 Windows cmd.exe 终端显示调整大小警告,并一直阻塞到终端被放大为止。

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

描述

Problem

The preflight UI no longer shows the "terminal too small" warning panel when the terminal window is too narrow for the rendered content. The UI renders with broken layout / wrapping instead of blocking and asking the operator to resize.

Where the check lives

  • _terminal_size_ok() at preflight_ui.py:622 checks against MIN_UI_WIDTH = 132 and MIN_UI_HEIGHT = 34
  • _wait_for_terminal_size() at preflight_ui.py:632 shows the resize panel in a loop until the terminal is large enough
  • Called from _arrow_select() at preflight_ui.py:1400 on every menu render cycle

Likely causes to investigate

  1. The fixed thresholds (MIN_UI_WIDTH = 132) may no longer match the actual rendered width of the preflight dashboard content, especially after recent UI changes added wider rows (session summary sections, launch contract, stim config view).
  2. The check only runs inside _arrow_select — if the arrow select path is skipped (e.g., _supports_arrow_select() returns false), the numbered-menu fallback has no size check at all.
  3. Rich may be auto-wrapping content to fit the terminal width, so the check passes but the layout breaks silently.

Expected behavior

When the terminal is too narrow for the preflight UI content, the resize warning panel should appear and block until the operator enlarges the window.

Observed on

Windows, native cmd.exe. Noticed 2026-04-15 after recent preflight UI changes.

主要语言
Python
星标
0
派生
1
PR 合并指标
30 天内没有已合并 PR

环境准备

我们还没有检查这个项目的环境配置文件。先看它的 README,通用步骤见我们的新手贡献指南。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

matiasandina/uid_python_api 的其他 Issue

查看 matiasandina/uid_python_api 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 发到你的邮箱

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