Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .github/workflows/build-desktop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,10 @@ jobs:
working-directory: apps/desktop
run: bun run clean:dev

- name: Generate file icons
working-directory: apps/desktop
run: bun run generate:icons
Comment on lines +84 to +86
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.


- name: Compile app with electron-vite
working-directory: apps/desktop
env:
Expand Down Expand Up @@ -188,6 +192,10 @@ jobs:
working-directory: apps/desktop
run: bun run clean:dev

- name: Generate file icons
working-directory: apps/desktop
run: bun run generate:icons

- name: Compile app with electron-vite
working-directory: apps/desktop
env:
Expand Down