Skip to content

[codex] Improve overlay capture and Codex command routing#408

Draft
tarushvkodes wants to merge 8 commits into
altic-dev:mainfrom
tarushvkodes:codex/lower-visualizer-threshold
Draft

[codex] Improve overlay capture and Codex command routing#408
tarushvkodes wants to merge 8 commits into
altic-dev:mainfrom
tarushvkodes:codex/lower-visualizer-threshold

Conversation

@tarushvkodes

@tarushvkodes tarushvkodes commented Jun 23, 2026

Copy link
Copy Markdown

Summary

This PR contains user-facing fixes/improvements for the overlay, Edit Mode, and Command Mode:

  • Lowers the default visualizer noise threshold from 0.4 to 0.12, so quieter microphone input animates the overlay waveform instead of looking dead.
  • Improves Edit Mode selected-text capture by falling back to a temporary Cmd+C clipboard capture when Accessibility APIs do not expose AXSelectedText or a selected range.
  • Adds an optional Command Mode route to Codex via CommandModeRouteToCodex.
  • Adds two Codex handoff styles:
    • 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.
  • Exposes the Codex route and style in the Command Mode UI with compact controls, and bypasses chat-provider readiness when Codex routing is active.
  • Updates the SwiftPM lockfile so Xcode 26 resolves MCP Swift SDK 0.12.1; the prior 0.10.2 resolution 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 --check
  • swiftc -parse $(rg --files Sources/Fluid -g '*.swift')
  • plutil -lint Fluid.xcodeproj/project.pbxproj Info.plist Fluid.entitlements
  • xcodebuild -list -project Fluid.xcodeproj
  • xcodebuild clean build -project Fluid.xcodeproj -scheme Fluid -destination 'platform=macOS,arch=arm64' CODE_SIGN_IDENTITY='' CODE_SIGNING_REQUIRED=NO CODE_SIGNING_ALLOWED=NO
  • Manual CLI smoke test: /Applications/Codex.app/Contents/Resources/codex -a never exec --skip-git-repo-check --color never -C /tmp -

Notes:

  • Full Xcode is installed locally and selected with xcode-select; the project build succeeds with the updated package resolution.
  • swift build remains blocked by the existing manifest mismatch: Package.swift declares tools version 5.9 while using .macOS(.v15), which PackageDescription exposes for newer tools.
  • GitHub Actions for this fork PR are currently action_required, so upstream CI has not run without manual approval.

@tarushvkodes tarushvkodes changed the title [codex] Lower default visualizer threshold [codex] Improve overlay capture and Codex command routing Jun 24, 2026
@tarushvkodes

Copy link
Copy Markdown
Author

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

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.

1 participant