From e277d1ba334127496797126daf935bfda7b410b6 Mon Sep 17 00:00:00 2001 From: jwinterm Date: Tue, 19 May 2026 10:50:44 -0400 Subject: [PATCH] CI: run compile_graphics.sh to generate .svg.vec icon assets MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Empty action-row buttons (Send/Receive/Swap/Scan) and empty bottom navbar tabs are the same root cause on Linux + Android (+ likely iOS): the workflows weren't running Cake's compile_graphics.sh, which is what converts res/pictures/*.svg sources → assets/new-ui/*.svg.vec precompiled vector assets that CakeImageWidget loads via AssetBytesLoader. History: commit 89e07fbba (Cake upstream, March 2026) moved to precompiled SVGs, added compile_graphics.sh, and added a 'Compile graphics' workflow step. Then 980c0278b added \*.svg.vec to .gitignore (so the artifacts are no longer tracked). End result: CI MUST run compile_graphics.sh to produce the .vec files, or every CakeImageWidget silently renders nothing. Fix: - Add vector_graphics_compiler: ^1.1.16 to dev_dependencies (the script invokes 'dart run vector_graphics_compiler ...' which needs the package in the project's deps for 'dart run' to find it). - Add a 'Compile SVG assets' step to all four workflows, between generate_localization and the build/pod-install step. This will populate assets/new-ui/ with ~82 .svg.vec files at build time, so every CakeImageWidget reference (action row, navbar, top bar, settings rows, etc.) resolves to its actual icon. --- .github/workflows/build-android.yml | 3 +++ .github/workflows/build-ios-sim.yml | 3 +++ .github/workflows/build-ios-testflight.yml | 3 +++ .github/workflows/build-linux.yml | 3 +++ pubspec_base.yaml | 5 +++++ 5 files changed, 17 insertions(+) diff --git a/.github/workflows/build-android.yml b/.github/workflows/build-android.yml index a1e566107..81b3f9932 100644 --- a/.github/workflows/build-android.yml +++ b/.github/workflows/build-android.yml @@ -228,6 +228,9 @@ jobs: - name: Generate localization run: dart run tool/generate_localization.dart + - name: Compile SVG assets (res/pictures/*.svg → assets/new-ui/*.svg.vec) + run: ./compile_graphics.sh + # ---- Compile + sign -------------------------------------------------- # Universal APK (single binary covers all 4 ABIs, easy to sideload). - name: Build release APK (universal, all ABIs) diff --git a/.github/workflows/build-ios-sim.yml b/.github/workflows/build-ios-sim.yml index 01c90f645..5ffac48f1 100644 --- a/.github/workflows/build-ios-sim.yml +++ b/.github/workflows/build-ios-sim.yml @@ -215,6 +215,9 @@ jobs: - name: Generate localization run: dart run tool/generate_localization.dart + - name: Compile SVG assets (res/pictures/*.svg → assets/new-ui/*.svg.vec) + run: ./compile_graphics.sh + # CocoaPods: the iOS Podfile installs Flutter plugin pods. Required # before flutter build can link them. - name: pod install diff --git a/.github/workflows/build-ios-testflight.yml b/.github/workflows/build-ios-testflight.yml index b83cc90b8..d3f955f80 100644 --- a/.github/workflows/build-ios-testflight.yml +++ b/.github/workflows/build-ios-testflight.yml @@ -252,6 +252,9 @@ jobs: - name: Generate localization run: dart run tool/generate_localization.dart + - name: Compile SVG assets (res/pictures/*.svg → assets/new-ui/*.svg.vec) + run: ./compile_graphics.sh + - name: pod install run: | cd ios diff --git a/.github/workflows/build-linux.yml b/.github/workflows/build-linux.yml index 332824cd8..f07803c33 100644 --- a/.github/workflows/build-linux.yml +++ b/.github/workflows/build-linux.yml @@ -161,6 +161,9 @@ jobs: - name: Generate localization run: dart run tool/generate_localization.dart + - name: Compile SVG assets (res/pictures/*.svg → assets/new-ui/*.svg.vec) + run: ./compile_graphics.sh + # ---- Compile + package ---------------------------------------------- - name: Build Linux app run: flutter build linux --dart-define-from-file=env.json --release diff --git a/pubspec_base.yaml b/pubspec_base.yaml index a1b56fc12..8e18fa92d 100644 --- a/pubspec_base.yaml +++ b/pubspec_base.yaml @@ -173,6 +173,11 @@ dev_dependencies: build_resolvers: ^2.4.4 hive_generator: ^2.0.1 flutter_launcher_icons: ^0.13.1 + # Cake's compile_graphics.sh runs `dart run vector_graphics_compiler` to + # precompile res/pictures/*.svg → assets/new-ui/*.svg.vec. Without this + # dep, the CI build doesn't generate the icon assets and CakeImageWidget + # silently fails to load them (icons render as empty placeholders). + vector_graphics_compiler: ^1.1.16 pedantic: ^1.8.0 # replace https://github.com/dart-lang/lints#migrating-from-packagepedantic translator: