-
Notifications
You must be signed in to change notification settings - Fork 194
Description
After upgrading to 0.26.3, the TUI session list shows "No Sessions Yet" even though sessions exist. The header bar at the top shows the correct session count (e.g. "x 1 error" or "o 1 waiting"), but the list panel is completely empty.
what happened
I had 18 sessions stuck in error state because my tmux server wasnt running. Removed all of them with ad rm, created new ones, restarted AD. The new sessions show up fine in ad list but the TUI just shows the empty state. Creating sessions or groups through the TUI also doesnt help, the creation dialog works but afterwards youre back to the empty screen.
root cause
loadUIState() restores the persisted status filter from sqlite metadata on startup. If all sessions matching that filter have been removed, rebuildFlatItems() produces an empty flatItems slice because the filter matches nothing. The header bar is not affected because it reads counts from h.instances directly.
The filter also gets re-persisted every few seconds by the tick loop (saveUIState()), so manually clearing it from the DB while the TUI is running doesnt help since it gets overwritten immediately.
repro
- have sessions in a specific status (e.g. error, idle)
- the status filter gets activated and persisted (pressing #, $, etc)
- remove all sessions with that status
- create new sessions with a different status
- restart AD
- session list is empty, header shows correct count
workaround
quit AD completely, then clear the filter manually:
sqlite3 ~/.agent-deck/profiles/default/state.db \
"UPDATE metadata SET value='{\"preview_mode\":0,\"status_filter\":\"\"}' WHERE key='ui_state';"
important: AD must not be running when you do this, otherwise the tick loop overwrites it within seconds.
fix
opened #362 with a small fix that auto-clears the filter in rebuildFlatItems() when filtering would result in an empty list but sessions actually exist.
version: 0.26.3
os: macOS (darwin arm64)