Skip to content

fix(ci): add generate:icons step to desktop build#2164

Merged
Kitenite merged 3 commits into
mainfrom
kitenite/wooden-wealth
Mar 7, 2026
Merged

fix(ci): add generate:icons step to desktop build#2164
Kitenite merged 3 commits into
mainfrom
kitenite/wooden-wealth

Conversation

@Kitenite
Copy link
Copy Markdown
Collaborator

@Kitenite Kitenite commented Mar 7, 2026

Summary

  • Adds a generate:icons step before compile:app in the desktop CI build workflow (both macOS and Linux jobs)
  • The renderer imports resources/public/file-icons/manifest.json which is generated by bun run generate:icons. CI was calling compile:app directly, skipping this step and causing a Rollup resolve error.

Test plan

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Mar 7, 2026

📝 Walkthrough

Walkthrough

Adds a pre-compile "Generate file icons" step to the desktop build workflow and increments the desktop app package version from 1.0.6 to 1.1.0; no other behavioral changes detected.

Changes

Cohort / File(s) Summary
Version Bump
apps/desktop/package.json
Bumped version from 1.0.6 to 1.1.0.
CI Build Workflow
.github/workflows/build-desktop.yml
Inserted a new step "Generate file icons" (runs bun run generate:icons) into macOS and Linux desktop build jobs before the Compile app step, adding an icon-generation pre-compile action.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Poem

🐰 I hopped through code with a tiny cheer,
Icons first, then build — the path is clear,
One-point-one now shines so bright,
A little bump, a gentle flight,
Keys tapped, carrots munched — release in sight! 🎉

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Description check ❓ Inconclusive The description is incomplete. While it mentions the version bump and the icon generation fix, it lacks proper structure following the template with sections like Type of Change, Testing, and Related Issues. Complete the PR description by filling in the template sections: specify the Type of Change (Chore, New feature, etc.), describe testing performed, link any related issues, and provide additional context if needed.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main change in the changeset: bumping the desktop app version to 1.1.0, which is reflected in the package.json modification.
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
  • Post copyable unit tests in a comment
  • Commit unit tests in branch kitenite/wooden-wealth

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.

Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

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

No issues found across 1 file

The renderer imports resources/public/file-icons/manifest.json which is
generated by the generate:icons script. CI was calling compile:app
directly without generating icons first, causing a Rollup resolve error.
@Kitenite Kitenite changed the title chore(desktop): bump version to 1.1.0 fix(ci): add generate:icons step to desktop build Mar 7, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Mar 7, 2026

🧹 Preview Cleanup Complete

The following preview resources have been cleaned up:

  • ✅ Neon database branch
  • ✅ Electric Fly.io app

Thank you for your contribution! 🎉

Copy link
Copy Markdown
Contributor

@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

🤖 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/build-desktop.yml:
- Around line 84-86: The workflow step that runs "bun run generate:icons" allows
the script to succeed even when no SVGs are produced; update CI to fail if icon
generation produced no assets by either (A) changing
apps/desktop/scripts/generate-file-icons.ts to detect missing referenced SVGs
and call process.exit(1) (or throw) when zero icons are found or any required
SVGs are missing, or (B) adding a follow-up job/step after the existing Generate
file icons step that inspects apps/desktop/public/manifest.json (or the script’s
output location) and exits non-zero if the manifest has no entries or expected
asset keys are missing; reference the generate-file-icons.ts script, the
generate:icons npm script, and manifest.json to locate the relevant
code/outputs.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 9c2ea5d0-0ce1-4f97-a4e1-d42f2b1471d0

📥 Commits

Reviewing files that changed from the base of the PR and between 10e16dc and fa4da25.

📒 Files selected for processing (1)
  • .github/workflows/build-desktop.yml

Comment on lines +84 to +86
- name: Generate file icons
working-directory: apps/desktop
run: bun run generate:icons
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

Fail the build if icon generation produced no SVG assets.

This step only checks that the script ran. apps/desktop/scripts/generate-file-icons.ts still exits 0 when referenced SVGs are missing, because it skips missing files and writes manifest.json anyway. That means CI can now get past compile:app but still publish a desktop build with broken file icons at runtime.

Suggested workflow hardening
-      - name: Generate file icons
-        working-directory: apps/desktop
-        run: bun run generate:icons
+      - name: Generate file icons
+        working-directory: apps/desktop
+        run: |
+          bun run generate:icons
+          test -f src/resources/public/file-icons/manifest.json || {
+            echo "::error::file icon manifest was not generated"
+            exit 1
+          }
+          test -n "$(find src/resources/public/file-icons -maxdepth 1 -name '*.svg' -print -quit)" || {
+            echo "::error::no file icon SVGs were generated"
+            exit 1
+          }

Also applies to: 195-197

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

In @.github/workflows/build-desktop.yml around lines 84 - 86, The workflow step
that runs "bun run generate:icons" allows the script to succeed even when no
SVGs are produced; update CI to fail if icon generation produced no assets by
either (A) changing apps/desktop/scripts/generate-file-icons.ts to detect
missing referenced SVGs and call process.exit(1) (or throw) when zero icons are
found or any required SVGs are missing, or (B) adding a follow-up job/step after
the existing Generate file icons step that inspects
apps/desktop/public/manifest.json (or the script’s output location) and exits
non-zero if the manifest has no entries or expected asset keys are missing;
reference the generate-file-icons.ts script, the generate:icons npm script, and
manifest.json to locate the relevant code/outputs.

Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

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

1 issue found across 1 file (changes from recent commits).

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="apps/desktop/package.json">

<violation number="1">
P2: This change rolls the desktop app version backward from `1.1.0` to `1.0.6`, which is unrelated to the CI fix and can break release/update version ordering.

(Based on your team's feedback about keeping PRs focused and avoiding unrelated changes.) [FEEDBACK_USED]</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.

@Kitenite Kitenite merged commit 70cc2a3 into main Mar 7, 2026
15 checks passed
@Kitenite Kitenite deleted the kitenite/wooden-wealth branch March 15, 2026 16:08
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