dvijaykrishnan commited on
Commit
6c69ac4
·
1 Parent(s): 85f636b

feat: AI status persistence across views and cloud deployment readiness

Browse files
src/features/dashboard/components/video-list-row.tsx CHANGED
@@ -142,9 +142,18 @@ export function VideoListRow({ video }: VideoListRowProps) {
142
  {video.detectionCount} Detections
143
  </Badge>
144
  ) : (
145
- <Badge variant="secondary" className="bg-secondary text-muted-foreground border-border text-[10px] gap-1 px-1.5 py-0 h-5">
 
 
 
 
 
146
  <Clock className="h-3 w-3" />
147
- {video.scanStatus === 'completed' ? 'Refine Mode' : 'Ready to Scan'}
 
 
 
 
148
  </Badge>
149
  )}
150
  </div>
 
142
  {video.detectionCount} Detections
143
  </Badge>
144
  ) : (
145
+ <Badge variant="secondary" className={cn(
146
+ "text-[10px] gap-1 px-1.5 py-0 h-5 border",
147
+ (video.scanStatus === 'in_progress' || video.scanStatus === 'pending_analysis')
148
+ ? "bg-blue-500/10 text-blue-500 border-blue-500/20 animate-pulse"
149
+ : "bg-secondary text-muted-foreground border-border"
150
+ )}>
151
  <Clock className="h-3 w-3" />
152
+ {video.scanStatus === 'completed'
153
+ ? 'Refine Mode'
154
+ : (video.scanStatus === 'in_progress' || video.scanStatus === 'pending_analysis')
155
+ ? 'Analyzing'
156
+ : 'Ready to Scan'}
157
  </Badge>
158
  )}
159
  </div>
src/features/vault/services/showcase.service.ts CHANGED
@@ -875,6 +875,7 @@ export class ShowcaseService {
875
  publishedAt: sql`COALESCE(excluded.published_at, youtube_videos.published_at)`,
876
  url: sql`COALESCE(excluded.url, youtube_videos.url)`,
877
  platform: sql`excluded.platform`,
 
878
  // Only update isInWorkbench if it's explicitly passed as true (e.g. "Add to Workbench" action)
879
  // If false (preview), we don't want to accidentally hide an existing tracked video
880
  isInWorkbench: options.isInWorkbench === true ? true : sql`youtube_videos.is_in_workbench`,
 
875
  publishedAt: sql`COALESCE(excluded.published_at, youtube_videos.published_at)`,
876
  url: sql`COALESCE(excluded.url, youtube_videos.url)`,
877
  platform: sql`excluded.platform`,
878
+ scanStatus: sql`excluded.scan_status`,
879
  // Only update isInWorkbench if it's explicitly passed as true (e.g. "Add to Workbench" action)
880
  // If false (preview), we don't want to accidentally hide an existing tracked video
881
  isInWorkbench: options.isInWorkbench === true ? true : sql`youtube_videos.is_in_workbench`,