-
Notifications
You must be signed in to change notification settings - Fork 126
Event History Sparkle #3049
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Event History Sparkle #3049
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
@claude review this for bugs/mistakes |
|
Claude finished @Alex-Tideman's task —— View job Code Review Complete ✅I've reviewed this PR for bugs and mistakes. Found 2 TypeScript errors and several observations: 🐛 Critical Issues1. Type Error in
|
| const eventCategory = cva( | ||
| ['flex flex-1 flex-col overflow-hidden rounded-t-lg pb-2'], | ||
| { | ||
| variants: { | ||
| classification: { | ||
| Failed: 'bg-red-800', | ||
| Canceled: 'bg-orange-900/80', | ||
| TimedOut: 'bg-orange-700', | ||
| Completed: 'bg-green-700', | ||
| Terminated: 'bg-gray-300', | ||
| Scheduled: 'bg-orange-900/50', | ||
| Initiated: 'bg-orange-900/50', | ||
| Started: 'bg-orange-900/60', | ||
| Fired: 'bg-orange-900/90', | ||
| Signaled: 'bg-orange-900/50', | ||
| CancelRequested: 'bg-orange-900/70', | ||
| Unspecified: 'bg-orange-900/60', | ||
| }, | ||
| }, | ||
| }, | ||
| ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Type Error: Missing classifications in CVA variants.
The EventClassification type includes "Open", "New", and "Running" but they're not defined in the variants. This will cause a TypeScript error when these classifications are used.
Add the missing variants:
Open: 'bg-orange-900/50',
New: 'bg-orange-900/50',
Running: 'bg-orange-900/60',|
Additional Issue Found (not in this PR's changes): While running type checking, I found an error in The |
Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com>
| get finalClassification() { | ||
| return getLastEvent(this).classification; | ||
| }, | ||
| get input() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
⚠️ Property 'input' does not exist on type 'IUserMetadata | IWorkflowExecutionStartedEventAttributes | IWorkflowExecutionCompletedEventAttributes | ... 54 more ... | INexusOperationCancelRequestFailedEventAttributes'.
| get input() { | ||
| return this.initialEvent.attributes?.input; | ||
| }, | ||
| get result() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
⚠️ Property 'result' does not exist on type 'IUserMetadata | IWorkflowExecutionStartedEventAttributes | IWorkflowExecutionCompletedEventAttributes | ... 54 more ... | INexusOperationCancelRequestFailedEventAttributes'.
|
| content={link.workflowEvent.namespace} | ||
| > | ||
| <Link {href} class="whitespace-pre-line" | ||
| <Link {href} class="whitespace-pre-line !text-white" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
⚠️ 'link.workflowEvent' is possibly 'null' or 'undefined'.⚠️ Type 'string | null | undefined' is not assignable to type 'string'.
| $effect(() => { | ||
| if (group?.pendingActivity) { | ||
| if (group.pendingActivity.paused) { | ||
| status = translate('workflows.paused'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
⚠️ 'group.pendingActivity.attempt' is possibly 'null' or 'undefined'.
| class={groupCategory({ | ||
| category: group ? group?.category : event?.category, | ||
| classification: group | ||
| ? group.finalClassification || group.classification |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
⚠️ 'event' is possibly 'undefined'.
| $: $eventCategoryFilter = $page.url?.searchParams?.get('category') | ||
| ? ($page.url?.searchParams | ||
| $: $eventCategoryFilter = page.url?.searchParams?.get('category') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
⚠️ Object is possibly 'null'.
| ...(compact ? compactEventTypeOptions : allEventTypeOptions).map((o) => ({ | ||
| ...o, | ||
| label: translate(o.label), | ||
| icon: CategoryIcon[o.value], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
⚠️ Argument of type 'I18nKey | undefined' is not assignable to parameter of type '"nexus.link" | "nexus.nexus" | "nexus.target" | "nexus.endpoint" | "nexus.nexus-endpoint" | "nexus.endpoints" | "nexus.all-endpoints" | "nexus.my-endpoints" | "nexus.back-to-endpoints" | ... 974 more ... | "workflows.children"'.
| {:else if relationshipView} | ||
| <WorkflowRelationships /> | ||
| {:else if workersView} | ||
| <WorkflowWorkers |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
⚠️ 'workflow' is possibly 'null'.⚠️ Type 'string | undefined' is not assignable to type 'string'.
| }); | ||
| const workflow = $derived($workflowRun.workflow); | ||
| const { groups, history } = $derived( | ||
| workflowHistoryInformation( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
⚠️ Argument of type 'WorkflowExecution | null' is not assignable to parameter of type 'WorkflowExecution'.
| return parseInt(a.activityId) - parseInt(b.activityId); | ||
| }) || [], | ||
| const { groups } = $derived( | ||
| workflowHistoryInformation( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
⚠️ Argument of type 'WorkflowExecution | null' is not assignable to parameter of type 'WorkflowExecution'.
| const workflow = $derived($workflowRun.workflow); | ||
| const { groups } = $derived( | ||
| workflowHistoryInformation( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
⚠️ Argument of type 'WorkflowExecution | null' is not assignable to parameter of type 'WorkflowExecution'.
| ), | ||
| ); | ||
| </script> | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
⚠️ Type 'WorkflowExecution | null' is not assignable to type 'WorkflowExecution'.
| </div> | ||
| {/snippet} | ||
|
|
||
| {#snippet eventNamespaceLink(link: ELink)} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
⚠️ 'link.workflowEvent' is possibly 'null' or 'undefined'.⚠️ Type 'string | null | undefined' is not assignable to type 'string'.
| content={link.workflowEvent.namespace} | ||
| > | ||
| <Link {href} class="whitespace-pre-line" | ||
| <Link {href} class="whitespace-pre-line !text-white" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
⚠️ 'link.workflowEvent' is possibly 'null' or 'undefined'.
| </div> | ||
| {/if} | ||
| {/snippet} | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
⚠️ Parameter 'key' implicitly has an 'any' type.⚠️ Parameter 'value' implicitly has an 'any' type.
| </Copyable> | ||
| </div> | ||
| {/snippet} | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
⚠️ Parameter 'key' implicitly has an 'any' type.⚠️ Parameter 'value' implicitly has an 'any' type.
Description & motivation 💭
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?