Skip to content

TUI: Grow the controls panel to fit wrapped controls - #7083

Merged
mperham merged 1 commit into
sidekiq:mainfrom
hammadxcm:fix-tui-controls-footer-clipping
Sep 29, 2026
Merged

mperham merged 1 commit into
sidekiq:mainfrom
hammadxcm:fix-tui-controls-footer-clipping

Conversation

@hammadxcm

Copy link
Copy Markdown
Contributor

Summary

Since #7052 the TUI controls wrap onto as many lines as the terminal width needs, but the controls panel is still a fixed constraint_length(5): 2 control lines, the footer, and 2 borders. When the controls need 3 lines, the footer is pushed out of the panel. That hides the Redis/Now/Locale line and, more importantly, the filter text being typed.

At the default 80-column width, English locale:

Tab Control lines at 80 cols 100 120
Scheduled / Retries / Dead 3 2 2
Busy / Queues 2 2 1
Home / Metrics 1 1 1

Longer translations make this happen at wider widths too.

Change

  • Move the row-splitting from TUI#render_controls into BaseTab#control_rows(width), same width estimate as before.
  • render computes the rows first and sizes the panel as [rows, 2].max + 3, so panels with 2 or fewer control lines keep the current height of 5.
  • render_controls renders the rows it's given. Everything else is unchanged.

Testing

  • New #control_rows test in test/tui_test.rb: every described control ends up in a row, every row fits the width, and a narrow width produces more than 2 rows. The test goes through BaseTab, so it doesn't need ratatui_ruby loaded, same as the existing TUI tests.
  • bundle exec rake is green (standard + lint:herb + full suite).

Since sidekiq#7052 the controls wrap onto as many lines as the terminal width
requires, but the panel is still a fixed 5 rows tall (2 control lines +
footer + borders). At 80 columns the Scheduled, Retries and Dead tabs
need 3 control lines, which pushes the footer out of the panel, hiding
the Redis/time/locale line and the filter being typed.

Move the row splitting into BaseTab#control_rows and size the panel
from it, keeping the previous minimum of 2 control lines.
@mperham
mperham merged commit 861101a into sidekiq:main Sep 29, 2026
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants