Skip to content

fix(tui): hide no-op slash commands (/settings) in lean mode#3724

Merged
Sayt-0 merged 1 commit into
mainfrom
fix/lean-mode-exclude-noop-commands
Jul 17, 2026
Merged

fix(tui): hide no-op slash commands (/settings) in lean mode#3724
Sayt-0 merged 1 commit into
mainfrom
fix/lean-mode-exclude-noop-commands

Conversation

@aheritier

Copy link
Copy Markdown
Contributor

Follows #3723.

In LEAN TUI mode, slash commands that are no-ops should not be offered in autocompletion, the command palette, or the slash-command parser. This excludes /settings in lean mode while leaving classic mode unaffected.

A single source of truth now drives both runtime message dropping and disabled slash-command derivation, with a guard test preventing drift.

Validation: task build, task test, and task lint pass.

…ette

Lean mode silently drops OpenSettingsDialogMsg (and other tab/sidebar
messages) in appModel.update, so /settings does nothing there. Yet it
still autocompleted and ran from the command palette.

Seed disabledCommands from a new leanModeDisabledSlashCommands list
when WithLeanMode is applied, reusing the existing disabledCommands
filter in commandCategories() so both inline completion and the
palette/parser stay consistent.

To avoid the two lean-mode lists (dropped message types vs. disabled
slash commands) drifting apart, the message-drop switch in update() now
runs off the same leanModeDroppedMessageTypes slice used to validate
leanModeDisabledSlashCommands, and a guard test executes every built-in
command to cross-check the two.
@aheritier
aheritier requested a review from a team as a code owner July 17, 2026 15:38
@Sayt-0
Sayt-0 enabled auto-merge July 17, 2026 15:40
@Sayt-0
Sayt-0 merged commit eba9421 into main Jul 17, 2026
14 checks passed
@Sayt-0
Sayt-0 deleted the fix/lean-mode-exclude-noop-commands branch July 17, 2026 15:43
@rumpl

rumpl commented Jul 17, 2026

Copy link
Copy Markdown
Member

Did /settings really show?

aheritier added a commit that referenced this pull request Jul 17, 2026
…op-commands"

This reverts commit eba9421, reversing
changes made to d771c13.
rumpl added a commit that referenced this pull request Jul 17, 2026
revert: pkg/tui lean-mode machinery from #3724
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants