Repository navigation
fix: load .env, open the app after activation, re-check licenses - #2
Merged
Merged
Conversation
- Load .env with dotenv. Previously the documented `cp .env.example .env`
flow left the key empty and `new KeyMint('')` threw at startup.
- Create the SDK client lazily and show a configuration message instead of
crashing when the variables are missing.
- Open the main window when activation succeeds. Before, the activation
dialog closed itself and nothing opened the app (it quit on Windows/Linux).
- Re-validate on launch and every 24 hours. The SDK throws on non-2xx, so
treat 401/402/403 as a rejected license and anything else (offline, 429,
5xx) as unknown, keeping the cached state.
- Optional KEYMINT_BASE_URL; README matches the code.
Keymint returns 404 when the product is deleted or deactivated, or the license was removed. Treating it as transient kept the cached license valid indefinitely; it now logs the user out like 401/402/403.
Member
Author
|
Reviewed 2026-10-17: |
catsika
force-pushed
the
fix/env-health-check
branch
from
October 17, 2026 23:42
08c4d4c to
9a819f2
Compare
catsika
marked this pull request as ready for review
October 17, 2026 23:51
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.
Problems
.envwas never loaded, soKEYMINT_CLIENT_API_KEYwas empty andnew KeyMint('')threw on startup.createMainWindow(); on Windows/Linux the app quit.checkLicenseHealthwas never called. It also treated SDK exceptions (which the SDK throws on every non-2xx) the same as network errors.Change
dotenvloads.envfirst. The SDK client is created lazily, and missing config shows a message instead of crashing.store.ts,events.ts(avoids an ipc ↔ index circular import), optionalKEYMINT_BASE_URL, and a README that matches the code.Testing
npm run buildpasses.license.jswas run against a local Keymint API (no GUI):valid;rejected;unknown, with a "could not reach" message;