Conversation
There was a problem hiding this comment.
2 issues found across 7 files
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="VoiceInk/AppDefaults.swift">
<violation number="1" location="VoiceInk/AppDefaults.swift:14">
P1: Missing runtime migration for legacy `useAppleScriptPaste` preference. Existing users who previously enabled AppleScript paste will silently revert to CGEvent on upgrade because `registerDefaults()` only supplies values for missing keys and there is no startup migration equivalent to `BackupImporter.swift:191-195`.</violation>
</file>
<file name="VoiceInk/Services/BackupImporter.swift">
<violation number="1" location="VoiceInk/Services/BackupImporter.swift:194">
P2: Legacy `useAppleScriptPaste = false` backups are not migrated, which can leave stale `pasteMethod` values and fail to restore expected paste behavior.</violation>
</file>
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.
|
+1! |
c6823b5 to
1fdce55
Compare
There was a problem hiding this comment.
3 issues found across 3 files (changes from recent commits).
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="VoiceInk/AppDelegate.swift">
<violation number="1" location="VoiceInk/AppDelegate.swift:19">
P2: The comment says this re-assert is meant to happen 'after a beat' to avoid racing with scene setup, but `DispatchQueue.main.async` schedules for the very next run-loop iteration with no real delay — it won't help if the actual race takes longer than one tick. Consider `asyncAfter` with a small explicit delay, or better, hook into an actual completion signal for scene/window setup instead of a timing guess.</violation>
</file>
<file name="VoiceInk/MenuBarManager.swift">
<violation number="1" location="VoiceInk/MenuBarManager.swift:74">
P3: This permanently overrides the standard macOS gesture of cmd-dragging the menu bar icon off the bar to hide it — any time the window closes or the accessory policy flips, the icon will be forced back into the menu bar even if the user intentionally removed it, not because of the reported bug.</violation>
<violation number="2" location="VoiceInk/MenuBarManager.swift:101">
P2: The 2000-point threshold used to detect a 'corrupted' status item position is a heuristic guess; on wide/multi-monitor setups where the menu bar spans across displays, a legitimately saved preferred position could exceed 2000 and get silently reset every launch, causing the icon to jump position repeatedly for those users.</violation>
</file>
Tip: Review your code locally with the cubic CLI to iterate faster.
Re-trigger cubic
| menuBarManager?.ensureMenuBarExtraVisible() | ||
| menuBarManager?.applyActivationPolicy() | ||
| // Policy changes can race with scene setup; re-assert after a beat. | ||
| DispatchQueue.main.async { [weak self] in |
There was a problem hiding this comment.
P2: The comment says this re-assert is meant to happen 'after a beat' to avoid racing with scene setup, but DispatchQueue.main.async schedules for the very next run-loop iteration with no real delay — it won't help if the actual race takes longer than one tick. Consider asyncAfter with a small explicit delay, or better, hook into an actual completion signal for scene/window setup instead of a timing guess.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At VoiceInk/AppDelegate.swift, line 19:
<comment>The comment says this re-assert is meant to happen 'after a beat' to avoid racing with scene setup, but `DispatchQueue.main.async` schedules for the very next run-loop iteration with no real delay — it won't help if the actual race takes longer than one tick. Consider `asyncAfter` with a small explicit delay, or better, hook into an actual completion signal for scene/window setup instead of a timing guess.</comment>
<file context>
@@ -12,7 +12,13 @@ class AppDelegate: NSObject, NSApplicationDelegate {
+ menuBarManager?.ensureMenuBarExtraVisible()
menuBarManager?.applyActivationPolicy()
+ // Policy changes can race with scene setup; re-assert after a beat.
+ DispatchQueue.main.async { [weak self] in
+ self?.menuBarManager?.ensureMenuBarExtraVisible()
+ }
</file context>
|
|
||
| // Positions for real menu-bar slots are typically low hundreds; values in the | ||
| // thousands usually mean the item was shoved into the overflow / off-screen. | ||
| if let position = defaults.object(forKey: positionKey) as? Double, position > 2000 { |
There was a problem hiding this comment.
P2: The 2000-point threshold used to detect a 'corrupted' status item position is a heuristic guess; on wide/multi-monitor setups where the menu bar spans across displays, a legitimately saved preferred position could exceed 2000 and get silently reset every launch, causing the icon to jump position repeatedly for those users.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At VoiceInk/MenuBarManager.swift, line 101:
<comment>The 2000-point threshold used to detect a 'corrupted' status item position is a heuristic guess; on wide/multi-monitor setups where the menu bar spans across displays, a legitimately saved preferred position could exceed 2000 and get silently reset every launch, causing the icon to jump position repeatedly for those users.</comment>
<file context>
@@ -50,6 +61,48 @@ class MenuBarManager: ObservableObject {
+
+ // Positions for real menu-bar slots are typically low hundreds; values in the
+ // thousands usually mean the item was shoved into the overflow / off-screen.
+ if let position = defaults.object(forKey: positionKey) as? Double, position > 2000 {
+ defaults.removeObject(forKey: positionKey)
+ } else if let position = defaults.object(forKey: positionKey) as? Int, position > 2000 {
</file context>
| Self.repairMenuBarStatusItemDefaults() | ||
| if !self.isMenuBarExtraInserted { | ||
| self.logger.notice("🧭 Re-inserting MenuBarExtra into the system menu bar.") | ||
| self.isMenuBarExtraInserted = true |
There was a problem hiding this comment.
P3: This permanently overrides the standard macOS gesture of cmd-dragging the menu bar icon off the bar to hide it — any time the window closes or the accessory policy flips, the icon will be forced back into the menu bar even if the user intentionally removed it, not because of the reported bug.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At VoiceInk/MenuBarManager.swift, line 74:
<comment>This permanently overrides the standard macOS gesture of cmd-dragging the menu bar icon off the bar to hide it — any time the window closes or the accessory policy flips, the icon will be forced back into the menu bar even if the user intentionally removed it, not because of the reported bug.</comment>
<file context>
@@ -50,6 +61,48 @@ class MenuBarManager: ObservableObject {
+ Self.repairMenuBarStatusItemDefaults()
+ if !self.isMenuBarExtraInserted {
+ self.logger.notice("🧭 Re-inserting MenuBarExtra into the system menu bar.")
+ self.isMenuBarExtraInserted = true
+ }
+ }
</file context>
f8be65f to
bc91716
Compare
bc91716 to
80e2983
Compare
There was a problem hiding this comment.
1 issue found across 1 file (changes from recent commits).
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="docs/reapply-direct-typing.md">
<violation number="1" location="docs/reapply-direct-typing.md:17">
P3: The grep alternatives are redundant: `directTyping` already matches any line containing `case directTyping`, so the `case directTyping` alternation adds no matches. The stop-condition text already relies on the plain `directTyping` token, so the second alternative is dead. Use the single token.</violation>
</file>
Tip: Review your code locally with the cubic CLI to iterate faster.
Re-trigger cubic
|
|
||
| ```bash | ||
| git fetch origin main | ||
| git grep -n 'directTyping\|case directTyping' origin/main -- '*.swift' |
There was a problem hiding this comment.
P3: The grep alternatives are redundant: directTyping already matches any line containing case directTyping, so the case directTyping alternation adds no matches. The stop-condition text already relies on the plain directTyping token, so the second alternative is dead. Use the single token.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At docs/reapply-direct-typing.md, line 17:
<comment>The grep alternatives are redundant: `directTyping` already matches any line containing `case directTyping`, so the `case directTyping` alternation adds no matches. The stop-condition text already relies on the plain `directTyping` token, so the second alternative is dead. Use the single token.</comment>
<file context>
@@ -1,22 +1,38 @@
```bash
git fetch origin main
-git grep -n 'directTyping\|Direct Typing' origin/main -- '*.swift'
+git grep -n 'directTyping\|case directTyping' origin/main -- '*.swift'
+git show origin/main:VoiceInk/Paste/PasteMethod.swift
+```
</file context>
| git grep -n 'directTyping\|case directTyping' origin/main -- '*.swift' | |
| git grep -n 'directTyping' origin/main -- '*.swift' |
…eive real key codes after the source reorganization.
f76af31 to
d07ff58
Compare
Playbook now forbids git push origin/upstream and PRs against Beingpax/VoiceInk. Fetch origin/main only to skip work if they already merged the feature.
Summary
Default/AppleScript)aon WindowscgEvent/useAppleScriptPastemigration, and localizationTest plan
a)useAppleScriptPaste: trueimports as AppleScript modeThanks to @kdubau for validating against real RDP sessions and the key-code fix in #758.