Skip to content

fix: honor terminal width for dumb terminals#3895

Merged
jjallaire merged 4 commits into
UKGovernmentBEIS:mainfrom
he-yufeng:fix/dumb-terminal-columns
May 11, 2026
Merged

fix: honor terminal width for dumb terminals#3895
jjallaire merged 4 commits into
UKGovernmentBEIS:mainfrom
he-yufeng:fix/dumb-terminal-columns

Conversation

@he-yufeng
Copy link
Copy Markdown
Contributor

Summary

  • honor COLUMNS when Rich is running under TERM=dumb
  • pass a fallback height with the width override so Rich does not fall back to 80 columns
  • add regression coverage for COLUMNS / LINES parsing

Part of #3841.

This does not implement the full structured JSON/plain log output requested in the issue. It fixes the concrete dumb-terminal width bug identified in the thread so long non-TTY logs can be captured without the 80-column Rich fallback.

To verify

  • python -m py_compile src/inspect_ai/_display/core/rich.py tests/display/test_rich.py
  • python -m pytest tests/display/test_rich.py -q
  • ruff check src/inspect_ai/_display/core/rich.py tests/display/test_rich.py

@he-yufeng he-yufeng force-pushed the fix/dumb-terminal-columns branch from c600140 to f4e981d Compare May 10, 2026 19:55
@jjallaire jjallaire merged commit 00b83e7 into UKGovernmentBEIS:main May 11, 2026
11 of 15 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