Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@
}

private static T? FindAncestorOrSelf<T>(DependencyObject? start, Func<T, bool>? predicate = null)
where T : DependencyObject
where T : class, DependencyObject

Check failure on line 140 in SalmonEgg/SalmonEgg/Presentation/Views/Discover/DiscoverSessionsPage.xaml.cs

View workflow job for this annotation

GitHub Actions / Build and Test

'DependencyObject': cannot specify both a constraint class and the 'class' or 'struct' constraint

Check failure on line 140 in SalmonEgg/SalmonEgg/Presentation/Views/Discover/DiscoverSessionsPage.xaml.cs

View workflow job for this annotation

GitHub Actions / Build and Test

'DependencyObject': cannot specify both a constraint class and the 'class' or 'struct' constraint
{
var current = start;
while (current is not null)
Expand All @@ -154,7 +154,7 @@
}

private static T? FindDescendant<T>(DependencyObject root, Func<T, bool> predicate)
where T : DependencyObject
where T : class, DependencyObject

Check failure on line 157 in SalmonEgg/SalmonEgg/Presentation/Views/Discover/DiscoverSessionsPage.xaml.cs

View workflow job for this annotation

GitHub Actions / Build and Test

'DependencyObject': cannot specify both a constraint class and the 'class' or 'struct' constraint

Check failure on line 157 in SalmonEgg/SalmonEgg/Presentation/Views/Discover/DiscoverSessionsPage.xaml.cs

View workflow job for this annotation

GitHub Actions / Build and Test

'DependencyObject': cannot specify both a constraint class and the 'class' or 'struct' constraint
{
var count = VisualTreeHelper.GetChildrenCount(root);
for (var i = 0; i < count; i++)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@
}

private static T? FindAncestorOrSelf<T>(DependencyObject? start)
where T : DependencyObject
where T : class, DependencyObject

Check failure on line 200 in SalmonEgg/SalmonEgg/Presentation/Views/Settings/DiagnosticsSettingsPage.xaml.cs

View workflow job for this annotation

GitHub Actions / Build and Test

'DependencyObject': cannot specify both a constraint class and the 'class' or 'struct' constraint
{
var current = start;
while (current is not null)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@
{
var current = interactiveControls[i];
current.XYFocusUp = i == 0 ? navItem : interactiveControls[i - 1];
current.XYFocusDown = i + 1 < interactiveControls.Length

Check warning on line 267 in SalmonEgg/SalmonEgg/Presentation/Views/SettingsShellPage.xaml.cs

View workflow job for this annotation

GitHub Actions / Browser WASM Smoke Gates

Possible null reference assignment.

Check warning on line 267 in SalmonEgg/SalmonEgg/Presentation/Views/SettingsShellPage.xaml.cs

View workflow job for this annotation

GitHub Actions / Browser WASM Smoke Gates

Possible null reference assignment.

Check warning on line 267 in SalmonEgg/SalmonEgg/Presentation/Views/SettingsShellPage.xaml.cs

View workflow job for this annotation

GitHub Actions / Build and Test

Possible null reference assignment.

Check warning on line 267 in SalmonEgg/SalmonEgg/Presentation/Views/SettingsShellPage.xaml.cs

View workflow job for this annotation

GitHub Actions / Build and Test

Possible null reference assignment.
? interactiveControls[i + 1]
: null;
}
Expand Down Expand Up @@ -401,7 +401,7 @@
}

private static T? FindDescendant<T>(DependencyObject root, Func<T, bool> predicate)
where T : DependencyObject
where T : class, DependencyObject

Check failure on line 404 in SalmonEgg/SalmonEgg/Presentation/Views/SettingsShellPage.xaml.cs

View workflow job for this annotation

GitHub Actions / Build and Test

'DependencyObject': cannot specify both a constraint class and the 'class' or 'struct' constraint
{
var count = VisualTreeHelper.GetChildrenCount(root);
for (var i = 0; i < count; i++)
Expand All @@ -423,7 +423,7 @@
}

private static System.Collections.Generic.IEnumerable<T> FindDescendants<T>(DependencyObject root, Func<T, bool> predicate)
where T : DependencyObject
where T : class, DependencyObject

Check failure on line 426 in SalmonEgg/SalmonEgg/Presentation/Views/SettingsShellPage.xaml.cs

View workflow job for this annotation

GitHub Actions / Build and Test

'DependencyObject': cannot specify both a constraint class and the 'class' or 'struct' constraint
{
var count = VisualTreeHelper.GetChildrenCount(root);
for (var i = 0; i < count; i++)
Expand All @@ -442,7 +442,7 @@
}

private static T? FindAncestorOrSelf<T>(DependencyObject? start, Func<T, bool>? predicate = null)
where T : DependencyObject
where T : class, DependencyObject

Check failure on line 445 in SalmonEgg/SalmonEgg/Presentation/Views/SettingsShellPage.xaml.cs

View workflow job for this annotation

GitHub Actions / Build and Test

'DependencyObject': cannot specify both a constraint class and the 'class' or 'struct' constraint
{
var current = start;
while (current is not null)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -162,18 +162,18 @@
continue;
}

button.XYFocusLeft = i > 0

Check warning on line 165 in SalmonEgg/SalmonEgg/Presentation/Views/Start/StartView.xaml.cs

View workflow job for this annotation

GitHub Actions / Browser WASM Smoke Gates

Possible null reference assignment.

Check warning on line 165 in SalmonEgg/SalmonEgg/Presentation/Views/Start/StartView.xaml.cs

View workflow job for this annotation

GitHub Actions / Browser WASM Smoke Gates

Possible null reference assignment.

Check warning on line 165 in SalmonEgg/SalmonEgg/Presentation/Views/Start/StartView.xaml.cs

View workflow job for this annotation

GitHub Actions / Build and Test

Possible null reference assignment.

Check warning on line 165 in SalmonEgg/SalmonEgg/Presentation/Views/Start/StartView.xaml.cs

View workflow job for this annotation

GitHub Actions / Build and Test

Possible null reference assignment.
? FindSuggestionButton(ViewModel.Suggestions[i - 1].AutomationId)
: null;
button.XYFocusRight = i + 1 < ViewModel.Suggestions.Count

Check warning on line 168 in SalmonEgg/SalmonEgg/Presentation/Views/Start/StartView.xaml.cs

View workflow job for this annotation

GitHub Actions / Browser WASM Smoke Gates

Possible null reference assignment.

Check warning on line 168 in SalmonEgg/SalmonEgg/Presentation/Views/Start/StartView.xaml.cs

View workflow job for this annotation

GitHub Actions / Browser WASM Smoke Gates

Possible null reference assignment.

Check warning on line 168 in SalmonEgg/SalmonEgg/Presentation/Views/Start/StartView.xaml.cs

View workflow job for this annotation

GitHub Actions / Build and Test

Possible null reference assignment.

Check warning on line 168 in SalmonEgg/SalmonEgg/Presentation/Views/Start/StartView.xaml.cs

View workflow job for this annotation

GitHub Actions / Build and Test

Possible null reference assignment.
? FindSuggestionButton(ViewModel.Suggestions[i + 1].AutomationId)
: null;
button.XYFocusDown = FindPromptBox();

Check warning on line 171 in SalmonEgg/SalmonEgg/Presentation/Views/Start/StartView.xaml.cs

View workflow job for this annotation

GitHub Actions / Browser WASM Smoke Gates

Possible null reference assignment.

Check warning on line 171 in SalmonEgg/SalmonEgg/Presentation/Views/Start/StartView.xaml.cs

View workflow job for this annotation

GitHub Actions / Browser WASM Smoke Gates

Possible null reference assignment.

Check warning on line 171 in SalmonEgg/SalmonEgg/Presentation/Views/Start/StartView.xaml.cs

View workflow job for this annotation

GitHub Actions / Build and Test

Possible null reference assignment.

Check warning on line 171 in SalmonEgg/SalmonEgg/Presentation/Views/Start/StartView.xaml.cs

View workflow job for this annotation

GitHub Actions / Build and Test

Possible null reference assignment.
}
}

private static T? FindDescendant<T>(DependencyObject root, Func<T, bool> predicate)
where T : DependencyObject
where T : class, DependencyObject

Check failure on line 176 in SalmonEgg/SalmonEgg/Presentation/Views/Start/StartView.xaml.cs

View workflow job for this annotation

GitHub Actions / Build and Test

'DependencyObject': cannot specify both a constraint class and the 'class' or 'struct' constraint
{
var count = VisualTreeHelper.GetChildrenCount(root);
for (var i = 0; i < count; i++)
Expand All @@ -195,7 +195,7 @@
}

private static T? FindAncestorOrSelf<T>(DependencyObject? current)
where T : DependencyObject
where T : class, DependencyObject

Check failure on line 198 in SalmonEgg/SalmonEgg/Presentation/Views/Start/StartView.xaml.cs

View workflow job for this annotation

GitHub Actions / Build and Test

'DependencyObject': cannot specify both a constraint class and the 'class' or 'struct' constraint
{
while (current is not null)
{
Expand Down
2 changes: 1 addition & 1 deletion global.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"Uno.Sdk": "6.5.33"
},
"sdk": {
"version": "10.0.202",
"version": "10.0.103",
"rollForward": "latestPatch",
"allowPrerelease": false
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,31 @@ namespace SalmonEgg.Presentation.Core.ViewModels.Chat.Overlay;

internal sealed class ChatConversationSurfaceProjectionCoordinator
{
private bool _hasLoadedActiveConversationRoot;
private bool _hasLoadedTranscriptSurface;

public ChatConversationSurfaceProjection Project(ChatConversationSurfaceStateInput input)
{
var state = ChatConversationSurfaceStatePresenter.Resolve(input);

if (state.ShouldShowActiveConversationRoot)
{
_hasLoadedActiveConversationRoot = true;
}

if (state.ShouldShowTranscriptSurface)
{
_hasLoadedTranscriptSurface = true;
}

return new ChatConversationSurfaceProjection(
state.IsActivationOverlayVisible,
state.IsOverlayVisible,
state.ShouldShowActiveConversationRoot,
state.ShouldShowActiveConversationRoot,
_hasLoadedActiveConversationRoot,
state.ShouldShowSessionHeader,
state.ShouldShowTranscriptSurface,
state.ShouldShowTranscriptSurface,
_hasLoadedTranscriptSurface,
state.ShouldShowConversationInputSurface,
state.ShouldShowBlockingLoadingMask,
state.ShouldShowLoadingOverlayStatusPill,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10078,10 +10078,10 @@ await fixture.UpdateStateAsync(state => state with
runtimeState.IsSessionActivationInProgress = true;

Assert.False(fixture.ViewModel.ShouldShowActiveConversationRoot);
Assert.False(fixture.ViewModel.ShouldLoadActiveConversationRoot);
Assert.True(fixture.ViewModel.ShouldLoadActiveConversationRoot);
Assert.False(fixture.ViewModel.ShouldShowSessionHeader);
Assert.False(fixture.ViewModel.ShouldShowTranscriptSurface);
Assert.False(fixture.ViewModel.ShouldLoadTranscriptSurface);
Assert.True(fixture.ViewModel.ShouldLoadTranscriptSurface);
Assert.False(fixture.ViewModel.ShouldShowConversationInputSurface);
Assert.Equal(SessionNamePolicy.CreateDefault("conv-1"), fixture.ViewModel.CurrentSessionDisplayName);
Assert.Equal(string.Empty, fixture.ViewModel.PresentedSessionHeaderDisplayName);
Expand Down Expand Up @@ -11138,10 +11138,10 @@ await fixture.DispatchConnectionAsync(new SetNewSessionDraftAction(new NewSessio
syncContext.RunAll();

Assert.False(fixture.ViewModel.ShouldShowActiveConversationRoot);
Assert.False(fixture.ViewModel.ShouldLoadActiveConversationRoot);
Assert.True(fixture.ViewModel.ShouldLoadActiveConversationRoot);
Assert.False(fixture.ViewModel.ShouldShowSessionHeader);
Assert.False(fixture.ViewModel.ShouldShowTranscriptSurface);
Assert.False(fixture.ViewModel.ShouldLoadTranscriptSurface);
Assert.True(fixture.ViewModel.ShouldLoadTranscriptSurface);
Assert.False(fixture.ViewModel.ShouldShowConversationInputSurface);

var switchTask = fixture.ViewModel.SwitchConversationAsync("conv-2");
Expand All @@ -11158,10 +11158,10 @@ await fixture.DispatchConnectionAsync(new SetNewSessionDraftAction(new NewSessio
syncContext.RunAll();

Assert.False(fixture.ViewModel.ShouldShowActiveConversationRoot);
Assert.False(fixture.ViewModel.ShouldLoadActiveConversationRoot);
Assert.True(fixture.ViewModel.ShouldLoadActiveConversationRoot);
Assert.False(fixture.ViewModel.ShouldShowSessionHeader);
Assert.False(fixture.ViewModel.ShouldShowTranscriptSurface);
Assert.False(fixture.ViewModel.ShouldLoadTranscriptSurface);
Assert.True(fixture.ViewModel.ShouldLoadTranscriptSurface);
Assert.False(fixture.ViewModel.ShouldShowConversationInputSurface);
Assert.Equal("conv-2", runtimeState.DesiredSessionId);
Assert.True(runtimeState.IsSessionActivationInProgress);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public void Project_WhenActiveConversationRootWasShown_KeepsLoadStateWhenLaterHi
Assert.True(visible.ShouldShowActiveConversationRoot);
Assert.True(visible.ShouldLoadActiveConversationRoot);
Assert.False(hidden.ShouldShowActiveConversationRoot);
Assert.False(hidden.ShouldLoadActiveConversationRoot);
Assert.True(hidden.ShouldLoadActiveConversationRoot);
}

[Fact]
Expand Down Expand Up @@ -97,6 +97,6 @@ public void Project_WhenTranscriptSurfaceWasShown_KeepsLoadStateWhenLaterHidden(
Assert.True(visible.ShouldShowTranscriptSurface);
Assert.True(visible.ShouldLoadTranscriptSurface);
Assert.False(hidden.ShouldShowTranscriptSurface);
Assert.False(hidden.ShouldLoadTranscriptSurface);
Assert.True(hidden.ShouldLoadTranscriptSurface);
}
}
Loading