header footer metrics update and credits by site fixes

This commit is contained in:
IGNY8 VPS (Salman)
2026-01-12 05:28:36 +00:00
parent 95d8ade942
commit 368601f68c
12 changed files with 339 additions and 215 deletions

View File

@@ -296,24 +296,45 @@ export function createApprovedPageConfig(params: {
const headerMetrics: HeaderMetricConfig[] = [
{
label: 'Approved',
accentColor: 'green',
calculate: (data: { totalCount: number }) => data.totalCount,
tooltip: 'Total approved content ready for publishing.',
},
{
label: 'On Site',
label: 'Content',
accentColor: 'blue',
calculate: (data: { content: Content[] }) =>
data.content.filter(c => c.external_id).length,
tooltip: 'Content published to your website.',
calculate: (data: { totalCount: number }) => data.totalCount,
tooltip: 'Total content items tracked. Overall volume across all stages.',
},
{
label: 'Pending',
label: 'Draft',
accentColor: 'amber',
calculate: (data: { content: Content[] }) =>
data.content.filter(c => !c.external_id).length,
tooltip: 'Approved content not yet published to site.',
data.content.filter(c => c.status === 'draft').length,
tooltip: 'Content written, images not generated. Generate images to move to review.',
},
{
label: 'In Review',
accentColor: 'purple',
calculate: (data: { content: Content[] }) =>
data.content.filter(c => c.status === 'review').length,
tooltip: 'Images generated, awaiting approval. Review and approve to publish.',
},
{
label: 'Approved',
accentColor: 'green',
calculate: (data: { content: Content[] }) =>
data.content.filter(c => c.status === 'approved').length,
tooltip: 'Approved content awaiting publishing. Publish to site when ready.',
},
{
label: 'Published',
accentColor: 'green',
calculate: (data: { content: Content[] }) =>
data.content.filter(c => c.status === 'published').length,
tooltip: 'Live content on your website. Successfully published and accessible.',
},
{
label: 'Total Images',
accentColor: 'blue',
calculate: (data: { content: Content[] }) =>
data.content.filter(c => c.has_generated_images).length,
tooltip: 'Total images generated across all content. Tracks visual asset coverage.',
},
];

View File

@@ -456,28 +456,42 @@ export const createContentPageConfig = (
value: 0,
accentColor: 'blue' as const,
calculate: (data) => data.totalCount || 0,
tooltip: 'Total content pieces generated. Includes drafts, review, and published content.',
tooltip: 'Total content items tracked. Overall volume across all stages.',
},
{
label: 'Draft',
value: 0,
accentColor: 'amber' as const,
calculate: (data) => data.content.filter((c: Content) => c.status === 'draft').length,
tooltip: 'Content in draft stage. Edit and refine before moving to review.',
tooltip: 'Content written, images not generated. Generate images to move to review.',
},
{
label: 'In Review',
value: 0,
accentColor: 'blue' as const,
accentColor: 'purple' as const,
calculate: (data) => data.content.filter((c: Content) => c.status === 'review').length,
tooltip: 'Content awaiting review and approval. Review for quality before publishing.',
tooltip: 'Images generated, awaiting approval. Review and approve to publish.',
},
{
label: 'Approved',
value: 0,
accentColor: 'green' as const,
calculate: (data) => data.content.filter((c: Content) => c.status === 'approved').length,
tooltip: 'Approved content awaiting publishing. Publish to site when ready.',
},
{
label: 'Published',
value: 0,
accentColor: 'green' as const,
calculate: (data) => data.content.filter((c: Content) => c.status === 'published').length,
tooltip: 'Published content ready for WordPress sync. Track your published library.',
tooltip: 'Live content on your website. Successfully published and accessible.',
},
{
label: 'Total Images',
value: 0,
accentColor: 'blue' as const,
calculate: (data) => 0,
tooltip: 'Total images generated across all content. Tracks visual asset coverage.',
},
],
};

View File

@@ -207,28 +207,42 @@ export const createImagesPageConfig = (
value: 0,
accentColor: 'blue' as const,
calculate: (data) => data.totalCount || 0,
tooltip: 'Total content pieces with image generation. Track image coverage across all content.',
tooltip: 'Total content items tracked. Overall volume across all stages.',
},
{
label: 'Complete',
value: 0,
accentColor: 'green' as const,
calculate: (data) => data.images.filter((i: ContentImagesGroup) => i.overall_status === 'complete').length,
tooltip: 'Content with all images generated. Ready for publishing with full visual coverage.',
},
{
label: 'Partial',
value: 0,
accentColor: 'blue' as const,
calculate: (data) => data.images.filter((i: ContentImagesGroup) => i.overall_status === 'partial').length,
tooltip: 'Content with some images missing. Generate remaining images to complete visual assets.',
},
{
label: 'Pending',
label: 'Draft',
value: 0,
accentColor: 'amber' as const,
calculate: (data) => data.images.filter((i: ContentImagesGroup) => i.overall_status === 'pending').length,
tooltip: 'Content waiting for image generation. Queue these to start creating visual assets.',
calculate: (data) => data.images.filter((i: ContentImagesGroup) => i.content_status === 'draft').length,
tooltip: 'Content written, images not generated. Generate images to move to review.',
},
{
label: 'In Review',
value: 0,
accentColor: 'purple' as const,
calculate: (data) => data.images.filter((i: ContentImagesGroup) => i.content_status === 'review').length,
tooltip: 'Images generated, awaiting approval. Review and approve to publish.',
},
{
label: 'Approved',
value: 0,
accentColor: 'green' as const,
calculate: (data) => data.images.filter((i: ContentImagesGroup) => i.content_status === 'approved').length,
tooltip: 'Approved content awaiting publishing. Publish to site when ready.',
},
{
label: 'Published',
value: 0,
accentColor: 'green' as const,
calculate: (data) => data.images.filter((i: ContentImagesGroup) => i.content_status === 'published').length,
tooltip: 'Live content on your website. Successfully published and accessible.',
},
{
label: 'Total Images',
value: 0,
accentColor: 'blue' as const,
calculate: (data) => data.images.filter((i: ContentImagesGroup) => i.overall_status === 'complete').length,
tooltip: 'Total images generated across all content. Tracks visual asset coverage.',
},
],
maxInArticleImages: maxImages,

View File

@@ -259,28 +259,40 @@ export function createReviewPageConfig(params: {
],
headerMetrics: [
{
label: 'Ready',
label: 'Content',
accentColor: 'blue',
calculate: ({ totalCount }) => totalCount,
tooltip: 'Content ready for final review. Review quality, SEO, and images before publishing.',
tooltip: 'Total content items tracked. Overall volume across all stages.',
},
{
label: 'Images',
accentColor: 'green',
calculate: ({ content }) => content.filter(c => c.has_generated_images).length,
tooltip: 'Content with generated images. Visual assets complete and ready for review.',
},
{
label: 'Optimized',
accentColor: 'purple',
calculate: ({ content }) => content.filter(c => c.optimization_scores && c.optimization_scores.overall_score >= 80).length,
tooltip: 'Content with high SEO optimization scores (80%+). Well-optimized for search engines.',
},
{
label: 'Sync Ready',
label: 'Draft',
accentColor: 'amber',
calculate: ({ content }) => content.filter(c => c.has_generated_images && c.optimization_scores && c.optimization_scores.overall_score >= 70).length,
tooltip: 'Content ready for WordPress sync. Has images and good optimization score.',
calculate: ({ content }) => content.filter(c => c.status === 'draft').length,
tooltip: 'Content written, images not generated. Generate images to move to review.',
},
{
label: 'In Review',
accentColor: 'purple',
calculate: ({ content }) => content.filter(c => c.status === 'review').length,
tooltip: 'Images generated, awaiting approval. Review and approve to publish.',
},
{
label: 'Approved',
accentColor: 'green',
calculate: ({ content }) => content.filter(c => c.status === 'approved').length,
tooltip: 'Approved content awaiting publishing. Publish to site when ready.',
},
{
label: 'Published',
accentColor: 'green',
calculate: ({ content }) => content.filter(c => c.status === 'published').length,
tooltip: 'Live content on your website. Successfully published and accessible.',
},
{
label: 'Total Images',
accentColor: 'blue',
calculate: ({ content }) => content.filter(c => c.has_generated_images).length,
tooltip: 'Total images generated across all content. Tracks visual asset coverage.',
},
],
};

View File

@@ -454,39 +454,46 @@ export const createTasksPageConfig = (
],
headerMetrics: [
{
label: 'Tasks',
label: 'Content',
value: 0,
accentColor: 'blue' as const,
calculate: (data) => data.totalCount || 0,
tooltip: 'Total content generation tasks. Tasks process ideas into written content automatically.',
tooltip: 'Total content items tracked. Overall volume across all stages.',
},
{
label: 'In Queue',
label: 'Draft',
value: 0,
accentColor: 'amber' as const,
calculate: (data) => data.tasks.filter((t: Task) => t.status === 'queued').length,
tooltip: 'Tasks queued for processing. These will be picked up by the content generation system.',
calculate: (data) => data.tasks.filter((t: Task) => t.status === 'draft').length,
tooltip: 'Content written, images not generated. Generate images to move to review.',
},
{
label: 'Processing',
label: 'In Review',
value: 0,
accentColor: 'blue' as const,
calculate: (data) => data.tasks.filter((t: Task) => t.status === 'in_progress').length,
tooltip: 'Tasks currently being processed. Content is being generated by AI right now.',
accentColor: 'purple' as const,
calculate: (data) => data.tasks.filter((t: Task) => t.status === 'review').length,
tooltip: 'Images generated, awaiting approval. Review and approve to publish.',
},
{
label: 'Completed',
label: 'Approved',
value: 0,
accentColor: 'green' as const,
calculate: (data) => data.tasks.filter((t: Task) => t.status === 'completed').length,
tooltip: 'Successfully completed tasks. Generated content is ready for review and publishing.',
calculate: (data) => data.tasks.filter((t: Task) => t.status === 'approved').length,
tooltip: 'Approved content awaiting publishing. Publish to site when ready.',
},
{
label: 'Failed',
label: 'Published',
value: 0,
accentColor: 'red' as const,
calculate: (data) => data.tasks.filter((t: Task) => t.status === 'failed').length,
tooltip: 'Failed tasks that need attention. Review error logs and retry or modify the task.',
accentColor: 'green' as const,
calculate: (data) => data.tasks.filter((t: Task) => t.status === 'published').length,
tooltip: 'Live content on your website. Successfully published and accessible.',
},
{
label: 'Total Images',
value: 0,
accentColor: 'blue' as const,
calculate: (data) => 0,
tooltip: 'Total images generated across all content. Tracks visual asset coverage.',
},
],
};