Favicon matches the app icon

The white plane in a blue ring on the dark rounded square, tuned to read
at 16 px, instead of the plane emoji (which looked different everywhere).
Adds favicon.ico (16/32/48) for browsers and tools that ask for it, busts
the cached SVG with ?v=2, and keeps it with the offline page.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
rickyandClaude Opus 5.5 committed 2026-11-14 14:37:30 -05:00
1 parent 291990412e
commit ec0f43019f
8 files changed
+21 -8

No files matched your search

+8 -2
View File
@@ -34,8 +34,14 @@ class PwaTest < ActionDispatch::IntegrationTest
assert_select "link[rel=manifest][href='/manifest.json'][crossorigin=use-credentials]" # behind an auth proxy (Authentik) the manifest needs cookies
assert_select "meta[name=theme-color]"
assert_select "link[rel=apple-touch-icon][href='/apple-touch-icon.png']"
assert_select "link[rel=icon][href='/favicon.svg']"
assert_includes Rails.public_path.join("favicon.svg").read, "✈️"
assert_select "link[rel=icon][href='/favicon.svg?v=2']"
assert_select "link[rel=icon][href='/favicon.ico']"
# The same design as the app icon (colours and plane), not an emoji.
favicon, icon = %w[favicon.svg icon.svg].map { Rails.public_path.join(_1).read }
plane = icon[/<path fill="#fff" d="([^"]+)"/, 1]
assert_includes favicon, plane
%w[#0f172a #0369a1].each { assert_includes favicon, _1 }
assert_equal [ 0, 1, 3 ], Rails.public_path.join("favicon.ico").binread(6).unpack("v3") # an icon file with 3 sizes
token = create_aircraft(owner: create_user("o2@example.com")).share_tokens.create!(privilege: "status")
get shared_path(token.token)