Repository navigation
fix: Windows and Linux active window detection - #27
Merged
Merged
Conversation
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)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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