feat(manager): wire dashboard to Strapi CMS data exclusively#515
Open
feat(manager): wire dashboard to Strapi CMS data exclusively#515
Conversation
Replace file-based job state with Strapi EnrichmentJob content type for durable storage. Coverage page now loads real video data from CMS with per-language coverage status. Language/country/continent geo data served via authenticated proxy API routes. Key changes: - New EnrichmentJob content type + enrichment.job-step component in CMS - Video schema: add children/parents self-relation, aiMetadata boolean - VideoVariant/VideoSubtitle schemas: add aiGenerated boolean - Gateway sync: post-pass links parent→children relations after import - Job state (lib/state.ts) backed by Strapi GraphQL mutations - Proxy API routes: /api/languages (with SWR cache), /api/videos, /api/enrich - Coverage page: skeleton loading, video collections from CMS, select mode - Dashboard layout: persistent nav with Report/Queue/Sign out - Auth: JWT decoded + role checked via API token (bypasses /api/users/me) - Session expiry: apiFetch wrapper auto-signs out on 401 - Login page restyled to match dashboard design language - CLAUDE.md: corrected GraphQL operations convention Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
P1 Critical: - JWT signature now verified via Strapi /api/users/me (403 = valid JWT) - Video API returns all 3 coverage statuses per video (no refetch on tab switch) - All GraphQL operations converted from untyped gql to typed graphql() P2 Important: - Gateway sync post-pass skips manager-owned videos - Extracted shared strapi-pagination helper (fetchAllPages, PageInfo) - Error messages no longer leak internal details to clients - updateStepStatus serialized per-job via Promise mutex - Languages cache uses Promise-based lock (no concurrent refresh race) P3 Nice-to-have: - Apollo Client default fetchPolicy set to no-cache - aiGenerated/aiMetadata fields now required (not nullable) - Removed dead types (JobCreatePayload, JobErrorDetails, RawVariant/RawSubtitle merged) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
aiGeneratedflags/api/languages,/api/videos,/api/enrich) with JWT auth and stale-while-revalidate caching for geo datachildren/parentsself-relation (replaceschildGatewayIdsJSON),aiMetadataboolean; gateway sync updated with post-pass to link relationsapiFetchwrapper auto-signs out on 401/api/enrichTest plan
pnpm devin apps/cms), verify EnrichmentJob type registered in adminchildrenrelations on videos🤖 Generated with Claude Code