Commit Graph

4 Commits

Author SHA1 Message Date
Dries Peeters da85aedefb feat(mobile): add data layer, OTLP telemetry, and CI build fixes
Implement the missing Flutter data layer so release builds compile: Dio ApiClient for /api/v1 (timer, time entries, projects, tasks, finance, time-off, users/me), JSON models, Hive LocalStorage, and offline SyncService queue.

Add OpenTelemetry (opentelemetry package) with initMobileOpenTelemetry() reading OTEL_EXPORTER_OTLP_ENDPOINT and OTEL_EXPORTER_OTLP_TOKEN via --dart-define, matching server OTLP base URL and Basic auth behavior. Instrument login token validation, timer start/stop, and sync pending.

Fix SyncUseCase to import storage SyncService, use trusted insecure hosts, and call syncAll().

GitHub Actions (build-mobile.yml, cd-release.yml): run flutter test; pass OTLP secrets into flutter build apk/appbundle/ios; switch iOS CI to release simulator builds and package build/ios/iphonesimulator/Runner.app to avoid requiring an Apple Development Team for generic device builds.

.gitignore: allow tracking mobile/lib/data/ despite the repo-wide data/ ignore rule.
2026-03-28 18:01:10 +01:00
Dries Peeters 4a5a5ceff9 chore: stop tracking gitignored files
Remove from index (keep on disk): .cursor/plans, logs/.gitkeep, logs/app.jsonl,
mobile lib files, tests/__pycache__/*.pyc. These are already in .gitignore;
stopping tracking so future changes are ignored.
2026-03-16 13:04:52 +01:00
Dries Peeters 0c999fd780 Version bump v4.15.1 2026-01-31 08:06:13 +01:00
Dries Peeters e9049ef923 fix(mobile): add missing Flutter app source files to fix build errors
- Add lib/main.dart entry point with proper routing setup
- Create Timer model (lib/data/models/timer.dart) with toJson support
- Enhance ApiClient with all required API methods:
  * Timer operations (getTimerStatus, startTimer, stopTimer)
  * Time entry operations (CRUD)
  * Project and task operations
- Add toJson() methods to TimeEntry and Timer models
- Fix splash screen auth check to use async methods properly
- Add missing provider methods (getElapsedTime, checkTimerStatus, loadTimeEntries)
- Update .gitignore to allow tracking mobile/lib/ directory

Fixes build error: 'Target file lib/main.dart not found' when running
flutter build apk --release or flutter build ios --release
2026-01-13 13:43:56 +01:00