The island shows the charger and headphones, and Shelf cards Quick Look and AirDrop - #15
Merged
Merged
Conversation
The island existed only while music played. The two moments people look for first on a notch Mac are the charger going in and AirPods connecting, and both come from public APIs with no permission: IOKit power-source notifications and the CoreAudio device list the lock card already reads. AmbientWatch reports the moment external power arrives and the moment a Bluetooth audio output appears, each once. It polls nothing. The pill grows out of the notch for 2.2 s in one grammar: a glyph in the left wing where the cover sits, the value in the right wing where the equalizer sits. That is the level for the charger and the device name for headphones, white on black like every other wing. The moment has the track peek's restraint: never with the panel open, under the pointer, mid-drag, over the lock screen or on a dark display. A track peek already showing gives way, and a lock clears it. Show Charging and Show Headphones Connecting are in Settings → General, both on. Tests: AmbientMomentTests (new): the power edge, device arrivals, the pill's width bounds, the defaults, and an offscreen render of both moments (written out with SHOT_OUT).
The Shelf could copy, open and reveal a card, but not preview it or send it anywhere. Its context menu now has Quick Look, the system panel, and AirDrop, the system sheet, offered only when AirDrop can take the files. Both act on the selection the way a drag does. Each activates the app, because each opens a window the user must use, and an inactive app's window opens behind theirs. The design doc, README and checklist record the island's new moments and these two actions. The hardware checks still owed are listed there. Tests: ShelfSharingTests (new).
# Conflicts: # checklist.md
…moments stay polite A review of the charger, headphones and Shelf-sharing commits found these, all fixed here: - Quick Look and AirDrop activated Isla and left it active, so the document the user had been typing in stopped answering until clicked. Activation is now handed back when the panel or the sheet closes. - Quick Look set the panel's data source without being its controller, which the SDK forbids and the runtime warns will raise. AppDelegate now accepts control from the end of the responder chain. - The AirDrop row asked NSSharingService on every card redraw. It is now checked on the click. - A charger moment could outlive sleep and wake the Mac with a stale percentage. Sleep clears it. - Headphones are tracked by device UID with a 30 s quiet period, a failed CoreAudio read no longer re-announces everything, and "Elshod's AirPods Max" shows as "AirPods Max". - A battery that holds rather than charges shows the plug and says "Power adapter connected". A failed power read no longer loses the next plug-in. Show Charging appears only where there is a battery. - The moment is refused where the grown pill would reach a still cursor, and every refusal is a pure, tested NotchController.ambientAllowed. Tests: AmbientMomentTests and ShelfSharingTests cover each. ./scripts/check passed with the xctest defaults domain set aside: 11 steps, 544 tests.
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.
This is the second half of the 2026-09-23 batch (plan section 7). It builds on #14, which is merged.
What changes
AppDelegate) and AirDrop (the system sheet). Both hand the keyboard back to the app that had it when they close.Verification
./scripts/checkpassed locally: 11 steps, 544 tests.AmbientMomentTests; passSHOT_OUTto write the PNGs.