Skip to content

follow-up(tui): #3724 targets inactive lean-mode path and risks hiding valid custom /settings command #3725

Description

@aheritier

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

  1. 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.

  2. 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.

  3. 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.

  4. Disproportionate complexity. Reflection and parallel registries add substantial machinery to exclude a single command on an apparently inactive path.

Suggested follow-up

Either:

References

Metadata

Metadata

Assignees

Labels

area/tuiFor features/issues/fixes related to the TUI

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions