Fix monotonic layout realization during temporary overlay visibility#63
Fix monotonic layout realization during temporary overlay visibility#63google-labs-jules[bot] wants to merge 2 commits into
Conversation
* Separates ShouldLoad realization logic from ShouldShow visual state. * Ensures layout-loading states are monotonic and do not regress (unload) when a temporary blocking overlay appears. * Fixes unintended UI unloading during fast session swaps, maintaining scroll position and visual continuity on resume.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
👋 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. |
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.
* Separates ShouldLoad realization logic from ShouldShow visual state. * Ensures layout-loading states are monotonic and do not regress (unload) when a temporary blocking overlay appears. * Fixes unintended UI unloading during fast session swaps, maintaining scroll position and visual continuity on resume. * Also fixed paths in source inspection tests to prevent Linux runner failures.
Observed Problem:
When temporary overlay blocking masks (like hydration history overlays or session connection swap loading states) become visible over the chat root, the underlying UI controls inadvertently un-realized entirely, regressing their loaded state. This led to loss of scroll position and a visually discontinuous flash/flicker upon the overlay dismissing.
Root Cause:
The view model projection mapped
ShouldLoadActiveConversationRootandShouldLoadTranscriptSurfacedirectly to their respectiveShouldShow...visual visibility predicates. When visibility dropped tofalsedue to an overlay intercepting input and covering the screen, the layout un-realized because of its directx:Loadbinding correlation. The intended lifecycle rule (layout realization should be monotonic once activated) was missed.Architectural Safety of the Fix:
This fix simply introduces stateful latches (
_hasLoadedActiveConversationRoot,_hasLoadedTranscriptSurface) to theChatConversationSurfaceProjectionCoordinatorstrictly on the view model projection layer. It separates UI visualization state from underlying structural realization bounds. It does not introduce any hacky view code-behinds or side effect state machines.Verification Commands Run:
dotnet build SalmonEgg.sln --configuration Debug dotnet test tests/SalmonEgg.Presentation.Core.Tests/SalmonEgg.Presentation.Core.Tests.csproj --configuration Debug --no-restoreAll unit tests, including adjusted projection overlay state machine assertions, passed successfully.
Unverified GUI-Only Risks:
Since this is a ViewModel-only fix that relies on Uno's standard
x:Loadhandling to respect monotonic true bindings, there is a minor unverified assumption that the underlying XAML platforms correctly suspend layout passes (rather than just drawing) for realized but collapsed (Visibility.Collapsed) surfaces. This is standard behavior but would require a full GUI/Windows test loop if we needed pixel-perfect confirmation of the hidden states.PR created automatically by Jules for task 16915579745302439965 started by @YoungSx