feat(tui): add interactive TUI dashboard with gum#229
Open
Babylonehy wants to merge 3 commits intownlen:masterfrom
Open
feat(tui): add interactive TUI dashboard with gum#229Babylonehy wants to merge 3 commits intownlen:masterfrom
Babylonehy wants to merge 3 commits intownlen:masterfrom
Conversation
Add a full-featured TUI control panel (clashctl tui) powered by gum: - Node switching with latency display and concurrent speed testing - Strategy group browsing, subscription management, proxy mode switching - Active connections viewer, log viewer, config management - Tun mode management, boot auto-proxy control, secret management Key fixes in proxy.sh: - Use env(GROUP) + to_entries to avoid yq lexer errors with emoji keys - URL-encode group/node names in controller API calls - Use tab delimiter instead of pipe to handle node names containing "|" - Fix proxy_group_display_list to use single API call (avoid N+1 requests) Install experience: - Prompt user during install to optionally install gum dependency - Auto-detect package manager (apt/yum/dnf/pacman/apk) for gum install Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
feat(tui): add interactive TUI dashboard with gum
Owner
|
@Babylonehy 感谢这个 PR,里面几个 不过这个 PR 同时引入了 建议拆成两个 PR:
这样更容易 review,也能先把确定的 bugfix 合进去。 |
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.
Summary
新增 TUI 控制台 (
clashctl tui):基于 gum 的交互式终端界面修复 proxy.sh 多项问题:
env(GROUP)+to_entriesproxy_node_url_encode|导致延迟解析错误 → 分隔符改为\tproxy_group_display_listN+1 API 调用 → 单次调用 + yq 内过滤proxy_group_select中die会杀掉 TUI → TUI 中用子 shell 调用set -e+read无换行 EOF 导致脚本退出 → 修复 printf 格式安装体验:安装时提示是否安装 gum 依赖,自动检测包管理器(apt/yum/dnf/pacman/apk)
Test plan
bash install.sh— 验证 TUI 安装提示(已装 gum 显示就绪,未装提示安装)clashctl tui— 进入 TUI 主界面