Delete “Q3 Report”?
A sheet blocks only this window — the rest of the app stays usable.
The panel sliding from the title bar is a sheet — modal to its window only
Sheet
/ NSWindow.beginSheet(_:completionHandler:) · NSWindow.endSheet(_:returnCode:) /
also called window-modal dialog, document-modal dialog, attached sheet
A sheet is a modal panel attached to a particular window, traditionally descending from its title bar. It prevents interaction with that parent window while other app windows can remain usable. An app-modal dialog instead blocks the application as a whole and is not visually attached to one document window.
If you called it…
…you meant a sheet.
Anatomy — every part, named
- 1Dimming layer
View.sheet(isPresented:content:)“The darkened area behind the sheet” is the dimming layer that marks the parent surface as temporarily unavailable.
Prompt — paste into your agent
Present this as a window-modal Sheet with NSWindow.beginSheet(_:completionHandler:) (SwiftUI: View.sheet), visibly attached beneath the parent window's title bar. Block only that parent window, not every window in the app.
Debug prompt — when it misbehaves
Paste this, then describe what you’re seeing — it hands your agent the classic failure modes to rule out first.
Debug my macOS sheet (NSWindow.beginSheet(_:completionHandler:), SwiftUI View.sheet). Rule out: the isPresented/item binding never reset so it will not present a second time; endSheet never called so the parent window stays blocked; presenting from a view controller detached from the window so nothing appears; two sheets queued on one window presenting back-to-back unexpectedly. The symptom:
In code
The exact names this thing goes by in code — each row is one framework’s word for it. Use the row that matches your project (or paste it into your prompt).
| AppKit | NSWindow.beginSheet(_:completionHandler:) | |
| AppKit | NSWindow.endSheet(_:returnCode:) | |
| SwiftUI | View.sheet(isPresented:onDismiss:content:) | |
| AppKit | NSApplication.runModal(for:) | app-modal alternative, not a sheet |