Skip to content

Commit 68e85cc

Browse files
grimmerkclaude
andcommitted
fix: review — check cmdline for Electron, fix IPC order
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent e334008 commit 68e85cc

4 files changed

Lines changed: 16 additions & 3 deletions

File tree

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
# Changelog
22

3+
## 1.0.63
4+
5+
- Fix: Terminal tab sessions correctly detected as CODEV (not parent terminal)
6+
- Click Terminal tab session → switches to Term tab instead of external terminal
7+
38
## 1.0.62
49

510
- Feat: session status hooks — colored dots for working (pulse) / idle / needs-attention (blink)

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "CodeV",
33
"productName": "CodeV",
4-
"version": "1.0.62",
4+
"version": "1.0.63",
55
"description": "Quick switcher for VS Code, Cursor, and Claude Code sessions",
66
"repository": {
77
"type": "git",

src/claude-session-utility.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,12 @@ export const detectTerminalApp = async (pid: number): Promise<string> => {
186186

187187
const commLower = comm.toLowerCase();
188188
// CodeV's embedded terminal (node-pty runs under Electron)
189-
if (commLower.includes('electron') || commLower.includes('codev')) return 'codev';
189+
if (commLower.includes('codev')) return 'codev';
190+
// Check if this Electron process is CodeV by inspecting command line
191+
if (commLower.includes('electron')) {
192+
const cmdline = (await execPromise(`ps -o command= -p ${currentPid} 2>/dev/null`)).trim();
193+
if (cmdline.toLowerCase().includes('codev')) return 'codev';
194+
}
190195
if (commLower.includes('iterm') || commLower.includes('iterm2')) return 'iterm2';
191196
if (commLower.includes('cmux')) return 'cmux';
192197
if (commLower.includes('ghostty')) return 'ghostty';

src/main.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1062,8 +1062,11 @@ const trayToggleEvtHandler = async () => {
10621062

10631063
// Set callback for CodeV embedded terminal sessions
10641064
setCodevTerminalCallback((_sessionId: string) => {
1065-
switcherWindow?.webContents.send('switch-to-terminal');
10661065
showSwitcherWindow();
1066+
// Send after show to ensure window exists and is ready
1067+
setTimeout(() => {
1068+
switcherWindow?.webContents.send('switch-to-terminal');
1069+
}, 50);
10671070
});
10681071

10691072
// Pre-initialize aiAssistantWindow for faster first open

0 commit comments

Comments
 (0)