Back to Source Monitor

Favicon View Display with Fallback Placeholder

.vbw-planning/milestones/polish-and-reliability/phases/02-favicon-support/PLAN-02-SUMMARY.md

0.13.01.2 KB
Original Source

What Was Built

  • Added source_favicon_tag helper rendering favicon image (when attached) or colored-circle initials placeholder
  • Placeholder uses first letter of source name with HSL color derived from name bytes for consistent coloring
  • ActiveStorage guard pattern: favicon_attached? checks defined?(ActiveStorage), respond_to?(:favicon), and attached?
  • Sources index row now shows 24px favicon next to source name in flex layout
  • Source show page shows 40px favicon next to name heading
  • Task 4 (import sessions) confirmed as no-op: OPML preview sources don't have favicons

Files Modified

  • app/helpers/source_monitor/application_helper.rb -- added source_favicon_tag, favicon_attached?, favicon_image_tag, favicon_placeholder_tag
  • app/views/source_monitor/sources/_row.html.erb -- wrapped name cell in flex container with favicon tag
  • app/views/source_monitor/sources/_details.html.erb -- added favicon next to h1 heading
  • test/helpers/source_monitor/favicon_helper_test.rb -- 13 tests covering placeholders, sizing, colors, edge cases
  • test/system/sources_test.rb -- updated assert_source_order to match link text (accommodates favicon initial)