Skip to content

Fix native Edit menu ownership - #3393

Merged
breznknecht merged 1 commit into
mainfrom
codex/issue-3301-edit-menu
Sep 16, 2026
Merged

breznknecht merged 1 commit into
mainfrom
codex/issue-3301-edit-menu

Conversation

@breznknecht

Copy link
Copy Markdown
Collaborator

TL;DR

Minga now owns each standard Edit command at its correct SwiftUI command placement, so Undo, Redo, Cut, Copy, Paste, and Select All appear once and have one active shortcut owner. Native text fields keep AppKit responder behavior, while editor actions use one BEAM fallback.

Closes #3301

Context

The prior .textEditing replacement did not replace SwiftUI defaults from .undoRedo and .pasteboard, which left duplicate or inactive standard Edit items. This change fixes menu composition without changing the editor Undo and Redo semantics tracked separately in #3285.

Changes

  • Replace .undoRedo, .pasteboard, and .textEditing independently, while keeping Find and Find and Replace in a separate group.
  • Route all six standard actions through the focused native field editor when present, with one explicit editor fallback when connected.
  • Validate native Undo and Redo against the field editor undo manager, and validate the remaining commands through AppKit responder validation.
  • Add a debug-only production menu probe and tests that inspect the assembled NSMenu, key equivalents, active shortcut ownership, disconnected state, editor Select All, and native field behavior.

Verification

  • xcodebuild test -quiet -project Minga.xcodeproj -scheme Minga -configuration Debug -derivedDataPath DerivedData CODE_SIGNING_ALLOWED=NO -only-testing:MingaTests/PickerQueryFieldTests -only-testing:MingaTests/MingaMenuTests
  • mix protocol.gen
  • mix swift.build
  • make lint

Acceptance Criteria Addressed

  • One Edit entry each for Undo, Redo, Cut, Copy, Paste, and Select All, with no disabled duplicates. ✅
  • Menu selection and keyboard shortcuts use the same action path; editor Select All sends the document command. ✅
  • Focused picker and Settings fields retain native editing and history behavior. ✅
  • Connected, disconnected, and unavailable command enablement is accurate. ✅
  • Production menu assembly and interaction paths have regression coverage. ✅

@breznknecht
breznknecht force-pushed the codex/issue-3301-edit-menu branch from 1a476b0 to df0be23 Compare September 16, 2026 16:48
@breznknecht
breznknecht merged commit 34ef844 into main Sep 16, 2026
11 checks passed
@breznknecht
breznknecht deleted the codex/issue-3301-edit-menu branch September 16, 2026 21:12
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.

Native Edit menus expose one working action per standard shortcut

1 participant