Repository navigation
Mac tests: no real key tap under UI testing (it raised a prompt over Settings); say what a missed live press did - #451
Conversation
A CI run of PR #447 (46015518999, live-tests) failed "every element action lands in the fixture" on its first step: the Reply press answered something other than "AXPress", and the fixture never recorded a press. The log couldn't say what the performer did instead — the call sat inside #expect, which printed no value — so whether AXPress was refused and the fallback click missed, or something else, is unknown. Each press's answer is now held before it is checked, so the next miss names it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DS5B1Thm9A5RTqE6KU3jvP
openKeyEditor raised a covered Settings row with a second ⌘, when the Connect…/Change… button wasn't hittable in 5 s — a fallback added (#427) after testCancelDiscardsKeyEditAndKeepsRow, first in its run, found the button present but covered, Settings having opened behind another window. The cause is in openSettingsWindow, which returned as soon as a Settings window existed. It now also waits for Settings to be the front window (`app.windows.firstMatch`, listed front to back), after its one ⌘,, and a Settings window left behind fails there naming every window front first. openKeyEditor no longer sends ⌘,: it waits for the button to be hittable or fails with the same window list. windowFrames moves to the shared windows file for both. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DS5B1Thm9A5RTqE6KU3jvP
PR #451's first run (46025331730) failed testCancelDiscardsKeyEditAndKeepsRow on the same miss #427's ⌘, fallback had covered: "Connect… is covered", with Settings ("General") the app's front window and the button inside its frame. So nothing of Blurt's covers it — another app's window does, or Blurt isn't the active app; the removed ⌘, raised it because typeKey brings the app forward first. The failure now names the app's state (4 = in front) and keeps a full-screen screenshot in the result bundle, so the next run says which. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DS5B1Thm9A5RTqE6KU3jvP
|
Status: CI red on The only failing test is
Even so, the button isn't hittable, so whatever covers it is a window from another process (a system dialog or a notification). The ⌘, step this PR removes cleared that cover, which is why it passed on main. Blocked on: run 46044674961's Generated by Claude Code |
…Settings The result bundle's screenshot from PR #451's run 46044674961 shows what covered testCancelDiscardsKeyEditAndKeepsRow's Connect… button: macOS's "Keystroke Receiving" prompt ("Blurt would like to receive keystrokes from any application"), open over Settings. Under UI testing AppDelegate calls showOverlay() at launch, which calls the key tap's ensureRunning(), and CGEvent.tapCreate for key events without Input Monitoring raises that prompt — the comment there assumed it simply failed. The install retry on the permission poll tried again every tick. The suite never uses the real tap: it drives the gate through simulatePressForTesting. ensureRunning() now refreshes the binding the simulated presses read and, under UI testing, creates no tap. With nothing covering the row, openKeyEditor needs no second ⌘, (removed earlier in this PR) and its comments name the real cause. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DS5B1Thm9A5RTqE6KU3jvP
|
Resolved: CI green on The screenshot showed macOS's "Keystroke Receiving" prompt open over Settings. The app raised it at launch under UI testing by creating a real key-event tap, which needs Input Monitoring permission. Under UI testing the app now creates no real tap: the suite only ever drove the tap's gate through Generated by Claude Code |
…hange
The audit timeouts ("Audit failed to complete in time", -56) hit the first
test of a shard: testSetupWithKey in #451's queue run (46055375031), and
testConsent and testSetupWithKey in the runs that added the re-run #447
removed. That test pays for the runner installing the app afresh (~20 s
in #451's recording) and the cold first launch after it, and the audit
read the hierarchy while the app was still coming up.
The class's setUp now launches the app once and waits for its screen to
hold still before any test (`warmFirstLaunch`), so no test's screen is the
cold launch; and audit() snapshots until the screen holds still before it
reads it, as auditScrolling already did for every page but the first.
Both are bounded waits for a state, not a re-run: a screen that never
settles still gets audited, and a pass that times out still fails.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DS5B1Thm9A5RTqE6KU3jvP
What & why
This follows up the three Mac-side flakes seen in CI between Nov 25 and 27. It fixes one at its cause, makes another diagnosable, and confirms the third is already fixed on main.
1.
APIKeySheetUITests/testCancelDiscardsKeyEditAndKeepsRow: the "Connect…" button was coveredOn main, a ⌘, fallback (#427) kept this test green. With it removed, the test failed on every run of this PR and on all 3 test-plan attempts. A full-screen screenshot from the result bundle (run 46044674961) shows what covered the button: macOS's "Keystroke Receiving" prompt ("“Blurt” would like to receive keystrokes from any application"), open over Settings.
Cause: under UI testing,
AppDelegatecallsshowOverlay()at launch. That callsDictationKeyTap.ensureRunning(), which runsCGEvent.tapCreatefor key events. Without Input Monitoring, macOS raises that prompt; the comment there assumed the call simply failed. The install retry on the permission poll then tried again on every tick.Fix: under UI testing,
ensureRunning()refreshes the key binding and creates no real tap. The suite never used the real tap: it drives the gate throughsimulatePressForTesting.With nothing covering the row:
openKeyEditordrops the ⌘, fallback.openSettingsWindowwaits for Settings to be the front window after its one ⌘,.2. Make a missed live press diagnosable
LivePerformerTests"every element action lands in the fixture" failed once on #447. That PR touched no Mac code, and the test passed on its next run. The press's answer sat inside#expect, so the log couldn't show what the performer did instead. Each press's answer is now held in a variable before it's checked, so the next miss names it. This is a diagnostic, not a fix, and it adds no retry.Not changed: already fixed on main
ReadAloudFlowsUITests/testPillShowsAReadAndNeverReplaysAnOldNoticeonly failed on #439's branch, from a change that was reverted before merging.How it was tested
Written in a Linux sandbox, which can't build or run the Mac suites, so CI is the first execution. Locally: swift-format,
swiftlint lint --strict, the size and lint-lite checks, andscripts/check.sh --portableall pass. The cause came from the CI run's own screenshot.scripts/check.shpasses (or CI will, if I'm not on a Mac)DictationKeyTap.ensureRunning,AppDelegateand the UI-test helpers)🤖 Generated with Claude Code
https://claude.ai/code/session_01DS5B1Thm9A5RTqE6KU3jvP