Skip to content

Conversation

@linw1995
Copy link
Owner

Summary

This PR improves the TUI experience for small terminal sizes by making the UI more responsive and space-efficient.

Changes

Compact Mode for Input Block (chat.rs)

  • Added a compact mode that activates when terminal width < 100 characters
  • In compact mode, moves context usage indicator and model indicator from bottom to top of the input block
  • This balances the visual layout and prevents bottom indicators from overwhelming small screens
  • Normal mode (wider screens) keeps the original layout with indicators at the bottom

Adaptive Shortcut Hints Panel (shortcut_hints.rs)

  • Made the shortcut hints panel width adaptive to fit available screen space
  • Previously fixed at 120+ characters, now shrinks to fit with minimal margins (4 chars reserved)
  • Ensures the popup remains usable on smaller screens without horizontal overflow

Related Issue

Fixes #125 - The TUI now adapts layouts to fit available space and ensures essential controls remain accessible on small screen sizes.

@linw1995 linw1995 added the enhancement New feature or request label Jan 29, 2026
@codecov-commenter
Copy link

Codecov Report

❌ Patch coverage is 0% with 19 lines in your changes missing coverage. Please review.
✅ Project coverage is 47.67%. Comparing base (a46f02c) to head (6019f8d).
⚠️ Report is 13 commits behind head on dev.

Files with missing lines Patch % Lines
crates/coco-tui/src/components/chat.rs 0.00% 17 Missing ⚠️
crates/coco-tui/src/components/shortcut_hints.rs 0.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##              dev     #157      +/-   ##
==========================================
- Coverage   50.22%   47.67%   -2.56%     
==========================================
  Files          93      100       +7     
  Lines       25033    27266    +2233     
==========================================
+ Hits        12574    12999     +425     
- Misses      12459    14267    +1808     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@linw1995 linw1995 merged commit 9620ec3 into dev Jan 29, 2026
3 checks passed
@linw1995 linw1995 deleted the feature/tui-small-screen branch January 29, 2026 11:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature: Improve TUI experience on small screen sizes

3 participants