Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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.
Summary
API key fetching in the desktop app was failing in production, and there was no way to open the inspector in a packaged build to find out why. Both are fixed here.
1. Worker calls leave from Rust instead of the webview. The worker's CORS allowlist takes the deadrop.io hosts, the Vercel previews, and
vscode-webview://. The Tauri webview origin istauri://localhostpackaged andhttp://localhost:1420undertauri dev, so neither build was ever getting through and prod was never going to fix what dev was showing.src/lib/native-fetch.ts(renamed fromnative-clerk-fetch-patch.ts) already routed Clerk FAPI calls through@tauri-apps/plugin-httpfor an unrelated Origin conflict, so worker calls now take that same path. Rust side requests are not webview originated, so CORS does not apply to them.I went this way instead of adding a desktop origin to the worker allowlist.
Originis self asserted, so allowlistingtauri://localhost, let alonehttp://localhost:1420, hands that bypass to anything willing to set the header against a public API. Nothing changes server side.No call sites changed, so this also covers cloud vault provisioning and token issuance in
vault-cloud.ts, plus the drop and grab session calls in the contexts. All of those were hitting the same wall.2. Opt in devtools for packaged builds.
pnpm tauri build --features devtoolscompiles the inspector in and opens it on launch. Plain release builds still ship without it, which is why right click and the hotkey do nothing today. I left it opt in rather than always on, since the whole pitch is that plaintext never leaves the device.Before merging
Confirm
VITE_DEADROP_API_URLmatches the capability scope.http:defaultinsrc-tauri/capabilities/default.jsonnow allowshttps://deadrop.nieky.dev/*andhttp://localhost:8787/*. I read the prod host offworker/wrangler.tomlbecause the.envfiles were outside what I could read. If the desktop build env points somewhere else, plugin-http rejects the call before it leaves and you trade a CORS error for a scope error.Testing
pnpm desktop:dev, sign in, open a cloud vault you own, confirm the API Keys section lists keys instead of erroringvault-cloud.tspnpm tauri build --features devtools, confirm the inspector opens in the packaged apppnpm desktop:build, confirm no inspectorVerified locally:
cargo checkwith and without the feature,pnpm -F desktop build, and the pre-push suite at 352 passing.Also here:
deadrop-setupskill refreshThe skill had drifted from the CLI. Corrections:
apiKeys createno longer prints to stdout by default. The hard rule said it does, and used that as the reason an agent must not run it. As of 1.11.0 it renders on an alternate screen, refuses a non-interactive stream outright, and needs--printto pipe. Rule kept, reasoning fixed.--copyis now the recommended way to issue a key. It puts both values on the clipboard and prints only the key name.DEADROP_VAULT_KEYcomes back with the key now. The skill was still sending users into.deadroprcto copy it out by hand, which is the file it also tells them not to open.apiKeys createonly offers vaults markedcloud, but the skill's init step makes a local one and the CI section never said so. Anyone following it end to end hit a dead stop.deadrop init --global(1.11.0). Project is recommended for encapsulation, global for ease of use, and project is the default when the user has no preference since it is the reversible direction.deadrop desktop install, the shared global config, the API Keys and Add secret UIs, and vault sharing. The desktop app is also now the answer to a gap the skill flagged as unsolved, since "Add secret" is a safe way for a user to enter a brand new value.Common follow-upssat between 5 and CI). Reordered.