feat: Mission Control Strip — "offen" total count per column #247
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Goal
Show a small "N offen" (N open) badge below each Mission Control Strip column heading so users know the total backlog size, not just the 5 items visible in the queue. This sets expectations ("there are 47 documents waiting to be segmented") and motivates sustained contribution.
Problem
The current backend returns at most 5 documents per column (hard-coded
DEFAULT_QUEUE_SIZE = 5inTranscriptionQueueService). The frontend shows these 5 items but has no way to display total queue depth because the total count is never fetched.The weekly pulse
TranscriptionWeeklyStatsDTOtracks activity during the past 7 days, which is unrelated to queue depth. There is currently no query that counts all qualifying documents in each queue regardless of the display limit.What is missing
Backend
Three new count queries in
DocumentRepository:countSegmentationQueue()— total documents withstatus NOT IN ('PLACEHOLDER')and no annotationscountTranscriptionQueue()— total documents with annotations but reviewed_pct < 90 %countReadyToReadQueue()— total documents with reviewed_pct >= 90 %DTO change — Either extend
TranscriptionWeeklyStatsDTOwithopenCounts, or introduce a newTranscriptionQueueStatsDTOrecord:Service change —
TranscriptionQueueService.getWeeklyStats()(or a new method) executes the three count queries and populates the new DTO fields.Controller — Either extend the existing
/api/transcription/weekly-statsresponse shape or add a new endpoint/api/transcription/queue-stats.Frontend
+page.server.ts— Update theweeklyStatsResultfetch (or add a new fetch) to load the open counts.MissionControlStrip.svelte/ column components — Render the "N offen" badge. Suggested placement: directly under the column heading, styled as a subdued label (e.g.text-xs text-gray-400), e.g.47 offen · ↑ +3 diese Woche.i18n — Add keys
mission_control_open_count("{count} offen") inde.json,en.json, andes.json.API types — After the backend DTO changes, regenerate
src/lib/generated/api.ts.Notes
"N bereit"/"N ready".COUNT(*)queries; no need to fetch full rows.