Skip to content

Premium#4

Open
paulpv wants to merge 14 commits into
mainfrom
premium
Open

Premium#4
paulpv wants to merge 14 commits into
mainfrom
premium

Conversation

@paulpv

@paulpv paulpv commented Jun 14, 2026

Copy link
Copy Markdown
Contributor

No description provided.

@paulpv paulpv force-pushed the premium branch 8 times, most recently from b01352b to c8a4b3c Compare June 20, 2026 00:44
@paulpv paulpv force-pushed the premium branch 7 times, most recently from d2988c0 to 36bd253 Compare June 26, 2026 02:26
paulpv added 14 commits June 25, 2026 19:37
Correctly identify the development environment for `dev.codeoba.com` in `AppConfig`.
Introduce a helper to extract detailed error messages from API responses, improving user feedback and debugging.
Improve exception logging to capture full exception objects.
…keys

Implement FilteredParentClassLoader in ClassLoaderInstaller to enforce classloader isolation, restricting resolution to standard JDK, contract interfaces, and basic Kotlin runtimes. Update PremiumLoader and PremiumCache to retrieve manifest and JAR bytes from auth-gated API endpoints using Firebase ID tokens. Add a 24-hour offline grace-period check to restrict unauthorized offline execution of cached payloads. URL-encode the deviceId query parameter in manifest requests to defend against malformed characters. Migrate device identity keys from RSA-2048 to EC P-256 (secp256r1) with self-healing auto-regeneration on conversion exceptions. Add unit tests for classloader isolation, grace-period expiry, and key migration.
…configuration boundaries

Align CI build steps to inject signature tokens and subscription properties at package-time, and fix lazy JVM property caching in tests.

Detailed Changes:
- core/build.gradle.kts: Allowed build properties like `enableSub` to resolve dynamically from system environment variables during JVM compilation, with a fallback to local files.
- .github/workflows/build-desktop.yml: Exported packaging-time environment parameters (`CODEOBA_ENABLE_SUBSCRIPTION`, `CODEOBA_FIREBASE_API_KEY`, and target env `CODEOBA_APP_SIGNATURE_HASH_DEV`/`_PROD`) on the runner to prevent release builds from shipping with default debug fallback tokens.
- core/src/commonMain/kotlin/com/whataicando/codeoba/core/util/AppConfig.kt: Changed the `BASE_URL` resolution from a lazy property to a dynamically computed function to prevent JVM tests from carrying stale target hosts over their lifetime.
- README.md: Redacted private repository file paths from the local development guides and clarified local public key provisioning.
- core/src/commonMain/kotlin/com/whataicando/codeoba/core/domain/auth/FirebaseAuthClient.kt, core/src/desktopMain/kotlin/com/whataicando/codeoba/core/premium/PremiumLoader.kt, core/src/desktopMain/kotlin/com/whataicando/codeoba/core/util/SecureStorage.kt: Adjusted internal auth, secure storage, and local premium loader initialization routines.
- docs/DEVELOPMENT.md, docs/SUBSCRIPTION.md, AGENTS.md: Aligned developer documents and agent instructions to document correct build flags and environment property variables.
…server

Ensure authentication tokens, device identifiers, and ecosystem preferences are isolated per backend server. This prevents conflicts and incorrect states when users switch between development, staging, or production environments.

- Introduces `@ServerDependent` annotation and `serverKey` helper to prefix relevant settings with the current `AppConfig.getBaseUrl()`.
- Includes migration logic to move existing `codeoba.com` settings to their new server-scoped keys.
- Refactors sign-out logic into a dedicated `SettingsManager.signOut()` function for consistency and reduces duplication.
- Adds automatic sign-out for `FirebaseAuthException` with HTTP status 400, indicating an expired or invalid session.
…bscription

Ecosystem device registration and background synchronization are now contingent on an active user subscription.

- Introduces a "Verify Status" button in the account settings, allowing users to manually check their subscription status and enable ecosystem features.
- Enhances the sign-in flow to automatically verify subscription status upon successful authentication, activating or deactivating ecosystem synchronization accordingly.
- Adds `FirebaseAuthClient.checkSubscriptionStatus` to communicate with the backend for subscription validation.
- Implements a cooldown and improved error messaging for subscription status checks.
During desktop builds, Gradle internally maps 0.x.y pre-release versions to 1.x.y to satisfy macOS CFBundleVersion rules. This step renames the resulting package files to reflect the original 0.x.y version, ensuring users see the intended pre-release version in the artifact filename.
Introduce Dependabot to automatically manage and update GitHub Actions and Gradle dependencies.
Parameterize the Java Development Kit (JDK) version used in CI builds, defaulting to Java 21, for greater flexibility.
…uilds

Adds automated macOS app signing and Apple Notary API submissions for desktop releases both in local packaging tasks and the GitHub Actions CI/CD pipeline.

Changes:
- Created 'app-desktop/src/desktopMain/resources/entitlements.plist' containing JIT execution and dynamic library loading permissions required by the JVM runtime.
- Configured macOS native packaging in 'app-desktop/build.gradle.kts' to sign the binaries using the entitlements file and submit them for notarization when signing parameters are exported in the build environment.
- Updated '.github/workflows/build-desktop.yml' to decode base64 p12 certificates from GitHub Secrets into a temporary keychain, resolve the signing identity dynamically, and pass credentials to Gradle. Adds conditional support for Developer ID Application and Developer ID Installer certificates to cover DMG and PKG packages.
- Optimized pipeline parameters in the workflow, enabling public variables like APPLE_ID and APPLE_TEAM_ID to be read from GitHub Actions variables (vars) with fallback to secrets, minimizing the amount of required repository secrets.
- Updated 'docs/APP_SIGNING.md' with step-by-step instructions on base64 encoding p12 keys from the scratch folder and generating App-Specific Passwords via the Apple Account settings portal.
…sizer

Introduce an automated, configurable store screenshot generation mode to capture high-quality app presentations for app stores (Apple App Store / Microsoft Store). This includes command-line window dimension sizing, canned datasets, and consolidated metrics calculators.

Changes:
- **CLI Parameter Parsing & Window Resizing (`Main.kt`, `DebugStoreConfig.kt`)**:
  - Parsed `--store`, `--size`, and `--canned-data` options from both JVM properties and CLI arguments.
  - Sized the application window dynamically based on the storefront targets (e.g., 1280x800 for Apple, 1920x1080 for Microsoft) or custom override sizes.
  - Intercepted help flags (`-h`, `--help`) to print instructions to stdout and exit cleanly.
  - Prevented window settings persistence from overwriting local developer coordinates when in screenshot mode.

- **Workspace Statistics Consolidations & Provider Architecture (`WorkspaceStatsProvider.kt`, `RealWorkspaceStatsProvider.kt`, `CannedWorkspaceStatsProvider.kt`)**:
  - Lifted classes out of the old stats provider, moving them into the `com.whataicando.codeoba.desktop.provider` package.
  - Extracted UI data requirements into a clean `WorkspaceStatsProvider` interface.
  - Consolidated duplicate initialization logic in `DetailPane.kt` and `Sidebar.kt` using `rememberWorkspaceStatsProvider(...)`.
  - Implemented `CannedWorkspaceStatsProvider` to programmatically generate a mathematically correct, deterministic mock dataset (382 sessions) for screenshots.
  - Fixed a metrics logic bug in `RealWorkspaceStatsProvider` to compute "Avg. Session Duration" by averaging actual elapsed session durations (`updatedAt - timestamp`) instead of model compute times. Spaced mock turns progressively (5 to 20 mins) to yield realistic session lengths (~1–3 hours).

- **Data Interceptors & Canned Datasets (`IndexManager.kt`, `GroupManager.kt`, `canned_apple.json`, `canned_microsoft.json`)**:
  - Intercepted database scans when screenshot mode is active to directly load platform-themed mock datasets (`canned_apple.json` and `canned_microsoft.json`).
  - Overrode active workspace groups in `GroupManager` with clean, generic software engineering titles (e.g., "Backend Service", "Frontend SPA") instead of exposing developer-specific local groups.

- **Build Systems & Documentation (`core/build.gradle.kts`, `SCREENSHOT_GENERATOR.md`, `DEVELOPMENT.md`)**:
  - Added build-time target configuration checks to expose `BuildConfig.DEBUG` status.
  - Created a developer setup guide for launching the screenshot generator and window overrides.
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.

1 participant