[FEATURE]: Add hints toggle to declutter UI #3902

Open
opened 2026-02-16 17:41:53 -05:00 by yindo · 2 comments
Owner

Originally created by @tuanhqv123 on GitHub (Dec 27, 2025).

Originally assigned to: @thdxr on GitHub.

Problem

The TUI UI displays several persistent hints that can feel cluttered:

  • /share copy link text in header
  • [Tab] switch agent hint in prompt footer
  • [Ctrl+P] commands hint in prompt footer

These hints take up screen real estate and become redundant once users are familiar with keyboard shortcuts.

Proposed Solution

Add a single toggle command "Hide hints" (KV key: hints_visible, default: true) that hides all UI hints:

  1. Header: Hide /share copy link (but keep URL display when already shared)
  2. Prompt footer: Hide [switch agent] and [commands] hints

Layout Behavior

Show hints = true (default) - Current layout:

Header:
  # Session Title           1,234 tokens (12%)
  /share copy link

Prompt:
  [Agent Name | Model | Provider]
  [Spinner|Esc] ........................ [Tab] switch agent  [Ctrl+P] commands

Show hints = false - Compact layout:

Header:
  # Session Title           1,234 tokens (12%)

Prompt:
  [Agent Name | Model | Provider] ... [Spinner|Esc]

Note: When hints are hidden, the spinner and esc interrupt move to the right side of the same row as the agent/model/provider info.

Implementation Details

  • Added hints_visible KV setting (default: true)
  • Added command session.toggle.hints in command palette
  • Modified Header.tsx, Prompt.tsx, and session/index.tsx
  • Replaced 3 separate toggle signals with single showHints signal
  • Preserved existing behavior for spinner/interrupt display during active operations

Alternatives Considered

  1. Separate toggles for each hint - rejected: too granular, increases config surface
  2. Per-hint keybind toggles - rejected: would require more keybinds, harder to discover
  3. Auto-hide after X sessions - rejected: doesn't allow user control

Questions for Maintainers

  • Is this something that aligns with OpenCode's design philosophy?
  • Should we also hide other hints (like /status, LSP/MCP counts) in footer?
  • Any naming preferences for the command/setting?

Code

I have implemented this change. Branch: feature/hints-toggle
Fork: https://github.com/tuanhqv123/opencode/tree/feature/hints-toggle

Waiting for design review approval before opening PR.

Originally created by @tuanhqv123 on GitHub (Dec 27, 2025). Originally assigned to: @thdxr on GitHub. ## Problem The TUI UI displays several persistent hints that can feel cluttered: - `/share copy link` text in header - `[Tab] switch agent` hint in prompt footer - `[Ctrl+P] commands` hint in prompt footer These hints take up screen real estate and become redundant once users are familiar with keyboard shortcuts. ## Proposed Solution Add a single toggle command "Hide hints" (KV key: `hints_visible`, default: `true`) that hides all UI hints: 1. Header: Hide `/share copy link` (but keep URL display when already shared) 2. Prompt footer: Hide `[switch agent]` and `[commands]` hints ### Layout Behavior **Show hints = true (default) - Current layout:** ``` Header: # Session Title 1,234 tokens (12%) /share copy link Prompt: [Agent Name | Model | Provider] [Spinner|Esc] ........................ [Tab] switch agent [Ctrl+P] commands ``` **Show hints = false - Compact layout:** ``` Header: # Session Title 1,234 tokens (12%) Prompt: [Agent Name | Model | Provider] ... [Spinner|Esc] ``` Note: When hints are hidden, the spinner and `esc interrupt` move to the right side of the same row as the agent/model/provider info. ## Implementation Details - Added `hints_visible` KV setting (default: `true`) - Added command `session.toggle.hints` in command palette - Modified `Header.tsx`, `Prompt.tsx`, and `session/index.tsx` - Replaced 3 separate toggle signals with single `showHints` signal - Preserved existing behavior for spinner/interrupt display during active operations ## Alternatives Considered 1. Separate toggles for each hint - rejected: too granular, increases config surface 2. Per-hint keybind toggles - rejected: would require more keybinds, harder to discover 3. Auto-hide after X sessions - rejected: doesn't allow user control ## Questions for Maintainers - Is this something that aligns with OpenCode's design philosophy? - Should we also hide other hints (like `/status`, LSP/MCP counts) in footer? - Any naming preferences for the command/setting? ## Code I have implemented this change. Branch: `feature/hints-toggle` Fork: https://github.com/tuanhqv123/opencode/tree/feature/hints-toggle Waiting for design review approval before opening PR.
yindo added the opentui label 2026-02-16 17:41:53 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Dec 27, 2025):

This issue might be a duplicate of existing issues. Please check:

  • #4786: [FEATURE]: focus mode to toggle off all the decorations (very similar - proposes hiding all decorations to reduce UI clutter)
  • #5734: [FEATURE]: Subagent sessions accumulate without cleanup option (related - addresses UI clutter from accumulated sessions)

Feel free to ignore if none of these address your specific case.

@github-actions[bot] commented on GitHub (Dec 27, 2025): This issue might be a duplicate of existing issues. Please check: - #4786: [FEATURE]: focus mode to toggle off all the decorations (very similar - proposes hiding all decorations to reduce UI clutter) - #5734: [FEATURE]: Subagent sessions accumulate without cleanup option (related - addresses UI clutter from accumulated sessions) Feel free to ignore if none of these address your specific case.
Author
Owner

@soustruh commented on GitHub (Jan 7, 2026):

This is a great feature for decluttering! However, I'd like to suggest expanding the scope to support customizable hints rather than just hide/show all.

Use Case

When users customize keybinds (especially input_submit and input_newline), the status line doesn't reflect these changes. For example:
My configuration:

{
  "keybinds": {
    "input_submit": "ctrl+return",
    "input_newline": "return"
  }
}

Current behavior: Status line shows tab switch agent ctrl+p commands (doesn't show the swapped Enter behavior)
Desired: Status line should show enter → newline ctrl+enter → submit tab → agent ctrl+p → commands
This helps users remember their custom shortcuts and avoid accidental submissions.

Proposed Enhancement

Instead of (or in addition to) a binary toggle, allow users to configure which hints to display:

{
  "tui": {
    "status_hints": {
      "enabled": true,
      "items": [
        { "keybind": "input_newline", "label": "newline" },
        { "keybind": "input_submit", "label": "submit" },
        { "keybind": "agent_cycle", "label": "agent" },
        { "keybind": "command_list", "label": "commands" }
      ]
    }
  }
}

Display: enter → newline ctrl+enter → submit tab → agent ctrl+p → commands

Benefits

  1. Complements your toggle - Users can enable/disable hints entirely OR customize them
  2. Auto-reflects keybind config - Shows actual configured keys, not defaults
  3. Flexible - Users can show only the hints they need (e.g., just submit/newline)
  4. Muscle memory - Helps learn custom shortcuts
  5. Backwards compatible - Falls back to current defaults if not configured

Implementation Consideration

The infrastructure is mostly there:

  • keybind.print() already resolves the actual configured key
  • Your toggle provides the enable/disable mechanism
  • Just needs config schema + dynamic hint rendering

Question

Would this enhancement fit within the scope of this feature, or should I open a separate feature request for customizable hints?

@soustruh commented on GitHub (Jan 7, 2026): This is a great feature for decluttering! However, I'd like to suggest expanding the scope to support **customizable hints** rather than just hide/show all. ## Use Case When users customize keybinds (especially `input_submit` and `input_newline`), the status line doesn't reflect these changes. For example: **My configuration:** ```json { "keybinds": { "input_submit": "ctrl+return", "input_newline": "return" } } ``` **Current behavior:** Status line shows `tab switch agent ctrl+p commands` (doesn't show the swapped Enter behavior) **Desired:** Status line should show `enter → newline ctrl+enter → submit tab → agent ctrl+p → commands` This helps users remember their custom shortcuts and avoid accidental submissions. ## Proposed Enhancement Instead of (or in addition to) a binary toggle, allow users to **configure which hints to display**: ```json { "tui": { "status_hints": { "enabled": true, "items": [ { "keybind": "input_newline", "label": "newline" }, { "keybind": "input_submit", "label": "submit" }, { "keybind": "agent_cycle", "label": "agent" }, { "keybind": "command_list", "label": "commands" } ] } } } ``` **Display:** `enter → newline ctrl+enter → submit tab → agent ctrl+p → commands` ## Benefits 1. **Complements your toggle** - Users can enable/disable hints entirely OR customize them 2. **Auto-reflects keybind config** - Shows actual configured keys, not defaults 3. **Flexible** - Users can show only the hints they need (e.g., just submit/newline) 4. **Muscle memory** - Helps learn custom shortcuts 5. **Backwards compatible** - Falls back to current defaults if not configured ## Implementation Consideration The infrastructure is mostly there: - `keybind.print()` already resolves the actual configured key - Your toggle provides the enable/disable mechanism - Just needs config schema + dynamic hint rendering ## Question Would this enhancement fit within the scope of this feature, or should I open a separate feature request for customizable hints?
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#3902