Skip to content

refactor(status): extract view height padding helper#606

Merged
tw93 merged 2 commits intotw93:mainfrom
teee32:fix/status-resize-ghost-lines
Mar 20, 2026
Merged

refactor(status): extract view height padding helper#606
tw93 merged 2 commits intotw93:mainfrom
teee32:fix/status-resize-ghost-lines

Conversation

@teee32
Copy link
Copy Markdown

@teee32 teee32 commented Mar 20, 2026

Summary

Extract the terminal-height padding logic in mo status into a dedicated helper.

The ghost-line fix itself has already landed via #601. This PR now keeps the helper-style refactor on top of the merged implementation.

What changed

  • add padViewToHeight(view, height) in cmd/status/main.go
  • replace the inline height-padding block in View() with the helper
  • no behavior change intended

Tests

  • go test ./cmd/status

@teee32 teee32 requested a review from tw93 as a code owner March 20, 2026 10:32
@tw93 tw93 force-pushed the fix/status-resize-ghost-lines branch from 65f3331 to 92c2244 Compare March 20, 2026 22:48
@tw93 tw93 changed the title fix(status): pad TUI output to prevent resize ghost lines refactor(status): extract view height padding helper Mar 20, 2026
Copy link
Copy Markdown

@youxi798 youxi798 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good!

@tw93 tw93 force-pushed the fix/status-resize-ghost-lines branch from 92c2244 to 78fe1d1 Compare March 20, 2026 22:55
Copy link
Copy Markdown
Owner

@tw93 tw93 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@FelixLyfe I pulled in latest main and resolved the merge conflict in cmd/status/main.go. I kept the current main branch view structure, including the full-height padding logic, and reapplied the read-only high-CPU alert bar on top of it. The branch is pushed and the PR is mergeable again.

I also re-ran go test for cmd/status after resolving the conflict, and it passed.

@tw93 tw93 merged commit 2c2249b into tw93:main Mar 20, 2026
@FelixLyfe
Copy link
Copy Markdown
Contributor

FelixLyfe commented Mar 21, 2026 via email

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.

4 participants