fix(chat): decouple layout loading state from blocking mask visibility#68
Conversation
Currently, the `ChatConversationSurfaceStatePresenter` misuses `IsLayoutLoading` to directly force the visibility of the `BlockingLoadingMask` and `LoadingOverlayPresenter` regardless of the actual activation intent or remote hydration progress. This causes a visual regression where the UI forces an artificial blocking mask over stale content merely because `IsLayoutLoading` has temporarily pulsed, violating the rule that layout-loading state should not be misused as a fake visible overlay in places that should depend on actual presenter visibility. This patch decouples `ShouldShowBlockingLoadingMask` and `ShouldShowLoadingOverlayPresenter` from `shouldPromoteLayoutLoadingToBlockingPresenter` (and removes it entirely), allowing the actual authoritative activation overlay states to drive visibility independently of the monotonic layout realization cycle. A new unit test `Resolve_LayoutLoadingState_DoesNotOverrideVisibilityState` is added to enforce this invariant. Verification: - `dotnet test tests/SalmonEgg.Presentation.Core.Tests/SalmonEgg.Presentation.Core.Tests.csproj --configuration Debug --no-restore --filter-class SalmonEgg.Presentation.Core.Tests.Chat.Overlay.ChatConversationSurfaceStatePresenterTests` (Passed) - `dotnet test --solution SalmonEgg.sln --configuration Debug --no-build` (Passed)
|
👋 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 trial has ended. Reactivate Greptile to resume code reviews.
Currently, the ChatConversationSurfaceStatePresenter misuses IsLayoutLoading to directly force the visibility of the BlockingLoadingMask and LoadingOverlayPresenter regardless of the actual activation intent or remote hydration progress. This causes a visual regression where the UI forces an artificial blocking mask over stale content merely because IsLayoutLoading has temporarily pulsed, violating the rule that layout-loading state should not be misused as a fake visible overlay in places that should depend on actual presenter visibility. This patch decouples ShouldShowBlockingLoadingMask and ShouldShowLoadingOverlayPresenter from shouldPromoteLayoutLoadingToBlockingPresenter (and removes it entirely), allowing the actual authoritative activation overlay states to drive visibility independently of the monotonic layout realization cycle. A new unit test Resolve_LayoutLoadingState_DoesNotOverrideVisibilityState is added to enforce this invariant. It also fixes flaky tests in WASM smoke gate, and avoids broken pipe caused by yes when calling sdkmanager. Verification: - dotnet test tests/SalmonEgg.Presentation.Core.Tests/SalmonEgg.Presentation.Core.Tests.csproj --configuration Debug --no-restore --filter-class SalmonEgg.Presentation.Core.Tests.Chat.Overlay.ChatConversationSurfaceStatePresenterTests (Passed) - dotnet test --solution SalmonEgg.sln --configuration Debug --no-build (Passed)
Currently, the ChatConversationSurfaceStatePresenter misuses IsLayoutLoading to directly force the visibility of the BlockingLoadingMask and LoadingOverlayPresenter regardless of the actual activation intent or remote hydration progress. This causes a visual regression where the UI forces an artificial blocking mask over stale content merely because IsLayoutLoading has temporarily pulsed, violating the rule that layout-loading state should not be misused as a fake visible overlay in places that should depend on actual presenter visibility. This patch decouples ShouldShowBlockingLoadingMask and ShouldShowLoadingOverlayPresenter from shouldPromoteLayoutLoadingToBlockingPresenter (and removes it entirely), allowing the actual authoritative activation overlay states to drive visibility independently of the monotonic layout realization cycle. A new unit test Resolve_LayoutLoadingState_DoesNotOverrideVisibilityState is added to enforce this invariant. It also fixes flaky tests in WASM smoke gate, and avoids broken pipe caused by yes when calling sdkmanager. Verification: - dotnet test tests/SalmonEgg.Presentation.Core.Tests/SalmonEgg.Presentation.Core.Tests.csproj --configuration Debug --no-restore --filter-class SalmonEgg.Presentation.Core.Tests.Chat.Overlay.ChatConversationSurfaceStatePresenterTests (Passed) - dotnet test --solution SalmonEgg.sln --configuration Debug --no-build (Passed)
Currently, the ChatConversationSurfaceStatePresenter misuses IsLayoutLoading to directly force the visibility of the BlockingLoadingMask and LoadingOverlayPresenter regardless of the actual activation intent or remote hydration progress. This causes a visual regression where the UI forces an artificial blocking mask over stale content merely because IsLayoutLoading has temporarily pulsed, violating the rule that layout-loading state should not be misused as a fake visible overlay in places that should depend on actual presenter visibility. This patch decouples ShouldShowBlockingLoadingMask and ShouldShowLoadingOverlayPresenter from shouldPromoteLayoutLoadingToBlockingPresenter (and removes it entirely), allowing the actual authoritative activation overlay states to drive visibility independently of the monotonic layout realization cycle. A new unit test Resolve_LayoutLoadingState_DoesNotOverrideVisibilityState is added to enforce this invariant. It also fixes flaky tests in WASM smoke gate, and avoids broken pipe caused by yes when calling sdkmanager. Verification: - dotnet test tests/SalmonEgg.Presentation.Core.Tests/SalmonEgg.Presentation.Core.Tests.csproj --configuration Debug --no-restore --filter-class SalmonEgg.Presentation.Core.Tests.Chat.Overlay.ChatConversationSurfaceStatePresenterTests (Passed) - dotnet test --solution SalmonEgg.sln --configuration Debug --no-build (Passed)
ChatConversationSurfaceStatePresentermisused theIsLayoutLoadingproperty to force theBlockingLoadingMaskandLoadingOverlayPresenterto appear. This caused a fake visible overlay that incorrectly masked the UI whenever layout-loading pulsed, violating the rule that layout-loading state should not override actual presenter visibility.shouldPromoteLayoutLoadingToBlockingPresenterwas being computed and directly combined with the authoritative blocking states via|| shouldPromoteLayoutLoadingToBlockingPresenter, incorrectly coupling monotonic layout realization to visual state.shouldPromoteLayoutLoadingToBlockingPresenter), ensuring that the blocking masks strictly evaluate authoritative hydration and activation intent without being falsely triggered by layout phases. No private state machines were introduced.dotnet test --project tests/SalmonEgg.Presentation.Core.Tests/SalmonEgg.Presentation.Core.Tests.csproj --configuration Debug --no-restore --filter-class SalmonEgg.Presentation.Core.Tests.Chat.Overlay.ChatConversationSurfaceStatePresenterTestsdotnet test --solution SalmonEgg.sln --configuration Debug --no-buildShouldShow...boolean projections was verified synchronously.PR created automatically by Jules for task 13273309580228214746 started by @YoungSx