Skip to content

Add first-launch onboarding wizard for permissions - #46

Open
mcnahum wants to merge 2 commits into
microsoft:mainfrom
mcnahum:permissions-onboarding-wizard
Open

Add first-launch onboarding wizard for permissions#46
mcnahum wants to merge 2 commits into
microsoft:mainfrom
mcnahum:permissions-onboarding-wizard

Conversation

@mcnahum

@mcnahum mcnahum commented Aug 10, 2026

Copy link
Copy Markdown

Summary

Adds a small, clean onboarding wizard for permissions with two goals:

  1. Approve the proper permission — a "Grant Screen Recording…" (or "Open Screen Recording Settings…" if already prompted) button that requests/opens the right place, with a live "Granted / Not granted" status that refreshes when the user returns from System Settings.
  2. Simply explain the main permission — a first page in plain language stating that Screen Recording is the one permission ZoomIt needs, why macOS requires it, and that Microphone/Camera are optional and separate.

Where it shows up

  • Shown automatically on first launch (replacing the previous behavior of silently opening Settings).
  • Also reachable any time via the menu bar ▸ Welcome & Permissions…, alongside the existing quick ▸ Check Permissions status alert (kept as-is for fast re-checks).

Implementation

  • New PermissionsWizardWindowController (AppKit, matching the existing code style — no new UI framework/dependency) with two pages and Back/Continue/Finish navigation.
  • Wired into AppController (new showPermissionsWizard()) and AppDelegate (first-launch trigger + new menu entry).
  • README updated to document the new first-launch flow.

Testing

  • swift build succeeds with no new warnings.
  • Manually verified with Scripts/build-app.sh + Scripts/reset-first-run.sh: wizard appears on first launch, Continue/Back navigate between pages, Finish closes the window, and the app remains running as a menu-bar-only accessory afterward.

Adds a short two-step "Welcome & Permissions" wizard shown on first
launch: it plainly explains why Screen Recording is the one required
permission, then lets the user grant it in place with a live status
label. It's also reachable any time from the menu bar, separate from
the existing quick "Check Permissions" status dialog.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 53cfe816-d51f-4038-80d5-d2fad9f0c22e
Copilot AI lite review requested due to automatic review settings August 10, 2026 14:13
@mcnahum

mcnahum commented Aug 10, 2026

Copy link
Copy Markdown
Author

Closing for now — still iterating locally before resubmitting.

@mcnahum mcnahum closed this Aug 10, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a first-launch onboarding wizard (AppKit) to explain and guide granting Screen Recording permission, and wires it into the app’s first-run flow and menu so users aren’t dropped into a silent menu-bar-only launch.

Changes:

  • Introduces PermissionsWizardWindowController with a two-page Welcome → Screen Recording grant flow and status refresh on app reactivation.
  • Updates first-launch behavior to show the wizard (instead of opening Settings) and adds a “Welcome & Permissions…” menu entry.
  • Updates README to document the new first-launch permissions flow.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.

File Description
Sources/ZoomItMacCore/Permissions/PermissionsWizardWindowController.swift Adds the new two-step permissions wizard window UI and reactivation-based status refresh.
Sources/ZoomItMacCore/App/AppDelegate.swift Shows the wizard on first launch and adds a menu entry to open it.
Sources/ZoomItMacCore/App/AppController.swift Adds showPermissionsWizard() and holds a lazy wizard controller instance.
README.md Documents the updated first-launch permissions experience and menu entry.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines +110 to +114
let body = makeBodyLabel("""
Click Grant Screen Recording to open the macOS permission prompt. If you've \
already responded to it before, this instead opens System Settings so you can \
turn it on there.

Comment on lines +14 to +17
private var backButton: NSButton?
private var primaryButton: NSButton?
private var statusLabel: NSTextField?
private var grantButton: NSButton?
Comment on lines +137 to +139
private func grantButtonTitle(granted: Bool) -> String {
granted ? "Open Screen Recording Settings…" : "Grant Screen Recording…"
}
- Split the wizard into three pages: Screen Recording explanation,
  Microphone/Camera (optional) explanation, and the grant step. Body
  labels now size themselves to their actual text instead of using a
  fixed height, so long copy is never clipped.
- Screen Recording's grant is cached per-process by macOS, so the
  wizard can't detect a new grant in-process. It now auto-relaunches
  ZoomIt when the user switches back after granting, with a manual
  "Relaunch ZoomIt Now" fallback button.
- Replaced the separate "Welcome & Permissions…" menu entry with a
  "Run Welcome…" button inside the Check Permissions dialog.
- The Check Permissions dialog now shows "Granted" in green for each
  permission that's been granted, via a custom attributed accessory
  view (NSAlert.informativeText can't color individual words.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
EOF
)
@mcnahum mcnahum reopened this Aug 10, 2026
@mcnahum

mcnahum commented Aug 10, 2026

Copy link
Copy Markdown
Author

Updated based on further testing/feedback:

  • Split into 3 pages (Screen Recording explanation, optional Microphone/Camera explanation, grant step) and fixed text clipping by sizing labels to their actual content.
  • Since Screen Recording's TCC grant is cached per-process by macOS and can't be detected in-process, the wizard now auto-relaunches ZoomIt when you return after granting it, with a manual "Relaunch ZoomIt Now" fallback.
  • Removed the separate "Welcome & Permissions" menu entry; it's now a "Run Welcome" button inside Check Permissions.
  • Check Permissions dialog now shows "Granted" in green per permission.

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.

3 participants