Commit Graph

5 Commits

Author SHA1 Message Date
Michele
f154f1b2f6 feat(04-02): thumbnail PostCard e hint Unsplash in OutputReview
- PostCard: thumbnail 80x56px della cover image quando keyword e' URL
  - Rilevamento con startsWith('http')
  - object-cover, loading=lazy, onError nasconde se URL non valido
  - Posizionato dopo cover_title e prima dei metadati secondari
- OutputReview: hint discreto Unsplash sotto il box info edit inline
  - Visibile solo se unsplash_api_key_configured === false
  - Link a /impostazioni con stile amber discreto
  - Scompare automaticamente dopo configurazione Unsplash
  - Usa Link da react-router-dom (pattern codebase)
2026-03-09 08:16:55 +01:00
Michele
ad2483d48d feat(02-02): OutputReview summary counter with regenerated/edited tracking
- Add regeneratedSlots Set to track regenerated post indices
- Add summary counter showing: N post, X generati, Y rigenerati, Z modificati
- Counter updates in real-time after each regeneration or inline edit
- Pass isRegenerated prop to PostCard for visual badge
- Update info box to mention regen feature with RefreshCw icon
- Use JSON.stringify comparison for manual edit detection

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-08 21:03:11 +01:00
Michele
d8e3eb9415 fix(01): calendar slot merge in OutputReview for PN/Schwartz badges
GenerateResponse now includes calendar field from backend.
OutputReview merges CalendarSlot into PostResult via slot_index,
enabling BadgePN, BadgeSchwartz rendering and Retry button.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-08 03:14:07 +01:00
Michele
a5d1c15c3a feat(01-04): pagine GenerateCalendar, OutputReview, GenerateSingle complete
- GenerateCalendar.tsx: form con obiettivo+settimane+brand+tono+nicchie
  - Pulsante Genera disabilitato senza API key con banner link a Impostazioni
  - Async submit: mutation ritorna job_id, mostra ProgressIndicator
  - Auto-navigate a /risultati/:jobId quando job completato
- OutputReview.tsx: carica job results via useJobResults(jobId)
  - Griglia PostCard responsive con conteggio success/failed
  - Stato locale per edit inline (aggiornato da PostCard.onEdit)
  - Download CSV via useDownloadEditedCsv (POST con edits) con due pulsanti (header + footer)
- GenerateSingle.tsx: form con tipo PN, livello Schwartz, nicchia, formato narrativo
  - Topic opzionale (altrimenti generato dall'AI)
  - Anteprima risultato con PostCard+SlideViewer e download CSV singolo
2026-03-08 02:29:17 +01:00
Michele
738a877d39 feat(01-04): layout, routing, API hooks, tipi TypeScript, Dashboard, Settings
- types.ts: CalendarSlot, GeneratedPost, PostResult, JobStatus, Settings, SettingsStatus
- api/client.ts: aggiunto apiGet, apiPost, apiPut, apiDownload, triggerDownload
- api/hooks.ts: 10+ hooks TanStack Query (settings, generate, job polling, CSV export)
- components/Layout.tsx + Sidebar.tsx: sidebar stone/amber palette con 4 nav link
- pages/Dashboard.tsx: banner API key, quick actions link, step guide
- pages/Settings.tsx: form completo (API key password, LLM select, brand, nicchie checkbox)
- App.tsx: 5 route con BrowserRouter basename='/postgenerator', QueryClientProvider, Layout
2026-03-08 02:23:55 +01:00