Skip to content

fix(chat): decouple layout loading state from blocking mask visibility#68

Open
google-labs-jules[bot] wants to merge 4 commits into
mainfrom
fix-layout-loading-overlay-presenter-13273309580228214746
Open

fix(chat): decouple layout loading state from blocking mask visibility#68
google-labs-jules[bot] wants to merge 4 commits into
mainfrom
fix-layout-loading-overlay-presenter-13273309580228214746

Conversation

@google-labs-jules

Copy link
Copy Markdown
Contributor
  • Problem: The ChatConversationSurfaceStatePresenter misused the IsLayoutLoading property to force the BlockingLoadingMask and LoadingOverlayPresenter to 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.
  • Root Cause: The property shouldPromoteLayoutLoadingToBlockingPresenter was being computed and directly combined with the authoritative blocking states via || shouldPromoteLayoutLoadingToBlockingPresenter, incorrectly coupling monotonic layout realization to visual state.
  • Safety/Architecture: The fix is safe because it merely removes the incorrect fallback (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.
  • Verification Run:
    • 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.ChatConversationSurfaceStatePresenterTests
    • dotnet test --solution SalmonEgg.sln --configuration Debug --no-build
  • Remaining GUI Risks: None, as the core logic governing the ShouldShow... boolean projections was verified synchronously.

PR created automatically by Jules for task 13273309580228214746 started by @YoungSx

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)
@google-labs-jules

Copy link
Copy Markdown
Contributor Author

👋 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 @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

@vercel

vercel Bot commented Jul 19, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
salmonegg Ready Ready Preview, Comment Jul 19, 2026 12:56am

@greptile-apps greptile-apps Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants