Skip to content

Allow onboarding and clipboard-only dictation without Accessibility#629

Open
uzairansaruzi wants to merge 7 commits into
altic-dev:mainfrom
uzairansaruzi:fix/627-accessibility-soft-gate-onboarding
Open

Allow onboarding and clipboard-only dictation without Accessibility#629
uzairansaruzi wants to merge 7 commits into
altic-dev:mainfrom
uzairansaruzi:fix/627-accessibility-soft-gate-onboarding

Conversation

@uzairansaruzi

@uzairansaruzi uzairansaruzi commented Jul 16, 2026

Copy link
Copy Markdown

Description

Onboarding currently hard-requires Accessibility before Continue works, which blocks MDM-locked and privacy-conscious users who can still use mic-based dictation with clipboard output.

This PR soft-gates Accessibility with an explicit Continue without Accessibility action, auto-enables clipboard copy on skip, unblocks onboarding completion, adds clipboard-only runtime fallback (no silent drop), exposes menu-bar Start/Stop Dictation, and shows in-app Record/Stop in the playground when Accessibility is unavailable.

Type of Change

  • 🐞 Bug fix
  • ✨ New feature
  • 💥 Breaking change
  • 🧹 Chore
  • 📝 Documentation update

Related Issue or Discussion

Closes #627

Testing

  • Tested on Intel Mac
  • Tested on Apple Silicon Mac
  • Tested on macOS version: macOS 26.5.2
  • Ran linter locally: swiftlint --strict --config .swiftlint.yml Sources
  • Ran formatter locally: swiftformat --config .swiftformat Sources
  • Ran tests locally: xcodebuild test -project Fluid.xcodeproj -scheme Fluid -destination 'platform=macOS' CODE_SIGNING_ALLOWED=NO (passed; E2E whisper fixture skipped as in CI)

Manual matrix:

  • Mic ready + Accessibility Needed → Continue disabled; Continue without Accessibility advances
  • Skip enables copyTranscriptionToClipboard
  • Full clipboard-only dictation path via menu bar (blocked in this environment by unsigned Release embed of MediaRemoteAdapter until manually copied)
  • Accessibility grant later restores hotkeys/insertion

Screenshots / Video

Permissions soft-gate (mic required, Accessibility recommended, explicit skip):

image

Playground in-app Record when Accessibility is skipped:

image

Settings clipboard-only mode copy:

image

Notes

  • Open decision from the issue plan: Continue stays Accessibility-gated; skip is a separate explicit control.
  • Confirmation for clipboard-only output uses NotificationService (system notification), matching existing AI/audio fallback patterns.
  • Follow-up for explicit Settings “None” insertion mode remains [✨ FEATURE] Add an option of "None" for Text Insertion Mode #481.

MDM and privacy-conscious users were blocked finishing setup when Accessibility stayed Needed. Soft-gate that permission, fall back to clipboard output, and expose menu-bar Start/Stop so basic dictation still works.

Co-authored-by: Cursor <cursoragent@cursor.com>
@github-actions github-actions Bot added needs PR template Pull request is missing required template content. needs screenshots Pull request needs screenshot or video evidence. labels Jul 16, 2026
@github-actions

Copy link
Copy Markdown

The PR Policy check is blocking this PR because required template information is missing.

Please update the PR description with:

  • Description
  • Type of Change
  • Related Issue or Discussion
  • Testing
  • Screenshots / Video

Visual files detected:

  • Sources/Fluid/ContentView.swift
  • Sources/Fluid/Persistence/SettingsStore.swift
  • Sources/Fluid/Services/MenuBarManager.swift
  • Sources/Fluid/UI/OnboardingTryoutStepView.swift
  • Sources/Fluid/UI/SettingsView.swift
  • Sources/Fluid/UI/WelcomeView.swift

Screenshots or video are required for UI, UX, settings, onboarding, overlay, menu bar, or visual behavior changes. If this PR has no visual changes, check the no-visual-change box in the template.

If this remains incomplete for 48 hours after opening, the PR may be closed.

@greptile-apps

greptile-apps Bot commented Jul 16, 2026

Copy link
Copy Markdown

Greptile Summary

This PR soft-gates the Accessibility permission requirement in onboarding, enabling users who cannot or choose not to grant it to still use dictation with clipboard output. It adds an explicit "Continue without Accessibility" skip action, auto-enables copyTranscriptionToClipboard on skip, and threads a clipboard-only fallback through all four dictation output paths (main, history, reprocess, rewrite) with a stable-identifier notification.

  • Onboarding: New canSkipAccessibility + shouldUseInAppPlaygroundRecording computed properties gate the skip button and the in-app Record control respectively; the .onboardingSandbox route still drives onboardingPlaygroundValidated, so playground completion works correctly with the in-app control.
  • Runtime fallback: All typing paths gate on AXIsProcessTrusted() captured per-call; shouldTypeExternally is blocked when unavailable, and TypingService.typeTextInstantly adds a safety-net clipboard copy for any call-site that bypasses the ContentView gates.
  • Menu bar: dictationStopProcessingCount correctly tracks nested begin/end calls from both the menu handler and ContentView.stopAndProcessTranscription, keeping the Start/Stop item disabled for the full stop→transcribe window.

Confidence Score: 5/5

Safe to merge — the change is additive and well-contained; existing Accessibility-granted users are unaffected.

All four dictation output paths correctly gate clipboard copy and notification on AXIsProcessTrusted(), the menu item's processing counter properly balances across nested callers, onboarding playground validation flows through the existing .onboardingSandbox route, and the onboardingAccessibilitySkipped flag is reset in all four onboarding-reset call-sites. No issues were found that could affect data delivery or cause regressions for existing users.

No files require special attention.

Reviews (7): Last reviewed commit: "Disable menu Start during any in-flight ..." | Re-trigger Greptile

Comment thread Sources/Fluid/Services/NotificationService.swift
Co-authored-by: Cursor <cursoragent@cursor.com>
@github-actions github-actions Bot removed needs PR template Pull request is missing required template content. needs screenshots Pull request needs screenshot or video evidence. labels Jul 16, 2026

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 6a2efafce5

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread Sources/Fluid/ContentView.swift Outdated
Comment thread Sources/Fluid/Services/MenuBarManager.swift Outdated
uzairansaruzi and others added 2 commits July 16, 2026 00:08
… guard.

Keep clipboard-only delivery when Fluid is frontmost without Accessibility, replace stacked clipboard notifications with a stable ID, and disable menu Start/Stop during dictionary training.

Co-authored-by: Cursor <cursoragent@cursor.com>
Show hotkey tryout whenever Accessibility is available, and surface the clipboard-only confirmation from TypingService's Accessibility fallback path.

Co-authored-by: Cursor <cursoragent@cursor.com>
@uzairansaruzi

Copy link
Copy Markdown
Author

Addressed remaining Greptile summary findings in the latest commit:

  1. Playground UI — in-app Record is now gated only on live Accessibility state (!isAccessibilityReady), so granting Accessibility after a skip restores the hotkey tryout.
  2. TypingService fallback — clipboard-only injection fallback now also calls NotificationService.showClipboardOnlyOutput() (e.g. Paste Last Transcription) so delivery is not silent.

Earlier review threads (stable notification ID, Fluid-frontmost clipboard copy, dictionary-training menu guard) remain fixed in f219272.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 8398ce8c56

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread Sources/Fluid/ContentView.swift Outdated
Comment thread Sources/Fluid/UI/WelcomeView.swift
Route menu-bar stop through the same onboarding sandbox selection as hotkeys, and keep the Settings clipboard toggle synced when onboarding writes SettingsStore directly.

Co-authored-by: Cursor <cursoragent@cursor.com>

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: c33e6cf4fd

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread Sources/Fluid/Services/MenuBarManager.swift
Comment thread Sources/Fluid/ContentView.swift
…t mid-stop.

Avoid false "Copied to clipboard" banners when pasteboard write fails, and keep Start Dictation disabled while a menu-bar stop is still processing.

Co-authored-by: Cursor <cursoragent@cursor.com>
@uzairansaruzi

Copy link
Copy Markdown
Author

@greptileai please re-review — clipboard notification is now gated on copy success in 6f55cac

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 6f55cac2b6

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread Sources/Fluid/Services/MenuBarManager.swift Outdated
Track stop→transcribe depth on MenuBarManager from ContentView so hotkey and in-app stops keep Start Dictation disabled, not only menu-initiated stops.

Co-authored-by: Cursor <cursoragent@cursor.com>
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] Allow onboarding to continue without Accessibility permission (clipboard fallback)

2 participants