tui: /sessions hides the current-session indicator when the current session is running

Aperta Adatta ai principianti
#66,585 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
68/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
typescript
Ambito
frontend

Direzione di ricerca

Leggi packages/tui/src/component/dialog-session-list.tsx e packages/tui/src/ui/dialog-select.tsx, quindi confronta come vengono visualizzati la colonna di stato delle sessioni e il marcatore della sessione corrente. Esamina come contesto il comportamento di selezione correlato in #63954. Il lavoro è completato quando la sessione attualmente in esecuzione rimane visibilmente identificabile in /sessions; verifica la visualizzazione degli stati in esecuzione e che richiedono attenzione.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

area/tui platform/linux type/feature version/v2

Summary

When opening the TUI session switcher (/sessions / Ctrl+X L) while the current session is running, the current-session indicator (▪, the blue rectangle) disappears completely, leaving no visual indication of which session you were on. Combined with /sessions opening with the selection highlight on the top row rather than the current session (#63954), switching sessions while work is running is confusing and disorienting.

Environment

  • opencode version: 2.4.2
  • Client: TUI
  • Model and provider: Not relevant
  • OS: Linux 7.0.0-44-generic (x86_64)
  • Terminal: TERM_PROGRAM=tmux, TERM=tmux-256color, COLORTERM=truecolor
  • Shell: /bin/bash
  • Install/channel: latest
  • Active plugins: ~/.config/opencode/plugins/alice-and-bot/index.js (no terminal plugins in cli.json)

Reproduction

  1. Open OpenCode TUI (v2.4.2, default new-designs enabled) with multiple sessions in the session list.
  2. Send a prompt in the current session so it enters the running state (or has a running child session).
  3. While it is still running, open the session switcher with /sessions or Ctrl+X L.
  4. Observe the row for the session you were just viewing and which row is initially highlighted/marked.

Expected Behavior

  • The current session should remain clearly marked (e.g., showing the current-session indicator ▪ alongside or distinct from the running spinner, and/or distinct styling) even while it is running or awaiting attention.
  • The active/current-session marker and focus should clearly identify the session you are currently in, rather than leaving focus on another row at the top of the list with no current-session indicator visible.

Actual Behavior

  • While the current session is running, the running spinner replaces the gutter and suppresses the current-session ▪ indicator completely.
  • Because new-designs also does not tint the title text for props.current, the current running session is visually indistinguishable from any other running session in the list.
  • Because /sessions also passes focusCurrent={false}, the selection bar (┃ / row highlight) sits on the top session in the list instead of the current session, making it easy to lose track of where you were.

Additional Context

  • Reproducible consistently on v2.4.2.
  • Code pointers (v2.4.2):
    • packages/tui/src/ui/dialog-select.tsx: DialogSelectRow renders the ▪ current indicator only when props.current && !props.gutter, and only colors title text for props.current when !newDesigns().
    • packages/tui/src/component/dialog-session-list.tsx: sessionStatusGutter(...) returns a <Spinner /> (or !/? attention icon) as gutter, which makes props.gutter truthy and hides the current-session indicator. The same sessionStatusGutter pattern is used in packages/tui/src/component/dialog-open.tsx.
    • Related: #63954 (focusCurrent={false} in dialog-session-list.tsx places the initial selection on row 0 instead of the current session).
Lingua principale
TypeScript
Stelle
228k
Fork
31k
Merge medio
5h 19m
PR unite (30g)
457

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di anomalyco/opencode

Tutte le issue di anomalyco/opencode

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.