Skip to content

Desktop App

Recon Desktop is a native window around the same local server and web UI that recon ui serves. Use it when you want Recon as an app with a native menu, a folder picker and a recent-workspaces list, instead of a browser tab.

  1. The app reads the first command-line argument, if any, as a workspace folder. Arguments that start with -psn_ (process serial numbers that macOS adds when you open an app from Finder) are ignored.
  2. It resolves the config directory and the masking salt (see Settings it reads).
  3. It chooses the startup workspace (see How the startup workspace is chosen).
  4. It starts the embedded Recon server on 127.0.0.1 with a random free port, on its own Tokio runtime.
  5. It builds the native menu, including the recent workspaces.
  6. It opens one window, labelled main, that loads http://127.0.0.1:<port> from that server. The window title is Recon — <workspace name>. The window opens at 1340 x 860 and cannot be resized below 960 x 620.

When the window closes and the app exits, the embedded server task is stopped.

The app links the recon-server crate and calls the same start function that recon ui uses, with two extra options:

Option Desktop value Effect
Folder picker A native folder dialog titled Open Recon Workspace Enables POST /api/v1/workspaces/pick, and native_picker_available is true in GET /api/v1/workspace and GET /api/v1/workspaces/recent. In recon ui this route returns 400 instead.
Config directory The resolved config directory Where recent_workspaces.json and default-workspace live.

Everything else is identical to recon ui: the same routes, the same per-launch X-Recon-Token check, the same offline sandboxes and the same /ws live feed. The server listens only on 127.0.0.1, so other machines cannot reach it. The port changes on every launch. See HTTP API for the full route list.

The app takes the first rule that matches:

Order Rule
1 The first command-line argument, if it is an existing directory. It does not need a .recon.toml.
2 The current working directory, if it is not /, contains a .recon.toml file, and is writable.
3 The first entry in the recent-workspaces list that is still a writable directory.
4 <config dir>/default-workspace, created if it does not exist.

“Writable” means the path is a directory, is not /, is not marked read-only, and the app can create (and then delete) a probe file named .recon_write_probe_<pid> in it. If the folder already has a .recon/ directory, the probe goes there instead.

If the server fails to start on the chosen workspace and no folder was given on the command line, the app retries once with default-workspace. If a folder was given on the command line, there is no fallback.

The default workspace is an empty folder. The server opens a folder without .recon.toml as a workspace named after the folder and creates its .recon/ state directory on first use, so the default workspace shows up as default-workspace.

default-workspace sits inside the config directory, which is resolved in this order:

Order Source
1 RECON_CONFIG_DIR, if set and not blank
2 $XDG_CONFIG_HOME/recon, if XDG_CONFIG_HOME is set and not blank
3 $HOME/.config/recon (or %USERPROFILE%\.config\recon when HOME is not set)
4 recon-config inside the system temp directory

On a typical macOS or Linux setup this gives ~/.config/recon/default-workspace.

If startup fails (the Tokio runtime cannot be built, the default workspace cannot be created, or the server cannot start even after the fallback), the app:

  1. prints Recon Desktop startup error: <message> to stderr,
  2. shows a native error dialog titled Recon Failed to Start with the full error chain, and
  3. exits with status 1.

The message chain includes the context failed starting embedded Recon server, or failed starting embedded Recon server (including default workspace fallback) when the fallback also failed.

The menu differs by platform. Open Workspace Folder… is the only item with an accelerator set in Recon’s code: CmdOrCtrl+O. The other items are Tauri’s standard predefined items.

Menu Items
Recon About, separator, Hide, Hide Others, Show All, separator, Quit
File Open Workspace Folder… (CmdOrCtrl+O), Recent Workspaces (submenu), separator, Close Window
Edit Undo, Redo, separator, Cut, Copy, Paste, Select All
Window Minimize, separator, Close Window
Menu Items
File Open Workspace Folder… (CmdOrCtrl+O), Recent Workspaces (submenu), separator, Quit
Edit Undo, Redo, separator, Cut, Copy, Paste, Select All
Window Minimize

Opens the native folder dialog titled Open Recon Workspace. If you cancel, nothing happens. If you pick a folder, the running server switches to it in place: no restart, same port, same token. The window title changes to Recon — <name>. If the switch fails, an error dialog titled Failed to Open Workspace shows the error text.

A switch fails if the folder does not exist or Recon cannot load it, for example when .recon.toml is not valid TOML. Any existing folder can be opened, with or without .recon.toml. On failure the previous workspace stays active.

The submenu lists entries from recent_workspaces.json in the config directory, newest first. Each item reads <name> — <path>. With no entries, it shows a disabled (No recent workspaces) item.

Choosing an entry switches the server to that folder. If the switch fails (for example, the folder was deleted), nothing is shown and the current workspace stays open.

The list holds at most 12 entries. A workspace is added or moved to the top each time the server opens it: at launch, from the menu, from the web UI’s workspace switcher, or from POST /api/v1/workspaces/switch and /pick. Each entry stores path, name and last_opened_utc. recon ui writes to the same file, so workspaces you open there also appear here.

The app listens to the server’s workspace_switched event. Whatever triggered the switch (menu, web UI, or an API call), it updates the window title to Recon — <name> and rebuilds the menu so the recent list is current.

The window decides per navigation whether to stay inside the app:

URL Handling
blob:, data:, about: and tauri: URLs Opened in the window
http or https to host 127.0.0.1 on the embedded server’s port Opened in the window
Anything else, including other localhost ports, localhost, external websites and editor URIs such as vscode://file/... Blocked in the window and handed to the operating system

“Handed to the operating system” means the app runs open <url> on macOS and xdg-open <url> on every other platform. The code has no Windows-specific branch. Requests to open a new window follow the same rule: allowed for the local server, otherwise denied and opened externally.

This is how the web UI’s “open handler in editor” action reaches your editor: it navigates to a URI built from the workspace’s editor_uri_template (default vscode://file/{path}:{line}), and the app hands that URI to the OS.

Setting Effect
First command-line argument Startup workspace (rule 1 above).
MASKKEEL_SALT Salt for PII Airlock masking. Default recon-dev-salt, the same default as the CLI’s --salt.
RECON_CONFIG_DIR, XDG_CONFIG_HOME, HOME, USERPROFILE Config directory, as listed above.
Current working directory Startup workspace (rule 2 above).

The app has no settings of its own beyond these. Per-workspace settings such as proxy and TLS live in the workspace and are edited through the web UI.

From tauri.conf.json and Cargo.toml:

Key Value
Product name Recon
Version 0.3.2
Bundle identifier dev.recon.desktop
Bundle targets all
Category DeveloperTool
Short description Local-first, code-aware & agent-safe API engineering studio
Icons icons/32x32.png, icons/128x128.png, icons/128x128@2x.png, icons/icon.icns
app.withGlobalTauri false
app.security.csp null
build.frontendDist ../../../ui/dist
Crate recon-desktop, edition 2024, rust-version 1.90, Tauri 2, rfd 0.18 for dialogs

The window does not load frontendDist directly. It loads the UI from the embedded server, which serves the ui/dist assets compiled into recon-server. There are no Tauri capability files in the app, and the UI source does not use Tauri APIs: everything goes through the HTTP API.

.github/workflows/release.yml builds the installers. It runs on every pushed tag that matches v*, and can be started by hand (workflow_dispatch) with an optional tag input (default v0.3.2) for a dry run.

Runner Label
ubuntu-22.04 linux-x86_64
macos-15 macos-aarch64

There is no Windows desktop build and no Intel macOS desktop build in the workflow.

Each desktop job:

  1. Installs pnpm 10 and Node 22, then builds the UI with pnpm install --frozen-lockfile and pnpm build in ui/.
  2. On Linux, installs libwebkit2gtk-4.1-dev, libappindicator3-dev, librsvg2-dev, patchelf, libssl-dev and libgtk-3-dev.
  3. Installs the stable Rust toolchain and tauri-cli version ^2.
  4. Runs cargo tauri build in apps/desktop/src-tauri.
  5. Copies every *.dmg, Recon*.AppImage, *.deb and *.rpm found under target/release/bundle into the job’s artifacts.

Signing is optional and driven by repository secrets:

Secret Used for
APPLE_CERTIFICATE, APPLE_CERTIFICATE_PASSWORD, APPLE_SIGNING_IDENTITY Code signing during cargo tauri build
APPLE_API_KEY, APPLE_API_ISSUER, APPLE_API_KEY_P8 App Store Connect API key for notarization
  • If APPLE_API_KEY, APPLE_API_ISSUER and APPLE_API_KEY_P8 are all set, the workflow writes the key to AuthKey_<APPLE_API_KEY>.p8 in the runner’s temp directory (accepting either a raw PEM or base64) and exports its path as APPLE_API_KEY_PATH.
  • If APPLE_CERTIFICATE is empty (or the runner is not macOS), all Apple variables are unset before cargo tauri build, which produces an unsigned build. Otherwise empty variables are unset individually and the certificate is stripped of whitespace.
  • The notarization step is skipped, with the message Skipping DMG notarization (Apple signing/notarization secrets not configured)., unless the certificate, API key, issuer and key path are all present.
  • When it runs, it verifies the signature of Recon.app (codesign --verify --deep --strict) and validates its stapled ticket (xcrun stapler validate). Then for each .dmg it verifies the signature, submits it with xcrun notarytool submit --wait, fails the job (after printing the notary log) unless the status is Accepted, and finally staples and validates the ticket on the DMG. A missing DMG also fails the job.
  • The temporary key file is always deleted at the end of the job.

When the run was triggered by a v* tag, a final job downloads all artifacts and:

  1. generates a Homebrew formula recon.rb for the CLI archives (macOS arm64 and x86_64, Linux x86_64),
  2. writes SHA256SUMS.txt for every asset, and
  3. creates a GitHub Release with generated release notes and all files attached.

The same workflow builds the CLI archives recon-<tag>-<target>.tar.gz for x86_64-unknown-linux-gnu, aarch64-apple-darwin and x86_64-apple-darwin. See Installation.

  • One server, one active workspace. Opening another folder replaces the current one.
  • A recent-workspace entry that fails to open fails silently.
  • External links use xdg-open on every non-macOS platform.
  • The app shares recent_workspaces.json with recon ui, but each process keeps its own server; switching in one does not affect the other.
  • recon ui serves the same UI and API in your browser. See Web Studio.
  • Workspace switching over HTTP: GET /api/v1/workspaces/recent, POST /api/v1/workspaces/switch, POST /api/v1/workspaces/pick. See HTTP API.