Skip to content

Cache full-view terminal content#288

Merged
forketyfork merged 2 commits intomainfrom
feat/full-view-terminal-cache
Apr 13, 2026
Merged

Cache full-view terminal content#288
forketyfork merged 2 commits intomainfrom
feat/full-view-terminal-cache

Conversation

@forketyfork
Copy link
Copy Markdown
Owner

@forketyfork forketyfork commented Apr 13, 2026

Fixes #284

Summary

This change brings steady-state full-screen rendering onto the same cached-content model Architect already uses for grid tiles. The renderer now reuses a cached full-view terminal texture when the focused session has not changed, while still keeping overlays live unless an active wave effect needs them baked into the cached texture.

Changes

  • Route steady-state full-view rendering through the shared cached-session path instead of rerasterizing the full terminal every frame.
  • Track cache composition so the renderer can tell whether a cached texture contains terminal content only or terminal content plus overlays for wave effects.
  • Add renderer tests that cover unchanged-frame reuse, epoch-based invalidation, and the overlay-baked cache case.
  • Update the architecture guide to document that renderer caching now applies to both grid tiles and steady-state full view.

Test plan

  • Open a terminal in full view and confirm cursor, selection, and scrollbar visuals still update correctly while terminal output is otherwise unchanged.
  • Trigger an attention or navigation wave in grid mode and confirm the animated session still shows the expected overlays during the wave.

Issue: Implement issue #284 by avoiding unnecessary rerasterization when the focused full-screen terminal has not changed.

Solution: Route steady-state full-view rendering through the shared cached session path already used for grid rendering. Track whether a cached texture contains only terminal content or content plus overlays so wave effects stay correct while steady-state overlays remain live. Add focused renderer tests for cache reuse and invalidation, and update the architecture docs to describe the new caching behavior.
@forketyfork forketyfork marked this pull request as ready for review April 13, 2026 13:05
@forketyfork forketyfork requested a review from Copilot April 13, 2026 13:05
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR extends Architect’s existing per-session texture caching model so steady-state full-screen terminal rendering can reuse cached content instead of rerasterizing the terminal surface every frame, while keeping overlays live except when wave effects require baking overlays into the cached texture.

Changes:

  • Unifies grid and full-view steady-state rendering through a shared cached-session rendering path.
  • Tracks cache “composition” (content-only vs content+overlays) to support wave effects without overlay artifacts.
  • Updates architecture documentation and adds predicate-level tests for cache refresh decisions.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
src/render/renderer.zig Introduces cache composition tracking and a shared renderSessionCached path used by both grid tiles and full view; adds tests for refresh predicate logic.
docs/ARCHITECTURE.md Documents that renderer caching now applies to both grid tiles and steady-state full view, and elaborates on epoch-based invalidation.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/render/renderer.zig
Comment thread docs/ARCHITECTURE.md Outdated
Comment thread src/render/renderer.zig Outdated
Issue: Address the unresolved review feedback on PR #288 about full-view cache retention, inaccurate architecture wording, and a misleading test name.

Solution: Release unfocused session caches during steady-state full view so Architect does not accumulate full-window textures as focus moves between sessions. Update the architecture text to describe epoch mismatch rather than a less-than check, and rename the predicate-level test so it matches what the test actually verifies.
@forketyfork forketyfork merged commit 8398891 into main Apr 13, 2026
4 checks passed
@forketyfork forketyfork deleted the feat/full-view-terminal-cache branch April 13, 2026 13:56
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.

[Feature]: Cache full-screen terminal content to avoid unnecessary full-view rerasterization

2 participants