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.
31 lines
1.5 KiB
Markdown
31 lines
1.5 KiB
Markdown
---
|
|
# claudbg-6dgc
|
|
title: Table overflows terminal — truncate long columns and respect terminal width
|
|
status: todo
|
|
type: bug
|
|
priority: normal
|
|
created_at: 2026-03-30T04:36:31Z
|
|
updated_at: 2026-03-30T04:41:14Z
|
|
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`
|