Skip to content

feat(tui): Session Picker UX — hide empty auto-sessions, highlight current session, page-scroll the list, widen the list pane #6014

Description

@7jrxt42BxFZo4iAnN4CX

Problem

The Session Picker (Ctrl-R / /sessions) has four usability gaps that make it hard to navigate and trust:

  1. Empty auto-created sessions clutter the list. Sessions with 0 messages and the default title ("Session") appear in the picker, even though the same definition (is_empty_auto_created_session) is already used to hide them from the launch "recent work" list and from --continue/auto-resume. The picker is the odd one out — it shows empty sessions while the other surfaces hide them.
  2. The current session is not highlighted, and its id is not discoverable. Opening the picker from a live session does not indicate which row is the session you are in. There is no command or surface that prints the current session id, so you can only find it by searching text — and even then the list shows only a truncated 8-char id.
  3. PageUp/PageDown scroll the history pane, not the session list. The list scrolls only by one row at a time (arrows/j/k), so navigating a long list is slow; PgUp/PgDn unexpectedly move the preview pane instead.
  4. The list pane is narrow and titles truncate. The two-pane layout gives the list only ~36% of width (history gets ~64%), so session rows (id + title + count + mode + relative time) are squeezed and titles get cut on the right even on wide terminals.

Affected: anyone who uses /sessions / Ctrl-R to resume or inspect sessions, especially with many sessions per workspace.

Proposed solution

  1. Hide empty auto-created sessions in the picker — apply the existing is_empty_auto_created_session filter in the picker's session projection so it matches the launch list and --continue behavior. (One filter condition; no new concept.)
  2. Highlight and identify the current session — mark the row that matches app.current_session_id (e.g. a current tag / distinct style) when the picker opens from a live session; and expose the current session id somewhere usable (status line hint or a /session id-style command), closing the same gap behind Resume hint omits session id; run --continue is ambiguous with multiple sessions per workspace #6001.
  3. Make PgUp/PgDn scroll the list when it owns focus — page the session list by a viewport per press (like the history pane already does for previews), with focus rules for list vs preview (exact behavior is an open question; see below).
  4. Give the list pane a fairer share of width — evaluate 50/50 or list-first split when there is enough terminal width, and consider dropping the id from the row when a meaningful title exists (id stays as a secondary/status detail).

Use case

  • Open /sessions after a long work week: the list is clean (no "Session" rows), the row you are working in is visibly marked, and you can page down through 40+ sessions to find the one you want instead of arrow-keying line by line.
  • You need to codewhale exec --session <id> or reference the current session: id is shown without digging.
  • On a 141-column terminal the list shows actual titles instead of truncated ones.

Alternatives considered

Impact

Every /sessions user. Medium-high: the empty-session fix removes visible noise, the current-session highlight answers a common "which one am I in" question, and paging is the difference between a usable and an annoying list past ~20 sessions. All four are picker-only changes; no session-store or data-model changes.

Additional context

Open questions (for maintainers)

  • Focus model for paging: should PgUp/PgDn always page the list (relegating preview scrolling to arrows/secondary keys), or switch focus list↔preview first (e.g. Tab), or page whichever pane is focused? (Variant A: list-only paging; B: focus-switch + per-pane paging; C: keep preview on PgUp/PgDn, add dedicated list page keys.)
  • Current-session indicator: inline tag (current), distinct color, or a footer/status line showing session id for the active session — which is preferred given the TUI visual language?
  • Width: rebalance to 50/50 vs dense rows (drop id when a real title exists) vs keep layout and only fix truncation math.

Acceptance criteria

  • Empty auto-created sessions (0 messages, default title) are not listed in /sessions / Ctrl-R (consistent with launch list and --continue)
  • When the picker is opened from a live session, the current session row is visually marked; some surface prints the current session id (status line or command)
  • PgUp/PgDn page the session list by one viewport per press (per the chosen focus model)
  • Session rows show meaningful titles without truncation on 141-column terminals (list pane widened or row densified)
  • Archived / all-workspace toggles (e, x, a) and / search still behave unchanged

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    • Status
      Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions