Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,13 @@ border border-border dark:border-neutral-700
</TableCell>
<TableCell>
<CCPairStatus
ccPairStatus={ccPairsIndexingStatus.cc_pair_status}
ccPairStatus={
ccPairsIndexingStatus.last_finished_status !== null
? ccPairsIndexingStatus.cc_pair_status
: ccPairsIndexingStatus.last_status == "not_started"
? ConnectorCredentialPairStatus.SCHEDULED
: ConnectorCredentialPairStatus.INITIAL_INDEXING
}
inRepeatedErrorState={ccPairsIndexingStatus.in_repeated_error_state}
lastIndexAttemptStatus={
ccPairsIndexingStatus.latest_index_attempt?.status
Expand Down Expand Up @@ -322,11 +328,7 @@ export function CCPairIndexingStatusTable({

// Filter by last status
if (filterOptions.lastStatus && filterOptions.lastStatus.length > 0) {
if (
!filterOptions.lastStatus.includes(
status.last_finished_status as any
)
) {
if (!filterOptions.lastStatus.includes(status.last_status as any)) {
Copy link
Contributor

Choose a reason for hiding this comment

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

logic: Filtering by last_status instead of last_finished_status could show incorrect states for completed operations. Consider using both fields or adding additional validation.

Copy link
Contributor

Choose a reason for hiding this comment

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

why do we need to do status.last_status as any? that feels wrong

Copy link
Contributor Author

Choose a reason for hiding this comment

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

There is no specific reason for that, now i changed the type.

return false;
}
}
Expand Down
Loading