Skip to content

Add direct APK download link to Android section#259

Merged
AnthonyRonning merged 1 commit intomasterfrom
add-android-apk-download
Oct 9, 2025
Merged

Add direct APK download link to Android section#259
AnthonyRonning merged 1 commit intomasterfrom
add-android-apk-download

Conversation

@AnthonyRonning
Copy link
Copy Markdown
Contributor

@AnthonyRonning AnthonyRonning commented Oct 9, 2025

Added a direct download link for the Android APK alongside the existing Google Play Beta link, giving users an alternative installation method.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features
    • Added a direct APK (Beta) download option under the Android download card, including a “Download APK (Beta)” button linking to the beta APK.
    • Added an identical APK direct-download block beneath the Mobile Apps section’s Google Play Beta prompt.
    • No changes to existing flows; purely UI additions to expose a beta APK download.

Added a direct download link for the Android APK alongside the existing
Google Play Beta link, giving users an alternative installation method.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@cloudflare-workers-and-pages
Copy link
Copy Markdown

Deploying maple with  Cloudflare Pages  Cloudflare Pages

Latest commit: 7a4ab05
Status: ✅  Deploy successful!
Preview URL: https://1293733f.maple-ca8.pages.dev
Branch Preview URL: https://add-android-apk-download.maple-ca8.pages.dev

View logs

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Oct 9, 2025

Walkthrough

Adds UI blocks to expose a direct beta APK download link in two locations on the downloads page: under the Android card and within the Mobile Apps section. No changes to logic, data flow, or exports.

Changes

Cohort / File(s) Summary
Downloads page UI additions
frontend/src/routes/downloads.tsx
Inserted “Or download the APK directly” sections with a “Download APK (Beta)” button linking to a specific APK release under the Android card and in the Mobile Apps section. No functional logic modified.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Poem

A rabbit taps the download drum,
“Beta bytes? Come get some!”
Two new doors, APK in sight,
Hop-click, moonlit build takes flight.
Carrot-orange progress bar aglow—
Test burrows deep, then off we go! 🥕📦

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check ✅ Passed The title succinctly describes the primary change of adding a direct APK download link to the Android section, matching the PR’s focus on UI enhancements without unnecessary detail or ambiguity.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch add-android-apk-download

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

@greptile-apps greptile-apps Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Greptile Overview

Greptile Summary

This PR adds a direct APK download option for Android users to the downloads page. The change introduces a new section within the existing Android card that provides an alternative installation method alongside the Google Play Beta link. The implementation adds proper styling and accessibility attributes consistent with the rest of the download page, using the same Tailwind CSS classes and hover effects found throughout the component.

The new APK download section is positioned below the Google Play Beta link with a visual separator and includes appropriate security attributes (target="_blank" and rel="noopener noreferrer"). The styling follows the established patterns used for other download buttons on the page, maintaining visual consistency with the existing design system.

However, the implementation uses a hardcoded GitHub release URL (https://github.com/OpenSecretCloud/Maple/releases/download/v1.99.0-android-beta1/app-universal-release.apk) rather than integrating with the existing dynamic URL loading system that the downloads page already uses for desktop platforms through the getLatestDownloadInfo utility function.

Changed Files
Filename Score Overview
frontend/src/routes/downloads.tsx 2/5 Added direct APK download section with hardcoded GitHub release URL instead of integrating with existing dynamic URL system

Confidence score: 2/5

  • This PR introduces a maintenance burden with hardcoded URLs that will become stale over time
  • Score lowered due to inconsistent implementation that bypasses the existing dynamic release loading system and will lead to users downloading outdated APKs when new versions are released
  • Pay close attention to the hardcoded GitHub release URL that needs to be replaced with dynamic URL loading integration

Sequence Diagram

sequenceDiagram
    participant User
    participant Browser
    participant DownloadsPage
    participant GitHub

    User->>Browser: "Navigate to /downloads"
    Browser->>DownloadsPage: "Request downloads page"
    DownloadsPage->>Browser: "Render page with mobile apps section"
    Browser->>User: "Display Android download options"
    
    Note over User,Browser: User sees Google Play Beta and APK options
    
    User->>Browser: "Click 'Download APK (Beta)' link"
    Browser->>GitHub: "Navigate to APK download URL"
    GitHub->>Browser: "Serve APK file download"
    Browser->>User: "Download app-universal-release.apk"
Loading

Additional Comments (1)

  1. frontend/src/routes/downloads.tsx, line 12-17 (link)

    style: Consider adding androidApk: string; to support dynamic APK URL loading like other platforms.

1 file reviewed, 1 comment

Edit Code Review Agent Settings | Greptile

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 3451c85 and 7a4ab05.

📒 Files selected for processing (1)
  • frontend/src/routes/downloads.tsx (1 hunks)
🧰 Additional context used
📓 Path-based instructions (2)
**/*.{ts,tsx,js,jsx}

📄 CodeRabbit inference engine (CLAUDE.md)

**/*.{ts,tsx,js,jsx}: Use 2-space indentation, double quotes, and a 100-character line limit for formatting
Use camelCase for variable and function names
Use try/catch with specific error types for error handling

Files:

  • frontend/src/routes/downloads.tsx
**/*.{ts,tsx}

📄 CodeRabbit inference engine (CLAUDE.md)

Use strict TypeScript typing and avoid any when possible

Files:

  • frontend/src/routes/downloads.tsx
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (5)
  • GitHub Check: build-linux
  • GitHub Check: build-ios
  • GitHub Check: build-android
  • GitHub Check: build-macos (universal-apple-darwin)
  • GitHub Check: Cloudflare Pages
🔇 Additional comments (2)
frontend/src/routes/downloads.tsx (2)

254-269: Inconsistency with AI summary: Only one APK download section added, not two.

The AI summary states that the APK download option was added "in two places," but the code changes only show one addition within the Android card in the Mobile Apps section.


259-259: APK download URL verified — following redirects returns HTTP 200 OK; no changes needed.

Or download the APK directly:
</p>
<a
href="https://github.com/OpenSecretCloud/Maple/releases/download/v1.99.0-android-beta1/app-universal-release.apk"
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion | 🟠 Major

Hardcoded APK version will become stale quickly.

The APK download URL is hardcoded to a specific version (v1.99.0-android-beta1), while desktop downloads dynamically fetch the latest release using getLatestDownloadInfo(). As new Android releases are published, this link will point to an outdated version, degrading the user experience.

Consider one of these approaches:

Option 1 (Recommended): Extend the existing dynamic release fetching

Add Android APK URL to the DownloadUrls interface and update getLatestDownloadInfo() to include it:

 interface DownloadUrls {
   macOS: string;
   linuxAppImage: string;
   linuxDeb: string;
   linuxRpm: string;
+  androidApk: string;
 }

Then update the fallback and use the dynamic URL:

 const FALLBACK_URLS: DownloadUrls = {
   macOS: `${FALLBACK_BASE_URL}/Maple_${FALLBACK_VERSION}_universal.dmg`,
   linuxAppImage: `${FALLBACK_BASE_URL}/Maple_${FALLBACK_VERSION}_amd64.AppImage`,
   linuxDeb: `${FALLBACK_BASE_URL}/Maple_${FALLBACK_VERSION}_amd64.deb`,
-  linuxRpm: `${FALLBACK_BASE_URL}/Maple-${FALLBACK_VERSION}-1.x86_64.rpm`
+  linuxRpm: `${FALLBACK_BASE_URL}/Maple-${FALLBACK_VERSION}-1.x86_64.rpm`,
+  androidApk: `${FALLBACK_BASE_URL}/app-universal-release.apk`
 };

Update the link to use the dynamic URL:

                   <a
-                    href="https://github.com/OpenSecretCloud/Maple/releases/download/v1.99.0-android-beta1/app-universal-release.apk"
+                    href={downloadUrls.androidApk}
                     className="py-2 px-4 rounded-lg text-center font-medium transition-all duration-300 block

Option 2: Use a separate constant for the Android release tag

If Android releases follow a different versioning scheme or cadence, define a constant at the top of the file:

const ANDROID_BETA_TAG = "v1.99.0-android-beta1";
const ANDROID_APK_URL = `https://github.com/OpenSecretCloud/Maple/releases/download/${ANDROID_BETA_TAG}/app-universal-release.apk`;

This at least makes the version easier to update in one place.

🤖 Prompt for AI Agents
In frontend/src/routes/downloads.tsx around line 259, the APK download URL is
hardcoded to a specific release tag making it stale; update the code to fetch
the APK URL dynamically by extending the DownloadUrls interface to include an
androidApk (or apkUrl) field, modify getLatestDownloadInfo() to populate that
field from the release assets (falling back to the existing hardcoded URL if not
found), and replace the hardcoded href with the new dynamic download field;
alternatively, if Android uses a separate cadence, add a single ANDROID_BETA_TAG
constant and construct ANDROID_APK_URL from it and use that constant in place of
the hardcoded URL.

@AnthonyRonning AnthonyRonning merged commit f2eb49b into master Oct 9, 2025
10 checks passed
@AnthonyRonning AnthonyRonning deleted the add-android-apk-download branch October 9, 2025 23:57
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