Skip to content

Force native update mechanism#1663

Merged
iscekic merged 10 commits intomainfrom
feat/force-native-update
Mar 27, 2026
Merged

Force native update mechanism#1663
iscekic merged 10 commits intomainfrom
feat/force-native-update

Conversation

@iscekic
Copy link
Copy Markdown
Contributor

@iscekic iscekic commented Mar 27, 2026

Summary

  • Adds app_min_versions DB table (single-row config) storing minimum required iOS/Android versions
  • Adds public GET /api/app/min-version endpoint (no auth, 5min cache)
  • Adds useForceUpdate hook that checks native binary version on cold start (fails open on network errors)
  • Adds blocking force-update screen that redirects to App Store / Play Store
  • Integrates version check into root layout routing, before auth/context checks

Notes

  • Replace <APP_STORE_ID> in kilo-app/src/app/force-update.tsx with actual Apple App Store ID once published
  • Run migration against DB after merge (pnpm drizzle migrate)
  • To trigger a force update, update the row directly: UPDATE app_min_versions SET ios_min_version = '1.2.0', updated_at = now();

Test plan

  • Run migration, verify app_min_versions table created with seed row
  • Hit GET /api/app/min-version and verify JSON response { ios: "1.0.0", android: "1.0.0" }
  • Set min version above current app version in DB, relaunch app → force update screen appears
  • Set min version back to 1.0.0, relaunch app → normal flow resumes
  • Kill network before launch → app loads normally (fail-open behavior)

@iscekic iscekic self-assigned this Mar 27, 2026
@kilo-code-bot
Copy link
Copy Markdown
Contributor

kilo-code-bot bot commented Mar 27, 2026

Code Review Summary

Status: 2 Issues Found | Recommendation: Address before merge

Overview

Severity Count
CRITICAL 0
WARNING 2
SUGGESTION 0
Issue Details (click to expand)

No new issues found in the incremental diff. The previous blank-screen regression in kilo-app/src/app/_layout.tsx is resolved by the latest commit.

Fix these issues in Kilo Cloud

Other Observations (not in diff)

Issues found in unchanged code that cannot receive inline comments:

File Line Issue
kilo-app/src/app/force-update.tsx 10 STORE_URL still uses the <APP_STORE_ID> placeholder, so enforcing a minimum iOS version would strand users on an invalid App Store link.
src/app/api/app/min-version/route.ts 14 limit(1) reads an arbitrary row because app_min_versions is not enforced as a singleton table.
Files Reviewed (1 file)
  • kilo-app/src/app/_layout.tsx - 0 issues

Reviewed by gpt-5.4-20260305 · 117,068 tokens

@iscekic iscekic merged commit 44dcc6f into main Mar 27, 2026
26 checks passed
@iscekic iscekic deleted the feat/force-native-update branch March 27, 2026 18:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants