Skip to content

首页博客

v0.7.1 hotfix: the oversized icon bug

Dear users, I owe you an apology. Here is how it happened.

At 10:33 on November 4, 2026, I shipped the greatest v0.7.0 release ever. But as the first person to download the update, I found a serious problem: the icons were too big!

I rushed out a fix and released v0.7.1. This version fixes the bug, and also bundles a security update for vue-i18n.


How did this happen? Well, according to DeepSeek's analysis:

What was fixed ​

Root cause: Tauri production builds inject a CSP nonce for the inline styles in index.html. Per the CSP spec, once a nonce is present, 'unsafe-inline' in style-src is ignored. FontAwesome inserts a <style> element at runtime by default, so it was blocked, the icon SVGs lost their size constraints, and the following appeared:

  • Oversized icons in the action bar, with text squeezed into vertical columns
  • Missing navigation icons in the title bar

Changes:

  • src/main.ts: statically import @fortawesome/fontawesome-svg-core/styles.css so the icon styles are bundled together with the app's CSS.
  • src/config/fontAwesome.ts: set config.autoAddCss = false to avoid duplicate injection at runtime.

Verification ​

  • Reproduced the anomaly locally, matching the screenshots; after the fix, both the icons and the title bar are back to normal.
  • pnpm build (including vue-tsc type checking) passes.
  • All jobs in the Release workflow succeeded: Windows x64/arm64, Linux x64/arm64, and finalize all completed.

基于 MIT 许可 发布