Repository navigation
feat(app): persist crash-loop state and guard app starts for safe mode (#122) - #317
Merged
Merged
Conversation
Contributor
|
/mira pause |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
rowkav09
force-pushed
the
feat/safe-mode-wiring
branch
2 times, most recently
from
September 23, 2026 23:47
f775bc3 to
543b9e9
Compare
rowkav09
force-pushed
the
feat/safe-mode-wiring
branch
from
September 23, 2026 23:50
543b9e9 to
218bae7
Compare
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.
What changed
src/startup-recovery-store.js:createStartupRecoveryStore({ file })loads and saves the feat: add startup recovery state core #181 recovery state as a small owner-only JSON file, written atomically. A missing, corrupt or oversized file loads as a clean start, so recovery can't be what stops the app from starting.guardStartup({ store, start })counts the attempt as a failure before callingstart, so a hard crash (process killed, native fault) still counts. Once the app has stayed up forhealthyAfterMs(60 s by default) the count is cleared. After three unconfirmed starts in a row,startgets{ safeMode: true }. A thrown startup error records which subsystem failed (configuration, provider, discord, updater or unknown, based onstartupCode) and is rethrown.retryNormal()clears it, which is what the tray's "retry normal startup" will call.Why
First wiring slice for #122. The follow-up PR wires
guardStartupintonowplaying.exe start, hasstartAppFromConfighonoursafeMode(no polling, Discord or updates), and adds the tray actions.Checks
Issue
Part of #122