Repository navigation
fix(tui): preserve wrapped sidebar todo height - #57530
ozandogrultan wants to merge 5 commits into
Conversation
|
The following comment was made by an LLM, it may be inaccurate: |
There was a problem hiding this comment.
The fix works. I copied the new test onto the base, where 16 of its 24 cases fail: wrapped todos get squeezed and the blank row before the next section is lost. With this PR all 24 pass. The packages/tui typecheck and the test/feature-plugins tests pass too.
The public API is unchanged.
With only the built-in plugins, Todo is the last section in the sidebar, so this only shows up when a plugin adds a section after it that can grow.
The test is the one thing worth changing. It runs 24 cases (count × width × wrapped × completed) over 109 lines for a one-line layout fix. One case would cover the fix: about 4 wrapped todos at width 40, followed by a section that can grow. Or drop the test to keep the change minimal.
There was a problem hiding this comment.
Thanks for cutting the test down to one case; that addresses my earlier point.
I ran the #57529 reproduction from source on the base and with this PR. It adds a plugin section that can grow after Todo and has the model write four long todos. On the base the todos get clipped and overlap, and the blank row before the next section is gone. With this PR all four todos keep their full wrapped height and the blank row stays. The new test fails on the base and passes here. The test/feature-plugins tests and the packages/tui typecheck pass.
The public API is unchanged.
No further concerns.


Issue for this PR
Closes #57529
Type of change
What does this PR do?
Prevent the sidebar Todo container from flex-shrinking below its wrapped content. This keeps todo labels intact and preserves the existing gap before the next section, without adding padding.
Add one real-component renderer regression with four wrapped todos at width 40, followed by a section that can grow.
How did you verify your code works?
bun run checkpass.Screenshots / recordings
Before (left) / after (right):
Rendered from recorded terminal cells using synthetic data, not an OS screenshot.
Checklist