Skip to content

feat: allow short video uploads for segment suggestions - #70

Merged
JustSamuel merged 1 commit into
mainfrom
feat/segment-suggestion-video
Aug 18, 2026
Merged

feat: allow short video uploads for segment suggestions#70
JustSamuel merged 1 commit into
mainfrom
feat/segment-suggestion-video

Conversation

@JustSamuel

Copy link
Copy Markdown
Collaborator

Summary

Adds video as a third kind for segment suggestions, alongside photo and voice -- not for chat attachments, per the earlier scope decision.

  • Backend: 50MB cap, video/mp4 / video/quicktime / video/webm allow-list, enforced server-side that kind=video is rejected for purpose=chat_attachment (not just omitted from the chat UI).
  • SegmentSuggestion.vue: a third "Video" toggle reusing the existing photo file-picker flow (pick an existing clip, not record one live).
  • Media tab: a <video> player alongside the existing image/audio branches.

Test plan

  • Backend: go build ./... && go vet ./... && go test ./... -race clean
  • Frontend: yarn type-check && yarn lint && yarn test clean, 311/311
  • Checked live in a browser preview: the card's copy and toggle render correctly under the down/night-hours gating

Adds a third kind alongside photo and voice, segment suggestions
only (not chat attachments): a 50MB cap and mp4/quicktime/webm
allow-list on the backend, enforced server-side too so a video can't
land in the 48h-ephemeral chat_attachment store via a hand-crafted
request. Reuses the existing photo file-picker flow rather than
building a recording UI, since uploading an already-recorded clip is
what "short videos should be fine" actually asked for. The Media tab
gets a <video> player alongside its existing image/audio branches.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown

Go test coverage

radiogaga/agenda.go:54:		Error				100.0%
radiogaga/agenda.go:64:		NewAgenda			100.0%
radiogaga/agenda.go:83:		Load				95.2%
radiogaga/agenda.go:126:	List				100.0%
radiogaga/agenda.go:143:	Replace				85.7%
radiogaga/agenda.go:190:	validateAgendaEvent		100.0%
radiogaga/agenda.go:226:	sortAgendaEvents		100.0%
radiogaga/agenda.go:239:	startMinutes			100.0%
radiogaga/agenda.go:249:	defaultAgendaEvents		100.0%
radiogaga/audit.go:53:		NewAuditLog			100.0%
radiogaga/audit.go:62:		Load				91.7%
radiogaga/audit.go:85:		List				100.0%
radiogaga/audit.go:102:		Record				94.1%
radiogaga/audit.go:139:		auditLogHandler			100.0%
radiogaga/chat.go:28:		writeMessage			100.0%
radiogaga/chat.go:35:		writeControl			100.0%
radiogaga/chat.go:139:		NewChat				100.0%
radiogaga/chat.go:156:		checkOriginAllowed		100.0%
radiogaga/chat.go:169:		HandleWS			87.7%
radiogaga/chat.go:300:		handleClient			90.0%
radiogaga/chat.go:331:		dispatch			100.0%
radiogaga/chat.go:380:		dispatchTyping			83.3%
radiogaga/chat.go:398:		broadcastTyping			100.0%
radiogaga/chat.go:407:		forwardTypingToUser		100.0%
radiogaga/chat.go:421:		Shutdown			100.0%
radiogaga/chat.go:435:		forwardToRadios			72.7%
radiogaga/chat.go:451:		forwardToOtherRadios		72.7%
radiogaga/chat.go:473:		broadcastPresence		72.7%
radiogaga/chat.go:492:		forwardToUser			64.3%
radiogaga/chat.go:514:		verifyGEWISTokenHandshake	75.0%
radiogaga/chat.go:546:		lidnrValid			100.0%
radiogaga/chat.go:553:		radioKeyValid			100.0%
radiogaga/chat.go:562:		VerifyRadioKey			100.0%
radiogaga/env.go:10:		init				100.0%
radiogaga/env.go:17:		String				66.7%
radiogaga/env.go:29:		StringSlice			100.0%
radiogaga/main.go:59:		normalizePort			100.0%
radiogaga/main.go:81:		healthHandler			100.0%
radiogaga/main.go:87:		tokenHandler			100.0%
radiogaga/main.go:92:		radioHandler			100.0%
radiogaga/main.go:125:		radioKeyValidateHandler		94.1%
radiogaga/main.go:160:		agendaHandler			100.0%
radiogaga/main.go:205:		newMux				67.9%
radiogaga/main.go:249:		newHTTPServer			100.0%
radiogaga/main.go:260:		main				0.0%
radiogaga/media.go:72:		NewMediaStore			100.0%
radiogaga/media.go:79:		Load				91.7%
radiogaga/media.go:102:		List				100.0%
radiogaga/media.go:111:		Get				100.0%
radiogaga/media.go:131:		Add				75.0%
radiogaga/media.go:151:		ReadBytes			92.3%
radiogaga/media.go:176:		Delete				93.3%
radiogaga/media.go:206:		DeleteMany			100.0%
radiogaga/media.go:216:		filePath			100.0%
radiogaga/media.go:238:		sweepExpiredChatAttachments	100.0%
radiogaga/media.go:257:		RunSweep			0.0%
radiogaga/media.go:320:		broadcastMediaEvent		71.4%
radiogaga/media.go:336:		mediaUploadHandler		78.9%
radiogaga/media.go:472:		decodeAndAuthorize		42.9%
radiogaga/media.go:488:		mediaListHandler		92.9%
radiogaga/media.go:516:		mediaDownloadHandler		66.7%
radiogaga/media.go:548:		mediaDeleteHandler		53.8%
radiogaga/media.go:574:		mediaWipeHandler		78.9%
radiogaga/metrics.go:58:	NewMetricsStore			100.0%
radiogaga/metrics.go:68:	Load				91.7%
radiogaga/metrics.go:90:	List				100.0%
radiogaga/metrics.go:104:	Append				88.9%
radiogaga/metrics.go:125:	Run				0.0%
radiogaga/metrics.go:142:	sampleOnce			100.0%
radiogaga/metrics.go:198:	normalizeIcecastBaseURL		100.0%
radiogaga/metrics.go:206:	fetchListenerCount		90.0%
radiogaga/metrics.go:257:	liveStatusHandler		90.0%
radiogaga/metrics.go:295:	metricsHandler			100.0%
radiogaga/metrics.go:321:	writeJSONFile			57.1%
radiogaga/status.go:30:		statusHandler			91.7%
total:				(statements)			81.0%

@github-actions

Copy link
Copy Markdown

Coverage Report for frontend

Status Category Percentage Covered / Total
🔵 Lines 88.35% 1312 / 1485
🔵 Statements 85.91% 1440 / 1676
🔵 Functions 83.3% 454 / 545
🔵 Branches 81.39% 884 / 1086
File Coverage
File Stmts Branches Functions Lines Uncovered Lines
Changed Files
frontend/src/components/SegmentSuggestion.vue 70% 63.44% 66.66% 73.19% 107-108, 120-136, 140, 155, 159-160, 165, 169, 193-196, 9-10, 46-55
frontend/src/pages/backoffice/media.vue 63.8% 60.25% 54.76% 69.23% 176, 193, 200, 218-219, 224, 231-236, 249-257, 265, 276, 20-21, 35-48, 97, 113-123
frontend/src/stores/chat.ts 94.44% 94.91% 88.23% 97.46% 110-111, 190, 192, 194
Generated in workflow #112 for commit e38e968 by the Vitest Coverage Report Action

@JustSamuel
JustSamuel merged commit 1d4efcb into main Aug 18, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant