Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [1.0.6] - 2026-09-06

### Fixed

- Dictation not pasting into terminals that expose no accessibility tree (e.g. Warp, Ghostty), where no focused element can be resolved at all. The transcript is now pasted into the frontmost app in that case, instead of being diverted to the clipboard — unless the frontmost app is EchoType itself or the Finder/desktop. The frontmost app name is logged.

## [1.0.5] - 2026-09-06

### Fixed
Expand Down
4 changes: 2 additions & 2 deletions Resources/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.0.5</string>
<string>1.0.6</string>
<key>CFBundleVersion</key>
<string>1.0.5</string>
<string>1.0.6</string>
<key>LSMinimumSystemVersion</key>
<string>14.0</string>
<key>LSUIElement</key>
Expand Down
20 changes: 18 additions & 2 deletions Sources/EchoType/Paster.swift
Original file line number Diff line number Diff line change
Expand Up @@ -75,10 +75,26 @@ enum Paster {
/// fall through to the clipboard. Poorly-accessible apps (terminals like
/// Warp/Ghostty) expose an opaque focused view — treat that as a text target
/// rather than losing the paste, matching pre-1.0.3 behavior.
// Apps whose "focus" is never a text target; dictating here goes to the
// clipboard rather than pasting into nothing.
private static let nonTextBundleIDs: Set<String> = [
"com.apple.finder",
]

private static func hasTextTarget() -> Bool {
guard let axElement = focusedElement() else {
Log.write("paste: no focused element — copying to clipboard")
return false
// Some terminals (Warp, Ghostty) expose no accessibility element at
// all. Rather than lose the paste, type into the frontmost app unless
// it is our own app or a known non-text app (the desktop/Finder).
let front = NSWorkspace.shared.frontmostApplication
let bundleID = front?.bundleIdentifier ?? "?"
let name = front?.localizedName ?? "?"
if bundleID == Bundle.main.bundleIdentifier || nonTextBundleIDs.contains(bundleID) {
Log.write("paste: no focused element, frontmost=\(name) — copying to clipboard")
return false
}
Log.write("paste: no focused element, frontmost=\(name) — pasting anyway")
return true
}

var role = "<none>"
Expand Down
Loading