merge: video embed on detail page (Worker R2)
CI / Lint / Test / Vet (push) Successful in 13s
CI / Build & Import (push) Successful in 11s
CI / Mirror to GitHub (push) Failing after 2s

# Conflicts:
#	internal/web/views_templ.go
This commit is contained in:
2026-06-03 15:38:31 +02:00
5 changed files with 192 additions and 98 deletions
+16 -13
View File
@@ -25,19 +25,20 @@ var ErrNotFound = errors.New("store: summary not found")
// not part of the Stage-0 store slice yet. When that table is migrated, swap the
// JOIN source — callers already fall back gracefully on an empty Channel.
type SummaryRow struct {
VideoID string
Title string // videos.title; empty when no videos row
Channel string // videos.provider for now; empty when no videos row
URL string // videos.url; empty when no videos row
PublishedAt time.Time // videos.published_at; zero when absent
Summary string
Highlights []string
Takeaways []string
AIProvider string
AIModel string
FallbackUsed bool
CreatedAt time.Time
Actions []string // current active actions for this video; nil when none
VideoID string
ProviderVideoID string // videos.provider_video_id; empty when no videos row
Title string // videos.title; empty when no videos row
Channel string // videos.provider for now; empty when no videos row
URL string // videos.url; empty when no videos row
PublishedAt time.Time // videos.published_at; zero when absent
Summary string
Highlights []string
Takeaways []string
AIProvider string
AIModel string
FallbackUsed bool
CreatedAt time.Time
Actions []string // current active actions for this video; nil when none
}
// selectSummary is the shared projection for both reads. videos is LEFT JOINed
@@ -45,6 +46,7 @@ type SummaryRow struct {
// crosses users and a missing videos row yields nulls, not a dropped summary.
const selectSummary = `
SELECT s.video_id,
COALESCE(v.provider_video_id, ''),
COALESCE(v.title, ''),
COALESCE(v.provider, ''),
COALESCE(v.url, ''),
@@ -153,6 +155,7 @@ func scanSummaryRow(rows pgx.Row) (SummaryRow, error) {
)
if err := rows.Scan(
&row.VideoID,
&row.ProviderVideoID,
&row.Title,
&row.Channel,
&row.URL,