Skip to content

feat(island-notifications): notification cards from the Dynamic Island - #547

Open
nikoelt wants to merge 31 commits into
mactools-app:mainfrom
nikoelt:pr/island-notifications
Open

nikoelt wants to merge 31 commits into
mactools-app:mainfrom
nikoelt:pr/island-notifications

Conversation

@nikoelt

@nikoelt nikoelt commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

Builds on #542: its commits come first in this branch, so please review this after it. Closes #543.

Problem and result

On the MacBook Pro with the camera island (macOS 27), notifications still slide in at the top-right corner, while on iPhone they grow out of the Dynamic Island. This adds an opt-in plugin that shows each notification as a card growing out of the island:

  • A short card shows the app, title and message; hovering keeps it up.
  • Swiping up dismisses it, pulling down opens the full message or holds it, and a click opens the exact item.
  • Messages cards, and Claude cards when that switch is on, have an inline reply field.
  • A Notifications list shows recent notifications, stacked by app like Notification Centre, and opens or clears them there. It gets its own panel at the width of Notification Centre's column, and the panel glides between widths.

Notification Centre stays the record: every notification still goes into its history, and Focus, notification styles and previews apply as before.

Changes

  • New plugin Plugins/IslandNotifications:
    • Watches Notification Centre's banner windows through Accessibility and moves each window off screen before it draws.
    • Shows a non-activating card using the shared morph surface.
    • Splits below a compact system Live Activity.
    • All Accessibility work runs off the main thread with bounded timeouts.
  • Shared surface: refactor(notch) moves the morph spring, geometry, path and mask view from NotchMenuBarPanel into Sources/PluginSupport/NotchMorphSurface.swift. The plugin compiles that file through its project.yml. PluginKit is unchanged.
  • Hover panel: NotchHoverPanelController no longer opens the hover panel while the pointer is over an island card.
  • Opt-in panel width (host):
    • MenuBarPanelDefinition.width is an optional width used while that panel is showing. It is decoded if present, and normalization drops any value below the shared minimum. No existing panel has one, so for everyone else nothing changes.
    • MenuBarPanelDefinition.dedicatedPanels maps the Notifications list to its panel: bell icon, 372 pt (Notification Centre's 344 pt column plus the list's 8 pt and the panel's 6 pt margins on each side). It is created once, during first reconciliation, only while the five-panel limit allows. After that it is an ordinary panel that can be edited or removed.
    • In a panel with its own width, a full-width widget alone in a single column fills the column (fillsBand). Everywhere else widgets keep their declared size, as the contributing guide requires.
    • NotchMenuBarPanel springs width and height together. The window keeps the larger size and the content is clipped to the surface during the change (NotchMorphMetrics.windowContentSize and revealedContentSize). Reduce Motion keeps the old instant resize.
  • Claude chat cards (a separate switch, off by default): Claude Code's session logs are read only while it is on. A finished turn is posted as MacTools' own notification, and the card is made only from that banner, so MacTools' notification settings, Focus and hidden previews decide whether one shows. A banner becomes a Claude card only when its app is MacTools, it shows the posted text, exactly one waiting turn fits, and macOS lists that request as delivered; any other banner keeps its own content. Each reply is reported once, including replies Claude writes as a thinking line and a text line. Behind each Claude card is MacTools' own banner, tracked like any other: a newer turn swapped into it becomes its card, and opening or clearing the card removes MacTools' notice from Notification Centre.
  • Reply targets:
    • A Messages lookup is fixed to the banner's arrival. Until Messages has written the banner's own message (15 seconds), only messages from the half minute around it count. Only a banner macOS shortened ("…" or its 1,024-character cut) may match the start of a longer message.
    • A banner that was already on screen when the plugin first read it has no known arrival time, so its card has no reply field and opens Messages itself.
    • A Claude reply checks the chat again by its session id and on screen before the text goes in and before Send. Another chat with the same title refuses the reply. Claude is reached only through its sidebar entry, never its link, which would bring it forward.
    • A reply sent from a card removes its notification from the list and from Notification Centre.
  • Notifications list: a row matches only on all of the notification's text, and two rows that read the same are left alone. Opening an entry removes it on the list's spring, as Clear does.
  • Reply animation: the text lifts out of the field on Send, a multi-line field shrinks back to one line with the card, and the card folds into the island with its content kept inside the surface. The shared morph view gains clipsContentToSurface, off by default, so the hover panel is unchanged.
  • Live Activities: MenuBarAgent's Accessibility subscriptions change only for elements that appeared or went, and reads are coalesced to at most two a second.
  • Scope: runs only on the camera island with macOS 27. Everywhere else it reports that it is unavailable, and nothing runs.
  • Permissions: Accessibility is required. Full Disk Access is optional, used only to read Messages' history so a reply reaches the exact conversation. The banner's text is matched to a message received from five minutes before the banner arrived to 30 seconds after, including the earlier versions Messages keeps for an edited message, since the banner shows the text as it arrived. No match means no reply, never a guess.
  • Data: nothing is stored. The list lives in memory, notification text never reaches the logs, and the switch defaults to off.
  • Language: works in any system language. Notification Centre's action names are read from its own string tables, and descriptions are split at any language's list marks.
  • Docs and metadata: a feature guide (docs/plugins/island-notifications.md), a plugin and an app changelog fragment, search terms and the panel name in 12 languages, and regenerated website and backup data.

Verification

  • IslandNotificationStateTests (including reading an edited message's earlier versions), IslandNotificationHistoryTests, IslandLiveActivityGeometryTests and MenuBarPanelStoreTests (two new tests: the dedicated panel is created once with its width while other panels have none; an invalid width is dropped), plus new tests for the reply arrival window, the Claude chat recheck, the Claude notice matching (other app, short text, two waiting turns, a request macOS refused, thinking lines), adopted alerts, shortened-only prefixes and the full-text row matching, within the full XCTest suite: pass, 3,362 tests, 0 failures (6 skipped by upstream's own settings)
  • make script-tests: pass (changelog, localization, website data, backup inventory, and 275 tooling tests)
  • Checked by hand on a MacBook Pro with the camera island (macOS 27), before the review fixes:
    • temporary banners and persistent alerts;
    • every gesture, and the exact-item open;
    • replies to Messages and Claude;
    • the list's open and clear, including inside a stack;
    • switching to the Notifications panel and back glides between widths, and opening or folding a stack moves the list and the panel's edge together;
    • other panels are unchanged.
  • Checked by hand after the review fixes: Claude replies from a card, including multi-line ones. The send and close animation was also recorded frame by frame with a test card.
  • Checked by hand after the second review's fixes: Claude cards come only from MacTools' delivered banner (another app's banner arriving while a reply waited kept its own content), a Claude reply from a card, including one that switched Claude to another chat in the background, and a Messages reply from a card.
  • Not yet checked by hand: an alert already on screen when the plugin starts (covered by unit tests), Claude cards under Focus or hidden previews, Focus and private previews, another system language, Reduce Motion (cards and the panel resize) and VoiceOver. Other languages are covered by unit tests of the description matching.
  • Measured before the review fixes: idle CPU 0–1.3%, footprint about 43 MB, about 10 log lines an hour. After the Live Activity change, MacTools idles at about one wake-up a second.

UI evidence

Cards

A compact card

A long card with a subtitle

Pull down to open the full message, then close it:

Pull open and close
Full-quality video

Swipe up to dismiss:

Swipe up to dismiss
Full-quality video

Notifications list

A stack in the list

The stack opened

The stack fanning out
Full-quality video

Panel width

Before, a panel at the shared width, and the Notifications panel at its own width:

A panel at the shared width

The Notifications panel at its own width

Switching between them:

The panel gliding between widths
Full-quality video

Captured from MacTools' own windows with test notifications. The recordings are built from rapid stills, because macOS hides banners while the screen is recorded. A Messages reply card is not shown: it needs a real incoming message.

The island surfaces are always dark, as Apple's are, so there is no light-mode variant.

Checklist

  • Core behavior and relevant risks are verified using existing tests, focused additions, or manual checks; results or limitations are recorded.
  • UI evidence is attached where applicable; shared components, themes, localization, and accessibility are respected.
  • User-facing documentation and changelog fragments are updated when required.
  • Plugin metadata, runtime contracts, action policies, and minimum-host compatibility agree.
  • Licensing and third-party notices are complete; no credentials, local configuration, or unrelated generated files are included.

🤖 Generated with Claude Code

nikoelt and others added 10 commits November 15, 2026 16:22
An opt-in plugin for the MacBook Pro camera island (macOS 27) that shows
each notification as a card growing out of the island, the way iPhone
does: hover to keep it, swipe up to dismiss, pull down to open, click to
open the exact item, and reply inline to Messages and Claude. A
Notifications widget lists recent notifications stacked by app and opens
or clears them through Notification Centre.

Notification Centre stays the record: banners are hidden through
Accessibility while a card shows and still go into its history; nothing
is stored and notification text never reaches the logs. Accessibility
work runs off the main thread with bounded timeouts. Off on every other
Mac.

The notch morph surface moves from NotchMenuBarPanel into
Sources/PluginSupport/NotchMorphSurface.swift so the plugin can compile
it; PluginKit is unchanged. The hover panel no longer opens under a card.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The list measures itself only while it is on screen, so a list that grew
while the panel was shut could open at its old height with the stacked
cards' edges cut off. The widget now asks the host for its size again
each time it becomes visible.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A panel can carry its own width, used while it is showing; no existing
panel has one, so nothing changes unless a panel opts in. A full-width
widget alone in such a panel fills its column. The Island Notifications
list gets a dedicated Notifications panel, created once when the list
first appears and only while the panel limit allows, sized so its cards
match Notification Centre's 344 pt column.

The notch panel now glides between sizes on a spring instead of
snapping, with its content clipped to the surface while it changes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The "No Notifications" line could report after the list had measured itself,
shrinking the panel to the empty height and cutting off the notifications.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A message edited after its banner showed no longer matched the card's
text, so replying said the conversation couldn't be found. The lookup
now also compares the earlier versions Messages keeps for edits.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@ggbond268

Copy link
Copy Markdown
Collaborator

Thanks for the work on this! I reviewed 687f78f and recommend addressing these four issues before merging:

  1. Messages replies can go to the wrong conversation. The send-time lookup matches message text within the last five minutes. If Alice's card stays open longer than that and Bob sends the same text, replying to Alice's card resolves to Bob. Please bind the card to a verified conversation identity and validate it before sending; if the target cannot be confirmed, open Messages instead.

  2. Claude transcript cards bypass notification privacy controls. They display reply text directly from session logs, without checking whether system banners are allowed, Focus suppresses them, or previews are hidden. Please use an allowed system banner as the source. If transcript alerts are retained, give them a separate opt-in and privacy controls that prevent this bypass.

  3. Claude replies can target a different chat with the same title. Title uniqueness is captured when the card is created, and sending relies on the current page title. A later same-title chat can therefore pass the old card's checks. Please revalidate the conversation using a stable session identity before entering and submitting text; otherwise, open the original chat instead.

  4. History actions can open or clear the wrong notification. Matching uses the app, title, and only the first 40 characters of the body, then selects the first match. Different notifications sharing that prefix can be confused. Please use a stable notification identity where available, or match the full available content and refuse ambiguous results before opening or clearing anything.

The existing 13 plugin tests pass. Isolated checks reproduced the Messages lookup, Claude identity-check, and history-matching issues using synthetic data; no real replies were sent. The privacy issue was confirmed from the code path, without a live Focus test.

nikoelt and others added 9 commits November 18, 2026 19:23
Messages: the conversation is looked up among messages received around the
banner's arrival, not the last five minutes before Send. A card held open
can no longer come to match a later message with the same text from
someone else; opening from the card or the list uses the same window.

Claude: the card's chat is looked up again by its id at send time, and the
window is checked again before the text goes in and before Send. Another
chat with the same title, now or in the sidebar, refuses the reply, and a
reply that isn't sent is taken back only if the box still holds just it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Stopping waited for any queued transcript read, up to a megabyte, on the
main thread. The queue now keeps the reader alive until its queued work
has run, and a turn read just before the stop is not shown after it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A row in Notification Centre now matches only with all of the
notification's text, not its first 40 characters; text shortened with "…"
on either side must still agree for 12 characters, and a notification
with no text matches only a row with none. When two rows read the same,
neither is opened or cleared: opening falls back to the app.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…changes

The plugin relies on host changes in this branch (a panel's own width and
the hover panel staying shut over a card), which no released host has
yet; the minimum host is now the next one, 2.2.4.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…rough a notice

Claude chat cards were shown straight from Claude Code's session logs
whenever the plugin was on, outside Focus and preview privacy. They are
now a separate switch, off by default, and the logs are read only while
it is on. A finished turn is posted as MacTools' own notification, and
its banner becomes the card: MacTools' notification settings, Focus and
hidden previews apply as for any app, the notice stays in Notification
Centre's history, and nothing shows when macOS would show nothing.

The guide now says how both reply targets are confirmed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Pressing Send lifts the text out of the field, as a sent message leaves
the Messages field, and the button turns to a spinner; the field keeps
its height, so the card doesn't move. Sent shows a green check, then the
card folds straight back into the island: its content shrinks toward the
island and blurs while it fades, and stays inside the surface, which it
used to spill past. A send that fails brings the text back.

The keyboard now returns to the app once the card has gone, instead of
the card blinking out and back as it closed, and the error line gets its
own room instead of covering the message.

The shared morph view gains an opt-in, off by default, that keeps its
content inside the surface at every size.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A reply of several lines left a tall empty field behind it, with "Sent"
at the top and the check stranded at the bottom. Now the reply rises and
fades inside the field, then the field shrinks back to one line as the
Messages field does, and the card shrinks with it on the same spring, so
"Sent" and the check share a one-line field. Growing a line while typing
follows the same spring. A send that fails brings the field back to its
text's height.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Each new line made the field and card spring to their new height while
the text kept the cursor in view, so the text bounced up and down. Lines
added or removed while typing take effect at once again, as in Messages;
only the field emptying back to one line after Send is animated.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Every read of MenuBarAgent removed and re-added all of its Accessibility
subscriptions, and re-registering made MenuBarAgent report changes that
started another read. Subscriptions now change only for elements that
appeared or went, changes are coalesced to at most two reads a second,
a hidden card checks its place at most twice a second, and MenuBarAgent
is found once instead of scanning every running app on each read.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@nikoelt

nikoelt commented Nov 18, 2026

Copy link
Copy Markdown
Contributor Author

Thanks for the thorough review. All four are addressed:

  1. Messages target. The lookup is now fixed to the banner's arrival, not to Send: messages received up to five minutes before it or 30 seconds after (Messages writes its history a few seconds late). A card held open can no longer come to match a later message with the same text, and opening from the card or the list uses the same window. No single match still means no reply. (5501e3f)
  2. Claude cards and privacy. They are now a separate switch, off by default, and the session logs are read only while it is on. A finished turn is posted as MacTools' own notification, and the card is made only from that banner when macOS shows it with the chat's title and the start of the reply. So MacTools' notification settings, Focus and hidden previews decide, as for any app, and a turn whose banner never appears expires without a card. The guide's sentence about Focus is corrected. (cffdd6e)
  3. Claude target. At send time the card's chat is looked up again by its session id, and another chat with the same title, in Claude's records or twice in the sidebar, refuses the reply. The window is checked again just before the text goes in and before Send; if it changed chat, nothing is sent and the text is taken back, and only while the box still holds just that reply. (5501e3f)
  4. List rows. A row now matches only on all of the notification's text. Text shortened with "…" must still agree for 12 characters, and a notification with no text matches only a row with none. When two rows read the same, neither row is pressed: opening falls back to opening the app, and Clear leaves Notification Centre as it is. (6ee4a49)

Also on the branch:

  • Stopping the Claude log watcher no longer waits on the main thread for a queued transcript read. (688b92c)
  • The Live Activity observer no longer re-registers its MenuBarAgent subscriptions on every read: re-registering made MenuBarAgent report changes that started another read. Subscriptions now change only for elements that appeared or went, reads are coalesced to at most two a second, and MenuBarAgent is found once. On my Mac this took MacTools from about 150 idle wake-ups a second to about one. (5cb6a5f)
  • minHostVersion is 2.2.4, since the plugin relies on host changes in this branch. (39b0845)
  • The reply's send and close animation is finished: the text lifts out of the field on Send, a multi-line field shrinks back to one line with the card, and the card folds back into the island with its content kept inside the surface. Lines typed in the field still resize it at once; only the emptying after Send is animated. This touches the shared morph view only through a new opt-in that defaults to off, so the hover panel is unchanged. (695dce1, 5112db5, 3246120)

Tests: new unit tests for the arrival window, the Claude chat recheck, the Claude notice matching (hidden preview, another app's banner with the same title, expiry) and the full-text row matching. The plugin's tests and the full XCTest suite pass on the branch (3,289 tests, 0 failures; 6 skipped by upstream's own settings), and make script-tests passes.

nikoelt and others added 3 commits November 18, 2026 20:49
…osing

Escape, a click elsewhere or a system panel could be undone by moving the
pointer on the island while the panel closed, because any hover reopened
it. The panel now records why it closes: only a close because the pointer
left is reversed by hovering back, while a click or shortcut still claims
it. After a dismissal the hover owner opens the panel again only once the
pointer has left the trigger and come back.

A size requested while the panel was closing was dropped, so a panel that
reopened kept its old bounds and could clip its content. The latest size is
now kept and applied when it reopens.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… island-notifications

# Conflicts:
#	Plugins/NotchHoverPanel/Sources/NotchHoverPanelController.swift
#	Sources/App/NotchMenuBarPanel.swift
#	docs/plugins/preferences-backup-inventory.md
@nikoelt

nikoelt commented Nov 18, 2026

Copy link
Copy Markdown
Contributor Author

Follow-up: this branch had a merge conflict with main. I merged the current main and the #542 fix for its two review points (678090f) into it. Three files conflicted: docs/plugins/preferences-backup-inventory.md, regenerated with scripts/plugins/generate-preferences-backup-inventory.py, and NotchMenuBarPanel and the hover controller, which keep both this branch's size spring and #542's close reason. The full XCTest suite passes on the merged branch (3,357 tests, 0 failures; 6 skipped by upstream's own settings), and make script-tests passes.

@ggbond268

Copy link
Copy Markdown
Collaborator

Thanks for the updates! I rechecked 846a2d1 and confirmed the fixes for cards held open after arrival, Claude's stale same-title check, the history prefix-matching issue, and the host close/resize regressions. The default-off Claude setting and reduced observer work are also good improvements.

Two safety issues still need addressing:

  1. An unrelated notification can reveal a pending Claude reply. The card matches a pending turn by title and body prefix without verifying the source app. For example, another app's “Notes / Done.” banner can become a card containing the full pending Claude reply. Since the reply is cached before notification delivery is confirmed, this can expose content even when MacTools' own notification is suppressed. Please verify that the banner is MacTools' own delivered notification and uniquely matches the pending turn before adding transcript content. Otherwise, keep the original banner content.

  2. Adopting an old Messages alert can still select the wrong recipient. Existing alerts receive a new arrivalDate when the plugin first sees them. If Alice's persistent alert from ten minutes ago is still visible, and muted Bob recently sent the same text, enabling the plugin adopts Alice's alert but resolves the reply to Bob. Please bind replies to a verified message/conversation identity. For existing alerts whose identity cannot be confirmed, disable inline reply and open Messages instead.

Both cases were reproduced with synthetic data; no real replies were sent, and Focus was not tested live. I'd recommend fixing these two issues before merging. Thanks again!

nikoelt and others added 4 commits November 19, 2026 09:47
… alerts

A Claude card now takes a waiting turn only from MacTools' own banner
that shows the posted text, when exactly one turn fits and macOS lists
that request as delivered. Notices are posted only with permission and
dropped if macOS refuses them. Any other banner keeps its own content.

Banners found already on screen (at start, or while a read was skipped)
are adopted with an unknown arrival time: no Messages reply field, and
opening falls back to Messages itself. Lookups only count messages from
around the arrival until the history has settled (15 s), and a card
keeps the conversation it found.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ed list entries

A reply sent from a card now removes its notification, as replying from
the notification itself does: from the panel's list, and from
Notification Centre (a banner still alive is closed off screen; one
already filed there has its row cleared, as the list's Clear does;
MacTools' own Claude notice is removed directly).

Opening an entry from the list removes it on the list's spring, as
Clear does, so the cards below move up with the panel instead of
leaving a gap.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…a label

A short all-caps first line was always read as a header label such as
TIME-SENSITIVE and dropped. An email from an all-caps sender then lost
its sender, and the app was read as "Spark Desktop, SENDER", so the
card and list entry had no icon or app. A line that the banner's
description lists as its own part, right before the next line, is now
kept as the title.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
nikoelt and others added 3 commits November 19, 2026 11:22
…ude reply

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude writes a reply that has thinking as two lines that both end the
turn: the thinking, then the text, under one message id. The watcher
reported both, the thinking line falling back to the last reply in the
log, so the same reply was posted twice and the card's single-match
check refused both, leaving two plain MacTools notifications.

A thinking-only line is no longer a reply, each message id is reported
once per session, a reply already waiting is not posted again, and
copies of one chat's same reply count as one turn when matching.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…essages prefix

Claude replies:
- A sidebar entry is a button whose first text equals the chat's title,
  however deeply Claude nests it (a selected or hovered row has more
  groups). The exact first-child layout rejected the real row, so
  replies failed with "chat not in the sidebar".
- Only "<title> - Claude Code" counts as the chat showing.
- The claude:// link is no longer opened to reply (it always brings
  Claude forward); without a sidebar entry the reply fails and the
  card opens the chat.
- A banner takes a waiting reply only when exactly one matches; the
  merging of copies and the mismatch log are gone (each reply is
  reported once by the log reader).

Messages: a banner matches only the start of a longer message when
macOS shortened it ("…" or the 1,024-character cut), so "See you
tomorrow" no longer matches someone else's "See you tomorrow at noon".
A group banner also matches its message without the group's name, and
attachment placeholders are ignored.

Reviewed with Fable 5.2 and GPT 6.2 Astra.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@nikoelt

nikoelt commented Nov 19, 2026

Copy link
Copy Markdown
Contributor Author

Thanks for rechecking, and for the clear repro cases. Both are addressed:

  1. Claude reply revealed by another banner. A banner now becomes a Claude card only when:

    • its app is MacTools;
    • it shows the text that was posted (in full, or shortened with "…" after a start of at least 12 characters);
    • exactly one waiting turn fits;
    • macOS lists that notification request as delivered.

    Otherwise the banner keeps its own content, so "Notes / Done." from another app stays that app's card. Notices are posted only with notification permission, and a request macOS refuses is dropped at once. One limit: Accessibility gives a banner's app only as its display name, not a bundle id, so "MacTools' own" means the banner's app name is MacTools. The delivered request and the exact text are what tie it to this turn.

  2. Adopted Messages alert. Banners already on screen when the plugin first reads them are adopted with an unknown arrival time. That covers start-up, and banners that came while Notification Centre was open or while a read was skipped. Their cards have no reply field; opening tries the alert's own action first, then Messages itself, with no conversation lookup. Banners carry no message id, so a fully verified identity isn't available. What a reply relies on is a confirmed arrival plus exactly one matching conversation. Two related gaps are closed as well:

    • Until Messages has written the banner's own message (15 seconds), only messages from the half minute around the arrival count. An older identical message from someone else therefore can't be the only match.
    • A banner whose text is a whole message no longer matches the start of someone else's longer message. Only a banner macOS shortened ("…" or its 1,024-character cut) can.

Also fixed while testing:

  • A Claude reply that includes thinking is written as two turn-ending lines; it was posted twice and is now reported once.
  • A Claude sidebar row is found by its first text rather than one exact layout, and replies never fall back to Claude's link, which brings Claude forward.
  • A short all-caps sender is no longer taken for a "TIME-SENSITIVE" label.
  • A reply sent from a card clears its notification.

Checked by hand on the camera island (macOS 27):

  • Claude cards come only from MacTools' delivered banner; another app's banner that arrived while a reply waited kept its own content.
  • A Claude reply from a card, and a Messages reply from a card.

The adopted-alert case is covered by unit tests only, and Focus was not tested live. Full suite: 3,361 tests pass; make script-tests pass.

nikoelt and others added 2 commits November 19, 2026 13:17
…econd card

A Claude card shows the whole reply while its banner shows the start.
Any later read of that notification window compared the banner with
the card's text, saw a difference, took the banner for a newer
notification and made a second, plain MacTools card from it, which
then appeared in the list beside the Claude entry. Each card now keeps
the banner's own text, and only a change to that counts.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A Claude card now has MacTools' own banner behind it, but three places
still treated it as a card with no banner:
- The shown card's banner is re-read twice a second for Claude cards
  too, so a second Claude turn macOS swaps into that banner becomes
  its card instead of being missed.
- A window handed back to native closes its Claude card as well, so
  the card and the native banner never show together.
- Opening or clearing a Claude card or list entry removes MacTools'
  notice from Notification Centre, as replying already did.

Found in review by Fable 5.2.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@nikoelt

nikoelt commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor Author

Two more fixes, found while testing on the camera island (macOS 27):

  • A Claude turn could show twice in the list (12801b32). A Claude card shows the whole reply, while its banner shows the start. A later read of the same notification window compared the banner with the card's text, took the banner for a newer notification, and made a second, plain MacTools card from it. Each card now keeps its banner's own text, and only a change to that counts.
  • Claude cards are tracked like any other banner (bc9af383). Three places still treated a Claude card as having no banner behind it:
    • The shown card's banner is now re-read for Claude cards too, so a newer turn swapped into it gets its own card.
    • A window handed back to native closes its Claude card as well.
    • Opening or clearing a Claude card or list entry removes MacTools' notice from Notification Centre, as replying already did.

Checked by hand: one Claude card and one list entry per turn, and a Claude reply from a card that switched Claude to another chat in the background. Full suite: 3,362 tests pass, 0 failures (6 skipped); make script-tests pass.

@ggbond268

Copy link
Copy Markdown
Collaborator

Thanks for the updates! I rechecked bc9af38 and confirmed that unrelated or undelivered banners no longer reveal the pending Claude reply, and adopted old Messages alerts no longer offer inline reply or resolve a recent message. The duplicate-card and list-animation fixes also look good.

Two reply-safety issues remain:

  1. A new notification can still choose the wrong recipient. If Alice’s “OK” banner arrives before her message reaches the database, Bob’s identical message from ten seconds earlier is accepted immediately. Bob then remains cached even after Alice’s message appears and the lookup becomes ambiguous. Please use the notification’s own reply action or a verified message/conversation identity. A short time window alone cannot establish the recipient; do not cache an unverified match, and open Messages instead when identity cannot be confirmed.

  2. A pending reply can still send after the plugin is disabled. I started a reply while its message was missing from the database, deactivated the controller, and then added the message. The mock sender was still invoked because the generation check happens after sending. Please track and cancel pending reply tasks on stop/deactivation, respect cancellation during waits, and recheck the active generation immediately before sending or performing Accessibility actions.

Both cases were reproduced with synthetic data and a mock sender; no real messages were sent. The 27 existing plugin tests and 275 script tests pass. Thanks again for working through these safeguards!

This branch has not been deployed

No deployments
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.

[Feature] Show notifications as cards from the Dynamic Island

2 participants