Skip to content

fix: Windows and Linux active window detection - #27

Merged
AxaySharma merged 1 commit into
developfrom
fix/windows-linux-tracking
Jul 12, 2026
Merged

AxaySharma merged 1 commit into
developfrom
fix/windows-linux-tracking

Conversation

@AxaySharma

Copy link
Copy Markdown
Contributor

What this fixes

Windows users saw zero tracking — no sessions started,
no apps detected. active-win was removed (node-gyp/VS
CI failures) but no replacement was built.

Approach

Pure child_process — zero native dependencies, zero CI risk.

Windows: PowerShell + Win32 GetForegroundWindow
Linux: xdotool + /proc/{pid}/comm

Work apps added for Windows by default

VS Code, Cursor, Windows Terminal, cmd, PowerShell,
Chrome, Edge, Firefox, IntelliJ, WebStorm, Figma,
Sublime Text, Notepad++

No version bump

v0.1.0 unchanged — this is a bug fix for existing release

pnpm typecheck: zero errors

Replaces removed active-win package with pure
child_process approaches — zero native dependencies.

Windows:
- PowerShell + Win32 GetForegroundWindow API
- Returns process name + ProductName
- WINDOWS_WORK_APPS: code, cursor, windowsterminal,
  cmd, powershell, chrome, msedge, firefox, idea64,
  webstorm64, figma, sublime_text, notepad++ and more
- WINDOWS_AI_NATIVE: cursor

Linux:
- bash + xdotool + /proc/{pid}/comm
- LINUX_WORK_APPS: code, cursor, gnome-terminal,
  konsole, xterm, idea, webstorm, sublime_text, figma

Both platforms:
- isWorkApp() branches by platform
- isAINativeApp() branches by platform
- getDisplayName() returns correct name per platform
- getWorkAppsList() returns platform-appropriate list

Home.tsx:
- Custom app input placeholder is platform-specific
  Mac: 'e.g. Safari, Figma, Notion'
  Win: 'e.g. chrome, msedge, notepad++'
  Linux: 'e.g. firefox, gedit'

handlers.ts: GET_CURRENT_APP returns { currentApp, platform }
api.ts: updated return type to match

pnpm typecheck: zero errors
Version: unchanged (0.1.0)
@AxaySharma
AxaySharma merged commit 49daa75 into develop Jul 12, 2026
2 checks passed
@AxaySharma
AxaySharma deleted the fix/windows-linux-tracking branch July 12, 2026 15: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.

1 participant