Skip to content

feat!: give Arduino Agent its own app identity - #41

Merged
mixelpixx merged 1 commit into
mainfrom
own-identity
Oct 2, 2026
Merged

mixelpixx merged 1 commit into
mainfrom
own-identity

Conversation

@mixelpixx

Copy link
Copy Markdown
Owner

Summary

This is the 0.7.0 identity change planned in #39. Arduino Agent stops sharing its app identity with the official Arduino IDE, so the two apps can be installed side by side.

The problem: the fork used Arduino's productName, appId and Electron userData folder (%APPDATA%\arduino-ide). Electron's single-instance lock is keyed on the userData folder, so with both apps installed, starting one handed the launch to whichever was already running. That included the bridge's auto-launch, which would then wait two minutes for an MCP server that never appeared.

What changes

Before After
Executable Arduino IDE.exe / Arduino IDE.app Arduino Agent.exe / Arduino Agent.app / arduino-agent
App ID cc.arduino.IDE2 (Arduino's) io.github.mixelpixx.arduino-agent
Electron userData and single-instance lock %APPDATA%\arduino-ide (shared) %APPDATA%\arduino-agent
Log folder %APPDATA%\Arduino IDE (shared) %APPDATA%\Arduino Agent
MCP serverInfo.name arduino-ide-mcp arduino-agent
Release assets arduino-ide-mcp-<platform>.zip arduino-agent-<platform>.zip, plus the old name as an alias

The new appId was also required before shipping any NSIS/MSI installer. Those installers derive their upgrade GUID from appId, so an installer built with Arduino's ID would have uninstalled the official IDE.

Deliberately still shared: ~/.arduinoIDE (preferences, arduino-cli.yaml and the MCP token), Arduino15 (installed cores and libraries) and the sketchbook.

Upgrade path, nothing lost

  • Migration: on first launch, arduino-ide-electron-main.js copies Local Storage, IndexedDB (the window layout and per-sketch board selections) and config.json (the sketches to reopen) from the old folder. This happens once, before the single-instance lock is taken. LevelDB LOCK files are skipped, an existing folder is never overwritten, and a marker file prevents repeats.
  • Bridge 0.3.1: if ARDUINO_AGENT_PATH names the old Arduino IDE executable and that file is gone, the bridge uses the renamed Arduino Agent one and logs a hint. Existing MCP configs keep working.
  • Release assets: they're uploaded under both names, so external /releases/latest/download/arduino-ide-mcp-*.zip links keep working. The README now points at the new names.

Also fixed: docs/BUILDING-WINDOWS.md ran rebuild:electron after the production build. CLAUDE.md is explicit that it must come first, otherwise the build bundles a Node-ABI pty.node and the app crashes on launch. The doc's packaging command also lacked the release metadata, which gave the app the wrong userData folder and skipped the bundled plugins.

Vendored edits (in arduino-ide-extension, marked // Arduino Agent): the log folder name, and the dev-mode fallback applicationName and uriScheme. Everything else is packaging, our extension, or docs.

Test plan

On a local Windows build packaged with the new release.yml command, while my installed 0.6.2 kept running. 0.6.2 still uses the shared arduino-ide folder and lock, exactly like the official IDE does, so it stands in for the collision:

  • Coexistence: the new Arduino Agent.exe opened its own window in 4 s. The 0.6.2 window kept the same PID and was not handed the launch.
  • Identity (from inside the app): app.getName() returns "Arduino Agent", userData is %APPDATA%\arduino-agent, and the title is sketch | Arduino Agent 0.6.2.
  • Migration: the marker file was written, and Local Storage, IndexedDB and config.json were copied. The user's open sketch was restored from the migrated config.json. No LevelDB LOCK files were copied (the only two present belong to the new app).
  • Logs: %APPDATA%\Arduino Agent\…_log.log was created, with the banner Arduino Agent 0.6.2.
  • Cleanup: closing the new build left 0.6.2 running. The test-created folders were removed afterwards, so the real install migrates fresh.
  • yarn test:bridge passes 13/13, including a new test that a pre-0.7.0 Arduino IDE path launches the renamed executable.
  • release.yml parses, and the upload step lists both asset names.
  • The MCP smoke test (serverInfo.name) and the macOS/Linux packaging get confirmed on the release draft.
  • CI.

🤖 Generated with Claude Code

@mixelpixx
mixelpixx merged commit 4d3ac50 into main Oct 2, 2026
1 check passed
@mixelpixx
mixelpixx deleted the own-identity branch October 2, 2026 01:58
@mixelpixx mixelpixx mentioned this pull request Oct 2, 2026
2 of 4 tasks
Arduino Agent shared every identity value with the official Arduino IDE:
productName, appId and Electron userData (`arduino-ide`). Its single-instance
lock is keyed on userData, so with both installed, starting one handed the
launch to whichever was already running. That included the bridge's
auto-launch, which then waited for an MCP server that never came.

- productName "Arduino Agent": `Arduino Agent.exe` / `Arduino Agent.app` /
  `arduino-agent`.
- appId io.github.mixelpixx.arduino-agent. It was required before shipping
  any installer: NSIS/MSI derive their upgrade GUIDs from appId, so an
  installer built with Arduino's would have removed the official IDE.
- Package name arduino-agent (release.yml, scripts/package.js), giving its
  own userData folder and single-instance lock. On first launch,
  arduino-ide-electron-main.js copies Local Storage, IndexedDB and
  config.json from the old folder once, before the lock is taken.
  ~/.arduinoIDE, Arduino15 and the sketchbook stay shared on purpose.
- Own log folder (%APPDATA%\Arduino Agent), MCP server name
  "arduino-agent", uriScheme arduino-agent, new installer sidebar artwork.
- Release assets are named arduino-agent-<platform>.zip, with the old
  arduino-ide-mcp-<platform>.zip uploaded alongside so existing links work.
- Bridge 0.3.1: an ARDUINO_AGENT_PATH naming the pre-0.7.0
  `Arduino IDE` executable falls back to the renamed one, so existing
  MCP configs keep working.
- Docs: download names, executable names, coexistence and upgrade notes.
  Also fixes BUILDING-WINDOWS.md running rebuild:electron after the
  production build (it must run before) and its packaging command missing
  the release metadata.

BREAKING CHANGE: the executable, app ID and Electron user-data folder are
renamed. The window layout is migrated, and old ARDUINO_AGENT_PATH values
keep working through the bridge fallback, but should be updated.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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