feat(tui): 工具列表搜索过滤 + 滚动/重叠修复 - #1
Merged
Merged
Conversation
- Deleted unit tests for DataMasker, Logger, and RequestLogger as they are no longer needed. - Updated ConnectionPool tests to improve idle timeout handling and event emission. - Enhanced ToolRouter tests to verify connection results and handle failures more effectively. - Suppressed console warnings and errors in transport tests to clean up test output. - Adjusted vitest configuration to exclude specific test files and set up for forking.
… check response - Updated CLI mode integration tests to use Content-Length framing for messages. - Refactored response reading logic to handle Content-Length headers in CLI mode. - Modified server mode health check test to verify summary counts in the response. - Simplified mock implementations in connection pool property tests by removing unused event methods. - Adjusted MCP handler tests to track session initialization in context rather than the handler. - Updated transport tests to validate message framing with Content-Length. - Increased test and hook timeout values in Vitest configuration for improved stability.
- Refactored logger setup to be configuration-driven, allowing for dynamic log level, output format, and masking of sensitive data. - Introduced `configureLogger` function to initialize logging based on system configuration. - Updated logger to support JSON formatting and sensitive value masking. - Added tests for logger functionality, ensuring sensitive data is masked in logs. fix(health): improve health monitoring event emissions - Changed event emission from `serviceUnhealthy` to `serviceFailed` for clarity. - Updated health monitor to manage unhealthy services more effectively. fix(cli): streamline CLI logging behavior - Removed unnecessary stderr suppression in CLI mode, allowing for better logging visibility. - Adjusted logging setup in TUI mode to align with new configuration-driven approach. feat(config): enforce unique service names in configuration - Added validation to ensure service names in `mcpServers` do not collide after normalization. test(tests): enhance integration and unit tests - Added tests for logger to verify structured logging and sensitive data masking. - Updated integration tests to check for proper handling of deleted sessions and responses. - Improved unit tests for health monitoring and tool routing to ensure robustness. refactor(transport): simplify transport message framing - Updated `StdioTransport` to use newline-delimited JSON-RPC messages, improving compatibility with legacy peers.
kugouming
force-pushed
the
feat/tui-tools-search-and-scroll
branch
from
August 27, 2026 02:47
3d37836 to
ba7f77f
Compare
- ServiceTools 新增 `/` 搜索模式,分层 Esc(退出搜索→清除过滤→返回列表) - 增加工具列表滚动偏移与超长名称截断,修复滚动指示符与工具行重叠 - app/app-optimized 计算 contentHeight 并下传 ServiceTools,移除外层 Esc 拦截 - 提取 service-field-config 统一表单帮助文案与输入占位符 - 抽取 DEFAULT_CONNECTION_POOL 常量,替换 cli/file-provider/JSON 编辑器中的硬编码默认值 - 新增工具滚动/搜索集成测试与字段配置单元测试
- 强制 CI=false,避免 Ink 在 CI 模式下跳过渲染导致捕获输出为空 - 用 vi.hoisted 提升 fetchServiceTools mock,断言 mock 驱动了渲染 - 新增 waitFor 轮询助手替代固定次数等待,适应慢速 CI 与 Ink 32ms 节流 - 滚动到底部命中目标即提前退出,减少不必要迭代
kugouming
force-pushed
the
feat/tui-tools-search-and-scroll
branch
from
August 27, 2026 04:27
9784fcc to
62d4561
Compare
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
本 PR 修复 ServiceTools 视图在工具数量较多时的多个布局/交互问题,并抽取服务表单的共享字段帮助文案。
TUI 工具列表修复 (
src/tui/components/ServiceTools.tsx)↑ more指示行不再与最后一行工具重叠(为指示行预留空间)wrap="truncate未计入▶ ✓前缀,改用手动截断)terminalHeightprop,由宿主传入实际可用高度,避免按满终端高度算行数导致溢出工具搜索/过滤
/进入搜索输入态,输入即按名称过滤(大小写不敏感子串),↑↓ 实时导航匹配结果Enter确认过滤(此后 Space 可切换工具),Esc分层:退出输入态 → 清空过滤 → 返回服务列表a/A批量切换作用于当前过滤结果;空匹配显示空态;搜索框常驻显示匹配数Esc 处理修复 (
app-optimized.tsx、app.tsx)useInput不再在 tools 视图拦截 Esc,交由 ServiceTools 分层处理;onBack同时刷新服务列表服务表单重构
service-field-config.ts共享字段帮助文案/占位符(ServiceForm/ServiceFormUnified 复用)DEFAULT_CONNECTION_POOL常量(types/service.ts),cli.ts、file-provider.ts使用Test plan
npm run typecheck通过npm run build通过tests/integration/tui-service-tools-scroll.test.ts(5 用例):滚动不重叠、长名截断、搜索过滤、空匹配、分层 Esc + 过滤态切换npx tsx src/cli.ts --mode tui进入工具多的服务,验证/搜索、↑↓ 导航、Space 切换、Esc 三步分层🤖 Generated with Claude Code