clitrigger 0.2.23 → 0.2.24

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/electron/main.cjs CHANGED
@@ -251,7 +251,12 @@ function createWindow(port) {
251
251
  // doesn't go dead after resume.
252
252
  mainWindow.webContents.on('did-create-window', (childWin) => {
253
253
  childWin.on('focus', () => {
254
- if (!childWin.isDestroyed()) childWin.webContents.focus();
254
+ // Skip when webContents already holds focus — a redundant programmatic
255
+ // focus() resets the Windows IME (TSF) caret context, which is the
256
+ // prime suspect for the candidate window jumping to the screen corner.
257
+ if (childWin.isDestroyed() || childWin.webContents.isFocused()) return;
258
+ imeDebugLog('popout', { event: 'focus-bridge' });
259
+ childWin.webContents.focus();
255
260
  });
256
261
  attachImeWindowLogging(childWin, 'popout');
257
262
  });
@@ -269,10 +274,14 @@ function createWindow(port) {
269
274
  // Windows lock-screen / screensaver hands the native HWND keyboard focus
270
275
  // off to the lock UI; on resume it doesn't always return to webContents,
271
276
  // leaving every input (SessionForm, SessionTerminal) dead until the user
272
- // minimizes and restores. Re-focus webContents on every window focus event
273
- // so the OS-level focus is always routed back into the renderer.
277
+ // minimizes and restores. Re-focus webContents on window focus — but only
278
+ // when it doesn't already hold focus: a redundant programmatic focus()
279
+ // resets the Windows IME (TSF) caret context (candidate window jumps to
280
+ // the screen corner).
274
281
  mainWindow.on('focus', () => {
275
- if (!mainWindow.isDestroyed()) mainWindow.webContents.focus();
282
+ if (mainWindow.isDestroyed() || mainWindow.webContents.isFocused()) return;
283
+ imeDebugLog('mainWindow', { event: 'focus-bridge' });
284
+ mainWindow.webContents.focus();
276
285
  });
277
286
  }
278
287
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "clitrigger",
3
- "version": "0.2.23",
3
+ "version": "0.2.24",
4
4
  "description": "Spawn isolated git worktrees and orchestrate Claude/Gemini/Codex CLI tasks in parallel from a web UI.",
5
5
  "keywords": [
6
6
  "claude",