Skip to content

Conversation

@ctate
Copy link
Collaborator

@ctate ctate commented Oct 25, 2025

No description provided.

@vercel
Copy link
Contributor

vercel bot commented Oct 25, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
coding-agent-platform Ready Ready Preview Comment Oct 25, 2025 2:52pm

checkId: vercelCheck.id,
status: vercelCheck.status,
conclusion: vercelCheck.conclusion,
createdAt: vercelCheck.started_at,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The API returns started_at as createdAt for GitHub Checks, but the component uses this field to display "Deployed [time]". This shows the deployment START time instead of COMPLETION time, which is misleading.

View Details
📝 Patch Details
diff --git a/components/task-chat.tsx b/components/task-chat.tsx
index b803308..c6a8b7d 100644
--- a/components/task-chat.tsx
+++ b/components/task-chat.tsx
@@ -667,20 +667,28 @@ export function TaskChat({ taskId, task }: TaskChatProps) {
                     <div className="text-xs font-medium truncate">Vercel Preview</div>
                     <div className="text-xs text-muted-foreground">
                       {deployment.status === 'completed' && deployment.conclusion === 'success'
-                        ? deployment.createdAt
-                          ? `Deployed ${new Date(deployment.createdAt).toLocaleString()}`
+                        ? deployment.completedAt || deployment.updatedAt || deployment.createdAt
+                          ? `Deployed ${new Date(
+                              (deployment.completedAt || deployment.updatedAt || deployment.createdAt) as string,
+                            ).toLocaleString()}`
                           : 'Preview deployment'
-                        : deployment.status === 'in_progress' || deployment.status === 'queued'
-                          ? 'Deployment in progress...'
-                          : deployment.conclusion === 'failure' ||
-                              deployment.state === 'error' ||
-                              deployment.state === 'failure'
-                            ? 'Deployment failed'
-                            : deployment.conclusion === 'cancelled'
-                              ? 'Deployment cancelled'
-                              : deployment.state === 'pending'
-                                ? 'Deployment pending...'
-                                : 'Deployment status unknown'}
+                        : deployment.state === 'success'
+                          ? deployment.completedAt || deployment.updatedAt || deployment.createdAt
+                            ? `Deployed ${new Date(
+                                (deployment.completedAt || deployment.updatedAt || deployment.createdAt) as string,
+                              ).toLocaleString()}`
+                            : 'Preview deployment'
+                          : deployment.status === 'in_progress' || deployment.status === 'queued'
+                            ? 'Deployment in progress...'
+                            : deployment.conclusion === 'failure' ||
+                                deployment.state === 'error' ||
+                                deployment.state === 'failure'
+                              ? 'Deployment failed'
+                              : deployment.conclusion === 'cancelled'
+                                ? 'Deployment cancelled'
+                                : deployment.state === 'pending'
+                                  ? 'Deployment pending...'
+                                  : 'Deployment status unknown'}
                     </div>
                   </div>
                   {(deployment.status === 'in_progress' ||

Analysis

Deployment completion timestamp displayed incorrectly - shows start time instead of completion time

What fails: TaskChat component displays deployment start time instead of completion time for successful Vercel deployments.

How to reproduce:

  1. Create a pull request that triggers a Vercel Preview deployment
  2. Wait for the deployment to complete successfully
  3. View the task details and navigate to the Deployments tab
  4. Observe the "Deployed [time]" message

Result: Shows the timestamp when the deployment STARTED (from started_at), not when it COMPLETED (from completed_at)

Expected: Should show the timestamp when the deployment COMPLETED

Root cause: In commit f2e65cb, the API response was changed from createdAt: completed_at to createdAt: started_at, with a new field completedAt: completed_at added. However, the component still displayed using deployment.createdAt for all deployment sources.

Fix applied: Modified components/task-chat.tsx (line 670-671) to:

  • Use completedAt first (available for GitHub Checks API) - represents actual completion time
  • Fall back to updatedAt (available for GitHub Deployments and Commit Statuses APIs) - represents when status was updated to success
  • Fall back to createdAt as final fallback

This ensures accurate timestamps are displayed for successful deployments across all deployment sources.

@ctate ctate closed this Oct 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants