Skip to content

[🐞 BUG] Write Mode cannot read selected text from any Application #259

Open

Description

@Benjamin-Justice

Describe the bug
Write Mode cannot read selected text from any Application I have tested.
It only works when I type into the playground text field within the FluidVoice App.

I have confirmed that Accessibility permissions are present.

Dictation works, Dictation with AI Enhancement works.

To Reproduce
Steps to reproduce the behavior:

  1. Install Fluid
  2. Complete Onboardibg Steps
  3. Verify AI enhancement works
  4. Open an application with a text field (e.g. Zed)
  5. Type "This is a spectacular situation".
  6. Select the text
  7. Start Write Mode ("right option"+R hotkey)
  8. dictate "translate to german"
  9. Wait until prompt is processed
  10. Selected Text is replaced with "Bitte geben Sie den Text ein, den ich für Sie ins Deutsche übersetzen soll." (german for "please provide the text, which I should translate to German for you.")

Expected behavior
I expected the selected text to be replaced with a german translation for the selected text.
In this case, something like "Dies ist eine spektakuläre Situation."

Screenshots
Will provide if you can tell me what would be helpful

Environment:

  • macOS Version: Tahoe 26.4 (25E246)
  • App Version: 1.5.10 (8)
  • Architecture: Apple Silicon

Additional context
Provider tested:

  • OpenRouter (API Key)

Models tested:

  • Gemini 3.1 Flash Lite Preview
  • Gemini 3 Flash
  • GPT4.1-Mini

Apps tested:

  • Zed
  • Google Chrome (in a Google Docs document)
  • Visual Studio Code
  • Obsidian

Crash Logs

fluid-write-mode-issue-partial.log

Excerpt regarding text selection:

[16:51:45.393] [INFO] [GlobalHotkeyManager] Rewrite mode shortcut triggered - starting
[16:51:45.395] [INFO] [GlobalHotkeyManager] Rewrite mode hotkey triggered
[16:51:45.396] [DEBUG] [GlobalHotkeyManager] GlobalHotkeyManager: rewrite callback path, isRunning=false, isReady=true
[TextSelectionService] Selection capture start
[16:51:45.437] [DEBUG] [ContentView] Captured recording app context: app=Code, bundleId=com.microsoft.VSCode, title=
[16:51:45.437] [DEBUG] [TextSelectionService] [TextSelectionService] Selection capture start
[TextSelectionService] Trying frontmost app fallback: com.microsoft.VSCode pid=840
[16:51:45.437] [DEBUG] [TextSelectionService] [TextSelectionService] Trying frontmost app fallback: com.microsoft.VSCode pid=840
[TextSelectionService] Frontmost app fallback could not resolve focused element
[TextSelectionService] Selection capture failed: no selected text found
[16:51:45.439] [DEBUG] [TextSelectionService] [TextSelectionService] Frontmost app fallback could not resolve focused element
[16:51:45.439] [DEBUG] [TextSelectionService] [TextSelectionService] Selection capture failed: no selected text found
[16:51:45.439] [INFO] [ContentView] Rewrite mode triggered, text captured: false
[16:51:45.440] [INFO] [ContentView] No text selected - starting in write/improve mode

Activity

  1. added
    bug
    on Apr 6, 2026
  2. m13v commented on Apr 7, 2026

    @m13v

    this is an accessibility permissions issue at the system level. on macOS, reading selected text from another app requires either the Accessibility API (AXUIElement) or the system pasteboard as a fallback. the AXUIElement approach: get the focused element with AXUIElementCopyAttributeValue for kAXFocusedUIElementAttribute, then read kAXSelectedTextAttribute. the catch is that some apps (Zed included) don't properly expose selected text through the accessibility tree. for those, the reliable fallback is simulating Cmd+C, reading the pasteboard, then restoring the previous pasteboard contents.

  3. m13v commented on Apr 7, 2026

    @m13v

    our macOS accessibility API implementation that handles AXUIElement tree walking, including the focused element and attribute reading patterns: https://github.com/mediar-ai/mcp-server-macos-use/blob/main/Sources/MCPServer/main.swift

  4. vasurya commented on Aug 5, 2026

    @vasurya

    Still reproducible with current releases:

    • FluidVoice: 1.6.7 (18)
    • macOS: 26.5.2 (25F84)
    • Architecture: Apple Silicon
    • Obsidian: 1.13.4
    • FluidVoice Accessibility permission: enabled

    This is application-specific:

    • Selecting text in TextEdit and invoking Edit Mode with Option+R works.
    • Selecting text in Obsidian and invoking the same command fails consistently.

    Reproduction:

    1. Open a note in Obsidian.
    2. Select some text.
    3. Press Option+R to start FluidVoice Edit Mode.
    4. Say: “Fix the grammar, and clean up text”
    5. Press Option+R again

    The selected text is replaced with:

    Please provide the text you would like me to fix.

    Relevant FluidVoice log excerpt:

    [TextSelectionService] Selection capture start
    [TextSelectionService] Trying frontmost app fallback: md.obsidian
    [TextSelectionService] Frontmost app fallback could not resolve focused element
    [TextSelectionService] Selection capture failed: no selected text found
    [ContentView] Rewrite mode triggered, text captured: false
    [ContentView] No text selected - starting in write/improve mode
    [ContentView] Processing write/improve ... originalText length: 0
    

    The resulting LLM request contains only the spoken instruction and no selected-text context. Updating Obsidian's application and installer to 1.13.4 did not change the result.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions