Repository navigation
Main window speed, part 2: less repeated work in Settings and Home - #2023
Merged
Merged
Conversation
The Apps row only needs to know whether the merged list is empty, but it built the whole list (a LaunchServices name lookup per allowed app that isn't running, then a sort) just for that, and the list below built it again. The divider now checks the two inputs directly: the union is empty exactly when both are. Same divider, same rows. Claude-Session: https://claude.ai/code/session_01VJosskWzmoGsWf4C4U3uJU
pruneMissingPaths held the cache's SQLite lock across one fileExists per cached row, so a Home search or Today build that needed the cache waited for the whole sweep (once a minute, longer on a slow or iCloud library). It now copies the paths under the lock, stats them unlocked, then locks again to delete. Rows found missing are re-checked under the lock, so a meeting saved again at the same path in between keeps its row. Same rows removed, same count returned. Claude-Session: https://claude.ai/code/session_01VJosskWzmoGsWf4C4U3uJU
The review queue scan only skipped transcripts with no db_pending speaker. Every transcript that still listed one was read (up to 256 KB), parsed, and for voices without a clip parsed again into transcript lines, on every refresh: each window open, rename, merge and meeting save. Users who rarely name voices keep most meetings pending, so that was close to reading the whole library each time. Now the profile-independent part of that parse (title, dates, capture id, duration, imported flag, the pending speakers, their sample lines, and the retained-audio preview windows) is cached by path + mtime + size, the same key as the no-pending cache. Each scan still applies the current profiles and clips and resolves the audio files fresh, so naming, deleting or re-clipping a voice shows up as before. If a voice lost its clip since the summary was made without transcript lines, the file is read again. pendingItems(in:...) keeps its signature and builds through the same summary, so its tests cover both paths. Claude-Session: https://claude.ai/code/session_01VJosskWzmoGsWf4C4U3uJU
Deleting a dictation read the whole day file twice, rewrote it (or moved it to the Trash) and fixed its permissions on the main thread, under the same lock the dictation writer holds while it saves. A delete during a save, or on an iCloud library with the file evicted, could stall the window. Undo's restore and the kept-audio cleanup when the undo window closes did the same. All three now run in a background task, the way meeting delete already does. A delete already in flight for the same entry is ignored instead of running twice. The store posts .dictationTranscriptDidSave from that background task, so the Settings window now receives it on the main queue (the menu bar already did). Same undo line, same alerts, same refresh after each step. Claude-Session: https://claude.ai/code/session_01VJosskWzmoGsWf4C4U3uJU
present() starts the full refreshState() for the new presentation and then activates the app. That activation fired refreshAfterAppActivation, which re-read permissions (TCC), shortcuts and the login-item status on the main thread while the window was opening; refreshState already reads all of them. present() now records when it ran, and an activation within a second of it is skipped. Later activations (coming back after granting a permission) refresh exactly as before. The rule lives in SettingsClosedWindowRefreshPolicy with a test. Claude-Session: https://claude.ai/code/session_01VJosskWzmoGsWf4C4U3uJU
Covers the pending-transcript cache: a newly named voice clears on the next scan, a deleted profile drops its row, clip URLs are applied fresh, and repeated scans of an untouched transcript give the same rows. Claude-Session: https://claude.ai/code/session_01VJosskWzmoGsWf4C4U3uJU
…ete event Review follow-up: track the confirm only once the delete actually starts. Claude-Session: https://claude.ai/code/session_01VJosskWzmoGsWf4C4U3uJU
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Requested by Justin · project thread
Why
This follows #2012 (merged) with more of the no-visible-change items from the UI speed plan. Pixels and behavior stay the same, and each commit stands alone. It's not part of the 1.1.70 test copy unless Justin or the release thread says so.
Product Impact
meetings/dictationmeeting reliabilityWhat changed
How I checked it
bash check.sh quick: pass (66/66)python3 scripts/dev/check-source-pins.py --changed-only,check-file-size,check-module-boundaries,check-test-shape,check-known-traps,check-telemetry-keys: passTests/SpeakerReviewQueueScannerTests.swift(a named voice clears, a deleted profile drops, clips are applied fresh, repeat scans give the same rows) andTests/SettingsClosedWindowPolicyTests.swift(activation window)bash build.sh --no-open/bash run-tests.sh: CIChecks I could not run, and why:
Mac or hardware test still needed?
main, with and without allowed apps.Risk Review
Notes
Plan:
speed/2026-10-05/ui.md. Review:reviews/next-release/2023.md(project files).🤖 Generated with Claude Code
https://claude.ai/code/session_01VJosskWzmoGsWf4C4U3uJU