sync: add AI review pipeline, parallel skill-files fetch, Redis cache improvements

- feat(review): add skill_reviews table, review API endpoints (pending/submit/stats), admin auth
- perf: parallel file fetching in skill-files API (was sequential → timeout)
- fix: handle Date serialization from Redis cache
- fix: align curation batch scripts with current browseReadyFilter

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
airano
2026-02-23 19:51:43 +03:30
parent 328520bb70
commit 447f9eff59
15 changed files with 1050 additions and 74 deletions

View File

@@ -20,10 +20,11 @@ interface NewSkillsPageProps {
}
// Format date to "X hours/days ago" with locale support
function formatTimeAgo(date: Date | null, locale: string): string {
function formatTimeAgo(date: Date | string | null, locale: string): string {
if (!date) return locale === 'fa' ? 'اخیراً' : 'Recently';
const d = date instanceof Date ? date : new Date(date);
const now = new Date();
const diffMs = now.getTime() - date.getTime();
const diffMs = now.getTime() - d.getTime();
const diffHours = Math.floor(diffMs / (1000 * 60 * 60));
const diffDays = Math.floor(diffHours / 24);