Repository navigation
fix: keep offscreen kitty images loaded instead of resending them on scroll - #4686
Conversation
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (6)
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 8 remain after this review. 📝 WalkthroughWalkthroughThe change adds Kitty image fingerprint lookup through the terminal and runtime layers. Fingerprint cache entries remain available while their images are stored, including when hidden. Scene collection uses fingerprints to validate offscreen images and retains eligible assets within limits of 16 images and 64 MiB. Headless tests cover reuse, replacement, deletion, deferred delivery, and eviction. Suggested reviewers: Priority: ➖ Normal Merge Risk: ⚪ Minimal · up to Offscreen image retention follows the intended eviction order and decoded-memory limit. No merge-blocking issue was identified. Security Architecture ReviewSecurity architecture risk: 🔵 Low · up to Previously delivered images can now remain loaded while offscreen. Pane ownership, image-identity checks, and retention limits constrain the change, and no security vulnerability was verified. Memory accounting and reconnect behavior are not fully established. Retained concerns Security review detailsSecurity Blast Radius
Trust Boundaries and Controls
Resilience and Maintainability Implications
Hardening Proposals
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
@coderabbitai review |
✅ Action performedReview finished.
|
|
7cc71db to
8f97e8f
Compare
|
@coderabbitai review |
✅ Action performedReview finished.
|
what was wrong
scrolling an agent UI with images (pi, alt screen) hung. when an image scrolled out of view herdr deleted it from the outer terminal, so every time it scrolled back herdr re-sent the full pixels server → client → terminal. pi itself only sends tiny "place image N here" commands and keeps up to 16 hidden images loaded, so outside herdr the same scroll is instant.
what this does
retained_assetsscene field with recently hidden images whose current pane image still matches the delivered fingerprint (deleted or replaced images drop out). the client already keeps retained images loaded, so no wire or client change. bounded like pi's own cache: 16 images / 64 MiB decoded, most recently visible first.numbers
pi-style scroller, 12 images, full sweep down and back (bytes herdr writes to the terminal):
retained text update (
render_scale_profile_retained_graphics, newoffscreencase):hidden images cost what a visible image already costs on master: clients reject row patches while
retained_assetsis non-empty, so text updates keep going out as surface messages. making that cheap needs a negotiated client capability, left for a follow-up.tests
manually checked with pi, terminal-browser, yazi, and
kitten icatin a fresh session.not in this pr
a=phas no stablep=; cheapest fix is on pi's side