Skip to content

Mac app: use platform APIs for the record dot, Settings links and labels - #439

Merged
alexkroman merged 16 commits into
mainfrom
claude/magical-maxwell-gfbw4a
Nov 27, 2026
Merged

alexkroman merged 16 commits into
mainfrom
claude/magical-maxwell-gfbw4a

Conversation

@alexkroman

Copy link
Copy Markdown
Collaborator
  • LiveRecordingView: .symbolEffect(.breathe) replaces the hand-rolled
    pulsingOpacity TimelineView; drop MeterBarGeometry.breathingOpacity and
    its tests, which had no other caller.
  • PermissionsStepView: Label for "Granted", reuse ProgressLine.
  • ReadyView: SettingsLink instead of openSettings.
  • MaintenanceSection: Show in Finder selects the log file when present.
  • TriggerKeyAction.displayName replaces two copies of the name switch.

Co-Authored-By: Claude Opus 5.5 noreply@anthropic.com
Claude-Session: https://claude.ai/code/session_01DS5B1WSxEQnVLdMQNCquvA

- LiveRecordingView: .symbolEffect(.breathe) replaces the hand-rolled
  pulsingOpacity TimelineView; drop MeterBarGeometry.breathingOpacity and
  its tests, which had no other caller.
- PermissionsStepView: Label for "Granted", reuse ProgressLine.
- ReadyView: SettingsLink instead of openSettings.
- MaintenanceSection: Show in Finder selects the log file when present.
- TriggerKeyAction.displayName replaces two copies of the name switch.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DS5B1WSxEQnVLdMQNCquvA
- StreamingPCMPlayer: AVAudioFormat.formatDescription for the wire format.
- VoiceCommandStep: synthesized Decodable for RawStep (CodingKeys = Field).
- MixWriter: vDSP_vsma/vDSP_vclip for the IOProc channel mix.
- OnceFlag: Atomic<Bool> instead of Mutex<Bool>.
- CaptureSessionRecorder: max() instead of reduce.
- OAuthClient, SpeechClient: Decodable error bodies and JWT claims,
  static ISO8601FormatStyle pair instead of a formatter per call.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DS5B1WSxEQnVLdMQNCquvA
- check-test-clock.sh also catches bare sleep(); fix the two unmarked
  UI-test sleeps (wait for the notice, mark the absence check).
- UI tests: XCUIElement.wait(for:toEqual:timeout:) and an
  XCTNSPredicateExpectation instead of hand-rolled polling.
- ios-lib.sh: ios_export_attachments replaces four copies of the
  xcresult manifest walk; ios-keyboard-shot.sh reads testFailures from
  the summary instead of walking the test tree.
- evals: read WAV PCM with the wave module instead of a 44-byte slice;
  one cache_root() and one load_json.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DS5B1WSxEQnVLdMQNCquvA
…soryFeedback

- BlurtiOSTests: a TestScoping .scratchSuite trait replaces 106 copies of
  ScratchSuite() + defer tearDown; guard/Issue.record -> try #require.
- SettingsView: @AppStorage(store: SharedStore.defaults) instead of a
  hand-rolled @State/onChange write-back; one defaultWindowMinutes.
- TextShortcutsCard: decode the shortcuts once per body.
- TypingTestView: .sensoryFeedback and FormatStyle.
- KeepOpen: Duration.UnitsFormatStyle for the card and picker labels.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DS5B1WSxEQnVLdMQNCquvA
…ing idioms

- waitUntil(_:timeout:_:) async overload throwing WaitTimedOut replaces
  ~15 unbounded Task.yield spins and three duplicate 30 s poll loops.
- GatedRewrites, GatedSpeaker, LateAnsweringTransport,
  HangingSpeechTransport signal and park on Gate/AsyncGate instead of
  polling a Mutex flag.
- withTemporaryDirectory/withTempLogURL replace hand-rolled temp dirs;
  every log-directory caller now cleans up.
- @test(arguments:), #require(throws:), #expect(==) and
  confirmation(expectedCount:) replace loops, do/catch, if-case and
  Mutex counters.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DS5B1WSxEQnVLdMQNCquvA
@alexkroman
alexkroman enabled auto-merge November 26, 2026 23:21
- ReadClipTests: hoist the try out of #expect so the closure is inferred
  as throwing (a try inside a macro doesn't count).
- VoiceCommandStep: periphery:ignore the CodingKeys typealias, which only
  the synthesized init(from:) reads.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DS5B1WSxEQnVLdMQNCquvA
…cancel

- TextShortcutsCard: add() re-checks the current fields and store, so a
  second tap before the redraw can't save an empty shortcut.
- ReadAloudFlowsUITests: wait for the pasted notice to appear before
  waiting for it to clear.
- GatedRewrites: a released request answers even if also cancelled, and a
  cancelled held one drops its gate.
- OAuthClientTests: cover a numeric offset and microseconds.
- live.py: the synthesize docstring describes _pcm.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DS5B1WSxEQnVLdMQNCquvA
Waiting for the notice to appear failed on CI: it can already have shown
and cleared by the time dictate returns, so no label wait can pin it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DS5B1WSxEQnVLdMQNCquvA
SharedStore becomes a Sendable value holding its UserDefaults, like the
engine's stores; the global nonisolated(unsafe) override is gone.
KeyboardModel, KeyboardRelayInjector, ListeningWindow and
SystemAudioSession take it as a required argument, and only the app and
keyboard entry points pass .live. Darwin signals carry the store's prefix
(empty for .live), DictationCoordinator's static mutexes move to a
per-coordinator DictationHandoff, and the relay can use a named pasteboard.

Tests build their own SharedStore.scratch() per test; ScratchSuite and
the .scratchSuite trait are removed, and BlurtiOSTests run in parallel.
The settled decision and a new invariant rule (no global static var
override in App/BlurtiOS) record the new rule.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DS5B1WSxEQnVLdMQNCquvA
Capture the store rather than [weak self], so a late XPC reply still
writes the lexicon as the static did before injection. Correct the
project.yml note: coordinator tests still write the general pasteboard.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DS5B1WSxEQnVLdMQNCquvA
…l-gfbw4a

# Conflicts:
#	App/Blurt/Blurt/Wizard/ReadyView.swift
#	App/Blurt/Blurt/Wizard/SoundsSettingsTab.swift
#	App/BlurtiOS/BlurtiOSCore/KeyboardModel+Typing.swift
#436's new asyncUndocumentedError test called scratchAudioFile(), which
this branch replaced with withScratchAudioFile/transcribeScratchFile.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DS5B1WSxEQnVLdMQNCquvA
os.Logger's message is an escaping autoclosure, so reading the injected
store there needs self. spelled out.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DS5B1WSxEQnVLdMQNCquvA
…lized

With parallel testing on, every test in the bundle ran at once on the
main actor (the target's default isolation). The suites that drive the
real ListeningWindow, DictationCoordinator and KeyboardModel poll for
their outcomes, and dozens of them at once starved each other past their
30 s bounds (openInFront, windowMinutesChanged, the coordinator's release
tests). Those nine suites keep .serialized, as on main, so each runs one
test at a time while suites still run in parallel with each other.

ios-test.sh now prints each failure's message from the xcresult summary,
since xcbeautify shows only the test names.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DS5B1WSxEQnVLdMQNCquvA
- KeyboardLifecycleTests.eventually takes the shared 30 s bound: a
  Darwin signal's round trip hops to the main actor, which other suites
  now share, and darwinSignals outran 3 s. Absence checks keep their own
  short timeouts.
- ios-test.sh holds xcodebuild's status until after the xcresult summary,
  so a failing run prints each failure's message rather than exiting
  before it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DS5B1WSxEQnVLdMQNCquvA
The test checks that an on-screen owner holds the dictation, but it asked
with Date(): under the address sanitizer with the suites in parallel, 25 s
passed and the record aged past the watchdog's bound on its own. The age
rule has its own tests; this one now asks at the record's seenAt.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DS5B1WSxEQnVLdMQNCquvA
@alexkroman
alexkroman added this pull request to the merge queue Nov 27, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Nov 27, 2026

Copy link
Copy Markdown
Collaborator Author

The merge queue dropped this PR on ios-audits (a): testConsent reported "Text clipped" on consent page 2 at the largest text size ("The text just before your cursor"). I don't think the PR caused it:

Every other job passed in the queue, and all of them passed on the PR run. Re-queuing should get it through. The audit's clipping check fires intermittently on ConsentView's wrapped labels; that's worth a separate fix.


Generated by Claude Code

@alexkroman
alexkroman added this pull request to the merge queue Nov 27, 2026
Merged via the queue into main with commit dc242bf Nov 27, 2026
22 checks passed
@alexkroman
alexkroman deleted the claude/magical-maxwell-gfbw4a branch November 27, 2026 03:40
alexkroman pushed a commit that referenced this pull request Nov 27, 2026
Two iPhone unit tests timed out at random after #439, each waiting its
whole 30 s `until` for a state that had already passed or never came:

- acceptedPress: FakeListeningSource held a press's start for 200 ms of
  wall time to make `.connecting` visible, while the test polled for it on
  the main actor. On a loaded runner the main actor was busy past 200 ms,
  `.connecting` gave way to `.recording` unseen, and the test failed at
  ~40 s (run 45935799021, ios-build). The fake now holds start() until the
  test calls releaseStart(), so the phase lasts until it has been checked.
- windowMinutesChanged: the test advanced the clock as soon as the record
  showed the shorter window, but the expiry timer is a task that parks on
  the clock when it next runs. Advanced first, it parked a minute past the
  step and never fired (same run, ios-sanitizers address).

WindowRig.step(_:once:) advances only once a timer due within the given
range has parked, bounded as `until` is; beat() is that for one heartbeat.
Every heartbeat and resume-poll step in the window tests uses them, the
unbounded waitUntilSleeping included, since these suites carry no
.timeLimit to end a sleeper that never arrives.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DS5B1Thm9A5RTqE6KU3jvP
alexkroman pushed a commit that referenced this pull request Nov 27, 2026
main (#439) replaced the scratchAudioFile() helper with
withScratchAudioFile; the PR's new test still called the old one, so the
test target failed to compile after the merge.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DS5B1VC8iooQz2hEdMGZKZ
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants