← Back to Pull requests

feat(desktop): detect new builds while running and update in the background #1791

Open
unknown opened this pull request with 198 lines diff across 2 files
View on GitHub
unknown unknown commented on Oct 01, 2026 21:56 UTC
Author

Summary

  • Fix the update feed. /api/desktop/latest.json fetched the release's manifest with $fetch; GitHub serves assets as application/octet-stream, which ofetch returns as a Blob, serialised as {}. The updater rejected it silently, so no beta build was ever offered an update. The manifest is now parsed with responseType: 'json' (verified locally on the beta channel: the endpoint answers the real latest-beta.json of desktop-v0.2.1 instead of {}).

  • Detect new builds while the app runs. useAppUpdate checks the build's own site feed at launch and every 15 minutes (preprod feed → every bump merged to develop; production feed → the promoted release only — unchanged per-flavour wiring from #1779).

  • Update in the background. A newer build is downloaded as soon as it is found. At launch, outside champion select and games, it installs and restarts at once. Otherwise a toast and a persistent sidebar button ("Update to vX") offer "Restart now"; if ignored, the next launch installs it. The app still never restarts under a running champion select or game.

  • Bumps the app to 0.3.0 so the new behaviour gets built; preprod's installed betas get offered it through the fixed feed.

  • Decision log (decisions/desktop.md + index) and features.md updated.
  • Verification

  • web: typecheck, 601 vitest tests, fresh build — green.

  • desktop/app: nuxt typecheck and nuxt generate — green.

  • The in-shell update flow only runs inside Tauri; it is checked on preprod after merge by letting an installed beta pick up 0.3.0.
  • Closes #1789

    Diff: 198 lines (+148 / -50) across 2 files Reviewer: claude[bot] Review duration: 8m
    All Vouch review confidence checks passed
    Residual risk 0.19 = Change Risk (0.36) × (1 − Review Confidence (0.47)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.36 · 198 lines diff across 2 files
    0.36
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.02 · 1 substantive comment(s)
    0.02
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    46%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Shallow Review Depth shallow_review_depth
    0.344
    Diff Size diff_size
    0.317
    Real PR Conversation Timeline
    1 comments
    "Review active on #1791"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 46.7% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 36.1% (MEDIUM) · Higher = larger blast radius
    36.1%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 46.7% · Lower = rushed or shallow review
    46.7%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 19.2% · Safe to merge
    19.2%