fix(chat): ensure layout loading states are monotonic during lifecycle overlays#54
Conversation
…e overlays - Update ChatConversationSurfaceProjectionCoordinator to maintain true for ShouldLoadActiveConversationRoot and ShouldLoadTranscriptSurface once they evaluate to true. - Add tests to verify load state is kept when surface is later hidden.
|
👋 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.
…e overlays - Update ChatConversationSurfaceProjectionCoordinator to maintain true for ShouldLoadActiveConversationRoot and ShouldLoadTranscriptSurface once they evaluate to true. - Add tests to verify load state is kept when surface is later hidden. - Fix indentation and format issues in ChatViewModelTests and wasm-settings-navigation-smoke
…e overlays - Update ChatConversationSurfaceProjectionCoordinator to maintain true for ShouldLoadActiveConversationRoot and ShouldLoadTranscriptSurface once they evaluate to true. - Add tests to verify load state is kept when surface is later hidden. - Fix indentation and format issues in ChatViewModelTests and wasm-settings-navigation-smoke
…e overlays - Update ChatConversationSurfaceProjectionCoordinator to maintain true for ShouldLoadActiveConversationRoot and ShouldLoadTranscriptSurface once they evaluate to true. - Add tests to verify load state is kept when surface is later hidden. - Fix indentation and format issues in ChatViewModelTests and wasm-settings-navigation-smoke - Fix AcpConnectionSettingsXamlTests assert that failed on CI
|
Closing during PR triage: this is a stale or duplicate layout-loading monotonicity attempt. #49 is the clean green candidate for this behavior; this PR is superseded, failing/conflicting, or mixed-scope and should not be merged as-is. |
Understood. Acknowledging that this work is now obsolete and stopping work on this task. |
The Observed Problem
When navigating or switching sessions, temporary blocking overlays (like the session switch or history loading overlay) cause the chat components to temporarily evaluate
ShouldShowActiveConversationRootandShouldShowTranscriptSurfaceto false. BecauseShouldLoad...properties were directly mirroringShouldShow..., this caused the underlying layout items (bound tox:Load) to be completely unloaded and destroyed. When the overlay cleared, the visual tree had to be expensively reconstructed, causing UI stutter and violating the layout realization contract.The Root Cause
In
ChatConversationSurfaceProjectionCoordinator, the projection blindly mappedShouldShowstates directly toShouldLoadstates:This violates the Uno Platform best practice and repository
AGENTS.mdrules which state: "In the Uno Platform UI lifecycle, separate layout realization (ShouldLoad...properties typically bound tox:Load) from visual state visibility (ShouldShow...properties). Layout-loading states should be monotonic and not regress (un-load) merely because a temporary blocking overlay becomes visible."Why the Fix is Safe Architecturally
The fix simply introduces internal boolean tracking (
_hasLoadedActiveConversationRoot,_hasLoadedTranscriptSurface) within theChatConversationSurfaceProjectionCoordinator. Once the layout evaluates that it needs to be shown (and thus loaded), theShouldLoadprojection permanently returnstruefor the lifecycle of that coordinator instance.ShouldShow...logic, so the UI is still correctly hidden/collapsed when overlays appear.x:Loadpatterns: once loaded, it stays in the visual tree and visibility is controlled independently.ChatConversationSurfaceProjectionCoordinatorTests.Exact Verification Commands Run
dotnet build SalmonEgg.sln --configuration Debugdotnet test tests/SalmonEgg.Presentation.Core.Tests/SalmonEgg.Presentation.Core.Tests.csproj --configuration Debug --no-restore(Note: Tested specifically theChatConversationSurfaceProjectionCoordinatorTestsandChatViewModelTeststo ensure our changes passed)Any Remaining Unverified GUI-only Risks
PR created automatically by Jules for task 15362945017983675042 started by @YoungSx