Skip to content

fix: grow hook output window dynamically instead of pre-allocating blank lines#237

Merged
avihut merged 3 commits intomasterfrom
fix/hook-dynamic-window-size
Feb 19, 2026
Merged

fix: grow hook output window dynamically instead of pre-allocating blank lines#237
avihut merged 3 commits intomasterfrom
fix/hook-dynamic-window-size

Conversation

@avihut
Copy link
Owner

@avihut avihut commented Feb 18, 2026

Summary

  • Remove pre-allocation of separator and tail ProgressBar slots in start_job — no blank lines appear before any output arrives
  • Add lazy growth in update_job_output: window starts at 0 lines and grows one slot per output line until the configured maximum (default 6), then rolls
  • Uses a 4-phase borrow-split pattern to work around Rust's aliasing rules between self.jobs and self.mp

Test Plan

  • test_dynamic_window_starts_empty — tail count is 0 after start_job with no output
  • test_dynamic_window_grows_with_output — count increments 1 per line up to max
  • test_dynamic_window_caps_at_max — count stays at max after cap; buffer holds all lines
  • test_dynamic_window_zero_output_no_separator — silent jobs finish cleanly with no bars allocated
  • All 350 unit + 179 integration tests pass

Fixes #236

🤖 Generated with Claude Code

avihut and others added 3 commits February 18, 2026 22:53
@avihut avihut added this to the v1.1.0 milestone Feb 19, 2026
@avihut avihut added bug Something isn't working fix Bug fix labels Feb 19, 2026
@avihut avihut self-assigned this Feb 19, 2026
@avihut avihut merged commit 41f3264 into master Feb 19, 2026
6 checks passed
@avihut avihut deleted the fix/hook-dynamic-window-size branch February 19, 2026 06:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working fix Bug fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant