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-6dgc--table-overflo...

1.7 KiB

title status type priority created_at updated_at parent
Table overflows terminal — truncate long columns and respect terminal width completed bug normal 2026-03-30T04:36:31Z 2026-03-30T05:06:58Z 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.rsrender_table, FALLBACK_WIDTH constant
  • src/commands/sessions.rslist() 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