Context
PR #3724 (merged as eba94215f075f1586b65045356233951eb89750b) added machinery to pkg/tui to hide no-op slash commands such as /settings in lean mode. On review, the change appears to target a code path that is no longer user-facing, and it introduces a latent correctness risk.
Problems
-
Wrong code path. The live --lean flow branches in cmd/root/run.go into runLeanTUI, which uses the separate pkg/leantui frontend. It does not construct pkg/tui with tui.WithLeanMode(). pkg/leantui also already omits /settings from its built-in command list, so the PR does not fix the currently active docker agent run --lean experience it claims to address.
-
Correctness risk / command-name collision. Filtering is done globally on slash-command text. An agent-defined custom command named settings (which produces an AgentCommandMsg and is not a no-op) would also be removed.
-
Test gap. The added tests instantiate the legacy pkg/tui model directly and do not exercise CLI routing or the real pkg/leantui command list.
-
Disproportionate complexity. Reflection and parallel registries add substantial machinery to exclude a single command on an apparently inactive path.
Suggested follow-up
Either:
References
Context
PR #3724 (merged as
eba94215f075f1586b65045356233951eb89750b) added machinery topkg/tuito hide no-op slash commands such as/settingsin lean mode. On review, the change appears to target a code path that is no longer user-facing, and it introduces a latent correctness risk.Problems
Wrong code path. The live
--leanflow branches incmd/root/run.gointorunLeanTUI, which uses the separatepkg/leantuifrontend. It does not constructpkg/tuiwithtui.WithLeanMode().pkg/leantuialso already omits/settingsfrom its built-in command list, so the PR does not fix the currently activedocker agent run --leanexperience it claims to address.Correctness risk / command-name collision. Filtering is done globally on slash-command text. An agent-defined custom command named
settings(which produces anAgentCommandMsgand is not a no-op) would also be removed.Test gap. The added tests instantiate the legacy
pkg/tuimodel directly and do not exercise CLI routing or the realpkg/leantuicommand list.Disproportionate complexity. Reflection and parallel registries add substantial machinery to exclude a single command on an apparently inactive path.
Suggested follow-up
Either:
pkg/tuilean-mode machinery introduced in fix(tui): hide no-op slash commands (/settings) in lean mode #3724, ortui.WithLeanMode, and add coverage ensuring custom command-name collisions (e.g. a custom/settings) remain functional.References