DT-3671 - standalone activity details redesign#3255
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
| </div> | ||
| <DetailList aria-label="Retry Policy" rowCount={2}> | ||
| <DetailListColumn> | ||
| <DetailListLabel>Initial Interval</DetailListLabel> |
There was a problem hiding this comment.
⚠️ Argument of type 'number | undefined' is not assignable to parameter of type 'string | number'.
| <DetailListColumn> | ||
| <DetailListLabel>Initial Interval</DetailListLabel> | ||
| <DetailListTextValue text={fromSeconds(activity.initialInterval)} /> | ||
| <DetailListLabel>Maximum Interval</DetailListLabel> |
There was a problem hiding this comment.
⚠️ Argument of type 'number | undefined' is not assignable to parameter of type 'string | number'.
| {@const badgeType = failed ? 'danger' : 'default'} | ||
| {#if activity} | ||
| <div class="flex flex-col gap-4"> | ||
| <ActivityExecutionInputAndOutcome |
There was a problem hiding this comment.
⚠️ '$activityExecution' is possibly 'undefined'.
| {#if activity} | ||
| <div class="flex flex-col gap-4"> | ||
| <ActivityExecutionInputAndOutcome | ||
| input={$activityExecution.input} |
There was a problem hiding this comment.
⚠️ '$activityExecution' is possibly 'undefined'.
| <div class="flex flex-col gap-4"> | ||
| <ActivityExecutionInputAndOutcome | ||
| input={$activityExecution.input} | ||
| outcome={$activityExecution.outcome} |
There was a problem hiding this comment.
⚠️ '$activityExecution' is possibly 'undefined'.
| this.backoffCoefficient = | ||
| activityExecution?.info?.retryPolicy.backoffCoefficient; | ||
| this.scheduleTime = activityExecution?.info?.scheduleTime; | ||
| this.currentInterval = formatSecondsAbbreviated( |
There was a problem hiding this comment.
⚠️ Argument of type 'string | undefined' is not assignable to parameter of type 'string'.
| } | ||
|
|
||
| public intervalForAttempt(attempt: number): number { | ||
| return Math.min( |
There was a problem hiding this comment.
⚠️ Type 'string | undefined' is not assignable to type 'string'.
|
|
||
| public intervalForAttempt(attempt: number): number { | ||
| return Math.min( | ||
| this.initialInterval * Math.pow(this.backoffCoefficient, attempt - 1), |
There was a problem hiding this comment.
⚠️ Type 'string | undefined' is not assignable to type 'string'.
| }), | ||
| ...(activityFormData.heartbeatTimeout && { | ||
| heartbeatTimeout: activityFormData.heartbeatTimeout, | ||
| }), |
There was a problem hiding this comment.
⚠️ Type '{ backoffCoefficient?: number | undefined; maximumAttempts?: number | undefined; maximumInterval?: string | undefined; initialInterval?: string | undefined; }' is not assignable to type 'RetryPolicy'.
| }; | ||
|
|
||
| export const fromNumberToDuration = (duration: string): string => { | ||
| export const fromNumberToDuration = (duration: string | number): string => { |
There was a problem hiding this comment.
⚠️ Type 'undefined' is not assignable to type 'string'.
|
| public currentAttempt: number | undefined = $state(); | ||
| public scheduleTime: string | undefined = $state(); | ||
| public lastAttemptCompletedTime: string | undefined = $state(); | ||
| public nextAttemptScheduleTime: string | undefined = $state(); |
There was a problem hiding this comment.
⚠️ Type 'string | undefined' is not assignable to type 'string'.
| public upcomingAttempts = $derived( | ||
| this.running | ||
| ? this.buildUpcomingAttempts( | ||
| this.activityExecution?.info?.lastAttemptCompleteTime, |
There was a problem hiding this comment.
⚠️ Argument of type 'number | undefined' is not assignable to parameter of type 'number'.
| : [], | ||
| ); | ||
|
|
||
| public attemptsRemaining = $derived( |
There was a problem hiding this comment.
⚠️ Object is possibly 'undefined'.⚠️ Object is possibly 'undefined'.
|
|
||
| public secondsRemaining = $derived.by(() => { | ||
| if (this.maximumAttempts) { | ||
| let total = 0; |
There was a problem hiding this comment.
⚠️ 'a' is possibly 'undefined'.⚠️ 'a' is possibly 'undefined'.
|
|
||
| const startToCloseTimeoutMillis = this.startToCloseTimeoutSeconds * 1000; | ||
|
|
||
| const endTime = new SvelteDate( |
There was a problem hiding this comment.
⚠️ Object is possibly 'undefined'.
| activityExecution?.info?.lastAttemptCompleteTime; | ||
| this.nextAttemptScheduleTime = | ||
| activityExecution?.info?.nextAttemptScheduleTime; | ||
| this.closeTime = activityExecution?.info?.closeTime; |
There was a problem hiding this comment.
⚠️ Type 'string | undefined' is not assignable to type 'string'.
| activityExecution?.info.scheduleToCloseTimeout; | ||
| this.startToCloseTimeout = activityExecution?.info?.startToCloseTimeout; | ||
| this.scheduleToStartTimeout = | ||
| activityExecution?.info?.scheduleToStartTimeout; |
There was a problem hiding this comment.
⚠️ Type 'string | undefined' is not assignable to type 'string'.
| } | ||
|
|
||
| public intervalForAttempt(attempt: number): number { | ||
| return Math.min( |
There was a problem hiding this comment.
⚠️ Argument of type 'number | undefined' is not assignable to parameter of type 'number'.⚠️ Object is possibly 'undefined'.
|
|
||
| public intervalForAttempt(attempt: number): number { | ||
| return Math.min( | ||
| this.initialInterval * Math.pow(this.backoffCoefficient, attempt - 1), |
There was a problem hiding this comment.
⚠️ Argument of type 'number | undefined' is not assignable to parameter of type 'number'.
| expect(activity.running).toBe(true); | ||
| expect(activity.upcomingAttempts.length).toBe(51); // includes current attempt | ||
| expect(activity.secondsRemaining).toBe(5500); | ||
| expect(activity.nextRetrySecondsLeft).toBe('1m 40s'); |
There was a problem hiding this comment.
⚠️ 'activity.deadlineTime' is possibly 'undefined'.
Description & motivation 💭
Better UI for the standalone activity details page
Screenshots (if applicable) 📸
Design Considerations 🎨
Testing 🧪
How was this tested 👻
Steps for others to test: 🚶🏽♂️🚶🏽♀️
Checklists
Draft Checklist
Merge Checklist
Issue(s) closed
Docs
Any docs updates needed?