Skip to content

fix: ensure Chat UI layout-loading states are monotonic#64

Open
google-labs-jules[bot] wants to merge 1 commit into
mainfrom
fix-layout-loading-monotonicity-5057594848030374984
Open

fix: ensure Chat UI layout-loading states are monotonic#64
google-labs-jules[bot] wants to merge 1 commit into
mainfrom
fix-layout-loading-monotonicity-5057594848030374984

Conversation

@google-labs-jules

Copy link
Copy Markdown
Contributor

The bug reported loading layout state regressions for the Chat component when temporary overlays are presented. As detailed in the repository lifecycle guidelines, ShouldLoad... properties governing visual tree realizations must be kept distinct from visual visibility ShouldShow... and importantly must be monotonic (never unset) after being loaded. This fixes it in ChatConversationSurfaceProjectionCoordinator and enforces it in tests.

  • Observed problem: ShouldLoadActiveConversationRoot and ShouldLoadTranscriptSurface were directly tied to visibility and lost state when overlaid.
  • Root cause: ChatConversationSurfaceProjectionCoordinator didn't maintain internal latching for the ShouldLoad projections.
  • Why fix is safe: By preserving standard WinUI/Uno XAML cross-platform optimization, layout inflation doesn't occur unnecessarily and XAML state correctly persists while hidden. No business logic is pushed to the views.
  • Exact verification run: dotnet test tests/SalmonEgg.Presentation.Core.Tests/SalmonEgg.Presentation.Core.Tests.csproj --configuration Debug --no-build
  • Remaining risks: GUI smoke checks around hydration transitions should ideally run on targeted WASM devices but unit tests guarantee view-model expectations strictly adhere to the contract.

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

Addresses lifecycle flaw where UI components (ActiveConversationRoot and TranscriptSurface) would be prematurely unloaded from the visual tree when a temporary blocking overlay was displayed, destroying state and hurting performance.

- Added monotonic logic (`_hasLoaded...`) to `ChatConversationSurfaceProjectionCoordinator` using logical OR to ensure `ShouldLoad...` properties stay true once triggered.
- Updated `ChatConversationSurfaceProjectionCoordinatorTests` to verify `ShouldLoad...` states remain true even when `ShouldShow...` evaluates to false.
- Verified test coverage via `ChatViewModelTests`.
@vercel

vercel Bot commented Jun 30, 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 Jun 30, 2026 11:05pm

@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.

@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.

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