Commit Graph

19 Commits

Author SHA1 Message Date
61e0cb061f android: target Android 16 (API 36)
Play blocks updates from August 31, 2026 unless the app targets API 36.
Bump compileSdk/targetSdk to 36 in :app and :baselineprofile, and AGP to
8.10.1 -- 8.7.3 cannot build against API 36. Gradle stays at 8.11.1, which
is what AGP 8.10 requires.

Nothing in the app relies on the behaviours Android 16 changed: edge-to-edge
is already opted in via enableEdgeToEdge(), the manifest pins no orientation
or resizability, and the two bundled native libraries (graphics-path,
datastore_shared_counter) are already 16 KB page aligned.

Align the version with iOS (1.8.1, code 88) so the API 36 build can ship.
2026-08-19 15:35:06 +02:00
9673bde107 Review: ask on value milestones, not exports
The old gate needed two exports, three days of install age, one prompt per
version and 120 days between prompts. Aptabase shows only 9% of users ever
export and 5% export twice, so `Review Prompt Requested` never fired once in
19 days and the store has a single rating.

Replace the export counter with three milestones -- a fully configured system,
an opened bill of materials, a completed export -- each counted at most once
per install, and ask once two different ones are reached. Recording and asking
are now separate: milestones are booked mid-task, where StoreKit and Play drop
the request, so the ask happens from calm screens only (system overview,
export preview dismissal, share sheet dismissal).

Two fixes that made the old prompt lose its slot for good: the throttle keys
were written before checking for a foreground scene, and the export trigger
fired while the Quick Look sheet was still animating away. Both platforms now
mark the throttle only once the store API really has a review flow to show.

Add a Settings entry that links straight to the store review page. It is never
throttled, and 45% of users open Settings versus 9% who export. New analytics
event `Review Milestone Reached` makes the funnel measurable.

Existing installs keep their legacy export credit and still need a second
milestone before being asked.
2026-08-19 15:07:46 +02:00
8541130fa3 Generate a baseline profile for release builds
Cold starts ran unoptimised: no profileinstaller dependency and no
profile in the bundle, so ART interpreted Compose on first launch
(class verification measured at 128 bytecodes/s in an emulator ANR).

Add the androidx.baselineprofile producer module with an AOSP managed
device, a generator covering startup plus the four detail tabs, and
commit the generated baseline and startup profiles.
2026-08-12 13:58:01 +02:00
40c887a61a Bump build to 87 2026-08-12 11:49:04 +02:00
a714a0d0d5 Bump version to 1.8.0 (build 86)
iOS MARKETING_VERSION/CURRENT_PROJECT_VERSION and Android
versionName/versionCode.
2026-08-12 11:26:08 +02:00
ab50728f07 Disable export until a system has components
The Overview share menu offered a wiring diagram and a full report even
for an empty system. Gate it on loads, batteries or chargers being
present (iOS + Android) and add UI tests for both states.
2026-08-12 11:26:03 +02:00
9257da046a Fix library batteries showing 0.0V
PocketBase stores battery nominal voltage in voltage_out while
voltage_in is 0.0 (not null). The nil-coalescing operator only
skips null, so 0.0 was returned instead of the real voltage.
Skip zero values when resolving displayVoltage on both platforms.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-29 15:26:52 +02:00
ff955b35fe Preview diagram and PDF before sharing (iOS + Android)
iOS: route exports through QLPreviewController so users can inspect
before sharing. Android: add a zoomable full-screen diagram preview
with a share button; PDF still goes straight to the share sheet.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-29 15:21:07 +02:00
022e309873 Show rating prompt after share sheet is dismissed
iOS: moved registerSuccessfulExport() into onDismiss so it fires
after the share sheet closes, not while it is still open.
Android: hold launchReview() until the activity is RESUMED so the
dialog cannot overlap the share chooser.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-29 14:55:09 +02:00
01cdaf1861 Require confirmation before deleting a system (iOS + Android)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-29 14:46:32 +02:00
d4b490ea07 Align Android with iOS reference behavior
- Overview PDF: usable energy summary, cable length, power loss,
  usable energy rows (matching iOS tables)
- Analytics: align event names and properties with iOS
- Localize default component names and editor dialog labels
- Unit system default via device measurement system (API 28+)
- Preserve BOM/affiliate fields when editing batteries/chargers

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-11 12:36:18 +02:00
89ee36c1a4 Add in-app rating prompt (iOS + Android)
Request an App Store / Play Store review after a successful export
(Overview PDF, BOM PDF, or wiring diagram). A shared gate keeps prompts
rare: >=2 successful exports, >=3 days since install, >=120 days since the
last prompt, and at most once per app version. A one-time migration
backdates existing users so the prompt can fire on their first export
after updating. Logs a "Review Prompt Requested" analytics event.

iOS uses StoreKit's AppStore.requestReview(in:) with UserDefaults state;
Android uses the Play In-App Review API with DataStore state.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-04 01:05:24 +02:00
23b117bfe2 Polish editors, previews, persistence and docs
Cross-platform refinements to appearance/battery/charger editors, tabs
and navigation, plus persistence, screenshot previews and CLAUDE.md docs.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-04 01:04:47 +02:00
d97e3a2b7c Add standalone wiring diagram PNG export
Fetch the wiring diagram from the VoltPlan API and share it as a
standalone PNG from the Overview share menu on both platforms, with a
localized error when the diagram cannot be generated.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-04 01:04:11 +02:00
67ec44e60a Refine component library (iOS + Android)
Tweaks to the PocketBase-backed component library: item parsing,
repository/view-model fetching, and the library screen UI.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-04 01:04:00 +02:00
0aa3184406 Add onboarding image carousel
Bundle the rotating onboarding illustrations (light/dark) and wire them
into the Android onboarding info component, matching the iOS carousel.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-04 01:03:53 +02:00
38118ebc36 android: refresh adaptive launcher icon
Add density-specific launcher PNGs with a new foreground, a monochrome
layer for themed icons, and a light background; drop the old vector
foreground.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-04 01:03:45 +02:00
b1fbac3ec1 android: load release signing from keystore.properties
Read upload-keystore credentials from a gitignored keystore.properties
(falling back to unsigned release when absent), bundle full native debug
symbols for Play crash symbolication, and ignore keystore secrets.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-04 01:03:38 +02:00
61f340a870 Add native Kotlin/Compose Android port
Full feature-parity port of the iOS app under ./android (package
app.voltplan.cable): Systems, bottom-nav system detail (Overview,
Components, Batteries, Chargers), calculator/loads, battery & charger
editors, overview with runtime/charge goals, Bill of Materials with PDF
export, VoltPlan PocketBase component library, and Aptabase analytics.
Room persistence, 5-language localization. Verified to build (assembleDebug).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-22 10:36:08 +02:00