[codex] Improve overlay capture and Codex command routing#408
[codex] Improve overlay capture and Codex command routing#408tarushvkodes wants to merge 8 commits into
Conversation
|
Update: improved Edit Mode replacement for Google Docs and similar browser editors.\n\n- Captures the original target PID when selected text is captured, so accepting a rewrite can return to the document instead of aiming at the FluidVoice overlay.\n- Routes Edit Mode acceptance through the reliable paste path, which web rich-text editors handle better than synthetic direct typing.\n- Gives clipboard-based selection capture a longer window for Google Docs/browser editors that update the pasteboard more slowly after Cmd+C.\n\nValidated locally:\n- swiftc parse over Sources/Fluid Swift files\n- git diff --check\n- plutil lint for project/Info/entitlements\n- xcodebuild clean build for macOS arm64\n- installed and ad-hoc signed local /Applications/FluidVoice.app |
Summary
This PR contains user-facing fixes/improvements for the overlay, Edit Mode, and Command Mode:
0.4to0.12, so quieter microphone input animates the overlay waveform instead of looking dead.Cmd+Cclipboard capture when Accessibility APIs do not exposeAXSelectedTextor a selected range.CommandModeRouteToCodex.Notch: keeps the FluidVoice Command Mode notch UX, runs the bundled Codex CLI in the background, and displays the result in the notch without focusing the Codex app.App: activates the Codex desktop app and pastes/submits the spoken command there, preserving the previous direct-GUI behavior.0.12.1; the prior0.10.2resolution failed under Xcode 26's stricter concurrency checks inside the dependency.Why
Some apps do not expose highlighted text through Accessibility, which caused Edit Mode to enter write mode and the model to ask the user to provide the text. The clipboard fallback preserves and restores the existing pasteboard contents while giving those apps a practical capture path.
For users who already work in Codex, Command Mode can be more useful as a clean voice handoff into Codex than as a separate terminal agent. The new route is preference-backed and defaults off, so the existing Command Mode behavior remains unchanged unless explicitly enabled. The notch style avoids stealing focus from the user's current app, while the app style remains available for direct desktop-app handoff.
Validation
git diff --checkswiftc -parse $(rg --files Sources/Fluid -g '*.swift')plutil -lint Fluid.xcodeproj/project.pbxproj Info.plist Fluid.entitlementsxcodebuild -list -project Fluid.xcodeprojxcodebuild clean build -project Fluid.xcodeproj -scheme Fluid -destination 'platform=macOS,arch=arm64' CODE_SIGN_IDENTITY='' CODE_SIGNING_REQUIRED=NO CODE_SIGNING_ALLOWED=NO/Applications/Codex.app/Contents/Resources/codex -a never exec --skip-git-repo-check --color never -C /tmp -Notes:
xcode-select; the project build succeeds with the updated package resolution.swift buildremains blocked by the existing manifest mismatch:Package.swiftdeclares tools version 5.9 while using.macOS(.v15), which PackageDescription exposes for newer tools.action_required, so upstream CI has not run without manual approval.