fix(linux): render UI correctly in AppImage (CSP nonce + SVG sizing)#4
Merged
Conversation
The Linux AppImage launched but rendered only a giant logo with no
layout. Root cause: Tauri injects a per-load 'nonce-...' into the CSP
style-src at runtime. Per the CSP spec, a nonce in style-src makes the
browser ignore 'unsafe-inline', so Angular's runtime-injected component
<style> tags (which carry no nonce) were all blocked by WebKitGTK. With
no component CSS, .brand-logo { width: 42px } never applied and the
<img> fell back to the SVG's 320mm (~1210px) intrinsic size.
- tauri.conf.json: dangerousDisableAssetCspModification ["style-src"]
so Tauri leaves style-src verbatim (keeps 'unsafe-inline', no nonce)
while still nonce-protecting script-src.
- tauri.svg: 320mm -> 320 intrinsic size (defense in depth).
- Also bundles GStreamer media framework + build deps for the webview
(fixes the earlier appsink error) and bumps version to 0.1.3.
Verified: rebuilt AppImage now renders the full UI correctly.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The Linux AppImage launched but rendered only a giant logo with no layout — the long-standing Linux render bug.
Root cause
Not a WebKitGTK/Wayland/Intel issue (ruled out — dev and prod bundles both render fine in the same engine). The real cause:
'nonce-…'into the CSPstyle-srcat runtime (__TAURI_STYLE_NONCE__).style-srcmakes the browser ignore'unsafe-inline'.createElement("style")— those<style>tags carry no nonce, so WebKitGTK blocked all component CSS..brand-logo { width: 42px }never applied and the<img>fell back to the SVG's320mm(~1210px) intrinsic size → giant logo, no layout.Fix
tauri.conf.json:dangerousDisableAssetCspModification: ["style-src"]— Tauri leavesstyle-srcverbatim (keeps'unsafe-inline', no nonce) while still nonce-protectingscript-src.tauri.svg:320mm→320intrinsic size (defense in depth, so the logo can never balloon again).appsinkerror) and bumps version to 0.1.3.Verification
Rebuilt the AppImage with the real CSP applied and launched it — the full UI now renders correctly (proper-size logo, header, Folders/Details panels, breadcrumb).
🤖 Generated with Claude Code