refactor: replace SVG sprite with client-side icon fetching and Rust caching

Eliminates server-side batch rendering and IconSprite pattern in favor of:
- Rust handler with moka cache (10k icons, 24h TTL, immutable HTTP headers)
- Client Icon component fetches SVGs on-demand with shimmer loading states
- Removes renderIconsBatch, tag-icons collection logic, and page load icon preprocessing
- Reduces SSR complexity and data serialization overhead
This commit is contained in:
2026-01-15 10:33:43 -06:00
parent 935c5e6475
commit 8aa14a2cab
26 changed files with 327 additions and 441 deletions
+2 -1
View File
@@ -2,7 +2,7 @@ use std::sync::Arc;
use crate::{
auth::SessionManager, cache::IsrCache, health::HealthChecker, http::HttpClient,
tarpit::TarpitState,
icon_cache::IconCache, tarpit::TarpitState,
};
/// Application state shared across all handlers
@@ -14,6 +14,7 @@ pub struct AppState {
pub pool: sqlx::PgPool,
pub session_manager: Arc<SessionManager>,
pub isr_cache: Arc<IsrCache>,
pub icon_cache: Arc<IconCache>,
}
/// Errors that can occur during proxying to Bun