Skip to content

Flowntier v0.4.10 — NSIS sidecar check + env-var API key seeding

Choose a tag to compare

@Thatgfsj Thatgfsj released this 28 Jun 22:01
· 103 commits to main since this release

What changed in v0.4.10

BUG-FRONTEND-RT-15 — NSIS installer now also checks the sidecar

The chairman correctly pointed out that v0.4.9 still failed with 'Cannot open file: O:\Flowntier\flowntier_runtime.exe' and that asking users to run a helper script every time is bad UX.

Root cause: Tauri 2.x's generated installer.nsi inserts !insertmacro CheckIfAppIsRunning "${MAINBINARYNAME}.exe" "${PRODUCTNAME}" at line 634, but this only checks the main binary. The sidecar flowntier_runtime.exe keeps a separate file handle on the binary that the install still fails to overwrite.

Fix: scripts/patch-nsis.cjs post-build script injects a second CheckIfAppIsRunning "flowntier_runtime.exe" "Flowntier sidecar" call. Tauri 2.x doesn't expose an installerHooks config key (the one I tried in v0.4.5 doesn't exist), so we patch the generated NSI file after the build. The script is idempotent (marks the file as 'already patched' on second run).

The chairman no longer needs to run kill_flowntier.cmd before every install.

Workflow to build the sidecar-checked installer locally:

cd apps/desktop
pnpm tauri:build    # 1. Build
pnpm tauri:patch    # 2. Patch the NSI to also check the sidecar

BUG-FRONTEND-RT-17 — env-var API keys seeded on startup

The chairman reported '供应商 (0)' (0 providers) even though OPENAI_API_KEY was in the env. Root cause: the seed_secrets Rust command was never called at app startup — only when Settings was opened. Added a new useEffect in App.tsx that calls invoke('seed_secrets') once on mount. Now the sidecar reads the env vars (OPENAI_API_KEY, ANTHROPIC_API_KEY, GOOGLE_API_KEY, DEEPSEEK_API_KEY, MOONSHOT_API_KEY, OPEN_BIGMODEL_API_KEY) and stores them in the keychain on app startup, so Settings shows the configured providers.

Security reminder

An API key was pasted into the chat during testing. The key was not stored, logged, or transmitted anywhere by this agent, but the key should be rotated via the provider's console ASAP and stored only in environment variables or .env files (which should be in .gitignore). Plaintext API keys in chat logs are a real risk.