703 Commits

Author SHA1 Message Date
Travis Stockton
cb0d636f20 fix: restore cowork-vm-service daemon recovery after crash (#408)
Two coordinated patches in build.sh's patch_cowork_linux function
address the daemon's inability to recover after mid-session death.

Patch 6 (reworked):
- Replace the one-shot _svcLaunched boolean with a timestamp-based
  _lastSpawn cooldown (10s). The retry loop can now re-fork the
  daemon on subsequent iterations after a crash instead of seeing
  the boolean already set and skipping the spawn forever.
- Redirect the forked daemon's stdout and stderr to
  ~/.config/Claude/logs/cowork_vm_daemon.log so node-level crash
  output is no longer lost to stdio:"ignore". Falls back cleanly
  if the log dir can't be opened.

Patch 6b (new):
- Extend the auto-reinstall delete list to also wipe
  sessiondata.img and rootfs.img.zst. Upstream preserves these to
  avoid re-download, but on 1.2773.0 the preserved files put the
  daemon into an unstartable state that persists across app
  restart and OS reboot (confirmed by issue reporter). Trade-off:
  next successful startup re-extracts these images; acceptable
  because auto-reinstall only runs after startup already failed.

Co-Authored-By: Claude <claude@anthropic.com>
2026-04-16 12:06:07 -05:00
github-actions[bot]
214d5e92d4 Update Claude Desktop download URLs to version 1.2773.0
Updated download URLs resolved from official redirect endpoints.

🤖 Generated with [Claude Code](https://claude.com/claude-code)
v1.3.31+claude1.2773.0
2026-04-16 01:39:35 +00:00
Aaddrick
ab3396043f fix: gate quick window patch to KDE sessions only (#393) (#406)
* fix: gate quick window patch to KDE sessions only (#393)

PR #390 fixed a quick-window regression on KDE but regressed GNOME/Ubuntu —
@Andrej730 confirmed removing patch_quick_window restores quick entry on
Ubuntu 24.04. Without a reproduction environment for GNOME yet, the safe
minimum-viable fix is to gate the patch behind a runtime XDG_CURRENT_DESKTOP
check: apply on KDE (where the fix is validated), fall back to upstream
behavior everywhere else (which Ubuntu users confirmed works).

Both halves of the patch are gated:

- blur() before hide(): wrapped in a ternary so non-KDE sessions get the
  original unconditional hide()
- focusFn()||show() replacement: wrapped so non-KDE sessions keep the
  original focus check instead of the visibility check

Adds an idempotency pre-check in the node block (XDG_CURRENT_DESKTOP
substring near the anchor) so re-runs skip cleanly. Part 1's existing
grep idempotency still works because `Q.blur(),Q.hide()` appears inside
the ternary literally.

This is a temporary gate. VMs are being spun up to bisect which half
actually regresses GNOME; once isolated, only that half needs the gate.

Refs #393, #370, #404

Co-Authored-By: Claude <claude@anthropic.com>

* style: split de_check assignment to fit under 80 chars

Matches the concatenation style already used for the node block's
deCheck, bringing the bash literal under the style guide's line limit.
No functional change — the expanded string is identical.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude <claude@anthropic.com>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
v1.3.31+claude1.2581.0
2026-04-15 18:23:27 -04:00
github-actions[bot]
158d43544c Update Claude Desktop download URLs to version 1.2581.0
Updated download URLs resolved from official redirect endpoints.

🤖 Generated with [Claude Code](https://claude.com/claude-code)
v1.3.30+claude1.2581.0
2026-04-15 01:39:29 +00:00
github-actions[bot]
e5cc4b21f8 Update Claude Desktop download URLs to version 1.2278.0
Updated download URLs resolved from official redirect endpoints.

🤖 Generated with [Claude Code](https://claude.com/claude-code)
v1.3.30+claude1.2278.0
2026-04-14 01:39:13 +00:00
github-actions[bot]
4b1d5bfa12 chore: update flake.lock 2026-04-13 03:17:43 +00:00
Aaddrick
605ccab0c9 fix: kill cowork daemon on app quit (#391)
* fix: kill cowork daemon on app quit

The upstream cowork-vm-shutdown quit handler uses the Swift VM addon
which isn't available on Linux, so it's never registered. Our forked
cowork-vm-service daemon was invisible to the quit system, surviving
app exit and leaving QEMU/virtiofsd processes running.

Register a Linux-specific quit handler via the upstream
registerQuitHandler infrastructure. The handler sends SIGTERM to the
daemon (which already handles it gracefully), verifies the PID via
/proc/cmdline to prevent killing the wrong process on PID reuse, and
polls for exit up to 10 seconds.

The daemon PID is captured at fork time on a global, avoiding any
need for pgrep/execSync at quit time. The handler is registered
unconditionally for Linux so it works regardless of how the daemon
was launched.

Fixes #369

Co-Authored-By: Claude <claude@anthropic.com>

* style: simplify quit handler patch comments and scope

Add block scope for consistency with Patches 8-9, trim header comment,
remove hardcoded minified name from implementation comment, simplify
insertIdx calculation to match Patch 4 pattern.

Co-Authored-By: Claude <claude@anthropic.com>

---------

Co-authored-by: Claude <claude@anthropic.com>
v1.3.30+claude1.1617.0
2026-04-12 19:45:54 -04:00
Aaddrick
32660beed2 fix: rewrite quick window patch with dynamic symbol extraction (#390)
* fix: rewrite quick window patch with dynamic symbol extraction

The original patch from PR #147 hardcoded the minified variable name
`e` (e.g. `s/e.hide()/e.blur(),e.hide()/`), which stopped matching
after upstream minifier changes renamed the variable. This silently
regressed the fix for #144 (quick entry submit not showing main window).

Replace with two robust patches:

1. Extract the quick window variable dynamically via the unique
   `setAlwaysOnTop(!0,"pop-up-menu")` anchor, then inject `blur()`
   before `hide()` with correct operator precedence (wrapped in parens
   to preserve the short-circuit guard).

2. Fix the main window not appearing after quick entry submit. The
   upstream code gates `Lt.show()` on a focus check (`isFocused()`),
   but on Linux `webContents.isFocused()` can return stale true for
   hidden windows. Replace with the visibility check (`isVisible()`)
   that other show-window paths in the same codebase already use.
   Implemented as a Node.js inline patch anchored on unique
   "[QuickEntry]" log strings, consistent with the cowork patches.

Fixes #144

Co-Authored-By: Claude <claude@anthropic.com>

* style: simplify comments in patch_quick_window

Remove version-specific minified names from comments (they change
between releases) and condense redundant explanations.

Co-Authored-By: Claude <claude@anthropic.com>

---------

Co-authored-by: Claude <claude@anthropic.com>
2026-04-12 17:59:21 -04:00
aaddrick
af8e393c8f docs: credit RayCharlizard for auto-memory path fix
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
v1.3.28+claude1.1617.0
2026-04-12 15:44:41 -04:00
Aaddrick
ae0b1aae15 Merge pull request #389 from RayCharlizard/fix/cowork-memory-path-host-backend
fix: translate CLAUDE_COWORK_MEMORY_PATH_OVERRIDE on HostBackend
2026-04-12 15:44:16 -04:00
aaddrick
4bd913dd68 docs: credit sabiut for build artifact integration tests
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-12 15:23:10 -04:00
Aaddrick
cfdfd2d483 Merge pull request #338 from sabiut/feature/integration-tests
feat: add integration tests for build artifacts
2026-04-12 15:21:51 -04:00
aaddrick
8690518bc1 docs: switch multi-item contributors to bulleted sublists
Update Acknowledgments section for readability — contributors with
multiple items now use nested bullet lists instead of inline commas.
Also adds cbonnissent's configurable bwrap mount points contribution.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-12 15:19:11 -04:00
Aaddrick
27c7059d4e Merge pull request #340 from cbonnissent/feature/339-configurable-bwrap-mounts
All 8 review items addressed. 39 BATS tests. Verified by community tester (pmolodo).
2026-04-12 15:15:37 -04:00
Claude Opus 4.6
379d8ebbda fix: translate CLAUDE_COWORK_MEMORY_PATH_OVERRIDE on HostBackend
buildSpawnEnv() translates CLAUDE_CONFIG_DIR from /sessions/ guest paths
to host paths, but CLAUDE_COWORK_MEMORY_PATH_OVERRIDE passes through
untranslated. On HostBackend, the /sessions/ directory does not exist,
so the auto-memory path points to a non-existent location and memory
writes silently fail.

This adds the same guest-path translation for the memory override:
1. Try translateGuestPath() (works if .auto-memory is in mountMap)
2. Fall back to resolveSubpath() on the mount-name portion, mirroring
   what HostBackend.mountPath() would return (typically ~/.auto-memory)
3. Remove the env var if neither translation succeeds

BwrapBackend is unaffected — it overrides spawn() with its own env
construction and /sessions/ paths are real inside the sandbox.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-12 13:06:44 -05:00
github-actions[bot]
218934d14d Update Claude Desktop download URLs to version 1.1617.0
Updated download URLs resolved from official redirect endpoints.

🤖 Generated with [Claude Code](https://claude.com/claude-code)
v1.3.27+claude1.1617.0
2026-04-10 01:40:40 +00:00
github-actions[bot]
814cd524c0 Update Claude Desktop download URLs to version 1.1348.0
Updated download URLs resolved from official redirect endpoints.

🤖 Generated with [Claude Code](https://claude.com/claude-code)
v1.3.27+claude1.1348.0
2026-04-09 01:40:07 +00:00
github-actions[bot]
b1e1ea8e78 Update Claude Desktop download URLs to version 1.1062.0
Updated download URLs resolved from official redirect endpoints.

🤖 Generated with [Claude Code](https://claude.com/claude-code)
v1.3.27+claude1.1062.0
2026-04-08 01:39:02 +00:00
github-actions[bot]
e4efeb3bc6 chore: update flake.lock 2026-04-06 03:16:30 +00:00
Aaddrick
42aec29a3e fix: read Electron version from file instead of launching binary (#381)
* fix: read Electron version from file instead of launching binary (#371)

--doctor hung because launching the Electron binary to get its version
spawns the full app, which ignores SIGPIPE and never exits. Read the
version file next to the binary instead — instant and reliable.

Co-Authored-By: Claude <claude@anthropic.com>

* style: extract _electron_version helper to deduplicate version reading

Both the bundled and system Electron code paths performed the same
version-file lookup inline. Extract to a shared helper for clarity.

Co-Authored-By: Claude <claude@anthropic.com>

---------

Co-authored-by: Claude <claude@anthropic.com>
2026-04-04 09:15:45 -04:00
Aaddrick
aa322cd6e2 Merge pull request #379 from RayCharlizard/fix/issue-373-complete
fix: complete double-nested home path resolution (#373)
v1.3.27+claude1.569.0
2026-04-03 22:19:15 -04:00
RayCharlizard
a03563904b fix: correct UTF-8 encoding for em-dash characters
The previous commit double-encoded UTF-8 em-dash characters (U+2014)
due to btoa/atob Latin-1 handling. This commit re-applies all patches
from a clean upstream base with proper UTF-8 encoding.

Co-authored-by: Claude <noreply@anthropic.com>
2026-04-03 12:31:22 -05:00
RayCharlizard
1a304d45cd fix: correct file content (re-encode with proper base64) 2026-04-03 12:24:43 -05:00
RayCharlizard
9b3c8f4682 fix: resolve all double-nested home paths in cowork service (#373)
PR #374 fixed the 3 mountPath() methods but missed 4 other call sites
that also join os.homedir() with root-relative subpaths from app.asar.

This commit:
- Adds resolveSubpath() helper that handles both root-relative and
  home-relative subpaths correctly
- Fixes buildMountMap() doubled mount paths
- Fixes buildSpawnEnv() doubled CLAUDE_CONFIG_DIR (critical: this is
  where Claude Code stores conversation data; deleting ~/home/ after
  the incomplete fix crashed session resume)
- Fixes resolveWorkDir() doubled working directory
- Fixes resolveSdkBinary() doubled SDK binary path
- Upgrades the 3 mountPath() methods to use resolveSubpath() for
  consistency and correct handling of home-relative paths

Fixes #373
2026-04-03 12:22:25 -05:00
Aaddrick
631e703d71 Merge pull request #374 from aaddrick/claude/review-issue-373-pszps
fix: resolve double-nested home paths in cowork mountPath (#373)
2026-04-03 08:37:25 -04:00
Claude
0bcc245c95 fix: resolve double-nested home paths in cowork mountPath (#373)
The mountPath() methods in HostBackend, BwrapBackend, and KvmBackend
joined os.homedir() with a root-relative subpath, causing paths like
/home/user/home/user/.config/Claude/... instead of the correct
/home/user/.config/Claude/...

The subpath parameter is encoded as path.relative("/", absolutePath),
making it root-relative. Joining with "/" instead of os.homedir()
produces the correct absolute path.

Fixes #373

Co-Authored-By: Claude <claude@anthropic.com>

https://claude.ai/code/session_01TEWYXVLaKgBfKVkHY47g9M
2026-04-03 12:33:33 +00:00
aaddrick
0782c5a70e ci: disable compare-release to use generic release notes
Bypasses the AI-powered compare-releases step to reduce API costs.
Falls back to the existing generic release notes template.

Co-Authored-By: Claude <claude@anthropic.com>
v1.3.26+claude1.569.0
2026-04-02 22:15:38 -04:00
github-actions[bot]
a918cd8091 Update Claude Desktop download URLs to version 1.569.0
Updated download URLs resolved from official redirect endpoints.

🤖 Generated with [Claude Code](https://claude.com/claude-code)
2026-04-03 01:38:50 +00:00
github-actions[bot]
a5bffe62c9 Update Claude Desktop download URLs to version 1.2.234
Updated download URLs resolved from official redirect endpoints.

🤖 Generated with [Claude Code](https://claude.com/claude-code)
v1.3.26+claude1.2.234
2026-04-02 01:39:14 +00:00
aaddrick
a4fa9c8b24 docs: credit gianluca-peri for GNOME quit accessibility report
Co-Authored-By: Claude <claude@anthropic.com>
2026-04-01 07:05:18 -04:00
aaddrick
c429cfb3d0 fix: enable Alt menu toggle and Ctrl+Q quit on Linux
Two changes for quit accessibility on Linux:

1. Fix Alt menu bar toggle in 'auto' mode (the default). The show
   event handler and setApplicationMenu interceptor were force-hiding
   the menu bar on every event, overriding autoHideMenuBar's native
   Alt toggle. Now only 'hidden' mode force-hides; 'auto' lets
   Electron handle the toggle natively.

2. Register Ctrl+Q as a global shortcut to quit. The upstream menu
   has a CmdOrCtrl+Q accelerator but Electron doesn't fire menu
   accelerators when the menu bar is hidden on Linux. The global
   shortcut ensures Ctrl+Q always works, using the same API as
   Ctrl+Alt+Space (works under XWayland).

Together these give GNOME and other DE users two ways to quit
without needing a tray icon: Alt → File → Quit, or Ctrl+Q.

Fixes #321

Co-Authored-By: Claude <claude@anthropic.com>
2026-04-01 07:04:45 -04:00
aaddrick
5926280d5c docs: credit jarrodcolburn for session-start hook sudo fix
Co-Authored-By: Claude <claude@anthropic.com>
2026-04-01 06:13:50 -04:00
aaddrick
891d7222fb fix: prevent session-start hook from blocking on sudo password
Add early exit when all tools are already installed, and use sudo -n
(non-interactive) throughout both hook scripts to fail immediately
instead of hanging on password prompts. Applies to session-start.sh
and install-build-tools.sh.

Fixes #359

Co-Authored-By: Claude <claude@anthropic.com>
2026-04-01 06:11:56 -04:00
aaddrick
879a700a7d docs: add learnings directory with NixOS packaging knowledge
Create docs/learnings/ for hard-won technical knowledge that isn't
obvious from code or docs alone. Reference from CLAUDE.md so
contributors (human and AI) consult it before working on related areas.

First entry covers NixOS Electron resource path resolution,
/proc/self/exe symlink behavior, testing without NixOS, and why
the co-located binary approach was chosen over alternatives.

Co-Authored-By: Claude <claude@anthropic.com>
2026-04-01 06:00:08 -04:00
Aaddrick
46a55d51fb Merge pull request #368 from aaddrick/fix/316-nix-ispackaged-electron-copy
fix(nix): enable isPackaged=true by co-locating Electron binary with app resources
2026-04-01 05:44:37 -04:00
aaddrick
2650d8e3c5 style(nix): apply style guide conventions to installPhase
Use [[ ]] for conditionals, collapse single-line if/fi blocks,
remove redundant mkdir, fix double-space in exec line.

Co-Authored-By: Claude <claude@anthropic.com>
2026-04-01 05:41:50 -04:00
aaddrick
a326ea2013 fix(nix): enable isPackaged=true by co-locating Electron binary with app resources
On NixOS, Electron and the app live in separate Nix store paths.
When ELECTRON_FORCE_IS_PACKAGED=true, the app reads locale files
(en-US.json) from process.resourcesPath at module load time —
before frame-fix-wrapper.js can correct the path. Since
resourcesPath is computed from /proc/self/exe (which resolves to
electron-unwrapped's store path), the files aren't found and the
app crashes with ENOENT.

The fix copies the Electron ELF binary into a custom tree within
the derivation, then merges both Electron's and the app's resources
into the adjacent resources/ directory. Everything else (shared
libs, .pak files, locales/) is symlinked to avoid duplication.
This makes /proc/self/exe resolve to our tree, so resourcesPath
naturally contains all needed files.

Also enables ELECTRON_FORCE_IS_PACKAGED=true unconditionally for
all package types, removing the 'nix' special case that kept NixOS
running in development mode with debug logging and exposed IPC.

Fixes #316

Co-Authored-By: Claude <claude@anthropic.com>
2026-04-01 05:38:01 -04:00
aaddrick
5777727aa1 docs: credit reinthal for NixOS nodePackages fix
Co-Authored-By: Claude <claude@anthropic.com>
2026-04-01 04:42:27 -04:00
Aaddrick
ddd8cebf08 Merge pull request #365 from reinthal/main
fix(nix): fix package rename asar
2026-04-01 04:42:01 -04:00
Alexander Reinthal
f04ec24184 fix(nix): fix package rename asar 2026-03-31 21:51:42 +02:00
aaddrick
140a4188d2 fix(ci): increase compare-releases timeout to 3 hours
The OOM fix is working — the script survives the full pipeline now. But
498 hunks of Claude-powered analysis need more than 5 minutes. Increase
timeout to 180 minutes so AI-generated release notes can complete. The
fallback and if: always() hardening remain as safety net.

Co-Authored-By: Claude <claude@anthropic.com>
v1.3.25+claude1.1.9669 v1.3.26+claude1.1.9669
2026-03-31 11:43:54 -04:00
aaddrick
15c703427b fix(ci): re-enable compare-releases step
OOM fix is in progress in claude-desktop-versions. Re-enabling so the
next release tests the fix. The if: always() hardening on fallback and
release steps ensures the release still ships if the script fails.

Co-Authored-By: Claude <claude@anthropic.com>
2026-03-31 10:14:58 -04:00
aaddrick
beaf9ae2e2 fix(ci): disable compare-releases to unblock releases (#361)
The concurrency group fix was insufficient — the runner SIGTERM occurs
even with a single CI run. The compare-releases.py script itself causes
the runner to die (~86s, exit 143) regardless of concurrency. Disabling
the step entirely until the script is debugged in claude-desktop-versions.

The fallback notes and if: always() hardening remain in place.

Co-Authored-By: Claude <claude@anthropic.com>
2026-03-31 10:04:01 -04:00
aaddrick
354f9706bc docs: credit jarrodcolburn for CI release pipeline analysis
Co-Authored-By: Claude <claude@anthropic.com>
2026-03-31 09:57:47 -04:00
aaddrick
bdcedbfea6 fix(ci): prevent runner kill from blocking release creation (#361)
Add concurrency group to CI workflow so concurrent runs (triggered when
check-claude-version pushes to main then pushes a tag) queue instead of
killing each other. This addresses the ~86-second runner SIGTERM that
has blocked 10 releases in March.

Also harden release steps as defense-in-depth:
- timeout-minutes: 5 on compare-releases step
- if: always() on fallback notes and Create GitHub Release steps

Co-Authored-By: Claude <claude@anthropic.com>
2026-03-31 09:48:05 -04:00
aaddrick
1f03ca86a5 docs: credit typedrat for flake package scoping fix
Co-Authored-By: Claude <claude@anthropic.com>
2026-03-31 09:37:38 -04:00
Aaddrick
d3cbc16b66 Merge pull request #360 from typedrat/fix/flake-nix-missing-rec
Fix the flake evaluation regression from #356
2026-03-31 09:36:17 -04:00
Alexis Williams
0ce0f24e8c fix: move claude-desktop-fhs to let block so default can reference it
The packages attrset referenced claude-desktop-fhs for the default
attribute, but without rec the name wasn't in scope. Move the
definition to the let block and use inherit instead.

Co-Authored-By: Claude <claude@anthropic.com>
2026-03-30 18:59:00 -07:00
github-actions[bot]
a855b484ab Update Claude Desktop download URLs to version 1.1.9669
Updated download URLs resolved from official redirect endpoints.

🤖 Generated with [Claude Code](https://claude.com/claude-code)
2026-03-31 01:38:42 +00:00
Aaddrick
91924b4a4d Merge pull request #356 from aaddrick/fix/355-nixos-fhs-default
fix: default Nix flake to FHS package for NixOS compatibility
2026-03-30 10:05:36 -04:00