Skip to content

fix: render the end state when a view animation completes - #420

Merged
forketyfork merged 1 commit into
mainfrom
fix/stale-frame-after-view-animation
Oct 29, 2026
Merged

forketyfork merged 1 commit into
mainfrom
fix/stale-frame-after-view-animation

Conversation

@forketyfork

Copy link
Copy Markdown
Owner

TLDR

When you open a terminal in full screen, a blue tint from the opening animation can stay on the screen. It stays until the terminal shows new output or you move the mouse. This change makes the app draw one more frame when an animation ends, so the tint goes away immediately.

Issue

After expanding a grid tile to full screen, the blue focus tint (the fill and border drawn on a focused grid tile) stayed visible on the expanded terminal. With an active terminal it went away after a moment; with an idle one it stayed until the mouse moved.

The frame loop demands frames only while the view mode is animating. On the loop iteration that moves the mode to its end state (for example Expanding → Full), the mode no longer counts as animating, and nothing else asks for a frame. The last presented frame is therefore an in-between one, rendered as a focused grid tile, and it stays until terminal output or user input triggers a repaint. Pans between full-screen sessions had the same gap. Collapse and grid resize happened to work because their completion marks sessions dirty, but they still waited for the output cadence.

Solution

  • frame_schedule.Demand gains animation_settled, an interactive (render-now) demand that does not keep continuous pacing.
  • The runtime sets it whenever an expand, collapse, pan, or grid-resize animation completes, so the end state renders on the same iteration.
  • CLAUDE.md records the rule so new view-mode transitions report their settle frame.

Test plan

  • With an idle shell in a grid tile, expand it to full screen and do not move the mouse: no blue tint or border should remain once the animation ends.
  • Pan between full-screen sessions and collapse back to the grid: the final frame should look settled without moving the mouse.

Issue: After switching a tile to full screen, the blue focus tint from the
expand animation stayed on screen, sometimes briefly and sometimes until the
mouse moved.
Solution: The frame loop only demanded frames while a view mode was still
animating. On the iteration that moved the mode to its end state nothing
demanded a frame, so the last in-between frame (drawn as a focused grid tile
with its blue fill) stayed presented until unrelated output or input arrived.
The frame scheduler now has an explicit animation_settled demand that the
runtime sets whenever an expand, collapse, pan, or grid-resize animation
completes, so the end state is rendered immediately.
@forketyfork
forketyfork requested a balanced review from Copilot October 29, 2026 07:37
@forketyfork
forketyfork marked this pull request as ready for review October 29, 2026 07:37

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟢 Approval recommended

No active review issues were identified for the animation settle-frame change, though builds and tests were not run during review.

No open issues 🎉

What changed in this PR

Fixes lingering animation visuals in Architect by requesting an immediate final frame when a view animation completes, without keeping continuous rendering active.

Changes:

  • Reports completion of expand, collapse, pan, and grid-resize animations to the frame scheduler.
  • Adds an animation_settled demand and a regression test for immediate end-state rendering.
  • Documents the settle-frame requirement in CLAUDE.md.

Builds and tests were not run during this review.

File Description
src/​app/​runtime.zig Signals animation completion to request a final frame.
src/​app/​frame_schedule.zig Adds immediate settle-frame demand and regression coverage.
CLAUDE.md Documents the final-frame scheduling requirement.

Review effort: Balanced

@forketyfork
forketyfork merged commit dc9bc08 into main Oct 29, 2026
5 checks passed
@forketyfork
forketyfork deleted the fix/stale-frame-after-view-animation branch October 29, 2026 07:43
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.

2 participants