Skip to content

Phase 5: packaging + app identity (0.6.0) - #15

Merged
TeleporterGuy merged 7 commits into
masterfrom
phase5-packaging
Oct 1, 2026
Merged

TeleporterGuy merged 7 commits into
masterfrom
phase5-packaging

Conversation

@TeleporterGuy

@TeleporterGuy TeleporterGuy commented Oct 1, 2026 •

Copy link
Copy Markdown
Owner

Phase 5 from ROADMAP.md: the app looks and identifies as DevTool, Windows gets a per-user Setup.exe next to the portable folder, and update checks land. Signing and self-update are wired but dormant until a certificate exists.

  • Icon: build/icon.png generated from join3r's iOS icon (npm run make-icon). electron-builder derives .ico / .icns.
  • Name: app.setName('DevTool') with userData pinned, so dev and prod browser storage stay apart. The dev Electron.app plist is patched. On Windows, the AppUserModelId is com.devtool.app (.dev for dev runs).
  • Windows exe: an afterPack hook (scripts/win-rcedit.cjs, rcedit package) stamps the icon and version resources. electron-builder's built-in exe editing (signAndEditExecutable) stays off because its winCodeSign download fails without symlink rights.
  • Installer: npm run build:win:setup builds a per-user NSIS DevTool-Setup-<v>.exe (no admin, Start Menu shortcut) plus a portable zip. npm run build:win is unchanged.
  • Releases: npm run release:win uploads a draft GitHub Release from the Windows box. --signed adds latest.yml, which is what lets signed installs self-update.
  • Signing: scripts/sign-win.cjs runs DEVTOOL_SIGN_CMD when set and does nothing otherwise.
  • Updates (stem's model): packaged builds check GitHub Releases at launch and every 6 h, through Electron's network stack so system proxy/PAC settings apply.
    • Unsigned builds only announce a new version and open its release page.
    • Signed NSIS installs self-update via electron-updater.
    • There is a Settings → Updates tab, a Check for Updates… menu item and an opt-out toggle.
  • Version: 0.6.0.

Verification

  • npm run typecheck, npm run lint (0 errors) and npm test pass on macOS. tests/updates.test.ts is new.
  • Windows 11: the exe carries the DevTool icon and version resources (unsigned). The installer installs per-user without UAC, and taskbar pinning groups correctly. The update check reports up to date. Uninstall keeps ~/.devtool. Dev runs stay separate.
    • On that machine, tests/ipc-path-allowlist.test.ts fails with symlink EPERM because the account cannot create symlinks; that suite is not touched by this PR.
  • macOS: dev and packaged builds say DevTool with the icon. The packaged update check works.
  • Windows retest at 13c7792 (0.6.0): build:win:setup builds DevTool-Setup-0.6.0.exe, the exe is stamped with FileVersion 0.6.0, and a fresh per-user install launches. Check now right after launch reports up to date within a second or two, so the Electron network-stack probe fixes the earlier 30 s timeout.
  • CI: editor-tab.test.tsx (Phase 4.5 code) flaked once on ubuntu. 92b4047 makes the test wait for the editor's commands to register.

🤖 Generated with Claude Code

TeleporterGuy and others added 7 commits October 1, 2026 21:33
- Icon: build/icon.png generated from join3r's iOS app icon
  (scripts/make-icon.mjs); electron-builder derives .ico/.icns. Window icon
  on Windows/Linux, Dock icon in macOS dev runs.
- Name: app.setName('DevTool') with userData pinned so dev and prod Chromium
  storage stay apart; dev Electron.app plist gets CFBundleName/DisplayName
  (postinstall + predev); Windows AppUserModelId com.devtool.app (.dev in dev).
- Windows exe: signAndEditExecutable on with no certificate, so rcedit stamps
  icon + version resources while the exe stays unsigned.
- NSIS: npm run build:win:setup -> per-user Setup.exe (no admin, Start Menu
  shortcut) + portable zip. Portable build:win unchanged.
- Signing: scripts/sign-win.cjs runs DEVTOOL_SIGN_CMD when set, no-op otherwise.
- Releases: npm run release:win uploads a draft GitHub Release from the
  Windows box; latest.yml only with --signed.
- Updates (stem's model): packaged builds check GitHub Releases at launch and
  every 6 h; unsigned builds only announce + open the release page, signed
  NSIS installs self-update via electron-updater. Settings -> Updates tab,
  Check for Updates... menu item, opt-out toggle.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
On Windows, signAndEditExecutable makes electron-builder fetch rcedit from
the winCodeSign archive, and 7-Zip cannot unpack its macOS symlinks
without Developer Mode or admin ("A required privilege is not held by the
client"), so npm run build:win failed on the build machine.

Turn signAndEditExecutable off and stamp icon + version resources with the
rcedit npm package in scripts/win-rcedit.cjs (build.afterPack). It also
overwrites Electron's leftover CompanyName / InternalName /
OriginalFilename, and runs scripts/sign-win.cjs on the exe, since
electron-builder no longer signs it (still a no-op without
DEVTOOL_SIGN_CMD; keeps release:win --signed's verify step working).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The Windows test saw the first update check time out after 30 s while later
ones took ~100 ms. Node's fetch also ignores the system proxy / PAC, which
company networks need. Probe the releases/latest redirect with Electron's
net.request (Chromium networking) instead; net.fetch cannot stop at a manual
redirect ("Redirect was cancelled").

Also note NoDefaultCurrentDirectoryInExePath breaking node-pty's gyp step
in agent shells on Windows (CLAUDE.md).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Windows and macOS verification recorded in ROADMAP.md; the one-off
PHASE5-WINDOWS-TEST.md plan and its results live in git history (a7e24a2).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Flaked on ubuntu CI: the editor's addCommand can run after the file
content is visible, so press() found no command for Ctrl+L.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@TeleporterGuy
TeleporterGuy merged commit da8a778 into master Oct 1, 2026
4 checks passed
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