Skip to content

[BUG] [v0.0.7] /agents footer omits the n new agent shortcut and shows a generic Esc action #51339

Description

@jony376

Project

cortex

Description

On the native Cortex TUI /agents panel, the footer renders the generic interactive hint row:

[↑↓] navigate  [Enter] select  [Type] search  [Esc] cancel

This is misleading for this screen.

When there are no custom agents, the panel body itself says:

No custom agents found (Press 'n' to create one)

The /agents builder defines panel-specific hints including n new agent and Esc close, but the rendered footer does not use them. As a result, the panel hides its primary creation shortcut and labels Esc as cancel even though this view behaves like a browser/manager screen.

Error Message

Debug Logs

System Information

OS: macOS 26.3.1

Screenshots

Screen.Recording.2026-03-30.at.05.24.58.mov

Steps to Reproduce

  1. From the Cortex repo root, create a clean temporary home:
    export HOME="$(mktemp -d)"
    mkdir -p "$HOME/.cortex"
  2. Mark the current repo as trusted so Cortex opens directly into the main TUI:
    cat > "$HOME/.cortex/trusted_workspaces.json" <<EOF
    {
      "version": 1,
      "trusted": [
        "$(pwd)"
      ]
    }
    EOF
  3. Set a dummy API key so the TUI can open the main session UI:
    export CORTEX_API_KEY=dummy
  4. Launch the native TUI:
    ./target/debug/Cortex
  5. At the prompt, run:
    /agents
    
  6. Observe the footer at the bottom of the panel.
  7. Compare it to the empty-state line in the body (Press 'n' to create one).

Expected Behavior

The /agents footer should reflect actions that are actually available on this panel:

  • Include n new agent.
  • Show Esc close (or equivalent dismiss wording) for this manager view.
  • Render panel-specific hints instead of a generic fallback hint row.

Actual Behavior

The /agents panel footer stays generic:

[↑↓] navigate  [Enter] select  [Type] search  [Esc] cancel

So the footer omits the n shortcut for Create New Agent and shows Esc cancel instead of the panel-specific Esc close.

Additional Context

Relevant code paths:

  • src/cortex-tui/src/interactive/builders/agents.rs builds the Agents interactive state and sets custom hints including ("n", "new agent") and ("Esc", "close").
  • src/cortex-tui/src/interactive/renderer.rs currently renders a generic hint row in render_hints() (↑↓ navigate, Enter select, optional Type search, Esc cancel) and does not consume per-panel custom hints.

Metadata

Metadata

Assignees

No one assigned

    Labels

    duplicateThis issue or pull request already exists

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions