refactor(tui): migrate app into core and bootstrap wiring#5
Merged
creatang merged 73 commits intoApr 10, 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%
5bdc898 to
c2fa334
Compare
…into new_Feat-manual
…-core-support refactor(tui): add core command status and workspace helpers
feat: 新增 token 计量与自动压缩触发能力
# Conflicts: # internal/runtime/runtime.go
引入 Cobra CLI 根命令,并新增 --workdir 启动参数。 将 Windows UTF-8 控制台初始化前置到 CLI 与 TUI 共用启动路径,保证中文路径与中文输出兼容。 会话存储目录切换为 ~/.neocode/projects/<workspace-hash>/sessions,并保持 session.Workdir 仅表示运行目录。 补充工作区路径规范化、中文路径分桶、启动覆盖与相关回归测试,同时更新 README 与文档说明。
引入 Cobra CLI 根命令,并新增 --workdir 启动参数。 将 Windows UTF-8 控制台初始化前置到 CLI 与 TUI 共用启动路径,保证中文路径与中文输出兼容。 会话存储目录切换为 ~/.neocode/projects/<workspace-hash>/sessions,并保持 session.Workdir 仅表示运行目录。 补充工作区路径规范化、中文路径分桶、启动覆盖与相关回归测试,同时更新 README 与文档说明。
…into new_Feat-manual
d643318 to
0e4af34
Compare
…-emitter fix(tools): 重构 EmitChunk 错误传播与调用语义
Generated with [codeagent](https://github.com/qbox/codeagent) Co-authored-by: Yumiue <188874804+Yumiue@users.noreply.github.com>
…t, rate-limit misclassification - runtime.go: decrement attempt before reactive-compact continue so the retry does not consume a MaxLoops slot (fixes max_loops=1 case) - compact.go: reset TokenInputTotal/TokenOutputTotal on session before saving after compact, preventing stale high totals from being restored on the next run - errors.go: guard text-based context_too_long override to only apply for generic client errors (ErrorCodeClient); 429 rate-limit errors whose message contains token-count fragments are no longer mis-routed into the reactive-compact path; same guard added in IsContextTooLong - errors_test.go: add regression cases for the 429-with-token-count-message scenarios in NewProviderErrorFromStatus and IsContextTooLong Generated with [codeagent](https://github.com/qbox/codeagent) Co-authored-by: Yumiue <188874804+Yumiue@users.noreply.github.com>
Generated with [codeagent](https://github.com/qbox/codeagent) Co-authored-by: Cai-Tang-www <106404101+Cai-Tang-www@users.noreply.github.com>
Generated with [codeagent](https://github.com/qbox/codeagent) Co-authored-by: Yumiue <188874804+Yumiue@users.noreply.github.com>
…e-146-1775790664 feat(runtime): recover with reactive compact on context-too-long
…-ask-select-closure feat(tui/runtime): 补齐权限 ask 的选择式闭环(上下选择 + Enter确认)
Generated with [codeagent](https://github.com/qbox/codeagent) Co-authored-by: minorcell <120795714+minorcell@users.noreply.github.com>
Generated with [codeagent](https://github.com/qbox/codeagent) Co-authored-by: Cai-Tang-www <106404101+Cai-Tang-www@users.noreply.github.com>
Generated with [codeagent](https://github.com/qbox/codeagent) Co-authored-by: Cai-Tang-www <106404101+Cai-Tang-www@users.noreply.github.com>
…e-213-1775793526 fix(runtime/tools): 收敛 EmitChunk 遗留 review 问题
Generated with [codeagent](https://github.com/qbox/codeagent) Co-authored-by: minorcell <120795714+minorcell@users.noreply.github.com>
Generated with [codeagent](https://github.com/qbox/codeagent) Co-authored-by: creatang <165447160+creatang@users.noreply.github.com>
creatang
pushed a commit
that referenced
this pull request
Apr 15, 2026
fix(review): preserve cleanup semantics and error contracts
creatang
pushed a commit
that referenced
this pull request
Apr 22, 2026
fix: harden gateway runtime migration reliability
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 顺序可安全回滚。