Skip to content

feat(website): serve plugin downloads from iracedeck.com (#196)#200

Merged
niklam merged 11 commits into
masterfrom
feat/196-download-urls
Mar 26, 2026
Merged

feat(website): serve plugin downloads from iracedeck.com (#196)#200
niklam merged 11 commits into
masterfrom
feat/196-download-urls

Conversation

@niklam

@niklam niklam commented Mar 26, 2026

Copy link
Copy Markdown
Owner

Related Issue

Fixes #196

What changed?

  • Firebase redirects — added 302 redirects in firebase.json for /downloads/plugin/latest/streamdeck and /downloads/plugin/latest/mirabox, pointing to GitHub Release latest/download URLs
  • Orchestrator workflow — new release.yml triggers on v* tags, runs Stream Deck and Mirabox builds in parallel, then deploys the website after both complete
  • Child workflow triggers — switched release-pack.yml, release-pack-dock.yml, and firebase-hosting-release.yml from push: tags to workflow_call (+ workflow_dispatch for manual runs)
  • Version badgefirebase-hosting-release.yml passes the tag version as PUBLIC_IRACEDECK_VERSION env var, baked into the website at build time
  • Downloads page — new Starlight splash page at /downloads/ with download buttons for both platforms, version badge, and marketplace fallback links
  • Landing page — replaced the GitHub hero button with "Download Directly" linking to /downloads/
  • Installation docs — added direct download option for both Stream Deck and Mirabox sections

Implementation decisions (deviations from issue)

  • Latest URLs only — versioned URLs (/downloads/plugin/v1.7.0/streamdeck) are deferred; only /latest/ is implemented
  • Firebase redirects instead of static HTML — simpler than the catch-all rewrite + redirect page proposed in the issue
  • No version badge on landing page — version badge lives on the downloads page only, not in the site header
  • workflow_dispatch version input — added optional version input to firebase-hosting-release.yml for manual testing convenience (not in original issue)

How to test

  1. Build the website locally: pnpm --filter @iracedeck/website build — should succeed with 47 pages
  2. Verify /downloads/ page renders with two download cards
  3. Verify landing page hero has "Download Directly" button instead of "GitHub"
  4. Verify installation docs have the new "Direct Download from iRaceDeck" sections
  5. After merging, trigger release.yml via a test tag to verify the orchestrator calls child workflows correctly
  6. Verify Firebase redirects work after deploy: curl -I https://iracedeck.com/downloads/plugin/latest/streamdeck should return 302

Checklist

  • Linked to an approved issue
  • New code has unit tests — N/A (CI config, static pages, CSS)
  • Changes registered in all applicable plugins (Stream Deck, Mirabox)
  • No unrelated changes included

Summary by CodeRabbit

  • New Features

    • Added a Downloads page with direct download links for Stream Deck and Mirabox, plus a “Latest release” version badge.
    • Landing page now links to the Downloads section.
    • New redirects make /downloads/plugin/latest/... point to the corresponding release assets.
    • Release process updated so the website deploys only after build artifacts are available.
  • Documentation

    • Installation guides updated with direct-download instructions for both platforms.

niklam added 10 commits March 26, 2026 18:10
Design for #196: serve plugin downloads from iracedeck.com with
Firebase redirects to GitHub Release assets, an orchestrator workflow,
and a standalone downloads page with version badge.
- Add secrets: inherit to orchestrator workflow_call jobs
- Add permissions: contents: write to orchestrator
- Rename env var to PUBLIC_IRACEDECK_VERSION for Astro exposure
- Document failure handling behavior
Six-task plan covering Firebase redirects, orchestrator workflow,
child workflow trigger changes, downloads page, landing page update,
and installation docs update.
- Remove platform-specific "double-click to install" from downloads
  page help text since it doesn't apply to Mirabox
- Add missing blank line before jobs: in firebase workflow for
  consistency with other workflow files
@coderabbitai

coderabbitai Bot commented Mar 26, 2026

Copy link
Copy Markdown

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 6eaf327f-17f7-46ff-b107-732833c43f58

📥 Commits

Reviewing files that changed from the base of the PR and between f0c8a10 and 0724030.

📒 Files selected for processing (3)
  • .github/workflows/firebase-hosting-release.yml
  • .github/workflows/release.yml
  • packages/website/src/content/docs/docs/getting-started/installation.md
✅ Files skipped from review due to trivial changes (1)
  • packages/website/src/content/docs/docs/getting-started/installation.md
🚧 Files skipped from review as they are similar to previous changes (2)
  • .github/workflows/firebase-hosting-release.yml
  • .github/workflows/release.yml

📝 Walkthrough

Walkthrough

Restructures release CI into a tag-triggered orchestrator that runs parallel plugin builds and then deploys the website with an explicit version input. Adds a downloads page and Firebase Hosting 302 redirects that point to GitHub Release assets; the website build bakes the release version into a public env var.

Changes

Cohort / File(s) Summary
Orchestrator Workflow
​.github/workflows/release.yml
New top-level workflow triggered on tag pushes v*; runs two parallel build jobs (calls reusable workflows) and then calls the firebase-hosting deployment with version: ${{ github.ref_name }}.
Child Workflows (triggers & inputs)
​.github/workflows/firebase-hosting-release.yml, ​.github/workflows/release-pack.yml, ​.github/workflows/release-pack-dock.yml
Replaced automatic tag push triggers with workflow_call (and added workflow_dispatch); firebase-hosting-release.yml now accepts a version input and sets PUBLIC_IRACEDECK_VERSION for the site build.
Firebase Hosting config
packages/website/firebase.json
Added hosting.redirects with two HTTP 302 redirects for /downloads/plugin/latest/streamdeck and /downloads/plugin/latest/mirabox to GitHub Release asset URLs.
Website content & docs
packages/website/src/content/docs/downloads.mdx, packages/website/src/content/docs/index.mdx, packages/website/src/content/docs/docs/getting-started/installation.md
Added downloads MDX page exporting version = import.meta.env.PUBLIC_IRACEDECK_VERSION, updated landing hero to link to /downloads/, and added direct-download instructions in installation docs.
Site nav & styles
packages/website/astro.config.mjs, packages/website/src/styles/custom.css
Added "Downloads" to sidebar and new responsive CSS for the downloads page (version badge, card/grid styles).
Design & planning docs
docs/superpowers/specs/...-download-urls-design.md, docs/superpowers/plans/...-download-urls.md
New design and plan documentation describing redirect strategy, orchestrator workflow, and website changes.

Sequence Diagram(s)

sequenceDiagram
    participant Git as Git Repository
    participant GHA as GitHub Actions Orchestrator
    participant BuildSD as Build StreamDeck (release-pack.yml)
    participant BuildMB as Build Mirabox (release-pack-dock.yml)
    participant Firebase as Firebase Hosting Deployer
    participant Release as GitHub Releases
    participant Browser as User Browser

    Git->>GHA: Push tag v*
    activate GHA
    GHA->>BuildSD: Call workflow_call (build Stream Deck)
    activate BuildSD
    GHA->>BuildMB: Call workflow_call (build Mirabox)
    activate BuildMB

    BuildSD->>Release: Attach Stream Deck artifact
    deactivate BuildSD
    BuildMB->>Release: Attach Mirabox artifact
    deactivate BuildMB

    GHA->>Firebase: Call workflow_call with version input
    activate Firebase
    Firebase->>Firebase: Build website with PUBLIC_IRACEDECK_VERSION
    Firebase->>Browser: Deploy site (downloads page + redirects)
    deactivate Firebase
    deactivate GHA

    Browser->>Firebase: Request /downloads/plugin/latest/streamdeck
    Firebase->>Release: Redirect 302 to GitHub Release asset
    Release->>Browser: Serve asset
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Possibly related PRs

Poem

🐰 I hopped from tag to build and back,
Two plugins baked on a CI track,
Redirects point where assets play,
A version badge hops out to say—
Download, click, and bounce away! 🎉

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title 'feat(website): serve plugin downloads from iracedeck.com (#196)' directly and clearly summarizes the main change—implementing download serving from iracedeck.com with Firebase redirects and orchestrated workflows.
Description check ✅ Passed The description covers all template sections with substantial detail: issue #196 is linked, changes are comprehensively documented with subsections, testing steps are provided, and the checklist is completed with explanations for N/A items.
Linked Issues check ✅ Passed The PR successfully implements all primary objectives from #196: Firebase 302 redirects for /latest/ URLs, orchestrator workflow calling child workflows via workflow_call, version passing to website build, downloads page, landing page update, and installation docs changes.
Out of Scope Changes check ✅ Passed All changes align with issue #196 objectives; implementation deviations (latest-only URLs, Firebase redirects vs. catch-all rewrite, version badge placement, workflow_dispatch convenience input) are documented and justified as reasonable simplifications.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/196-download-urls

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🧹 Nitpick comments (5)
.github/workflows/firebase-hosting-release.yml (1)

8-12: Consider marking version input as required for workflow_call.

The release.yml orchestrator always passes version: ${{ github.ref_name }}, so the workflow_call input could be marked as required to catch configuration errors early. The current setup works but relies on implicit behavior.

Optional: Mark version as required for workflow_call
   workflow_call:
     inputs:
       version:
         description: "Release version tag (e.g., v1.7.0)"
         type: string
+        required: true
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/firebase-hosting-release.yml around lines 8 - 12, The
workflow_call input "version" is not marked required; update the workflow_call
inputs block so the "version" input under workflow_call (inputs -> version)
includes required: true (keeping description and type: string) to enforce that
callers provide version (e.g., github.ref_name) and surface misconfigurations
early.
docs/superpowers/plans/2026-03-26-download-urls.md (2)

15-15: Minor: Heading level jumps from h1 to h3.

Same as the spec document - heading levels should increment by one. Consider using ## for task headings.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/superpowers/plans/2026-03-26-download-urls.md` at line 15, The "Task 1:
Firebase Redirects" heading is using h3 (###) while the document jumps from h1
to h3; change that heading to h2 (use ## Task 1: Firebase Redirects) so heading
levels increment by one and match the surrounding spec structure.

212-244: Minor discrepancy: Plan content differs slightly from actual implementation.

The plan shows the help text as:

"After downloading, double-click the file to install. See the installation guide..."

But the actual downloads.mdx file (line 31) has:

"After downloading, see the installation guide..."

This is not a problem—the actual implementation is fine—but you may want to update this plan document to match the implementation for consistency if this document serves as ongoing reference.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/superpowers/plans/2026-03-26-download-urls.md` around lines 212 - 244,
Update the plan's help paragraph so it matches the actual implementation text in
downloads.mdx: replace the current line containing "After downloading,
double-click the file to install. See the <a
href="/docs/getting-started/installation/">installation guide</a> for detailed
instructions." with the shorter copy used in downloads.mdx ("After downloading,
see the installation guide...") so the plan and the implemented downloads
content stay consistent.
docs/superpowers/specs/2026-03-26-download-urls-design.md (2)

15-15: Minor: Heading level jumps from h1 to h3.

The static analysis tool flagged that heading levels should increment by one. Line 15 uses ### (h3) directly after the h1 title without an h2 in between.

📝 Suggested fix
-### Task 1: Firebase Redirects
+## Task 1: Firebase Redirects

Apply the same change to other ### headings in this document.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/superpowers/specs/2026-03-26-download-urls-design.md` at line 15, Change
the heading level for the "Latest only" heading (currently "### Latest only —
only `/downloads/plugin/latest/{platform}` URLs are implemented...") from h3 to
h2 and similarly promote any other "###" headings in this document to "##" so
heading levels increment sequentially after the h1 title; update the markdown
headings (the "###" tokens) throughout the document to "##" to satisfy the
static analyzer.

77-82: Consider documenting the partial failure scenario more explicitly.

The spec notes that if either build fails, the website deploy is skipped. This is acceptable for preventing broken download links, but it also means:

  1. If only one platform build fails, neither platform's download link will be updated on the website
  2. The GitHub Release itself may still have one working asset

This is likely the desired behavior (all-or-nothing deployment), but consider adding a note about manual recovery options (e.g., re-running the workflow after fixing the failed build).

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/superpowers/specs/2026-03-26-download-urls-design.md` around lines 77 -
82, Add an explicit note to the design doc describing the partial-failure
scenario: in the orchestrator workflow where `build-streamdeck` and
`build-mirabox` run in parallel and `deploy-website` waits for both, call out
that if one build fails the site deploy is skipped (all-or-nothing) and that a
GitHub Release might still contain a single platform asset; document manual
recovery steps such as re-running the orchestrator after fixing the failed job
or re-running the specific build job then triggering `deploy-website` (or
running the orchestrator with the same `version` input), and mention that
`secrets: inherit` and `GITHUB_TOKEN`/`FIREBASE_SERVICE_ACCOUNT_IRACEDECK` are
required for those recovery actions.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In @.github/workflows/release.yml:
- Around line 7-8: The workflow's permissions block only grants contents: write
but the Firebase action FirebaseExtended/action-hosting-deploy@v0 uses
GITHUB_TOKEN and needs checks: write and pull-requests: write to create check
runs and PR comments; update the permissions block that governs the Firebase
deployment (either the orchestrator permissions block or add a dedicated
permissions block in the firebase-hosting-release workflow) to include checks:
write and pull-requests: write in addition to contents: write so the deployment
action has the required scopes.

In `@packages/website/src/content/docs/docs/getting-started/installation.md`:
- Around line 61-63: Update the "Direct Download from iRaceDeck" section to
remove the word "extract" and clarify that the .sdPlugin file is downloaded
directly: change the sentence referencing ".sdPlugin" to state that users should
download the .sdPlugin file (not extract it) from the iRaceDeck Downloads page
and then import that .sdPlugin into the Mirabox Space app; keep the link to
[iRaceDeck Downloads page] and the import instruction intact.

---

Nitpick comments:
In @.github/workflows/firebase-hosting-release.yml:
- Around line 8-12: The workflow_call input "version" is not marked required;
update the workflow_call inputs block so the "version" input under workflow_call
(inputs -> version) includes required: true (keeping description and type:
string) to enforce that callers provide version (e.g., github.ref_name) and
surface misconfigurations early.

In `@docs/superpowers/plans/2026-03-26-download-urls.md`:
- Line 15: The "Task 1: Firebase Redirects" heading is using h3 (###) while the
document jumps from h1 to h3; change that heading to h2 (use ## Task 1: Firebase
Redirects) so heading levels increment by one and match the surrounding spec
structure.
- Around line 212-244: Update the plan's help paragraph so it matches the actual
implementation text in downloads.mdx: replace the current line containing "After
downloading, double-click the file to install. See the <a
href="/docs/getting-started/installation/">installation guide</a> for detailed
instructions." with the shorter copy used in downloads.mdx ("After downloading,
see the installation guide...") so the plan and the implemented downloads
content stay consistent.

In `@docs/superpowers/specs/2026-03-26-download-urls-design.md`:
- Line 15: Change the heading level for the "Latest only" heading (currently
"### Latest only — only `/downloads/plugin/latest/{platform}` URLs are
implemented...") from h3 to h2 and similarly promote any other "###" headings in
this document to "##" so heading levels increment sequentially after the h1
title; update the markdown headings (the "###" tokens) throughout the document
to "##" to satisfy the static analyzer.
- Around line 77-82: Add an explicit note to the design doc describing the
partial-failure scenario: in the orchestrator workflow where `build-streamdeck`
and `build-mirabox` run in parallel and `deploy-website` waits for both, call
out that if one build fails the site deploy is skipped (all-or-nothing) and that
a GitHub Release might still contain a single platform asset; document manual
recovery steps such as re-running the orchestrator after fixing the failed job
or re-running the specific build job then triggering `deploy-website` (or
running the orchestrator with the same `version` input), and mention that
`secrets: inherit` and `GITHUB_TOKEN`/`FIREBASE_SERVICE_ACCOUNT_IRACEDECK` are
required for those recovery actions.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: a7bd0e66-12fd-4abc-ac11-daaba7b78f7e

📥 Commits

Reviewing files that changed from the base of the PR and between 7c75373 and f0c8a10.

📒 Files selected for processing (12)
  • .github/workflows/firebase-hosting-release.yml
  • .github/workflows/release-pack-dock.yml
  • .github/workflows/release-pack.yml
  • .github/workflows/release.yml
  • docs/superpowers/plans/2026-03-26-download-urls.md
  • docs/superpowers/specs/2026-03-26-download-urls-design.md
  • packages/website/astro.config.mjs
  • packages/website/firebase.json
  • packages/website/src/content/docs/docs/getting-started/installation.md
  • packages/website/src/content/docs/downloads.mdx
  • packages/website/src/content/docs/index.mdx
  • packages/website/src/styles/custom.css

Comment thread .github/workflows/release.yml
Comment thread packages/website/src/content/docs/docs/getting-started/installation.md Outdated
- Add checks: write and pull-requests: write to orchestrator
  permissions for FirebaseExtended/action-hosting-deploy
- Mark workflow_call version input as required
- Fix Mirabox install wording (remove incorrect "extract")
@niklam
niklam merged commit bcfb398 into master Mar 26, 2026
4 checks passed
@niklam
niklam deleted the feat/196-download-urls branch March 26, 2026 20:27
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.

feat(website): serve plugin downloads from iracedeck.com with versioned URLs

1 participant