Skip to content

fix(cli): remove post-response blank padding in TUI#4397

Closed
helix4u wants to merge 1 commit intoNousResearch:mainfrom
helix4u:codex/remove-cli-prompt-padding
Closed

fix(cli): remove post-response blank padding in TUI#4397
helix4u wants to merge 1 commit intoNousResearch:mainfrom
helix4u:codex/remove-cli-prompt-padding

Conversation

@helix4u
Copy link
Copy Markdown

@helix4u helix4u commented Apr 1, 2026

What does this PR do?

Removes the extra post-response newline padding in the CLI TUI.

The CLI was inserting a large block of blank lines after each response to push the prompt lower in the terminal. In practice, this created a giant empty gap after short replies and made the interface feel broken during normal chat use.

This change removes that spacer output so the prompt appears directly after the response again.

Related Issue

N/A

Type of Change

  • 🐛 Bug fix (non-breaking change that fixes an issue)
  • ✅ Tests (adding or improving test coverage)

Changes Made

  • Removed the post-response newline padding block in cli.py
  • Added a small foreground turn cleanup helper to keep the behavior testable
  • Added a regression test in tests/test_cli_prompt_spacing.py to verify CLI turn cleanup does not emit blank spacer output

How to Test

  1. Run hermes
  2. Send a short message in the CLI
  3. Verify the prompt appears directly after the response, without a large blank gap
  4. Repeat with a few short turns to confirm the terminal no longer accumulates large blank spacer blocks

Checklist

Code

  • I've read the Contributing Guide
  • My commit messages follow Conventional Commits (fix(scope):, feat(scope):, etc.)
  • I searched for existing PRs to make sure this isn't a duplicate
  • My PR contains only changes related to this fix/feature (no unrelated commits)
  • I've run pytest tests/ -q and all tests pass
  • I've added tests for my changes
  • I've tested on my platform: Linux

Documentation & Housekeeping

  • I've updated relevant documentation (README, docs/, docstrings) — or N/A
  • I've updated cli-config.yaml.example if I added/changed config keys — or N/A
  • I've updated CONTRIBUTING.md or AGENTS.md if I changed architecture or workflows — or N/A
  • I've considered cross-platform impact (Windows, macOS) per the compatibility guide — or N/A
  • I've updated tool descriptions/schemas if I changed tool behavior — or N/A

Screenshots / Logs

Before:

  • Short CLI responses left a large blank block before the next prompt

After:

  • The prompt appears immediately after the response with no artificial vertical padding

Test Notes

Targeted tests for this change pass:

  • pytest tests/test_cli_prompt_spacing.py -q
  • pytest tests/test_cli_background_tui_refresh.py -q

I also ran the full suite with pytest tests/ -v, but it is not fully green on the current branch/worktree. The failures I saw were outside this CLI spacing change, including existing failures in:

  • tests/gateway/test_api_server.py
  • tests/test_api_key_providers.py
  • tests/test_cli_init.py
  • tests/agent/test_auxiliary_client.py
  • tests/hermes_cli/test_models.py
  • tests/tools/test_delegate.py
  • tests/tools/test_tirith_security.py
  • tests/tools/test_file_read_guards.py
@helix4u
Copy link
Copy Markdown
Author

helix4u commented Apr 1, 2026

before: image
after:
image

@helix4u helix4u marked this pull request as ready for review April 1, 2026 04:07
@helix4u helix4u closed this Apr 1, 2026
@helix4u
Copy link
Copy Markdown
Author

helix4u commented Apr 1, 2026

handed off for a different fix.

@helix4u helix4u deleted the codex/remove-cli-prompt-padding branch April 1, 2026 08:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

1 participant