docs: add instructions for install with package managers#288
docs: add instructions for install with package managers#288
Conversation
📝 WalkthroughWalkthroughAdds Flatpak repository publishing infrastructure (env template, Makefile targets, repo metadata, GPG signing/push), refactors Flatpak manifest/metainfo to use local build artefacts, and updates the website download page with new platform-specific components and code blocks. ChangesFlatpak Repository Publishing Setup
Website Download UI
Sequence DiagramsequenceDiagram
participant Dev as Developer / CI
participant Make as Makefile
participant Builder as flatpak-builder
participant GPG as GPG (signing)
participant RepoCmd as flatpak build-update-repo
participant Sync as rclone
participant Remote as Remote storage (S3 / rclone target)
Dev->>Make: run `make repo-update`
Make->>Builder: build flatpak in `${BUILD_DIR}`
Builder->>GPG: produce signed metadata (sign with `GPG_SIGN_ID`)
GPG->>RepoCmd: provide key/signatures
RepoCmd->>Make: export `${REPO_DIR}` and generate deltas
Make->>Sync: `rclone sync ${REPO_DIR} ${REPO_REMOTE}`
Sync->>Remote: upload repository files
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
Cloudflare Pages DeploymentEvent Name: pull_request Wrangler Output⛅️ wrangler 4.87.0 🌎 Deploying... |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@packages/app/scripts/flathub/Makefile`:
- Around line 22-24: The repo-update Makefile target currently signs the repo
with ${GPG_SIGN_ID} but leaves packages/site/public/deepink.flatpakrepo
hardcoded; update the repo-update flow (target: repo-update) to either
regenerate packages/site/public/deepink.flatpakrepo from the active signer
fingerprint/key derived from ${GPG_SIGN_ID} (export the signer's public
key/fingerprint and embed it into the .flatpakrepo) or perform a strict
fingerprint check before publishing and fail fast if the embedded key in
packages/site/public/deepink.flatpakrepo does not match the fingerprint of
${GPG_SIGN_ID}; touch the variables BUILD_DIR, APP_ID, REPO_DIR, and GPG_SIGN_ID
in the script to locate where to add the export-or-compare logic.
- Around line 22-27: Add guards and ordering: in the repo-update recipe check
that required env vars (GPG_SIGN_ID, REPO_DIR, APP_ID, BUILD_DIR) and publish
target (REPO_REMOTE) are non-empty and fail early with a clear error if any are
missing; ensure you do not pass an empty --gpg-sign value to flatpak commands.
Also make repo-push depend on repo-update (so repo-update runs first) and ensure
repo-update recreates a fresh repo by removing or reinitializing ${REPO_DIR}
before running flatpak build-update-repo so stale content cannot be pushed;
reference targets and vars: repo-update, repo-push, BUILD_DIR, APP_ID, REPO_DIR,
GPG_SIGN_ID, REPO_REMOTE.
🪄 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: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: 1474afe6-5716-43a7-bdd2-9d460c8b8b76
📒 Files selected for processing (6)
packages/app/scripts/flathub/.env.examplepackages/app/scripts/flathub/Makefilepackages/app/scripts/flathub/app.deepink.Deepink.metainfo.xmlpackages/app/scripts/flathub/app.deepink.Deepink.yamlpackages/site/public/.well-known/org.flathub.VerifiedApps.txtpackages/site/public/deepink.flatpakrepo
💤 Files with no reviewable changes (1)
- packages/site/public/.well-known/org.flathub.VerifiedApps.txt
Cloudflare Pages DeploymentEvent Name: pull_request Wrangler Output⛅️ wrangler 4.87.0 🌎 Deploying... |
There was a problem hiding this comment.
Actionable comments posted: 2
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
packages/site/src/features/Download/index.tsx (1)
76-93:⚠️ Potential issue | 🟠 Major | ⚡ Quick winGuard against empty
versionsbefore dereferencingversions[0].Lines 77–93 assume
versions[0]exists. If the release list is empty, this throws and breaks the downloads page.Suggested fix
const { links, linkMap } = useMemo(() => { + const latest = versions[0]; + if (!latest) { + return { + links: { windows: [], linux: [], mac: [] }, + linkMap: { Windows: undefined, macOS: undefined, Linux: undefined }, + }; + } - const msi = versions[0].assets.find((version) => + const msi = latest.assets.find((version) => version.name.endsWith('.msi'), )?.url; - const mac = versions[0].assets.find((version) => + const mac = latest.assets.find((version) => version.name.endsWith('.dmg'), )?.url; - const appImage = versions[0].assets.find((version) => + const appImage = latest.assets.find((version) => version.name.endsWith('.AppImage'), )?.url; - const deb = versions[0].assets.find((version) => + const deb = latest.assets.find((version) => version.name.endsWith('.deb'), )?.url; - const rpm = versions[0].assets.find((version) => + const rpm = latest.assets.find((version) => version.name.endsWith('.rpm'), )?.url;Also applies to: 121-125
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@packages/site/src/features/Download/index.tsx` around lines 76 - 93, The code in packages/site/src/features/Download/index.tsx dereferences versions[0] (used to build msi, mac, appImage, deb, rpm and later code around linkMap/links) without guarding against an empty versions array; modify the useMemo to first check for versions && versions.length > 0 (or use const latest = versions?.[0]; if (!latest) return { links: [], linkMap: {} }) and then use latest.assets to compute msi, mac, appImage, deb, rpm so the component safely returns empty defaults when there are no releases; apply the same guard where versions[0] is used around lines 121-125.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@packages/site/src/features/Download/index.tsx`:
- Around line 187-257: The new download copy in Download/index.tsx is hardcoded
in Text, Heading and SimpleCodeBlock content (inside the PlatformDownloads calls
for macOS and Linux and the top paragraph) and must be moved into i18n resources
and rendered via the existing i18n helpers (useTranslation/t or <Trans>) instead
of literal English; locate the PlatformDownloads usages and replace the
hardcoded strings (the top Text "Deepink is widely available...", the macOS
block content around Homebrew and the install command, and the Linux block
content around Flatpak and its commands) with translation keys, add those keys
to the locale JSON files, and render any inline links/Code blocks using <Trans>
or t() with components/values so markup (links, <Code>, <SimpleCodeBlock>) is
preserved while making the text localizable.
In `@packages/site/src/features/Download/SimpleCodeBlock.tsx`:
- Around line 10-12: The IconButton wrapping the CodeBlock.CopyIndicator lacks
an accessible name; update the IconButton component (in SimpleCodeBlock.tsx) to
include an explicit accessible label (e.g., aria-label or aria-label={t('copy
code')} if using i18n) such as aria-label="Copy code" (or a localized
equivalent) so assistive technologies convey the button’s purpose; ensure the
prop is added to the IconButton component that wraps CodeBlock.CopyIndicator.
---
Outside diff comments:
In `@packages/site/src/features/Download/index.tsx`:
- Around line 76-93: The code in packages/site/src/features/Download/index.tsx
dereferences versions[0] (used to build msi, mac, appImage, deb, rpm and later
code around linkMap/links) without guarding against an empty versions array;
modify the useMemo to first check for versions && versions.length > 0 (or use
const latest = versions?.[0]; if (!latest) return { links: [], linkMap: {} })
and then use latest.assets to compute msi, mac, appImage, deb, rpm so the
component safely returns empty defaults when there are no releases; apply the
same guard where versions[0] is used around lines 121-125.
🪄 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: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: 47e41f66-3804-4420-a61e-a70fc653da8d
📒 Files selected for processing (4)
packages/site/src/features/Download/PlatformDownloads.tsxpackages/site/src/features/Download/SimpleCodeBlock.tsxpackages/site/src/features/Download/index.tsxwords.txt
✅ Files skipped from review due to trivial changes (1)
- words.txt
Cloudflare Pages DeploymentEvent Name: pull_request Wrangler Output⛅️ wrangler 4.88.0 🌎 Deploying... |
Closes #287, closes #286
TODO
Summary by CodeRabbit