Skip to content

PR #416

PR #416 #1361

Triggered via dynamic May 21, 2026 13:09
Status Success
Total duration 1m 31s
Artifacts

codeql

on: dynamic
Matrix: analyze
Fit to window
Zoom out
Zoom in

Annotations

1 error and 4 warnings
Breaking API change: `x`/`y` coordinate parameters removed from `long_press` with no migration path: src/mcp/tools/ui-automation/long_press.ts#L36
The `longPressSchema` (which doubles as the `legacy` schema for non-session-aware callers) drops `x` and `y` in favour of `elementRef`, so any existing client or script passing coordinates will get a silent validation failure with no backwards-compatible fallback.
cli/json swipe success test is skipped instead of the stale fixture being re-baselined: src/snapshot-tests/suites/ui-automation-suite.ts#L144
The `cli/json` swipe success test is conditionally skipped with `it.skip` to avoid a fixture mismatch rather than re-baselining the fixture to the new `withinElementRef`/`direction` contract — this leaves a stale contract fixture in-tree without requiring a reviewed update.
O(n²) scan per candidate in findActiveForegroundRoot: src/mcp/tools/ui-automation/shared/runtime-next-steps.ts#L371
For every record, `foregroundScore` calls both `findSheetGrabberDescendant` (O(n) linear scan) and `records.filter(isForegroundCandidateForRoot(...))` (another O(n) scan), making the overall function O(n²) in the number of snapshot elements. On a rich UI snapshot with many elements this runs synchronously on every action response. Consider pre-grouping records by AX path prefix or building a spatial index once before scoring all candidates.
[FKH-A5Y] O(n²) scan per candidate in findActiveForegroundRoot (additional location): src/mcp/tools/ui-automation/shared/runtime-snapshot.ts#L461
For every record, `foregroundScore` calls both `findSheetGrabberDescendant` (O(n) linear scan) and `records.filter(isForegroundCandidateForRoot(...))` (another O(n) scan), making the overall function O(n²) in the number of snapshot elements. On a rich UI snapshot with many elements this runs synchronously on every action response. Consider pre-grouping records by AX path prefix or building a spatial index once before scoring all candidates.
[FKH-A5Y] O(n²) scan per candidate in findActiveForegroundRoot (additional location): src/mcp/tools/ui-automation/shared/runtime-next-steps.ts#L543
For every record, `foregroundScore` calls both `findSheetGrabberDescendant` (O(n) linear scan) and `records.filter(isForegroundCandidateForRoot(...))` (another O(n) scan), making the overall function O(n²) in the number of snapshot elements. On a rich UI snapshot with many elements this runs synchronously on every action response. Consider pre-grouping records by AX path prefix or building a spatial index once before scoring all candidates.