Skip to content

ENG-1352: Add open in Alacritty support#2131

Merged
arnestrickmann merged 1 commit into
mainfrom
arne/eng-1352-add-open-in-alacritty-functionality
May 20, 2026
Merged

ENG-1352: Add open in Alacritty support#2131
arnestrickmann merged 1 commit into
mainfrom
arne/eng-1352-add-open-in-alacritty-functionality

Conversation

@arnestrickmann
Copy link
Copy Markdown
Contributor

Summary

  • Add Alacritty to the shared Open In app registry with platform-specific launch commands
  • Add remote SSH launch handling for Alacritty using its -e command form
  • Add the Alacritty SVG icon from Wikimedia Commons and registry coverage

Impact

Users can select Alacritty from Open In options when it is installed. Remote project opens also launch an SSH session in Alacritty using the existing terminal launcher flow.

Validation

  • pnpm run format
  • pnpm run lint
  • pnpm run typecheck
  • pnpm run test

@arnestrickmann arnestrickmann marked this pull request as ready for review May 19, 2026 23:46
@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented May 19, 2026

Greptile Summary

This PR adds Alacritty as an "Open In" terminal option, including its SVG icon, a registry entry with --working-directory-based launch commands for macOS/Linux/Windows, and a remote SSH handler in the main-process service that mirrors the existing Ghostty/Kitty pattern.

  • openInApps.ts: Alacritty is registered with three macOS launch strategies (CLI-first, bundle-ID, app-name), plus Linux and Windows entries, all using --working-directory correctly.
  • service.ts: Remote SSH handler for Alacritty uses -e to pass the SSH command, but Alacritty removed that flag in v0.13 — the launch will fail with "unknown option" on all modern installations; the fix is to use -- as the separator instead.
  • Tests: The new openInApps.test.ts correctly covers the registry entry but does not exercise the remote SSH code path.

Confidence Score: 3/5

The registry and icon additions are safe to ship, but the remote SSH handler is broken for all modern Alacritty installs and should be fixed before merging.

The remote SSH launch passes -e to Alacritty, a flag that was removed in v0.13 (late 2023). Any user on a current Alacritty install who tries to open a remote project will hit an "unknown option" error on all three macOS attempts and the Linux fallback. The local open-in path (working-directory commands) is unaffected, but the advertised remote capability — half the point of supportsRemote: true — does not work.

src/main/core/app/service.ts — the Alacritty remote SSH launch block needs -e replaced with -- before this is usable.

Important Files Changed

Filename Overview
src/main/core/app/service.ts Adds Alacritty remote SSH handler modelled on the Ghostty block, but passes -e to Alacritty which was removed in v0.13; all three launch attempts will fail on modern installations.
src/shared/openInApps.ts Adds Alacritty to the app registry with correct --working-directory flag, three darwin launch strategies, win32, and linux; no issues.
src/shared/openInApps.test.ts New test file verifying Alacritty registry entries and platform launch commands; assertions match the implementation correctly.
src/assets/images/alacritty.svg New Alacritty SVG icon sourced from Wikimedia Commons; no code issues.

Sequence Diagram

sequenceDiagram
    participant UI as Renderer
    participant SVC as AppService
    participant OS as OS Process

    UI->>SVC: "openApp({ app: 'alacritty', isRemote: true, sshConnectionId })"
    SVC->>SVC: openInRemote()
    SVC->>SVC: buildRemoteTerminalExecArgs(host, user, port, path)

    alt "platform === darwin"
        SVC->>OS: open -n -b org.alacritty --args -- ssh-cmd
        OS-->>SVC: success / error
        alt failed
            SVC->>OS: open -na Alacritty --args -- ssh-cmd
            OS-->>SVC: success / error
        end
        alt failed
            SVC->>OS: alacritty -- ssh-cmd
            OS-->>SVC: success / error
        end
    else linux / win32
        SVC->>OS: alacritty -- ssh-cmd
        OS-->>SVC: success / error
    end

    SVC-->>UI: resolve / throw
Loading
Prompt To Fix All With AI
Fix the following 1 code review issue. Work through them one at a time, proposing concise fixes.

---

### Issue 1 of 1
src/main/core/app/service.ts:324-345
**`-e` flag removed in Alacritty v0.13**

Alacritty removed the `-e`/`--command` option in v0.13 (late 2023). Every attempt in the array that passes `-e` before `remoteExecArgs` will fail with an "unknown option" error on any modern Alacritty installation. The correct separator is now `--`: `alacritty -- <cmd> [args…]`. For the macOS `open --args` variants, the same applies — `'--args', '-e', ...remoteExecArgs` should become `'--args', '--', ...remoteExecArgs`.

```suggestion
      const attempts =
        platform === 'darwin'
          ? [
              {
                file: 'open',
                args: ['-n', '-b', 'org.alacritty', '--args', '--', ...remoteExecArgs],
              },
              { file: 'open', args: ['-na', 'Alacritty', '--args', '--', ...remoteExecArgs] },
              { file: 'alacritty', args: ['--', ...remoteExecArgs] },
            ]
          : [{ file: 'alacritty', args: ['--', ...remoteExecArgs] }];
```

Reviews (1): Last reviewed commit: "ENG-1352: add Alacritty open-in support" | Re-trigger Greptile

Comment on lines +324 to +345
if (appId === 'alacritty') {
const remoteExecArgs = buildRemoteTerminalExecArgs({
host,
username,
port,
targetPath: target,
});
const attempts =
platform === 'darwin'
? [
{
file: 'open',
args: ['-n', '-b', 'org.alacritty', '--args', '-e', ...remoteExecArgs],
},
{ file: 'open', args: ['-na', 'Alacritty', '--args', '-e', ...remoteExecArgs] },
{ file: 'alacritty', args: ['-e', ...remoteExecArgs] },
]
: [{ file: 'alacritty', args: ['-e', ...remoteExecArgs] }];

await this.launchRemoteTerminal('Alacritty', attempts);
return;
}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 -e flag removed in Alacritty v0.13

Alacritty removed the -e/--command option in v0.13 (late 2023). Every attempt in the array that passes -e before remoteExecArgs will fail with an "unknown option" error on any modern Alacritty installation. The correct separator is now --: alacritty -- <cmd> [args…]. For the macOS open --args variants, the same applies — '--args', '-e', ...remoteExecArgs should become '--args', '--', ...remoteExecArgs.

Suggested change
if (appId === 'alacritty') {
const remoteExecArgs = buildRemoteTerminalExecArgs({
host,
username,
port,
targetPath: target,
});
const attempts =
platform === 'darwin'
? [
{
file: 'open',
args: ['-n', '-b', 'org.alacritty', '--args', '-e', ...remoteExecArgs],
},
{ file: 'open', args: ['-na', 'Alacritty', '--args', '-e', ...remoteExecArgs] },
{ file: 'alacritty', args: ['-e', ...remoteExecArgs] },
]
: [{ file: 'alacritty', args: ['-e', ...remoteExecArgs] }];
await this.launchRemoteTerminal('Alacritty', attempts);
return;
}
const attempts =
platform === 'darwin'
? [
{
file: 'open',
args: ['-n', '-b', 'org.alacritty', '--args', '--', ...remoteExecArgs],
},
{ file: 'open', args: ['-na', 'Alacritty', '--args', '--', ...remoteExecArgs] },
{ file: 'alacritty', args: ['--', ...remoteExecArgs] },
]
: [{ file: 'alacritty', args: ['--', ...remoteExecArgs] }];
Prompt To Fix With AI
This is a comment left during a code review.
Path: src/main/core/app/service.ts
Line: 324-345

Comment:
**`-e` flag removed in Alacritty v0.13**

Alacritty removed the `-e`/`--command` option in v0.13 (late 2023). Every attempt in the array that passes `-e` before `remoteExecArgs` will fail with an "unknown option" error on any modern Alacritty installation. The correct separator is now `--`: `alacritty -- <cmd> [args…]`. For the macOS `open --args` variants, the same applies — `'--args', '-e', ...remoteExecArgs` should become `'--args', '--', ...remoteExecArgs`.

```suggestion
      const attempts =
        platform === 'darwin'
          ? [
              {
                file: 'open',
                args: ['-n', '-b', 'org.alacritty', '--args', '--', ...remoteExecArgs],
              },
              { file: 'open', args: ['-na', 'Alacritty', '--args', '--', ...remoteExecArgs] },
              { file: 'alacritty', args: ['--', ...remoteExecArgs] },
            ]
          : [{ file: 'alacritty', args: ['--', ...remoteExecArgs] }];
```

How can I resolve this? If you propose a fix, please make it concise.

@arnestrickmann arnestrickmann merged commit 40b7fe9 into main May 20, 2026
1 check 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