refactor(tui): migrate app into core and bootstrap wiring#189
Merged
minorcell merged 11 commits intoApr 8, 2026
Merged
Conversation
- Fix NUL byte check in services/file_service.go (Linux filepath.Abs does not error on NUL) - Set explicit width/height in TestAppHelpersAndRenderingSmoke to prevent header wrap - Relax shell menu newline assertion on Windows for CJK path wrapping - Increase workspace command executor timeout from 5s to 15s - Add comprehensive tests for runtime_bridge parsing functions (services: 48% -> 95%) - Add DefaultWorkspaceCommandExecutor and edge case tests (infra: 65% -> 87%)
fix(tui): fix CI failures and boost test coverage above 80%
Collaborator
Author
|
这个pr得等前面的pr合并了再看有没有冲突,这个是最后的结构调整差异还是蛮大的。。。 |
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
Collaborator
|
internal/tui/core/app/update.go:715 新的 runtime 事件注册表已经不再处理 permission 相关事件,而 tea.KeyMsg 路径里也没有旧版的审批按键分支了。结果是 runtime 一旦发出权限请求,TUI 侧就没有办法再用 y/a/n 回传审批,运行会卡住。 |
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.
背景:完成 internal/tui 从扁平单包到分层结构的主迁移闭环。
本次改动:
将原扁平 internal/tui/.go 迁入 internal/tui/core/app/。
新增 internal/tui/bootstrap/* 完成依赖注入装配。
保留 internal/tui/tui.go 作为兼容入口。
删除迁移后冗余旧文件(保持功能不变)。
同步完成若干一致性收敛:
runtime 事件处理注册表化(替代巨型 switch 部分逻辑)
RuntimeClosedMsg 状态重置完善
panelOrder 去重
Activity 使用统一 state.ActivityEntry(保留 IsError)
工具函数重复定义清理
影响范围:仅 internal/tui。
验证:
go test ./internal/tui/... ./internal/app
风险与回滚:
中风险(迁移量较大);按堆叠 PR 顺序可安全回滚。