Repository navigation
fix(tui): make ? typeable with /? as the help alias - #612
Merged
AAswordman merged 1 commit intoDec 3, 2026
Merged
Conversation
A bare ? opened the help panel from the global key handler, so a question mark could never be typed into the input. Help now lives on F1 and the /help command; /? joins as a declared alias (command table entry so the completion popup lists it), and a literal ? falls through to the input editor like any other character. The help panel still closes on ?, which is safe while the overlay owns the keyboard. Signed-off-by: h4rm00n <harmoon@qq.com>
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
变更说明
问题:TUI 中直接键入英文问号
?会被全局快捷键拦截并打开帮助面板,导致无法输入问号字符(提问、写 Markdown 等场景都会被卡住)。方案:
?的帮助绑定(保留 F1);?此后按普通字符落入输入编辑器;/help增加别名/?:内建命令派发加"?"分支,命令表(COMMAND_SPECS)加入?条目,使补全弹窗能列出并精确匹配/?;help_lines)在/help处标注别名;?仍可关闭面板(覆盖层独占键盘期,无输入歧义)。改动类型
影响范围
apps/cli/src/tui/core/app.rs(全局按键、内建命令派发)、apps/cli/src/tui/input/commands.rs(命令表 + 测试)、i18n 两处help_lines?;通过/?或/help或 F1 打开帮助面板验证
另用隔离环境(独立 XDG/config 目录 + 私有 dbus + tmux 抓帧)做了交互验证:
?:字符出现在输入框(> ?),帮助面板不再弹出;/?回车:帮助面板打开;未运行 Flutter 侧测试:本 PR 未改 Flutter/Dart 代码。
截图或日志
复现步骤:TUI 输入框直接敲
?。修复前面板立即弹出且字符无法输入;修复后字符正常进入输入框,帮助面板经/?、/help或 F1 打开。提交者确认
Package parsing检查通过。CLA 签署评论链接:#520 (comment)