# Task: Fix AI programming input context menu ## Identity - Task ID: 20260907-input-context-menu-a7c31e - Mode: Feature - Branch: codex/20260907-input-context-menu-a7c31e-input-context-menu - Worktree: D:\Datas\OthersProjects\.codex-worktrees\makelore\20260907-input-context-menu-a7c31e - Base commit: 8c13ae76db6fa47972bdf9ff3de932eb761aaffe - Owner: codex - Status: Ready for Integration ## Scope - Reproduce the AI Programming composer symptom where right-clicking editable text exposes no native editing menu. - Compare the current integrated primary-window wiring with completed task `20260819-context-menu-impl-c7d4a2e1` and reuse only behavior still compatible with the current window lifecycle. - Restore the smallest Main-owned native text-editing context-menu behavior and add focused regression coverage at the real window/event seam. - Verify that the AI Design `design-chat-composer` textarea shares the same primary Renderer seam, and extend the Electron regression to cover both Code and Design textarea controls without adding a duplicate listener. - Update user-facing documentation or Electron E2E coverage only where current behavior and the shared fixture require it. ## Intent And Constraints - Electron Main owns desktop context-menu integration. Do not add Renderer, Preload, IPC, Host API, or direct clipboard access for this fix. - Use the primary window's `webContents` `context-menu` event and native editing roles when that remains the confirmed compatible seam. - Show a menu only for editable controls or an existing text selection; derive enabled actions from the actual Electron edit context. - Preserve Renderer-owned custom menus, Monaco behavior, the detached Agent Browser, existing application-menu behavior, Chinese-only UI, and the single light visual system. - Build a deterministic red-capable feedback loop for the reported input symptom before selecting a cause or changing production code. - Work only in the isolated task worktree; do not modify, adopt, clean, or merge the occupied root `main` worktree or any peer worktree. ## Outcome - Confirmed the failure at the real Electron window seam: a renderer right-click produced no native menu because the primary `webContents` had zero `context-menu` listeners. The earlier implementation in task `20260819-context-menu-impl-c7d4a2e1` exists only on its isolated branch and was never integrated into the current `main` history. - Added a Main-owned text context-menu module that builds native Chinese `cut`, `copy`, `paste`, and `selectAll` roles from Electron's actual `isEditable`, `selectionText`, and `editFlags` context. Ordinary non-editable content still produces no menu. - Registered the listener once during primary-window creation without adding Renderer, Preload, IPC, Host API, or direct clipboard access. - Confirmed `DesignConversationPane` renders the AI Design composer as the ordinary `