Skip to content

Commit

Permalink
Awake Updates - TILLSON_11272024 (#36049)
Browse files Browse the repository at this point in the history
* Update with bug fixes for tray icon and support for parent process

* Process information enum

* Update the docs

* Fix spelling

* Make sure that PID is used in PT config flow

* Logic for checks based on #34148

* Update with link to PR

* Fixes #34717

* Small cleanup

* Proper task segmentation in a function

* Cleanup the code

* Fix synchronization context issue

* Update planning doc

* Test disabling caching to see if that manages to pass CI

* Cleanup to make sure that we're logging things properly.

* Update ci.yml

* Disable cache to pass CI

* Retry logic

* Cleanup

* Code cleanup

* Fixes #35848

* Update notes and codename

* After third attempt, log error instead of throwing exception

* More cleanup to avoid double execution

* Add expected word

* Safeguards for bad values for timed keep-awake

* More updates to make sure I am using uint

* Update error message

* Update packages

* Fix notice and revert CsWinRT upgrade

* Codename update

* Update expect.txt

* Update the struct

* Ensuring we're properly awaiting tray initialization

* Update to make sure tray reflects the bound process

* Cleanup, proper JSON serialization for logs.

* Not needed.

* Add command validation logic

* Moving the initialization logic earlier

* Make sure we show the display state in the tooltip

* Update tray string

* Update src/modules/awake/Awake/Core/Manager.cs

Co-authored-by: Jaime Bernardo <[email protected]>

* Update src/modules/awake/Awake/Core/Manager.cs

Co-authored-by: Jaime Bernardo <[email protected]>

* Update src/modules/awake/Awake/Core/Manager.cs

Co-authored-by: Jaime Bernardo <[email protected]>

* Update src/modules/awake/Awake/Core/Manager.cs

Co-authored-by: Jaime Bernardo <[email protected]>

* Update logic for icon resets

* Update doc

* Simplify function for setting mode shell icon

* Issues should be properly linked

* Minor cleanup

* Update timed behavior

---------

Co-authored-by: Jaime Bernardo <[email protected]>
Co-authored-by: Clint Rutkas <[email protected]>
  • Loading branch information
3 people authored Dec 9, 2024
1 parent 3aec0a0 commit ef672b5
Show file tree
Hide file tree
Showing 16 changed files with 502 additions and 220 deletions.
1 change: 1 addition & 0 deletions .github/actions/spell-check/expect.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1542,6 +1542,7 @@ THISCOMPONENT
THotkey
thumbcache
TILEDWINDOW
TILLSON
timedate
timediff
timeunion
Expand Down
2 changes: 1 addition & 1 deletion Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
<PackageVersion Include="Markdig.Signed" Version="0.34.0" />
<!-- Including MessagePack to force version, since it's used by StreamJsonRpc but contains vulnerabilities. After StreamJsonRpc updates the version of MessagePack, we can upgrade StreamJsonRpc instead. -->
<PackageVersion Include="MessagePack" Version="2.5.187" />
<PackageVersion Include="Microsoft.CodeAnalysis.NetAnalyzers" Version="9.0.0-preview.24508.2" />
<PackageVersion Include="Microsoft.CodeAnalysis.NetAnalyzers" Version="9.0.0" />
<PackageVersion Include="Microsoft.Data.Sqlite" Version="9.0.0" />
<PackageVersion Include="Microsoft.Diagnostics.Tracing.TraceEvent" Version="3.1.16" />
<PackageVersion Include="Microsoft.Extensions.DependencyInjection" Version="9.0.0" />
Expand Down
2 changes: 1 addition & 1 deletion NOTICE.md
Original file line number Diff line number Diff line change
Expand Up @@ -1318,7 +1318,7 @@ EXHIBIT A -Mozilla Public License.
- Mages 2.0.2
- Markdig.Signed 0.34.0
- MessagePack 2.5.187
- Microsoft.CodeAnalysis.NetAnalyzers 9.0.0-preview.24508.2
- Microsoft.CodeAnalysis.NetAnalyzers 9.0.0
- Microsoft.Data.Sqlite 9.0.0
- Microsoft.Diagnostics.Tracing.TraceEvent 3.1.16
- Microsoft.Extensions.DependencyInjection 9.0.0
Expand Down
20 changes: 18 additions & 2 deletions doc/planning/awake.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,22 +10,38 @@ The build ID can be found in `Core\Constants.cs` in the `BuildId` variable - it

The build ID moniker is made up of two components - a reference to a [Halo](https://en.wikipedia.org/wiki/Halo_(franchise)) character, and the date when the work on the specific build started in the format of `MMDDYYYY`.

| Build ID | Build Date |
| Build ID | Build Date |
|:-------------------------------------------------------------------|:------------------|
| [`TILLSON_11272024`](#TILLSON_11272024-november-27-2024) | November 27, 2024 |
| [`PROMETHEAN_09082024`](#PROMETHEAN_09082024-september-8-2024) | September 8, 2024 |
| [`VISEGRADRELAY_08152024`](#VISEGRADRELAY_08152024-august-15-2024) | August 15, 2024 |
| [`DAISY023_04102024`](#DAISY023_04102024-april-10-2024) | April 10, 2024 |
| [`ATRIOX_04132023`](#ATRIOX_04132023-april-13-2023) | April 13, 2023 |
| [`LIBRARIAN_03202022`](#librarian_03202022-march-20-2022) | March 20, 2022 |
| `ARBITER_01312022` | January 31, 2022 |

### `TILLSON_11272024` (November 27, 2024)

>[!NOTE]
>See pull request: [Awake - `TILLSON_11272024`](https://github.com/microsoft/PowerToys/pull/36049)
- [#35250](https://github.com/microsoft/PowerToys/issues/35250) Updates the icon retry policy, making sure that the icon consistently and correctly renders in the tray.
- [#35848](https://github.com/microsoft/PowerToys/issues/35848) Fixed a bug where custom tray time shortcuts for longer than 24 hours would be parsed as zero hours/zero minutes.
- [#34716](https://github.com/microsoft/PowerToys/issues/34716) Properly recover the state icon in the tray after an `explorer.exe` crash.
- Added configuration safeguards to make sure that invalid values for timed keep-awake times do not result in exceptions.
- Updated the tray initialization logic, making sure we wait for it to be properly created before setting icons.
- Expanded logging capabilities to track invoking functions.
- Added command validation logic to make sure that incorrect command line arguments display an error.
- Display state now shown in the tray tooltip.
- When timed mode is used, changing the display setting will no longer reset the timer.

### `PROMETHEAN_09082024` (September 8, 2024)

>[!NOTE]
>See pull request: [Awake - `PROMETHEAN_09082024`](https://github.com/microsoft/PowerToys/pull/34717)
- Updating the initialization logic to make sure that settings are respected for proper group policy and single-instance detection.
- [#34148] Fixed a bug from the previous release that incorrectly synchronized threads for shell icon creation and initialized parent PID when it was not parented.
- [#34148](https://github.com/microsoft/PowerToys/issues/34148) Fixed a bug from the previous release that incorrectly synchronized threads for shell icon creation and initialized parent PID when it was not parented.

### `VISEGRADRELAY_08152024` (August 15, 2024)

Expand Down
2 changes: 1 addition & 1 deletion src/modules/awake/Awake/Core/Constants.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@ internal static class Constants
// Format of the build ID is: CODENAME_MMDDYYYY, where MMDDYYYY
// is representative of the date when the last change was made before
// the pull request is issued.
internal const string BuildId = "PROMETHEAN_09082024";
internal const string BuildId = "TILLSON_11272024";
}
}
2 changes: 1 addition & 1 deletion src/modules/awake/Awake/Core/ExtensionMethods.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ public static void AddRange<T>(this ICollection<T> target, IEnumerable<T> source
ArgumentNullException.ThrowIfNull(target);
ArgumentNullException.ThrowIfNull(source);

foreach (var element in source)
foreach (T? element in source)
{
target.Add(element);
}
Expand Down
Loading

0 comments on commit ef672b5

Please sign in to comment.