Skip to content

Commit e08dedc

Browse files
address copilot comments
Signed-off-by: Adhitya Mamallan <[email protected]>
1 parent 7d80bde commit e08dedc

File tree

3 files changed

+15
-5
lines changed

3 files changed

+15
-5
lines changed

src/views/workflow-history-v2/config/workflow-history-details-row-parsers.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ const workflowHistoryDetailsRowParsersConfig: Array<DetailsRowItemParser> = [
3333
icon: MdHourglassBottom,
3434
},
3535
{
36-
name: '"attempt" greater than 1, as "retries"',
36+
name: '"attempt" greater than 0, as "retries"',
3737
matcher: (name) => name === 'attempt',
3838
hide: (_, value) => typeof value === 'number' && value <= 0,
3939
icon: MdReplay,

src/views/workflow-history-v2/workflow-history-details-row/workflow-history-details-row.tsx

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,22 @@ export default function WorkflowHistoryDetailsRow({
1818
return getParsedDetailsRowItems(detailsEntries);
1919
}, [detailsEntries]);
2020

21+
const negativePathsSet = useMemo(
22+
() =>
23+
new Set(
24+
detailsEntries
25+
.filter((entry) => entry.isNegative)
26+
.map((entry) => entry.path)
27+
),
28+
[detailsEntries]
29+
);
30+
2131
if (rowItems.length === 0) return <div />;
2232

2333
return (
2434
<styled.DetailsRowContainer>
2535
{rowItems.map((item) => {
26-
const isNegative = detailsEntries.some(
27-
(detail) => detail.path === item.path && detail.isNegative
28-
);
36+
const isNegative = negativePathsSet.has(item.path);
2937

3038
return (
3139
<StatefulTooltip

src/views/workflow-history-v2/workflow-history-event-group/workflow-history-event-group.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,9 @@ export default function WorkflowHistoryEventGroup({
7575

7676
const groupSummaryDetails = useMemo(
7777
() =>
78-
summaryDetailsEntries.flatMap(([_, { eventDetails }]) => eventDetails),
78+
summaryDetailsEntries.flatMap(
79+
([_eventId, { eventDetails }]) => eventDetails
80+
),
7981
[summaryDetailsEntries]
8082
);
8183

0 commit comments

Comments
 (0)