--- # claudbg-6dgc title: Table overflows terminal — truncate long columns and respect terminal width status: completed type: bug priority: normal created_at: 2026-03-30T04:36:31Z updated_at: 2026-03-30T05:06:58Z parent: claudbg-tci9 --- ## Problem `sessions list` table overflows the terminal width. The project path column is the main culprit — full paths like `/run/media/pop/4e1ca4f1-.../Projects/src/github.com/pop/claudbg` make rows far too wide. ## Current behavior `src/output/table.rs` hardcodes `FALLBACK_WIDTH = 200` and applies `.max(FALLBACK_WIDTH)`, so the table is *always at least 200 chars wide* regardless of the actual terminal. No `ColumnConstraint` is applied to any column. ## Expected behavior - The table should never exceed the actual terminal width (use `terminal_size` or `comfy_table`'s built-in terminal detection). - The project path column should be truncated to show the **last** N characters (tail of the path), since the trailing project name is more meaningful than the leading `/run/media/...` prefix. E.g. display `…/pop/claudbg` instead of `/run/media/pop/4e1ca4f1-…`. - Other columns (ID, date, model, message count) should not be truncated. - comfy-table supports `ColumnConstraint::MaxWidth` and `ColumnConstraint::LowerBoundary` — use these to cap the project column. ## Relevant files - `src/output/table.rs` — `render_table`, `FALLBACK_WIDTH` constant - `src/commands/sessions.rs` — `list()` function that calls `render_table` ## Summary of Changes - Removed hardcoded FALLBACK_WIDTH=200 from table.rs; table now uses ContentArrangement::Dynamic for automatic terminal width fitting - In sessions list(), truncate project path to last ~40 chars with ellipsis prefix when longer