Windows port carry-over: main/preload/scripts/patches/distribution/CI#2
Merged
Conversation
Lands all the Windows-port work that was sitting in the working tree from the prior session. Required for `npm install` to succeed on a fresh clone: the postinstall script (referenced in package.json) lives here, as do the patches it applies and the scripts/dev.js wrapper that the dev script calls. scripts/ - postinstall.js: cross-platform dispatcher. On any OS: applies patches via patch-package, then runs `electron-builder install-app-deps`. On macOS: also patches the dev icon. On Windows: no-ops past the rebuild. - dev.js: replaces `unset ELECTRON_RUN_AS_NODE && electron-vite dev` (POSIX-only). Node wrapper that does `delete process.env.ELECTRON_RUN_AS_NODE` then exec's electron-vite. Works on Windows + macOS without cross-env's empty-string semantics issue. - doctor.js, doctor.ps1: diagnostic tooling for both platforms. - setup.ps1: PowerShell mirror of commands/setup.command for first-launch. - build-icons.js: regenerates resources/icon.ico from PNGs via png-to-ico. patches/ - node-gyp+11.5.0.patch: teaches node-gyp 11.5 about VS 2026 (Build Tools 18.5). Adds versionMajor=18 → versionYear=2026 mapping; expands [2019, 2022] arrays to [2019, 2022, 2026]; maps versionYear 2026 → toolset v145. - node-pty+1.1.0.patch: removes Spectre-mitigated lib requirement + fixes winpty.gyp to call .\GetCommitHash.bat / .\UpdateGenVersion.bat (Windows security setting NoDefaultCurrentDirectoryInExePath=1 breaks the bare `cmd /c "cd shared && GetCommitHash.bat"` pattern). src/main/ - platform/win-process.ts: NEW. Centralized Windows helpers for binary discovery (probes %APPDATA%\npm, %LOCALAPPDATA%\npm, %LOCALAPPDATA%\Programs\claude, Volta, then `where claude`), PATH enrichment, cmd.exe wrapping for .cmd/.bat files, and taskkill /T /F for full subprocess-tree cleanup. - cli-env.ts, process-manager.ts, claude/run-manager.ts, claude/pty-run-manager.ts: branch on win32 to use win-process helpers. - index.ts: Windows-specific BrowserWindow flags (thickFrame:false, paintWhenInitiallyHidden:false), Ctrl+Alt+C summon hotkey on Windows (Alt+Space collides with Windows system menu), region screenshot via desktopCapturer + ms-screenclip URI, JumpList delight item, gridWindow snap-grid for multi-monitor positioning, multi-tab Ctrl+Alt+1..9 global hotkeys, tray.ico variant on Windows. - skills/installer.ts: replaced curl|tar shell pipeline (Windows bsdtar doesn't accept the glob arg form) with Node-native fetch + the `tar` npm package. Cross-platform; no shell. src/preload/index.ts - New exports: takeScreenshot now takes optional 'region' | 'fullscreen' mode; activate-tab-by-index event for global Ctrl+Alt+1..9 hotkeys. src/renderer/ - ConversationView, SearchPanel, StatusBar: minor Windows-aware tweaks (CMD label, screenshot mode plumbing, terminal-launcher discovery). src/shared/types.ts - Channel constants for new IPC: START_WINDOW_DRAG, ACTIVATE_TAB_BY_INDEX, TAKE_SCREENSHOT mode. New TerminalInstallation/PreferredTerminalId types. resources/ - icon.ico, tray.ico: multi-res Windows icons (16/24/32/48/64/128/256) generated from existing PNG assets via png-to-ico. distribution/ - winget manifest (Clui.installer.yaml + .locale.en-US.yaml + .yaml): scaffolded for `winget install ElecTream.Clui` once first release is tagged. - scoop bucket entry (clui.json): for users who prefer scoop. - README.md: distribution channel overview. .github/workflows/ - release.yml: now matrix-builds macOS arm64 + macOS x64 + windows-latest. windows-latest ships VS 2022 Build Tools preinstalled so node-pty rebuilds cleanly. --publish always uploads all artifacts to the same GitHub Release tag. - ci.yml: NEW. Non-tag PR CI — both OSes, build only, no publish. docs/ - WINDOWS.md: parity matrix, node-pty troubleshooting, SmartScreen workaround, hotkey rebinding, tray pinning. Living doc. - BUBBLE_RESEARCH.md, MOBILE.md: prior-session research artifacts on potential Android bubble interface for remote Claude sessions. README.md - Added Windows fork callout linking to upstream + install/dev sections for both platforms. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.
Lands all the Windows-port work that was sitting in the working tree from the prior session. Required for
npm installto succeed on a fresh clone: the postinstall script (referenced in package.json) lives here, as do the patches it applies and the scripts/dev.js wrapper that the dev script calls.scripts/
electron-builder install-app-deps. On macOS: also patches the dev icon. On Windows: no-ops past the rebuild.unset ELECTRON_RUN_AS_NODE && electron-vite dev(POSIX-only). Node wrapper that doesdelete process.env.ELECTRON_RUN_AS_NODEthen exec's electron-vite. Works on Windows + macOS without cross-env's empty-string semantics issue.patches/
cmd /c "cd shared && GetCommitHash.bat"pattern).src/main/
where claude), PATH enrichment, cmd.exe wrapping for .cmd/.bat files, and taskkill /T /F for full subprocess-tree cleanup.tarnpm package. Cross-platform; no shell.src/preload/index.ts
src/renderer/
src/shared/types.ts
resources/
distribution/
winget install ElecTream.Cluionce first release is tagged..github/workflows/
docs/
README.md