Skip to content
Merged
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
83 changes: 81 additions & 2 deletions Tools/windows/uia-live-gate.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -823,6 +823,13 @@ try {
$null = $card.GetCurrentPattern([System.Windows.Automation.SelectionItemPattern]::Pattern)
}
$projectCardIds = @($projectCards | ForEach-Object { $_.Current.AutomationId })
$attentionAction = @(Get-DirectChildren $graph $rawWalker | Where-Object {
$_.Current.AutomationId -match '^attention-action-' -and $_.Current.Name -eq "Reply"
}) | Select-Object -First 1
Require ($null -ne $attentionAction) "NEEDS YOU card omitted its reason-specific Reply action"
Require (($attentionAction.Current.BoundingRectangle.Width -gt 0) -and
($attentionAction.Current.BoundingRectangle.Height -gt 0)) "Reply attention action had empty bounds"
$null = $attentionAction.GetCurrentPattern([System.Windows.Automation.InvokePattern]::Pattern)
$reclaimOffer = @(Get-DirectChildren $graph $rawWalker | Where-Object { $_.Current.Name -eq "Reclaim" }) | Select-Object -First 1
$keepOffer = @(Get-DirectChildren $graph $rawWalker | Where-Object { $_.Current.Name -eq "Keep" }) | Select-Object -First 1
Require ($null -ne $reclaimOffer) "resolved card with a reclaimable worktree omitted its Reclaim descendant"
Expand All @@ -838,7 +845,7 @@ try {
# and Projects above) instead of assuming cards and the offer are contiguous blocks.
$graphChildIds = @(Get-DirectChildren $graph $rawWalker |
ForEach-Object { $_.Current.AutomationId } | Where-Object { $_ })
$expectedGraphIds = @($projectCardIds + @($connectionAlert.Current.AutomationId, $reclaimOffer.Current.AutomationId, $keepOffer.Current.AutomationId) + $canvasActionIds)
$expectedGraphIds = @($projectCardIds + @($attentionAction.Current.AutomationId, $connectionAlert.Current.AutomationId, $reclaimOffer.Current.AutomationId, $keepOffer.Current.AutomationId) + $canvasActionIds)
Require ((@($graphChildIds | Sort-Object) -join ",") -eq (@($expectedGraphIds | Sort-Object) -join ",")) `
"Graph exposed unexpected or missing children: $($graphChildIds -join ',')"
$null = Assert-FragmentLinks $graph $rawWalker $graphChildIds "RawView Graph"
Expand Down Expand Up @@ -977,6 +984,10 @@ try {
$workspaceShowGraph = $null
$workspaceTabs = @()
$workspaceControls = @()
$workspacePanelToggle = $null
$workspaceSparkline = $null
$workspaceStart = $null
$workspaceUsage = $null
for ($attempt = 0; $attempt -lt 100; $attempt++) {
$workspaceChildren = @(Get-DirectChildren $graph $rawWalker)
$workspaceToolbar = @($workspaceChildren | Where-Object {
Expand All @@ -992,8 +1003,22 @@ try {
$_.Current.AutomationId -match '^workspace-(new-tab|split-right|split-down)-' -and
$_.Current.Name -in @("New Tab", "Split Right", "Split Down")
})
$workspacePanelToggle = @($workspaceChildren | Where-Object {
$_.Current.AutomationId -match '^workspace-toggle-panel-' -and $_.Current.Name -eq "Collapse loop panel"
}) | Select-Object -First 1
$workspaceSparkline = @($workspaceChildren | Where-Object {
$_.Current.AutomationId -match '^workspace-detail-sparkline-' -and $_.Current.Name -eq "Metric sparkline"
}) | Select-Object -First 1
$workspaceStart = @($workspaceChildren | Where-Object {
$_.Current.AutomationId -match '^workspace-detail-start-' -and $_.Current.Name -eq "Start time"
}) | Select-Object -First 1
$workspaceUsage = @($workspaceChildren | Where-Object {
$_.Current.AutomationId -match '^workspace-detail-usage-' -and $_.Current.Name -match 'tokens$'
}) | Select-Object -First 1
if (($null -ne $workspaceToolbar) -and ($null -ne $workspaceShowGraph) -and
($workspaceTabs.Count -ge 1) -and ($workspaceControls.Count -eq 3)) {
($workspaceTabs.Count -ge 1) -and ($workspaceControls.Count -eq 3) -and
($null -ne $workspacePanelToggle) -and ($null -ne $workspaceSparkline) -and
($null -ne $workspaceStart) -and ($null -ne $workspaceUsage)) {
break
}
Start-Sleep -Milliseconds 100
Expand All @@ -1006,6 +1031,60 @@ try {
"workspace chrome omitted a split control (found $($workspaceControls.Count) of 3: $(@($workspaceControls | ForEach-Object { $_.Current.Name }) -join '|'))"
Require ($workspaceTabs.Count -ge 1) `
"workspace chrome exposed no tab children; found $(@($workspaceChildren | ForEach-Object { $_.Current.AutomationId }) -join '|')"
Require ($null -ne $workspacePanelToggle) "workspace right panel omitted collapse control"
Require ($null -ne $workspaceSparkline) "workspace right panel omitted metric sparkline child"
Require ($null -ne $workspaceStart) "workspace right panel omitted start-time child"
Require ($null -ne $workspaceUsage) "workspace right panel omitted token-usage child"
foreach ($detailChild in @($workspacePanelToggle, $workspaceSparkline, $workspaceStart, $workspaceUsage)) {
Require (($detailChild.Current.BoundingRectangle.Width -gt 0) -and
($detailChild.Current.BoundingRectangle.Height -gt 0)) `
"workspace right panel child $($detailChild.Current.AutomationId) has empty bounds"
}
$workspacePanelToggle.GetCurrentPattern([System.Windows.Automation.InvokePattern]::Pattern).Invoke()
Start-Sleep -Milliseconds 150
$workspaceChildren = @(Get-DirectChildren $graph $rawWalker)
$workspacePanelToggle = @($workspaceChildren | Where-Object {
$_.Current.AutomationId -match '^workspace-toggle-panel-' -and $_.Current.Name -eq "Expand loop panel"
}) | Select-Object -First 1
Require ($null -ne $workspacePanelToggle) "workspace right panel did not expose expand control after collapse"
$workspacePanelToggle.GetCurrentPattern([System.Windows.Automation.InvokePattern]::Pattern).Invoke()
Start-Sleep -Milliseconds 150
$workspaceChildren = @(Get-DirectChildren $graph $rawWalker)
$workspaceTabs = @($workspaceChildren | Where-Object {
$_.Current.AutomationId -match '^workspace-tab-' -and $_.Current.Name -match 'tab$'
})
$initialWorkspaceTabId = $workspaceTabs[0].Current.AutomationId
$newTab = @($workspaceChildren | Where-Object {
$_.Current.AutomationId -match '^workspace-new-tab-' -and $_.Current.Name -eq "New Tab"
}) | Select-Object -First 1
Require ($null -ne $newTab) "workspace omitted New Tab before mounted-tab preservation check"
$newTab.GetCurrentPattern([System.Windows.Automation.InvokePattern]::Pattern).Invoke()
for ($attempt = 0; $attempt -lt 60; $attempt++) {
Start-Sleep -Milliseconds 100
$workspaceChildren = @(Get-DirectChildren $graph $rawWalker)
$workspaceTabs = @($workspaceChildren | Where-Object {
$_.Current.AutomationId -match '^workspace-tab-' -and $_.Current.Name -match 'tab$'
})
if ($workspaceTabs.Count -ge 2) { break }
}
Require ($workspaceTabs.Count -ge 2) "New Tab did not expose a mounted background tab"
$newWorkspaceTabId = $workspaceTabs[1].Current.AutomationId
$workspaceTabs[0].GetCurrentPattern([System.Windows.Automation.InvokePattern]::Pattern).Invoke()
Start-Sleep -Milliseconds 150
$workspaceTabs = @(Get-DirectChildren $graph $rawWalker | Where-Object {
$_.Current.AutomationId -match '^workspace-tab-' -and $_.Current.Name -match 'tab$'
})
Require (($workspaceTabs[0].Current.AutomationId -eq $initialWorkspaceTabId) -and
($workspaceTabs[1].Current.AutomationId -eq $newWorkspaceTabId)) `
"switching to the mounted background tab changed terminal tab identity"
$workspaceTabs[1].GetCurrentPattern([System.Windows.Automation.InvokePattern]::Pattern).Invoke()
Start-Sleep -Milliseconds 150
$workspaceTabs = @(Get-DirectChildren $graph $rawWalker | Where-Object {
$_.Current.AutomationId -match '^workspace-tab-' -and $_.Current.Name -match 'tab$'
})
Require (($workspaceTabs[0].Current.AutomationId -eq $initialWorkspaceTabId) -and
($workspaceTabs[1].Current.AutomationId -eq $newWorkspaceTabId)) `
"switching back from the mounted background tab changed terminal tab identity"
$surfaceActionPatterns["overview-destination"].Invoke()
Start-Sleep -Milliseconds 150
Require ([GraphCodeUiaGateState]::PostTaggedExitCollision($process.MainWindowHandle)) `
Expand Down
5 changes: 5 additions & 0 deletions graphcode-windows/src/AccessibilityProvider.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -798,10 +798,15 @@ class Node final : public IRawElementProviderSimple,
row.identity.rfind("quick-chat-row:", 0) == 0 ? L"quick-chat-row-" :
row.identity.rfind("quick-chat-workspace:", 0) == 0 ? L"quick-chat-workspace-" :
row.identity.rfind("loop-disclosure:", 0) == 0 ? L"loop-disclosure-" :
row.identity.rfind("attention-action:", 0) == 0 ? L"attention-action-" :
row.identity.rfind("workspace-toolbar:", 0) == 0 ? L"workspace-toolbar-" :
row.identity.rfind("workspace-loop-bar:", 0) == 0 ? L"workspace-loop-bar-" :
row.identity.rfind("workspace-show-graph:", 0) == 0 ? L"workspace-show-graph-" :
row.identity.rfind("workspace-stop:", 0) == 0 ? L"workspace-stop-" :
row.identity.rfind("workspace-toggle-panel:", 0) == 0 ? L"workspace-toggle-panel-" :
row.identity.rfind("workspace-detail-sparkline:", 0) == 0 ? L"workspace-detail-sparkline-" :
row.identity.rfind("workspace-detail-start:", 0) == 0 ? L"workspace-detail-start-" :
row.identity.rfind("workspace-detail-usage:", 0) == 0 ? L"workspace-detail-usage-" :
row.identity.rfind("workspace-tab-close:", 0) == 0 ? L"workspace-tab-close-" :
row.identity.rfind("workspace-tab:", 0) == 0 ? L"workspace-tab-" :
row.identity.rfind("workspace-new-tab:", 0) == 0 ? L"workspace-new-tab-" :
Expand Down
Loading
Loading