You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
claudbg/.beans/claudbg-0yk4--tui-session-m...

16 lines
708 B
Markdown

---
# claudbg-0yk4
title: 'TUI: session message count always shows 0'
status: completed
type: bug
priority: normal
created_at: 2026-03-31T23:45:03Z
updated_at: 2026-04-01T05:49:51Z
---
In the TUI session list, the message count column always shows 0. The message count is not being populated from the database or computed correctly for the TUI.
## Summary of Changes
In `src/tui/run.rs`: after building the session list from disk discovery, open the DB and query `session_id, COALESCE(project_path, ''), message_count` from the sessions table. Use `tokio::task::block_in_place` to run the async DB query from the synchronous TUI startup. Populate `msg_count` on each `SessionListItem` from the DB result.