Skip to content

Commit 4d9ff43

Browse files
committed
feat(web): show video creation time on home page and watch page
- Add createdAt to API video status response - Library cards now display date + time (e.g. Apr 10, 2026 at 6:13 AM) - Watch page header shows 'Created <date> at <time>' instead of the misleading auto-updating 'Updated' timestamp
1 parent 71d7e72 commit 4d9ff43

5 files changed

Lines changed: 30 additions & 3 deletions

File tree

apps/web-api/src/routes/videos.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,7 @@ export async function videoRoutes(app: FastifyInstance) {
184184
ai_entities_json: unknown;
185185
ai_action_items_json: unknown;
186186
ai_quotes_json: unknown;
187+
created_at: string;
187188
operator_notes: string | null;
188189
transcription_dead_error: string | null;
189190
ai_dead_error: string | null;
@@ -192,6 +193,7 @@ export async function videoRoutes(app: FastifyInstance) {
192193
`SELECT
193194
v.id,
194195
v.name,
196+
v.created_at,
195197
v.processing_phase,
196198
v.processing_progress,
197199
v.result_key,
@@ -255,6 +257,7 @@ export async function videoRoutes(app: FastifyInstance) {
255257
return reply.send({
256258
videoId: row.id,
257259
name: row.name,
260+
createdAt: row.created_at,
258261
processingPhase: row.processing_phase,
259262
processingProgress: row.processing_progress,
260263
resultKey: row.result_key,

apps/web/src/lib/api.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ export type MultipartCompleteResponse = {
4242
export type VideoStatusResponse = {
4343
videoId: string;
4444
name: string;
45+
createdAt: string;
4546
processingPhase: string;
4647
processingProgress: number;
4748
resultKey: string | null;

apps/web/src/pages/HomePage.tsx

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,12 +46,19 @@ export function HomePage() {
4646
return phase ? (labels[phase] ?? phase) : 'Queued';
4747
};
4848

49-
const dateLabel = (iso: string) =>
50-
new Date(iso).toLocaleDateString(undefined, {
49+
const dateLabel = (iso: string) => {
50+
const d = new Date(iso);
51+
const date = d.toLocaleDateString(undefined, {
5152
month: 'short',
5253
day: 'numeric',
5354
year: 'numeric',
5455
});
56+
const time = d.toLocaleTimeString(undefined, {
57+
hour: 'numeric',
58+
minute: '2-digit',
59+
});
60+
return `${date} at ${time}`;
61+
};
5562
const phaseBucket = (phase?: string | null): LibraryFilter => {
5663
if (
5764
!phase ||

apps/web/src/pages/VideoPage.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -366,6 +366,7 @@ export function VideoPage() {
366366
isProcessing,
367367
processingPhase: status?.processingPhase,
368368
processingProgress: status?.processingProgress,
369+
createdAt: status?.createdAt ?? null,
369370
lastUpdatedAt,
370371
errorMessage,
371372
jobStatusLabel: jobStatus?.status ?? null,

apps/web/src/pages/video-page/VideoPageHeader.tsx

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ export type VideoPageHeaderVideoProps = {
2323
isProcessing: boolean;
2424
processingPhase: VideoStatusResponse["processingPhase"] | undefined;
2525
processingProgress: number | null | undefined;
26+
createdAt: string | null;
2627
lastUpdatedAt: string | null;
2728
errorMessage: string | null;
2829
jobStatusLabel: string | null;
@@ -72,6 +73,7 @@ export function VideoPageHeader({ titleProps, videoProps, uiProps, actionProps }
7273
isProcessing,
7374
processingPhase,
7475
processingProgress,
76+
createdAt,
7577
lastUpdatedAt,
7678
errorMessage,
7779
jobStatusLabel,
@@ -174,7 +176,20 @@ export function VideoPageHeader({ titleProps, videoProps, uiProps, actionProps }
174176
{processingPhase === "failed" && (
175177
<span className="status-chip status-chip-danger">Failed</span>
176178
)}
177-
{lastUpdatedAt && <span>Updated {new Date(lastUpdatedAt).toLocaleTimeString()}</span>}
179+
{createdAt && (
180+
<span>
181+
Created{' '}
182+
{new Date(createdAt).toLocaleDateString(undefined, {
183+
month: 'short',
184+
day: 'numeric',
185+
year: 'numeric',
186+
})}{' '}
187+
at {new Date(createdAt).toLocaleTimeString(undefined, {
188+
hour: 'numeric',
189+
minute: '2-digit',
190+
})}
191+
</span>
192+
)}
178193
</div>
179194
</div>
180195

0 commit comments

Comments
 (0)