Skip to content

Right key does not consistently resize the detail/agents panel when session has agents #55

Description

@miabbott

Version: v0.2.0-alpha.12

Terminal multiplexer: tmux

OS: Fedora Linux 44 (Workstation Edition)

What happened?

While focus is on the Sessions panel, Left reliably shrinks the detail/agents panel. Right does not reliably grow it back — its behavior depends on which session is currently highlighted.

Steps to reproduce:

  1. Focus the Sessions panel.
  2. Highlight a session that has one or more agents.
  3. Press Left a few times — the detail/agents panel shrinks as expected.
  4. Press Right to grow it back — nothing happens to the panel size; focus silently moves into the Agents panel instead.

Root cause, in packages/sidebar-core-rs/src/input.rs:

UiKey::Left => {
    if app.panel_focus == PanelFocus::Sessions {
        app.resize_detail_panel(-1);       // Left always resizes here
    } else {
        app.focus_sessions_panel();
    }
}
UiKey::Right => {
    if app.panel_focus == PanelFocus::Sessions {
        let agent_count = app
            .focused_session_name()
            .and_then(|name| app.sessions.iter().find(|s| s.name == name))
            .map(|s| s.agents.len())
            .unwrap_or(0);
        if agent_count > 0 {
            app.focus_agents_panel();       // Right diverts to navigation instead
        } else {
            app.resize_detail_panel(1);
        }
    }
}

Left unconditionally resizes when focus is on the Sessions panel. Right is dual-purpose: if the focused session has any agents, it moves focus into the Agents panel instead of resizing. This makes Right's behavior depend on which session happens to be highlighted. There's no modified keybinding (Shift+Right, Ctrl+Right, etc.) that performs a pure resize, so growing the panel back currently requires navigating to a session with zero agents first, dragging the panel separator with the mouse, or editing detailPanelHeight directly in ~/.config/opensessions/config.json.

Expected behavior

Right should resize the detail/agents panel symmetrically with Left when focus is on the Sessions panel, regardless of whether the focused session has agents. Panel navigation into the Agents list could use the existing Ctrl+J/Ctrl+K bindings instead, or a distinct modifier-based resize key could be added if entering the Agents panel via Right is intentional.

Debug logs

No relevant entries in /tmp/opensessions-debug.log — it only captures sidebar pane width-repair events, not TUI keypress or panel-focus/resize handling, so there's nothing to attach for this interaction.

🤖 Assisted-by: OpenCode (Claude Sonnet 5)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    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