diff --git a/.github/actions/spell-check/excludes.txt b/.github/actions/spell-check/excludes.txt index c6f1225788..551c248923 100644 --- a/.github/actions/spell-check/excludes.txt +++ b/.github/actions/spell-check/excludes.txt @@ -105,6 +105,7 @@ ^src/common/notifications/BackgroundActivatorDLL/cpp\.hint$ ^src/common/sysinternals/Eula/ ^src/modules/cmdpal/doc/initial-sdk-spec/list-elements-mock-002\.pdn$ +^src/modules/cmdpal/ext/SamplePagesExtension/Pages/SampleMarkdownImagesPage\.cs$ ^src/modules/colorPicker/ColorPickerUI/Shaders/GridShader\.cso$ ^src/modules/launcher/Plugins/Microsoft\.PowerToys\.Run\.Plugin\.TimeDate/Properties/ ^src/modules/MouseUtils/MouseJumpUI/MainForm\.resx$ diff --git a/.github/actions/spell-check/expect.txt b/.github/actions/spell-check/expect.txt index b3966292e9..4e02c75a2a 100644 --- a/.github/actions/spell-check/expect.txt +++ b/.github/actions/spell-check/expect.txt @@ -101,7 +101,6 @@ ATX ATRIOX aumid authenticode -Authenticode AUTOBUDDY AUTOCHECKBOX AUTOHIDE @@ -316,7 +315,6 @@ CURSORINFO cursorpos CURSORSHOWING CURSORWRAP -CursorWrap customaction CUSTOMACTIONTEST CUSTOMFORMATPLACEHOLDER @@ -432,7 +430,6 @@ DSTINVERT DString DSVG dto -DTo DUMMYUNIONNAME dutil DVASPECT @@ -466,7 +463,6 @@ EDITKEYBOARD EDITSHORTCUTS EDITTEXT EFile -ekus eku emojis ENABLEDELAYEDEXPANSION @@ -1152,7 +1148,6 @@ NONCLIENTMETRICSW NONELEVATED nonspace nonstd -nullrefs NOOWNERZORDER NOPARENTNOTIFY NOPREFIX @@ -1192,8 +1187,8 @@ ntfs NTSTATUS NTSYSAPI NULLCURSOR -nullref nullonfailure +nullref numberbox nwc ocr diff --git a/.github/actions/spell-check/patterns.txt b/.github/actions/spell-check/patterns.txt index cb303a10ad..181d728e84 100644 --- a/.github/actions/spell-check/patterns.txt +++ b/.github/actions/spell-check/patterns.txt @@ -253,7 +253,7 @@ _SILENCE_STDEXT_ARR_ITERS_DEPRECATION_WARNING # hit-count: 1 file-count: 1 # Amazon -\bamazon\.com/[-\w]+/(?:dp/[0-9A-Z]+|)[^"'\s]+ +\bamazon\.com/[-\w]+/(?:dp/[0-9A-Z]+|) # hit-count: 3 file-count: 3 # imgur diff --git a/.pipelines/v2/release.yml b/.pipelines/v2/release.yml index e8cc7d5ed8..71f80f574b 100644 --- a/.pipelines/v2/release.yml +++ b/.pipelines/v2/release.yml @@ -52,8 +52,6 @@ extends: name: SHINE-INT-S ${{ if eq(parameters.useVSPreview, true) }}: demands: ImageOverride -equals SHINE-VS17-Preview - ${{ else }}: - image: SHINE-VS17-Latest os: windows sdl: tsa: @@ -75,7 +73,6 @@ extends: name: SHINE-INT-L demands: # Our INT agents have a large disk mounted at P:\ - - WorkFolder -equals P:\_work - ${{ if eq(parameters.useVSPreview, true) }}: - ImageOverride -equals SHINE-VS17-Preview os: windows @@ -126,7 +123,6 @@ extends: parameters: pool: name: SHINE-INT-L - image: SHINE-VS17-Latest os: windows official: true codeSign: true diff --git a/.pipelines/v2/templates/job-build-project.yml b/.pipelines/v2/templates/job-build-project.yml index 34e4ce4340..62cb993d5d 100644 --- a/.pipelines/v2/templates/job-build-project.yml +++ b/.pipelines/v2/templates/job-build-project.yml @@ -111,6 +111,7 @@ jobs: ${{ else }}: OutputBuildPlatform: ${{ platform }} variables: + NUGET_PACKAGES: 'C:\NuGetPackages' # Some of our build steps cache these here... and it was apparently part of the global environment MakeAppxPath: 'C:\Program Files (x86)\Windows Kits\10\bin\10.0.26100.0\x86\MakeAppx.exe' # Azure DevOps abhors a vacuum # If these are blank, expansion will fail later on... which will result in direct substitution of the variable *names* @@ -139,6 +140,10 @@ jobs: - output: pipelineArtifact artifactName: $(JobOutputArtifactName) targetPath: $(Build.ArtifactStagingDirectory) + - output: pipelineArtifact + artifactName: $(JobOutputArtifactName)-failure-$(System.JobAttempt) + targetPath: $(LogOutputDirectory) + condition: or(failed(), canceled()) steps: - checkout: self clean: true @@ -395,7 +400,7 @@ jobs: ### HACK: On ARM64 builds, building an app with Windows App SDK copies the x64 WebView2 dll instead of the ARM64 one. This task makes sure the right dll is used. - task: CopyFiles@2 displayName: HACK Copy core WebView2 ARM64 dll to output directory - condition: eq(variables['BuildPlatform'],'arm64') + condition: and(succeeded(), eq(variables['BuildPlatform'], 'arm64')) inputs: contents: packages/Microsoft.Web.WebView2.1.0.2903.40/runtimes/win-ARM64/native_uap/Microsoft.Web.WebView2.Core.dll targetFolder: $(Build.SourcesDirectory)/ARM64/Release/WinUI3Apps/ @@ -434,11 +439,11 @@ jobs: inputs: testResultsFormat: VSTest testResultsFiles: '**/*.trx' - condition: ne(variables['BuildPlatform'],'arm64') + condition: and(succeeded(), ne(variables['BuildPlatform'], 'arm64')) # Native dlls - task: VSTest@2 - condition: ne(variables['BuildPlatform'],'arm64') # No arm64 agents to run the tests. + condition: and(succeeded(), ne(variables['BuildPlatform'], 'arm64')) # No arm64 agents to run the tests. displayName: 'Native Tests' inputs: platform: '$(BuildPlatform)' diff --git a/src/modules/awake/Awake/Core/Native/Bridge.cs b/src/modules/awake/Awake/Core/Native/Bridge.cs index 44812a4ef7..e82b698a47 100644 --- a/src/modules/awake/Awake/Core/Native/Bridge.cs +++ b/src/modules/awake/Awake/Core/Native/Bridge.cs @@ -88,9 +88,6 @@ namespace Awake.Core.Native [return: MarshalAs(UnmanagedType.Bool)] internal static extern bool GetCursorPos(out Point lpPoint); - [DllImport("user32.dll", SetLastError = true)] - internal static extern bool ScreenToClient(IntPtr hWnd, ref Point lpPoint); - [DllImport("user32.dll", SetLastError = true)] internal static extern bool GetMessage(out Msg lpMsg, IntPtr hWnd, uint wMsgFilterMin, uint wMsgFilterMax); diff --git a/src/modules/awake/Awake/Core/TrayHelper.cs b/src/modules/awake/Awake/Core/TrayHelper.cs index 37e2de8e48..16cd5f5795 100644 --- a/src/modules/awake/Awake/Core/TrayHelper.cs +++ b/src/modules/awake/Awake/Core/TrayHelper.cs @@ -61,9 +61,8 @@ namespace Awake.Core Bridge.SetForegroundWindow(hWnd); - // Get cursor position and convert it to client coordinates + // Get cursor position in screen coordinates Bridge.GetCursorPos(out Models.Point cursorPos); - Bridge.ScreenToClient(hWnd, ref cursorPos); // Set menu information MenuInfo menuInfo = new() diff --git a/src/modules/cmdpal/Microsoft.CmdPal.UI/Helpers/GlobalErrorHandler.cs b/src/modules/cmdpal/Microsoft.CmdPal.UI/Helpers/GlobalErrorHandler.cs index 0b55b03615..9b5ac21364 100644 --- a/src/modules/cmdpal/Microsoft.CmdPal.UI/Helpers/GlobalErrorHandler.cs +++ b/src/modules/cmdpal/Microsoft.CmdPal.UI/Helpers/GlobalErrorHandler.cs @@ -51,10 +51,10 @@ internal sealed partial class GlobalErrorHandler // without its exception being observed. It is NOT raised immediately // when the Task faults; timing depends on GC finalization. e.SetObserved(); - HandleException(e.Exception, Context.UnobservedTaskException, isRecoverable: true); + HandleException(e.Exception, Context.UnobservedTaskException); } - private void HandleException(Exception ex, Context context, bool isRecoverable = false) + private static void HandleException(Exception ex, Context context) { Logger.LogError($"Unhandled exception detected ({context})", ex); @@ -70,10 +70,25 @@ internal sealed partial class GlobalErrorHandler StoreReport(report, storeOnDesktop: false); + string message; + string caption; + try + { + message = ResourceLoaderInstance.GetString("GlobalErrorHandler_CrashMessageBox_Message"); + caption = ResourceLoaderInstance.GetString("GlobalErrorHandler_CrashMessageBox_Caption"); + } + catch + { + // The resource loader may not be available if the exception occurred during startup. + // Fall back to hardcoded strings in that case. + message = "Command Palette has encountered a fatal error and must close."; + caption = "Command Palette - Fatal error"; + } + PInvoke.MessageBox( HWND.Null, - "Command Palette has encountered a fatal error and must close.\n\nAn error report has been saved to your desktop.", - "Unhandled Error", + message, + caption, MESSAGEBOX_STYLE.MB_ICONERROR); } } diff --git a/src/modules/cmdpal/Microsoft.CmdPal.UI/Strings/en-us/Resources.resw b/src/modules/cmdpal/Microsoft.CmdPal.UI/Strings/en-us/Resources.resw index 13cda5925b..8d15c39b39 100644 --- a/src/modules/cmdpal/Microsoft.CmdPal.UI/Strings/en-us/Resources.resw +++ b/src/modules/cmdpal/Microsoft.CmdPal.UI/Strings/en-us/Resources.resw @@ -431,8 +431,8 @@ Right-click to remove the key combination, thereby deactivating the shortcut. Last Position Reopen the window where it was last closed - - + + Settings @@ -493,28 +493,34 @@ Right-click to remove the key combination, thereby deactivating the shortcut. Reloading extensions.. - + Discover more extensions - + Find more extensions on the Microsoft Store or WinGet. - + Learn how to create your own extensions - + Find extensions on the Microsoft Store - + Microsoft Store - + Find extensions on WinGet - + Microsoft Store - + Search extensions + + Command Palette has encountered a fatal error and must close. + + + Command Palette - Fatal error + \ No newline at end of file diff --git a/src/modules/cmdpal/ext/SamplePagesExtension/Pages/SampleListPageWithDetails.cs b/src/modules/cmdpal/ext/SamplePagesExtension/Pages/SampleListPageWithDetails.cs index 018c11720c..abf80e3d1e 100644 --- a/src/modules/cmdpal/ext/SamplePagesExtension/Pages/SampleListPageWithDetails.cs +++ b/src/modules/cmdpal/ext/SamplePagesExtension/Pages/SampleListPageWithDetails.cs @@ -63,7 +63,7 @@ internal sealed partial class SampleListPageWithDetails : ListPage Details = new Details() { Title = "Hero Image Example", - HeroImage = new IconInfo("https://m.media-amazon.com/images/M/MV5BNDBkMzVmNGQtYTM2OC00OWRjLTk5OWMtNzNkMDI4NjFjNTZmXkEyXkFqcGdeQXZ3ZXNsZXk@._V1_QL75_UX500_CR0,0,500,281_.jpg"), + HeroImage = new IconInfo("https://m.media-amazon.com/images/M/MV5BNDBkMzVmNGQtYTM2OC00OWRjLTk5OWMtNzNkMDI4NjFjNTZmXkEyXkFqcGdeQXZ3ZXNsZXk@._V1_QL75_UX500_CR0,0,500,281_.jpg"), /* #no-spell-check-line */ Body = "It is literally an image of a hero", }, }, diff --git a/src/settings-ui/Settings.UI/SettingsXAML/Controls/Dashboard/ShortcutConflictControl.xaml b/src/settings-ui/Settings.UI/SettingsXAML/Controls/Dashboard/ShortcutConflictControl.xaml index 0310c37008..44470ebbc1 100644 --- a/src/settings-ui/Settings.UI/SettingsXAML/Controls/Dashboard/ShortcutConflictControl.xaml +++ b/src/settings-ui/Settings.UI/SettingsXAML/Controls/Dashboard/ShortcutConflictControl.xaml @@ -10,7 +10,7 @@