Repository navigation
feat(desktop): add cross-platform tray app for quick secret creation - #172
Merged
Merged
Conversation
Tauri 2 tray/menu-bar app for macOS, Windows and Linux. A configurable global shortcut opens a quick-create window prefilled from the clipboard; the secret is encrypted in the webview with @crypt.fyi/core and the link replaces the clipboard contents, confirmed by a notification. Adds desktop translations to every locale, a Desktop workflow that builds the app on all three platforms, and docs.
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #57
Summary
Adds
@crypt.fyi/desktop, a cross-platform (macOS, Windows, Linux) tray/menu-bar app for creating secret links from anywhere:Ctrl+Alt+Shift+E/⌘⌥⇧E, configurable) toggles a small always-on-top quick-create window.https://api.crypt.fyi), web URL, shortcut recorder, default expiry/burn, clipboard prefill, language and theme.@crypt.fyi/theme.Architecture
packages/desktop/src): plain TypeScript + Tailwind on Vite, the same approach as the extension's settings page. All logic that isn't DOM wiring lives in small pure modules with unit tests:secret.tsbuilds theClient.createinput, the share URL (same shape as web: key in the fragment,?p=truefor passwords) and maps errors.settings.tsvalidates settings per field.shortcut.tsrecords keyboard input as an accelerator and formats it for display.i18n.tsis a small i18next-compatible lookup over the core locales, with{{var}}interpolation and plurals.src-tauri/src/lib.rs): only the tray, window lifecycle (close hides the window), single-instance handling and plugin setup. The tray is built natively so the app can always be reopened or quit, even if the webview fails to load. The frontend localizes its labels through oneset_tray_labelscommand.build,lint,typecheckandtestcover the frontend only, so the normalpnpmpipeline and CI need no Rust. There is nodevscript, so the rootpnpm devdoesn't need Rust either.tauri:devandtauri:buildare separate scripts. The version comes frompackage.json, and the package joins the changesetsfixedgroup so it stays in step with the others.Desktopworkflow (.github/workflows/desktop.yml): builds on macOS (arm64 and x64), Windows and Linux withtauri-apps/tauri-action@v1and uploads the installers as workflow artifacts. It also runscargo fmt --checkandcargo clippy -D warnings. It runs only when desktop, core, theme or the lockfile change.Security notes
@crypt.fyi/core'sClient. The server gets ciphertext and the hash only. No secret, key or password crosses IPC into Rust.capabilities/default.json): clipboard read/write text, global-shortcut register/unregister, notifications, and show/hide/focus for its own window. There is no fs, shell, process, opener or HTTP plugin. API requests use the webview'sfetch, bounded by CSP.tauri.conf.json:default-src 'self',script-src 'self',style-src 'self'(nounsafe-inlinein production builds;devCsprelaxes styles only for Vite HMR),object-src/frame-src/form-action/base-uriset to'none', andfreezePrototype: true.connect-srcishttps:plushttpon loopback only, because the API URL is user-configurable (self-hosting).withGlobalTauri: false.Testing
Verified locally (Windows, Node 22):
pnpm install,pnpm format:check,pnpm lint,pnpm typecheck: all pass.pnpm --filter @crypt.fyi/desktop test: 58 tests pass.--testMatch.testMatchfinds no files. That's an existing environment quirk, unrelated to this change. CI runs on Linux.pnpm --filter @crypt.fyi/desktop build: the frontend bundle has no inline scripts or styles.Not verified locally:
cargoon this machine, socargo check/clippyand the native app weren't run here. The new Desktop workflow on this PR compiles, lints and bundles it on all four targets; see its checks.