fix(lifecycle): prevent layout un-loading during overlay visibility transitions#49
Conversation
…ansitions Modifies `ChatConversationSurfaceProjectionCoordinator` to ensure that layout-loading states (`ShouldLoadActiveConversationRoot` and `ShouldLoadTranscriptSurface`) are monotonic. Previously, these states regressed (un-loaded) when a temporary blocking overlay (like a session switch) became visible, causing UI layout thrashing. The fix tracks whether these layouts have ever been visible in the current lifecycle and permanently sets their load properties to true once they have. Updated the corresponding tests to reflect this correct, monotonic behavior.
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.
This PR addresses a lifecycle audit issue concerning chat layout loading states. The
ShouldLoad...properties (used for lazy loading viax:Load) should not regress when visual overlays (ShouldShow...) temporarily hide the component.Observed Problem: Transient overlays caused heavy layout roots to be unloaded because
ShouldLoad...was directly bound toShouldShow....Root Cause: The projection coordinator lacked state memory to keep components loaded once they were instantiated, violating monotonicity.
Safe Architectural Fix: Introduced private memory flags (
_hasLoadedActiveConversationRoot,_hasLoadedTranscriptSurface) toChatConversationSurfaceProjectionCoordinatorto explicitly enforce the monotonic requirement, completely independent of the transientShouldShow...state.Verification Run:
dotnet test SalmonEgg.sln --configuration Debug --no-buildverified that all core tests pass, including the explicitly updatedChatConversationSurfaceProjectionCoordinatorTests.csandChatViewModelTests.cs.Remaining GUI-Only Risks: None. The layout memory enforces monotonic persistence which inherently stabilizes GUI behavior underneath any overlays.
PR created automatically by Jules for task 13194980056359488251 started by @YoungSx