Skip to content

Re-evaluate Hera pane size-drift kick on Ctrl+Z fullscreen toggle - #1064

Merged
anutron merged 2 commits into
masterfrom
argus/argus-agent-death/fix-zoom-width
Oct 19, 2026
Merged

anutron merged 2 commits into
masterfrom
argus/argus-agent-death/fix-zoom-width

Conversation

@anutron

@anutron anutron commented Oct 19, 2026

Copy link
Copy Markdown
Collaborator

Problem

Ctrl+Z zoom of a Hera pane changes its width without rebinding it. maybeKickPaneRerender's per-bind kickedFor gate then short-circuited, so the size-drift kill+resume never re-ran. The zoomed pane kept split-width (88) history, and unzoom kept zoom-width content in the narrow pane, until a rebind (leaving and returning to the TUI) re-evaluated.

Fix (TUI-side only; no supervisor/protocol change)

  • HeraPage.Draw flags a one-frame layoutShifted when the fullscreen/focus layout changes.
  • maybeKickPaneRerender re-arms behind a fresh KickDebounce dwell only if the pane's last-seen width moved. Rapid toggling collapses into one evaluation, and isRedundantAttach still dedupes same-width repeats.
  • maybeKickRerenderAtWidth's "kick in flight" early return now calls onDeferred, so a toggle landing mid-restart retries.
  • uxlog: non-forced PTY resize ([terminalpane] pty resize OLD -> NEW), fullscreen width-change re-arm, and kick evaluation.
  • Gotcha added in hera-view.md and index.md. No OpenSpec change (bug fix, no new behavior surface).

Tests

  • TestPanes_FullscreenToggleRearmsKick (red before the fix)
  • TestRerender_InFlightKickInvokesOnDeferred
  • TestTerminalPane_NonForcedResizeIsLogged
  • make test-cover-gate passes (88.8%). make vuln fails on stdlib CVEs, which CI treats as advisory. fmt-check and lint-pr passed.

🤖 Generated with Claude Code

anutron and others added 2 commits October 19, 2026 14:22
A fullscreen toggle changes the focused pane's width without rebinding it,
so the per-bind kickedFor gate swallowed the re-evaluation and the zoomed
pane kept split-width history (and unzoom kept zoom-width content). Re-arm
behind a fresh KickDebounce dwell when a layout shift moves the width; retry
when a kick is already in flight; log non-forced PTY resizes.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@anutron
anutron force-pushed the argus/argus-agent-death/fix-zoom-width branch from a7fb345 to 1479278 Compare October 19, 2026 21:25
@github-actions

Copy link
Copy Markdown

Merging this branch will increase overall coverage

Impacted Packages Coverage Δ 🤖
github.com/drn/argus/internal/tui 84.05% (+0.00%) 👍
github.com/drn/argus/internal/tui/hera 93.28% (+0.04%) 👍
github.com/drn/argus/internal/tui/terminal 96.40% (+0.01%) 👍

Coverage by file

Changed files (no unit tests)

Changed File Coverage Δ Total Covered Missed 🤖
github.com/drn/argus/internal/tui/app.go 81.05% (+0.05%) 3098 (+3) 2511 (+4) 587 (-1) 👍
github.com/drn/argus/internal/tui/hera/page.go 92.71% (+0.05%) 425 (+3) 394 (+3) 31 👍
github.com/drn/argus/internal/tui/hera/panes.go 95.43% (+0.25%) 175 (+9) 167 (+9) 8 👍
github.com/drn/argus/internal/tui/terminal/terminalpane.go 96.93% (+0.01%) 1010 (+2) 979 (+2) 31 👍

Please note that the "Total", "Covered", and "Missed" counts above refer to code statements instead of lines of code. The value in brackets refers to the test coverage of that file in the old version of the code.

Changed unit test files

  • github.com/drn/argus/internal/tui/app_rerender_test.go
  • github.com/drn/argus/internal/tui/hera/panes_test.go
  • github.com/drn/argus/internal/tui/terminal/terminalpane_test.go

@anutron
anutron merged commit d1caf53 into master Oct 19, 2026
1 check 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.

1 participant