-
-
Notifications
You must be signed in to change notification settings - Fork 4
Rebuild chat desktop shell as native WinUI 3 #1339
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
PrzemyslawKlys
wants to merge
35
commits into
master
Choose a base branch
from
codex/chat-winui3-review-20260610
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 31 commits
Commits
Show all changes
35 commits
Select commit
Hold shift + click to select a range
43cfef6
Rebuild chat shell as native WinUI
PrzemyslawKlys f8e64fe
Use shared runtime for persisted native conversations
PrzemyslawKlys 6fb0d0c
Use typed shared artifact contracts
PrzemyslawKlys 7f69f8d
Remove obsolete native UI planning artifacts
PrzemyslawKlys c334e00
Preserve typed fence diagnostics in native rendering
PrzemyslawKlys 5b909f6
Harden native shell startup and history rendering
PrzemyslawKlys 146ef07
Reuse the workspace empty chat draft
PrzemyslawKlys 6475dbe
Share desktop service launch profile mapping
PrzemyslawKlys c12b17f
Block sign-in races during native turns
PrzemyslawKlys baed0a3
Support offline OfficeIMO release validation
PrzemyslawKlys 472856a
Share image override activation across desktop shells
PrzemyslawKlys c638802
Unify native desktop state and request policy
PrzemyslawKlys f7483d0
Order chat admission before execution
PrzemyslawKlys e945b08
Harden native chat state and request handling
PrzemyslawKlys 92302c7
Preserve concurrent desktop conversation updates
PrzemyslawKlys 6d67a74
Synchronize merged desktop conversation metadata
PrzemyslawKlys 773da02
Refresh live metadata from persisted conversations
PrzemyslawKlys 95101ca
Restore native WinUI chat interaction
PrzemyslawKlys b23649b
Scope chat send shortcut to composer
PrzemyslawKlys bf0f7d5
Improve native chat rendering and scrolling
PrzemyslawKlys 94e862e
Unify native and legacy chat behavior
PrzemyslawKlys 838dc03
Complete shared chat parity and scrolling
PrzemyslawKlys e79ed99
Polish native chat tables and visual workspaces
PrzemyslawKlys 6703062
Fix WinUI chat interaction and streaming fidelity
PrzemyslawKlys 9700a5d
Complete native chat review follow-through
PrzemyslawKlys b157099
Fix WinUI runtime profile authority and artifact rendering
PrzemyslawKlys 677f6d0
Fix WinUI settings and authentication handoff
PrzemyslawKlys 7950680
Fix WinUI state merge and export parity
PrzemyslawKlys 6a00512
Fix native chat scrolling and startup readiness
PrzemyslawKlys f3cee24
Preserve settings and queued turns across windows
PrzemyslawKlys 8dcb9a0
Centralize desktop conversation state merging
PrzemyslawKlys e9a865b
Centralize desktop profile prompt behavior
PrzemyslawKlys c8efc3c
Harden native chat state transitions
PrzemyslawKlys 640f05e
Harden first native request safety
PrzemyslawKlys 340324d
Harden native WinUI chat baseline
PrzemyslawKlys File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 21 additions & 0 deletions
21
IntelligenceX.Chat/IntelligenceX.Chat.Abstractions/Policy/SessionRuntimeIdentityDto.cs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| namespace IntelligenceX.Chat.Abstractions.Policy; | ||
|
|
||
| /// <summary> | ||
| /// Identifies the provider runtime that is active inside the chat service. | ||
| /// </summary> | ||
| public sealed record SessionRuntimeIdentityDto { | ||
| /// <summary> | ||
| /// Optional persisted service profile that supplied the runtime settings. | ||
| /// </summary> | ||
| public string? ProfileName { get; init; } | ||
|
|
||
| /// <summary> | ||
| /// Canonical provider transport token such as native or compatible-http. | ||
| /// </summary> | ||
| public required string Transport { get; init; } | ||
|
|
||
| /// <summary> | ||
| /// Effective service model, when the runtime exposes one. | ||
| /// </summary> | ||
| public string? Model { get; init; } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
66 changes: 66 additions & 0 deletions
66
IntelligenceX.Chat/IntelligenceX.Chat.App.Tests/ChatAppLaunchModeResolverTests.cs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,66 @@ | ||
| using System; | ||
| using System.Collections.Generic; | ||
| using IntelligenceX.Chat.App; | ||
| using Xunit; | ||
|
|
||
| namespace IntelligenceX.Chat.App.Tests; | ||
|
|
||
| /// <summary> | ||
| /// Tests the app launch contract without constructing WinUI windows. | ||
| /// </summary> | ||
| public sealed class ChatAppLaunchModeResolverTests { | ||
| /// <summary> | ||
| /// Ensures normal launches use the native WinUI shell instead of the legacy WebView shell. | ||
| /// </summary> | ||
| [Fact] | ||
| public void Resolve_DefaultsToNativeWinUi() { | ||
| var mode = ChatAppLaunchModeResolver.Resolve(_ => null); | ||
|
|
||
| Assert.Equal(ChatAppLaunchMode.NativeWinUI, mode); | ||
| } | ||
|
|
||
| /// <summary> | ||
| /// Ensures the legacy WebView shell remains available only as an explicit escape hatch. | ||
| /// </summary> | ||
| [Fact] | ||
| public void Resolve_UsesLegacyWebViewWhenExplicitlyRequested() { | ||
| var mode = ChatAppLaunchModeResolver.Resolve(CreateEnvironment( | ||
| (ChatAppLaunchModeResolver.LegacyWebViewEnvVar, "1"))); | ||
|
|
||
| Assert.Equal(ChatAppLaunchMode.LegacyWebView, mode); | ||
| } | ||
|
|
||
| /// <summary> | ||
| /// Ensures diagnostic launch modes continue to outrank the normal shell selection. | ||
| /// </summary> | ||
| [Theory] | ||
| [InlineData(ChatAppLaunchModeResolver.MinimalWindowEnvVar, nameof(ChatAppLaunchMode.MinimalWindow))] | ||
| [InlineData(ChatAppLaunchModeResolver.WebViewSmokeEnvVar, nameof(ChatAppLaunchMode.WebViewSmoke))] | ||
| public void Resolve_PreservesDiagnosticLaunchModes(string variableName, string expectedName) { | ||
| var mode = ChatAppLaunchModeResolver.Resolve(CreateEnvironment( | ||
| (variableName, "true"), | ||
| (ChatAppLaunchModeResolver.LegacyWebViewEnvVar, "true"))); | ||
|
|
||
| Assert.Equal(expectedName, mode.ToString()); | ||
| } | ||
|
|
||
| /// <summary> | ||
| /// Ensures the old native opt-in flag is harmless because native WinUI is now the default. | ||
| /// </summary> | ||
| [Fact] | ||
| public void Resolve_TreatsNativeWinUiFlagAsNoOpCompatibilitySignal() { | ||
| var mode = ChatAppLaunchModeResolver.Resolve(CreateEnvironment( | ||
| (ChatAppLaunchModeResolver.NativeWinUiEnvVar, "1"))); | ||
|
|
||
| Assert.Equal(ChatAppLaunchMode.NativeWinUI, mode); | ||
| } | ||
|
|
||
| private static Func<string, string?> CreateEnvironment(params (string Name, string Value)[] values) { | ||
| var map = new Dictionary<string, string?>(StringComparer.OrdinalIgnoreCase); | ||
| foreach (var value in values) { | ||
| map[value.Name] = value.Value; | ||
| } | ||
|
|
||
| return name => map.TryGetValue(name, out var value) ? value : null; | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With the normal package-mode path (
UseLocalNativeMarkdownEnginesunset or no sibling OfficeIMO checkout), the app and export projects consume these defaults. The commit's ownInternalDocs/chat-native-winui/native-chat-product-plan.mdstates that the public OfficeIMO packages remain on 2.0.1 while 2.0.2 is only validated from local source, so a clean package-mode restore requests unavailable 2.0.2 packages and cannot build or package the desktop app. Keep the NuGet defaults at published versions and reserve 2.0.2 for the explicit local-project path.Useful? React with 👍 / 👎.