Repository navigation
fix(computer): evict reindexed window caches, match non-Darwin app title suffixes, and note Windows PostMessage hotkeys - #1094
Conversation
There was a problem hiding this comment.
Approve with nits (1 P2, 1 P3) · merge base 8f52ed7 · 1 commit, 6 files
Findings
P2 · apps/computer/local-daemon/internal/uiruntime/runtime.mjs:535 — parseWindowView does not drop removed - [N] rows for header-only since_status=reindexed diffs. When since_status=reindexed arrives without since_status=diff or a since <id>: line on a non-fallback path (fallbackOnReindexed = false, such as macOS run_actions at cua.go:3009 or explicit observe({since})), isDiff is false while reindexed is true, so line 535 keeps removed - [N] rows in parsed.rows under the new snapshotId and lets a subsequent v.click(...) target a deleted or shifted index. Also on line 561, || reindexed in isFullOrReindexed is dead code because line 557 already deletes the cache whenever reindexed is true. Include reindexed in the diff-line handling (isDiff || reindexed at lines 523, 535, and 548) and remove the dead || reindexed on line 561.
P3 · apps/computer/local-daemon/internal/linger/localtools/cua.go:2235 — isChordKeyString misclassifies trailing-plus chords like "ctrl++" as single keys. For raw press_key({key: "ctrl++"}) (which normalizeWindowsKeyCombo in cua_windows_policy.go:137 explicitly supports for zoom-in), strings.Split(s, "+") yields ["ctrl", "", ""] (1 non-empty segment), returning false and omitting windowsPostMessageHotkeyNote when delivered via PostMessage. Handle trailing "++" (or share a chord-splitting helper with normalizeWindowsKeyCombo).
Checked: withoutStructured strips structuredContent (cua.go:2662) · runActions single trailing note (cua.go:3082) · compactHelpText 100-byte hotkey budget (ui_runtime.go:1095)
Unverified: live Windows cua-driver "via PostMessage" receipt string · Windows test execution of localtools and uiruntime
CI: all 8 checks passed; Windows CI only compiles localtools and uiruntime
Automated review of 7703bab by Antigravity.
…tle suffixes, and note Windows PostMessage hotkeys
7703bab to
e20324a
Compare
|
Addressed both nits from the review in commit
Verified locally: |
There was a problem hiding this comment.
Approve · follow-up on 7703bab · merge base 8f52ed7 · 1 commit, 6 files
Resolved: header-only reindexed removed rows (runtime.mjs:522, runtime_test.go:4033) · trailing-plus chord detection (cua.go:2244, cua_mac_overhaul_test.go:5203)
Checked: withoutStructured strips structuredContent (cua.go:2675) · runActions single trailing note (cua.go:3097) · compactHelpText 100-byte budget (ui_runtime.go:1095)
Unverified: live Windows cua-driver "via PostMessage" receipt string · Windows test execution of localtools and uiruntime
CI: all 8 checks passed; Windows CI only compiles localtools and uiruntime
Automated review of e20324a by Antigravity.
What and why
Final small ergonomics & cache-correctness PR from our 3-OS real-machine CUA verification (single commit
7703bab83onmain8f52ed715):reindexedpartial diffs fromui_execwindow cache (runtime.mjs):get_window_statereturns areindexedpartial diff, evictwindowRowCachesso the nextobserve()(or an auto-diffedobserve()/no_changereadback, while preserving trailing post-action notes) fetches a complete tree with true shifted element indices instead of reusing stale indices.ui.app()(runtime.mjs):" - <app>"/" — <app>"window title segments whenapp_nameand exact titles miss (excluding browsers, terminals, code editors, Explorer, and 1-char targets to avoid false matches like"notes.md — VS Code").PostMessagemodifier hotkey note (cua.go,cua_windows_policy.go):hotkey, modifiedpress_key, orrun_actionsbatch containing one is deliveredvia PostMessage, append a single trailing note after the final post-action readback warning that WinUI 3 apps can ignore background modifier state.apps/computer/local-daemon/README.md,runtime_test.go,cua_mac_overhaul_test.go):README.mdfor all three behaviors and add cross-platform Go unit tests (TestWindowsPostMessageHotkeyNoteanduiruntimetests) covering reindexed eviction, non-Darwin suffix matching/exclusions, and Windows PostMessage hotkey detection.How it was verified
make check-repository-gate BASE=origin/main(PASS: commitlint, env inventory, Prettier, English-only/CJK, doc links, changelog)golangci-lint run --new-from-rev=origin/main ./...(0 issues)darwin/arm64,windows/amd64,linux/amd64go test -c ./internal/linger/localtools)go test -race ./internal/uiruntime+go test -race -run TestWindowsPostMessageHotkeyNote ./internal/linger/localtools(PASS)contracts/openapi/changes)Boundary
provider_readycritical-path changes.