Files
iOS/Sources/App/Assist
Copilot 0c0c2533e5 Add scene support for AssistView on macOS (#3965)
## Summary
Enables AssistView to open in a dedicated window on macOS while
maintaining modal presentation on iOS/iPad.

**Implementation:**
- Added `.assist` case to `SceneActivity` enum with `ha.assist`
identifier
- Created `AssistSceneDelegate` extending `BasicSceneDelegate` to manage
Assist windows
- Updated `Info.plist` with Assist scene configuration
- Added `SceneManager.activateAnyScene(for:with:)` to pass parameters
via `NSUserActivity.userInfo`
- Modified `WebViewExternalMessageHandler.showAssist()` to branch on
`Current.isCatalyst`:
  - macOS: `SceneManager.activateAnyScene(for: .assist, with: userInfo)`
  - iOS/iPad: Existing modal presentation (unchanged)
- Window centering: Assist window opens centered on screen (600x600)
using `UIWindowScene.MacGeometryPreferences` (iOS 17+)
- Close button: Removed toolbar close button in scene mode since window
has native close button; modal presentation on iOS/iPad retains close
button

**Parameters passed via userInfo:**
- `server`: Server identifier string
- `pipelineId`: Pipeline ID string
- `autoStartRecording`: Boolean

## Screenshots

N/A - Scene system change, requires macOS build to screenshot

## Link to pull request in Documentation repository
Documentation: home-assistant/companion.home-assistant#

## Any other notes
Follows existing scene patterns from `SettingsSceneDelegate` and
`AboutSceneDelegate`. No breaking changes to iOS/iPad behavior. The
`showCloseButton` parameter in `AssistView` allows flexible control of
close button visibility - `false` for scene mode (window has native
controls), `true` for modal presentation.

<!-- START COPILOT CODING AGENT SUFFIX -->



<details>

<summary>Original prompt</summary>

> Turn AssistView into a scene, so it can be initiated in a new window
on macOS


</details>



<!-- START COPILOT CODING AGENT TIPS -->
---

💡 You can make Copilot smarter by setting up custom instructions,
customizing its development environment and configuring Model Context
Protocol (MCP) servers. Learn more [Copilot coding agent
tips](https://gh.io/copilot-coding-agent-tips) in the docs.

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: bgoncal <5808343+bgoncal@users.noreply.github.com>
2025-11-12 17:16:50 +00:00
..