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.
What happens at launch
Section titled “What happens at launch”- 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. - It resolves the config directory and the masking salt (see Settings it reads).
- It chooses the startup workspace (see How the startup workspace is chosen).
- It starts the embedded Recon server on
127.0.0.1with a random free port, on its own Tokio runtime. - It builds the native menu, including the recent workspaces.
- It opens one window, labelled
main, that loadshttp://127.0.0.1:<port>from that server. The window title isRecon — <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.
Embedded server
Section titled “Embedded server”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.
How the startup workspace is chosen
Section titled “How the startup workspace is chosen”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 location
Section titled “Default workspace location”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.
Startup errors
Section titled “Startup errors”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:
- prints
Recon Desktop startup error: <message>to stderr, - shows a native error dialog titled
Recon Failed to Startwith the full error chain, and - 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 |
Linux and Windows
Section titled “Linux and Windows”| Menu | Items |
|---|---|
| File | Open Workspace Folder… (CmdOrCtrl+O), Recent Workspaces (submenu), separator, Quit |
| Edit | Undo, Redo, separator, Cut, Copy, Paste, Select All |
| Window | Minimize |
Open Workspace Folder…
Section titled “Open Workspace Folder…”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.
Recent Workspaces
Section titled “Recent Workspaces”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.
Title and menu sync
Section titled “Title and menu sync”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.
Links and URIs
Section titled “Links and URIs”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.
Settings it reads
Section titled “Settings it reads”| 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.
Bundle configuration
Section titled “Bundle configuration”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.
Release builds
Section titled “Release builds”.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.
Desktop job
Section titled “Desktop job”| 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:
- Installs pnpm 10 and Node 22, then builds the UI with
pnpm install --frozen-lockfileandpnpm buildinui/. - On Linux, installs
libwebkit2gtk-4.1-dev,libappindicator3-dev,librsvg2-dev,patchelf,libssl-devandlibgtk-3-dev. - Installs the stable Rust toolchain and
tauri-cliversion^2. - Runs
cargo tauri buildinapps/desktop/src-tauri. - Copies every
*.dmg,Recon*.AppImage,*.deband*.rpmfound undertarget/release/bundleinto the job’s artifacts.
macOS signing and notarization
Section titled “macOS signing and notarization”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_ISSUERandAPPLE_API_KEY_P8are all set, the workflow writes the key toAuthKey_<APPLE_API_KEY>.p8in the runner’s temp directory (accepting either a raw PEM or base64) and exports its path asAPPLE_API_KEY_PATH. - If
APPLE_CERTIFICATEis empty (or the runner is not macOS), all Apple variables are unset beforecargo 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.dmgit verifies the signature, submits it withxcrun notarytool submit --wait, fails the job (after printing the notary log) unless the status isAccepted, 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.
Publishing
Section titled “Publishing”When the run was triggered by a v* tag, a final job downloads all artifacts and:
- generates a Homebrew formula
recon.rbfor the CLI archives (macOS arm64 and x86_64, Linux x86_64), - writes
SHA256SUMS.txtfor every asset, and - 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.
Limits
Section titled “Limits”- 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-openon every non-macOS platform. - The app shares
recent_workspaces.jsonwithrecon ui, but each process keeps its own server; switching in one does not affect the other.
Also available via
Section titled “Also available via”recon uiserves 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.