0.3.1 hotfix: GetNewClosure dispatcher crashes and Autopilot playbook 500s#66
Merged
Conversation
GetNewClosure() binds handlers to a dynamic module that cannot resolve script-scope functions on Windows PowerShell 5.1 and reads script-scope variables as frozen snapshots (or null when closures nest). This crashed the app 4 seconds after any toast appeared, e.g. right after a group tag update, with "The term 'Hide-Toast' is not recognized". - Toast auto-dismiss tick and slide-out Completed handlers are now plain scriptblocks bound to the script session state; stale-toast protection uses a live script-scope generation pair instead of a captured copy. - Copy Key reset timer is a captured local instead of a null script: read. - Checkbox mutual-exclusivity handlers and the copy-button click handler drop GetNewClosure so Write-Log and script variables resolve on 5.1. Bump version to 0.3.1. Fixes #64 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The Graph windowsAutopilotDeviceIdentities endpoint currently returns HTTP 500 whenever a \$select projection is used, on both beta and v1.0 and regardless of which properties are selected (verified against a live tenant). Playbooks 1 and 2 now fetch Autopilot devices without \$select, matching the dashboard queries that were unaffected. Embedded playbook copies regenerated to stay in sync. Fixes #65 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Hotfix for the two bugs reported against 0.3.0 today.
Issue #64: app crash after group tag update (Windows PowerShell 5.1)
GetNewClosure()binds a scriptblock to a dynamic module that cannot resolve script-scope functions on Windows PowerShell 5.1 and reads$script:variables as frozen snapshots (or null when closures nest). The toast auto-dismiss timer handler therefore failed 4 seconds after any toast with "The term 'Hide-Toast' is not recognized" and took down the main window. Verified via live Graph calls that the group tag update itself succeeds; only the UI crashed.Fixes applied:
$script:copyButtonTimer, which reads as null inside the nested closure and threw 2 seconds after every key copy.GetNewClosure()soWrite-Logand$script:serviceCheckboxesresolve.Closure semantics were verified with standalone repro scripts on pwsh 7.6 (snapshot and nested-null behavior reproduce there too; the function resolution failure is 5.1-specific, matching the report).
Issue #65: Autopilot playbooks fail with HTTP 500
The Graph
windowsAutopilotDeviceIdentitiesendpoint currently returns an internal server error whenever a$selectprojection is used. Reproduced against a live tenant on both beta and v1.0, with several property combinations; the same call without$selectworks. Playbooks 1 and 2 now fetch Autopilot devices without$select(embedded copies regenerated), matching the dashboard queries that were unaffected.Release
Fixes #64
Fixes #65
🤖 Generated with Claude Code