Skip to content

Conversation

@plebe1us
Copy link
Member

@plebe1us plebe1us commented Jan 30, 2026

Note

Medium Risk
Moderate risk because it changes the desktop build/release toolchain (Forge packaging, CI matrices, and artifact naming) and modifies how the bundled Kubo binary is downloaded/located at runtime across platforms/architectures.

Overview
Migrates desktop packaging from electron-builder to Electron Forge via a new forge.config.js, new electron:build:* scripts (incl. per-arch targets), updated CI tests to electron-forge package, and cleanup of electron-builder hooks/config (including removal of electron/after-all-artifact-build.cjs).

Release pipelines are reworked for multi-arch artifacts and Node 22: Linux and macOS now build matrix x64 + arm64, React builds force NODE_ENV=production, and release body generation is moved to a new finalize-release job that updates the body after assets upload.

IPFS/Kubo bundling is updated and hardened: bumps Kubo to 0.39.0, downloads platform/arch-specific binaries (env-overridable), adjusts runtime binary resolution and logging in electron/start-ipfs.js, and updates Electron runtime paths from dist/ to build/ (preload, index.html, tray/icon). Also renames “default subplebbits” data to “directories” (5chan-directories.json schema change to communities) and updates UI/hooks/docs links accordingly.

Written by Cursor Bugbot for commit c4e2f75. This will update automatically on new commits. Configure here.

@vercel
Copy link

vercel bot commented Jan 30, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
5chan Ready Ready Preview, Comment Jan 30, 2026 6:02am

Request Review

@plebe1us plebe1us merged commit 802b144 into master Jan 30, 2026
11 checks passed
Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 6 potential issues.

Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.

This is the final PR Bugbot will review for you during this billing cycle

Your free Bugbot reviews will reset on February 8

Details

You are on the Bugbot Free tier. On this plan, Bugbot will review limited PRs each billing cycle.

To receive Bugbot reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.

const useInitialTheme = (pendingPostSubplebbitAddress?: string) => {
const location = useLocation();
const { subplebbitAddress: paramsSubplebbitAddress, accountCommentIndex } = useParams<{ subplebbitAddress: string; accountCommentIndex?: string }>();
const { communityAddress: paramsSubplebbitAddress, accountCommentIndex } = useParams<{ communityAddress: string; accountCommentIndex?: string }>();
Copy link

Choose a reason for hiding this comment

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

Wrong route parameter name breaks theme selection

High Severity

The route parameter key was changed from subplebbitAddress to communityAddress, but the actual routes use :boardIdentifier (as defined in app.tsx). This causes paramsSubplebbitAddress to always be undefined since no route parameter named communityAddress exists. Board pages will incorrectly fall through to the default theme instead of selecting themes based on NSFW status.

Fix in Cursor Fix in Web


- name: Setup Node.js v22 for Electron build
uses: actions/setup-node@v2
with:
Copy link

Choose a reason for hiding this comment

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

Linux arm64 build downloads wrong architecture IPFS binary

High Severity

The Linux arm64 build runs on ubuntu-22.04 (x64 runner) but downloads the IPFS binary without setting BUILD_ARCH. The resolveBuildArch() function in before-pack.js falls back to process.arch which returns 'x64' on the x64 runner, causing the arm64 build to package an x64 IPFS binary that won't work on arm64 Linux systems.

Fix in Cursor Fix in Web

const iconPath = path.join(dirname, '..', isDev ? 'public' : 'build', 'icon.png');
app.dock.setIcon(iconPath);
}
}
Copy link

Choose a reason for hiding this comment

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

App name incorrectly set to 'seedit' on macOS

High Severity

The newly added code sets app.setName('seedit') for ALL macOS builds, but the app is named '5chan' everywhere else (in forge.config.js, documentation, etc.). The comment says "for development mode on macOS" but there's no isDev check in the condition. This causes production macOS builds to display "seedit" in the dock and menu bar instead of "5chan".

Fix in Cursor Fix in Web

if (subplebbitAddress) {
const subplebbit = subplebbits.find((s) => s.address === subplebbitAddress);
if (subplebbit?.nsfw) {
const communityAddress = pendingPostSubplebbitAddress || pendingPost?.communityAddress;
Copy link

Choose a reason for hiding this comment

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

Wrong property name for pending post address fallback

Medium Severity

The fallback pendingPost?.communityAddress uses a non-existent property on Comment objects. The correct property is subplebbitAddress, as used consistently throughout the codebase (e.g., in use-theme.ts and app.tsx). When pendingPostSubplebbitAddress parameter is not provided, the fallback fails and pending post views get incorrect theme selection.

Fix in Cursor Fix in Web

- uses: ncipollo/release-action@v1
with:
artifacts: 'dist/5chan*.AppImage,dist/5chan-html*.zip'
artifacts: 'dist/5chan*.AppImage,dist/5chan*-arm64.AppImage,dist/5chan-html*.zip'
Copy link

Choose a reason for hiding this comment

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

Release workflow looks for artifacts in wrong directory

High Severity

The release workflow expects artifacts in dist/ but electron-forge outputs to out/make/ by default. The test workflow correctly references out/ directory, and find-forge-executable.js searches in out/ and out/make/. However, the release workflow's artifact patterns (dist/5chan*.AppImage, dist/5chan*.dmg, dist/5chan*.exe) won't match any files, causing releases to have no downloadable binaries.

Additional Locations (2)

Fix in Cursor Fix in Web

- uses: ncipollo/release-action@v1
with:
artifacts: 'dist/5chan*.AppImage,dist/5chan-html*.zip'
artifacts: 'dist/5chan*.AppImage,dist/5chan*-arm64.AppImage,dist/5chan-html*.zip'
Copy link

Choose a reason for hiding this comment

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

HTML archive creation deleted but still referenced

Medium Severity

The electron/after-all-artifact-build.cjs file that created the 5chan-html-*.zip static web build was deleted, but the release workflow still includes dist/5chan-html*.zip in its artifacts pattern. The scripts/release-body.js also references this file for generating download links. The HTML archive won't be created, leaving a gap in the release deliverables.

Additional Locations (1)

Fix in Cursor Fix in Web

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.

2 participants