Skip to content

refactor(menubar): shared prompt/dismissal component [P17.02]#170

Open
cesarnml wants to merge 7 commits into
agents/p17-01-capability-matrix-drafted-from-code-developer-dispositionedfrom
agents/p17-02-shared-prompt-dismissal-component
Open

refactor(menubar): shared prompt/dismissal component [P17.02]#170
cesarnml wants to merge 7 commits into
agents/p17-01-capability-matrix-drafted-from-code-developer-dispositionedfrom
agents/p17-02-shared-prompt-dismissal-component

Conversation

@cesarnml

Copy link
Copy Markdown
Owner

Summary

  • delivery ticket: P17.02 Shared prompt/dismissal component
  • ticket file: docs/product/delivery/phase-17/ticket-02-shared-prompt-dismissal.md
  • stacked base branch: agents/p17-01-capability-matrix-drafted-from-code-developer-dispositioned
  • post-verify: outcome clean completed at 2026-07-12 06:16 UTC
  • subagentReview: outcome clean completed at 2026-07-12 06:25 UTC

cesarnml added 6 commits July 12, 2026 13:09
Asserts exact FloatingPetPromptItem titles and order for Own and
Minimalist capability rows from docs/contracts/window-capability-matrix.md
§1. Fails to compile: FloatingPetPromptBuilder/Capabilities/Handlers do
not exist yet.
Introduces FloatingPetPromptBuilder.items(capabilities:handlers:) as the
single [FloatingPetPromptItem] constructor, parameterized by named
matrix capabilities (docs/contracts/window-capability-matrix.md §1)
rather than shape identity. FloatingPetInteractionView.presentHidePrompt
and MinimalistBadgeView.presentHidePrompt both route through it,
reproducing the current per-shape item lists verbatim.

Introduces FloatingPetPromptDismissal, adjacent to
FloatingPetPromptCoordinator, as the single global-mouse/local-mouse/
global-keyboard/resign-active dismiss-on-click-away observer stack.
Replaces three hand-rolled copies: FloatingPetInteractionView's hide
prompt, MinimalistBadgeView's hide prompt, and MinimalistBadgeView's
panel-size pill. Drops the dead NSWindow.didResignKeyNotification
observer per matrix row R1.11 (both panels are non-activating and can
never become key).

xcodegen regenerated to register the two new source files.
…nt-review]

FloatingPetPromptDismissal.uninstall() gated all cleanup on `owner`
being non-nil. Weak references to self are already nil by the time
self's own deinit body runs (confirmed empirically), so calling
uninstall() from a presenting view's deinit — the only call site on
that path — silently skipped removing the NotificationCenter observer
and three NSEvent monitors. Each dead monitor keeps firing a harmless
but wasted [weak self] no-op on every future mouse/keyboard event
app-wide, forever, for every prompt/pill ever presented.

Decouples monitor/observer teardown from the owner-nil check (only the
coordinator hand-off needs a live owner identity — the coordinator's
own weak activeOwner self-clears regardless) and adds a defensive
deinit { uninstall() } on FloatingPetPromptDismissal itself as a
backstop for any future caller that skips an explicit uninstall().

Also adds the Minimalist plain-origin-labeled exact-array builder test
mirroring the existing Own case, closing a coverage gap the review
flagged in Advisory Observations.
@vercel

vercel Bot commented Jul 12, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
codogotchi Ready Ready Preview, Comment Jul 12, 2026 6:29am

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.

1 participant