From 792172c88f91e6a3bcdbed48e73532cc5c52f955 Mon Sep 17 00:00:00 2001 From: binh-dam-ibigroup Date: Fri, 2 Oct 2026 17:21:25 -0400 Subject: [PATCH 01/22] feat(FeedSourceTableRow): Display future feed versions beneath active ones. --- lib/manager/components/FeedSourceTableRow.js | 164 +++++++++++++------ 1 file changed, 116 insertions(+), 48 deletions(-) diff --git a/lib/manager/components/FeedSourceTableRow.js b/lib/manager/components/FeedSourceTableRow.js index 8dc6d24ba..0b38fa0c2 100644 --- a/lib/manager/components/FeedSourceTableRow.js +++ b/lib/manager/components/FeedSourceTableRow.js @@ -187,67 +187,135 @@ export default class FeedSourceTableRow extends PureComponent { ) // data for latest validation columns - const currentVersionData = this.getVersionDisplayData(feedSource.latestValidation) + const latestVersionData = this.getVersionDisplayData(feedSource.latestValidation) const latestVersionId = feedSource.latestValidation && feedSource.latestValidation.feedVersionId const comparisonVersionId = comparisonValidationSummary && comparisonValidationSummary.feedVersionId + const activeVersionData = this.getVersionDisplayData(feedSource.latestActiveFeedValidation || feedSource.latestValidation) + const defaultVersion = feedSource.latestActiveVersion || feedSource.latestVersion + const pendingVersion = feedSource.latestVersion + if (latestVersionId && latestVersionId === comparisonVersionId) { - currentVersionData.status = comparisonColumn === 'DEPLOYED' + (latestVersionData.status) = comparisonColumn === 'DEPLOYED' ? 'same-as-deployed' : 'same-as-published' } + const hasPendingVersion = feedSource.latestActiveVersion && feedSource.latestActiveVersion.id !== latestVersionId + const rowsRequired = hasPendingVersion ? 2 : 1 + + // Render the active or expired version first. + // If there is a future version, show it underneath. return ( - - - - - {comparisonColumn && - - {comparisonData - ? ( - - ) - : - {comparisonColumn === 'PUBLISHED' - ? this.messages('status.feedNotPublished') - : this.messages('status.feedNotInDeployment')} - - } + <> + + + + + {comparisonColumn && + + {comparisonData + ? ( + + ) + : + {comparisonColumn === 'PUBLISHED' + ? this.messages('status.feedNotPublished') + : this.messages('status.feedNotInDeployment')} + + } + + } + + - } - - - - - {currentVersionData.startDate} - {currentVersionData.startDate && ' -'} - {currentVersionData.endDate &&
} - {currentVersionData.endDate} - - {currentVersionData.errorCount} - {isExtensionEnabled('mtc') && - + {activeVersionData.startDate} + {activeVersionData.startDate && ' -'} + {activeVersionData.endDate &&
} + {activeVersionData.endDate} + {activeVersionData.errorCount} + {isExtensionEnabled('mtc') && + + + } + + + + + {hasPendingVersion && + + {comparisonColumn && + + {comparisonData + ? ( + + ) + : + {comparisonColumn === 'PUBLISHED' + ? this.messages('status.feedNotPublished') + : this.messages('status.feedNotInDeployment')} + + } + + } + + + + + {latestVersionData.startDate} + {latestVersionData.startDate && ' -'} + {latestVersionData.endDate &&
} + {latestVersionData.endDate} + + {latestVersionData.errorCount} + {isExtensionEnabled('mtc') && + + + + } + } - - - - + ) } } From f027cd6635dc2ce3904ddd794c78e9e558d7aeaa Mon Sep 17 00:00:00 2001 From: binh-dam-ibigroup Date: Fri, 2 Oct 2026 17:21:58 -0400 Subject: [PATCH 02/22] improvement(PublushStatus): Don't render if no version. --- lib/manager/components/PublishStatus.js | 7 ------- 1 file changed, 7 deletions(-) diff --git a/lib/manager/components/PublishStatus.js b/lib/manager/components/PublishStatus.js index 209221fca..da317c525 100644 --- a/lib/manager/components/PublishStatus.js +++ b/lib/manager/components/PublishStatus.js @@ -91,13 +91,6 @@ export class PublishStatus extends PureComponent {

) - } else if (!publishState) { - return ( - - - {this.messages('no-version')} - - ) } else if (publishState === 'PUBLISH_BLOCKED') { return ( From d53822a9f139cb325637f6029175b184e189203c Mon Sep 17 00:00:00 2001 From: binh-dam-ibigroup Date: Fri, 2 Oct 2026 17:37:35 -0400 Subject: [PATCH 03/22] refactor(types): Add types --- lib/types/index.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/types/index.js b/lib/types/index.js index 8d78f78f3..f3957f3f4 100644 --- a/lib/types/index.js +++ b/lib/types/index.js @@ -406,8 +406,11 @@ export type FeedSourceSummary = { isPublic: boolean, labelIds: Array, lastUpdated?: number, + latestActiveFeedValidation?: ValidationSummary, + latestActiveVersion?: FeedVersionSummary, latestSentToExternalPublisher?: ?number, latestValidation?: ValidationSummary, + latestVersion?: FeedVersionSummary, name: string, projectId: string, publishState?: ?string @@ -544,6 +547,7 @@ export type FeedVersionSummary = { fileSize: number, id: string, lastUpdated: number, + latestSentToExternalPublisher?: ?number, name: string, namespace: string, originNamespace: ?string, From bfd84aad63c771034f45302c0f726cff99e04aca Mon Sep 17 00:00:00 2001 From: binh-dam-ibigroup Date: Fri, 2 Oct 2026 18:30:57 -0400 Subject: [PATCH 04/22] refactor(FeedSourceTableRow): Remove duplicate comparison content --- lib/manager/components/FeedSourceTableRow.js | 27 +++----------------- 1 file changed, 3 insertions(+), 24 deletions(-) diff --git a/lib/manager/components/FeedSourceTableRow.js b/lib/manager/components/FeedSourceTableRow.js index 0b38fa0c2..c7618fdc6 100644 --- a/lib/manager/components/FeedSourceTableRow.js +++ b/lib/manager/components/FeedSourceTableRow.js @@ -208,12 +208,12 @@ export default class FeedSourceTableRow extends PureComponent { // If there is a future version, show it underneath. return ( <> - + {comparisonColumn && - + {comparisonData ? ( { {hasPendingVersion && - - {comparisonColumn && - - {comparisonData - ? ( - - ) - : - {comparisonColumn === 'PUBLISHED' - ? this.messages('status.feedNotPublished') - : this.messages('status.feedNotInDeployment')} - - } - - } + Date: Mon, 5 Oct 2026 13:44:31 -0400 Subject: [PATCH 05/22] fix(FeedSourceTableRow): Show 'Feed not published' if comparisonValidationSummary has no start/end date --- lib/manager/components/FeedSourceTableRow.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/manager/components/FeedSourceTableRow.js b/lib/manager/components/FeedSourceTableRow.js index c7618fdc6..b62eb59ef 100644 --- a/lib/manager/components/FeedSourceTableRow.js +++ b/lib/manager/components/FeedSourceTableRow.js @@ -190,6 +190,7 @@ export default class FeedSourceTableRow extends PureComponent { const latestVersionData = this.getVersionDisplayData(feedSource.latestValidation) const latestVersionId = feedSource.latestValidation && feedSource.latestValidation.feedVersionId const comparisonVersionId = comparisonValidationSummary && comparisonValidationSummary.feedVersionId + const hasComparisonDates = comparisonValidationSummary && comparisonValidationSummary.startDate && comparisonValidationSummary.endDate const activeVersionData = this.getVersionDisplayData(feedSource.latestActiveFeedValidation || feedSource.latestValidation) const defaultVersion = feedSource.latestActiveVersion || feedSource.latestVersion @@ -214,7 +215,7 @@ export default class FeedSourceTableRow extends PureComponent { {comparisonColumn && - {comparisonData + {comparisonData && hasComparisonDates ? ( Date: Mon, 5 Oct 2026 14:42:03 -0400 Subject: [PATCH 06/22] refactor(FeedSourceTableRow): Fix comment --- lib/manager/components/FeedSourceTableRow.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/manager/components/FeedSourceTableRow.js b/lib/manager/components/FeedSourceTableRow.js index b62eb59ef..27710cb1c 100644 --- a/lib/manager/components/FeedSourceTableRow.js +++ b/lib/manager/components/FeedSourceTableRow.js @@ -126,8 +126,7 @@ export default class FeedSourceTableRow extends PureComponent { } /** - * This method generates the variables and used to live in the render method, - * but was extracted to appease the eslint complexity rule + * Generate the variables for comparing published/deployed version vs. latest version. */ generateFeedSourceLabelRenderVars (feedSource: Feed, comparisonValidationSummary: ?ValidationSummary) { // data for feed source info column From 859eb52f31c4a3e053deef2ba956ccce6e251c45 Mon Sep 17 00:00:00 2001 From: binh-dam-ibigroup Date: Mon, 5 Oct 2026 15:10:38 -0400 Subject: [PATCH 07/22] refactor(FeedSourceTableRow): Extract common render code --- lib/manager/components/FeedSourceTableRow.js | 97 ++++++++++---------- 1 file changed, 46 insertions(+), 51 deletions(-) diff --git a/lib/manager/components/FeedSourceTableRow.js b/lib/manager/components/FeedSourceTableRow.js index 27710cb1c..30ade09d4 100644 --- a/lib/manager/components/FeedSourceTableRow.js +++ b/lib/manager/components/FeedSourceTableRow.js @@ -165,6 +165,46 @@ export default class FeedSourceTableRow extends PureComponent { } } + renderStatusCell (versionData, lastVersionUpdate) { + return ( + + + + ) + } + + renderDatesCell (versionData) { + return ( + + {versionData.startDate} + {versionData.startDate && ' -'} + {versionData.endDate &&
} + {versionData.endDate} + + ) + } + + renderPublishedCell (version) { + return ( + + + + + ) + } + // eslint-disable-next-line complexity render () { const { @@ -233,65 +273,20 @@ export default class FeedSourceTableRow extends PureComponent { } } - - - - - {activeVersionData.startDate} - {activeVersionData.startDate && ' -'} - {activeVersionData.endDate &&
} - {activeVersionData.endDate} - + {this.renderStatusCell(activeVersionData, lastVersionUpdate)} + {this.renderDatesCell(activeVersionData)} {activeVersionData.errorCount} - {isExtensionEnabled('mtc') && - - - } + {isExtensionEnabled('mtc') && this.renderPublishedCell(defaultVersion)} {hasPendingVersion && - - - - - {latestVersionData.startDate} - {latestVersionData.startDate && ' -'} - {latestVersionData.endDate &&
} - {latestVersionData.endDate} - + {this.renderStatusCell(latestVersionData, lastVersionUpdate)} + {this.renderDatesCell(latestVersionData)} {latestVersionData.errorCount} - {isExtensionEnabled('mtc') && - - - - } + {isExtensionEnabled('mtc') && this.renderPublishedCell(pendingVersion)} } From 8ce5dfe3abc13d4d82e8a9349e25db87cf8ed58f Mon Sep 17 00:00:00 2001 From: binh-dam-ibigroup Date: Mon, 5 Oct 2026 15:52:38 -0400 Subject: [PATCH 08/22] refactor(FeedSourceTable): Combine detail cell rendering --- lib/manager/components/FeedSourceTableRow.js | 84 +++++++++----------- 1 file changed, 39 insertions(+), 45 deletions(-) diff --git a/lib/manager/components/FeedSourceTableRow.js b/lib/manager/components/FeedSourceTableRow.js index 30ade09d4..0e33aa06d 100644 --- a/lib/manager/components/FeedSourceTableRow.js +++ b/lib/manager/components/FeedSourceTableRow.js @@ -24,7 +24,7 @@ import WatchButton from '../../common/containers/WatchButton' import FeedLabel from '../../common/components/FeedLabel' import LabelAssignerModal from '../components/LabelAssignerModal' import type { Props as ContainerProps } from '../containers/FeedSourceTableRow' -import type { Feed, ValidationSummary, Project } from '../../types' +import type { Feed, FeedSourceSummary, ValidationSummary, Project } from '../../types' import type { FeedSourceTableComparisonColumns, ManagerUserState @@ -165,43 +165,26 @@ export default class FeedSourceTableRow extends PureComponent { } } - renderStatusCell (versionData, lastVersionUpdate) { + renderDetailCells (versionData, lastVersionUpdate) { return ( - - - - ) - } - - renderDatesCell (versionData) { - return ( - - {versionData.startDate} - {versionData.startDate && ' -'} - {versionData.endDate &&
} - {versionData.endDate} - - ) - } - - renderPublishedCell (version) { - return ( - - - - + <> + + + + + {versionData.startDate} + {versionData.startDate && ' -'} + {versionData.endDate &&
} + {versionData.endDate} + + {versionData.errorCount} + ) } @@ -243,6 +226,7 @@ export default class FeedSourceTableRow extends PureComponent { const hasPendingVersion = feedSource.latestActiveVersion && feedSource.latestActiveVersion.id !== latestVersionId const rowsRequired = hasPendingVersion ? 2 : 1 + const isMtcEnabled = isExtensionEnabled('mtc') // Render the active or expired version first. // If there is a future version, show it underneath. @@ -273,20 +257,16 @@ export default class FeedSourceTableRow extends PureComponent { } } - {this.renderStatusCell(activeVersionData, lastVersionUpdate)} - {this.renderDatesCell(activeVersionData)} - {activeVersionData.errorCount} - {isExtensionEnabled('mtc') && this.renderPublishedCell(defaultVersion)} + {this.renderDetailCells(activeVersionData, lastVersionUpdate)} + {isMtcEnabled && } {hasPendingVersion && - {this.renderStatusCell(latestVersionData, lastVersionUpdate)} - {this.renderDatesCell(latestVersionData)} - {latestVersionData.errorCount} - {isExtensionEnabled('mtc') && this.renderPublishedCell(pendingVersion)} + {this.renderDetailCells(latestVersionData, lastVersionUpdate)} + {isMtcEnabled && } } @@ -390,6 +370,20 @@ class FeedInfo extends PureComponent<{ feedSource: Feed, project: Project, user: } } +function PublishedCell ({ version }: { version: FeedSourceSummary }) { + return ( + + + + ) +} + class Status extends PureComponent<{ dateFormat: string, icon: string, From 4a568c0d4d794a9b95b1039d9b942b490bfde515 Mon Sep 17 00:00:00 2001 From: binh-dam-ibigroup Date: Mon, 5 Oct 2026 17:04:38 -0400 Subject: [PATCH 09/22] refactor(PublishStatus): Replace props with version prop. --- lib/manager/components/FeedSourceTableRow.js | 28 ++++++++------------ lib/manager/components/PublishStatus.js | 15 ++++++----- lib/types/index.js | 1 + 3 files changed, 20 insertions(+), 24 deletions(-) diff --git a/lib/manager/components/FeedSourceTableRow.js b/lib/manager/components/FeedSourceTableRow.js index 0e33aa06d..d7aeaeefe 100644 --- a/lib/manager/components/FeedSourceTableRow.js +++ b/lib/manager/components/FeedSourceTableRow.js @@ -24,7 +24,7 @@ import WatchButton from '../../common/containers/WatchButton' import FeedLabel from '../../common/components/FeedLabel' import LabelAssignerModal from '../components/LabelAssignerModal' import type { Props as ContainerProps } from '../containers/FeedSourceTableRow' -import type { Feed, FeedSourceSummary, ValidationSummary, Project } from '../../types' +import type { Feed, ValidationSummary, Project } from '../../types' import type { FeedSourceTableComparisonColumns, ManagerUserState @@ -258,7 +258,11 @@ export default class FeedSourceTableRow extends PureComponent { } {this.renderDetailCells(activeVersionData, lastVersionUpdate)} - {isMtcEnabled && } + {isMtcEnabled && ( + + + + )} @@ -266,7 +270,11 @@ export default class FeedSourceTableRow extends PureComponent { {hasPendingVersion && {this.renderDetailCells(latestVersionData, lastVersionUpdate)} - {isMtcEnabled && } + {isMtcEnabled && ( + + + + )} } @@ -370,20 +378,6 @@ class FeedInfo extends PureComponent<{ feedSource: Feed, project: Project, user: } } -function PublishedCell ({ version }: { version: FeedSourceSummary }) { - return ( - - - - ) -} - class Status extends PureComponent<{ dateFormat: string, icon: string, diff --git a/lib/manager/components/PublishStatus.js b/lib/manager/components/PublishStatus.js index da317c525..cedcd31c4 100644 --- a/lib/manager/components/PublishStatus.js +++ b/lib/manager/components/PublishStatus.js @@ -5,10 +5,10 @@ import moment from 'moment' import React, { PureComponent } from 'react' import { getComponentMessages } from '../../common/util/config' +import type { FeedVersionSummary } from '../../types' type Props = { - latestSentToExternalPublisher?: number, - publishState: string; + version?: FeedVersionSummary }; type PublishStatusState = { @@ -26,15 +26,16 @@ export class PublishStatus extends PureComponent { } componentDidMount () { - if (this.props.publishState === 'PUBLISHING') { + const { publishState } = this.props.version || {} + if (publishState === 'PUBLISHING') { this.updateElapsed() this._interval = setInterval(this.updateElapsed, 10000) } } componentDidUpdate (prevProps: Props) { - const wasProcessing = prevProps.publishState === 'PUBLISHING' - const isProcessingNow = this.props.publishState === 'PUBLISHING' + const wasProcessing = (prevProps.version || {}).publishState === 'PUBLISHING' + const isProcessingNow = (this.props.version || {}).publishState === 'PUBLISHING' if (!wasProcessing && isProcessingNow) { this.updateElapsed() this._interval = setInterval(this.updateElapsed, 10000) @@ -50,7 +51,7 @@ export class PublishStatus extends PureComponent { } updateElapsed = () => { - const ts = this.props.latestSentToExternalPublisher + const { sentToExternalPublisher: ts } = this.props.version || {} if (!ts) { this.setState({ elapsed: '' }) return @@ -69,7 +70,7 @@ export class PublishStatus extends PureComponent { }; render () { - const { publishState } = this.props + const { publishState = '' } = this.props.version || {} const { elapsed } = this.state if (publishState === 'PUBLISHED') { diff --git a/lib/types/index.js b/lib/types/index.js index f3957f3f4..03334e7f8 100644 --- a/lib/types/index.js +++ b/lib/types/index.js @@ -553,6 +553,7 @@ export type FeedVersionSummary = { originNamespace: ?string, publishState?: 'PUBLISHED' | 'PUBLISHING' | 'PUBLISH_BLOCKED' | 'READY_TO_PUBLISH', retrievalMethod: ?RetrievalMethod, + sentToExternalPublisher?: number, updated: number, // HACK: validationSummary is fully populated in FeedVersion. // Only startDate and endDate are available in FeedVersionSummary. From d132e81514359f9f6a4f97b729493976ab6904ea Mon Sep 17 00:00:00 2001 From: binh-dam-ibigroup Date: Mon, 5 Oct 2026 17:16:25 -0400 Subject: [PATCH 10/22] refactor(FeedSourceTableRow): Improve types --- lib/manager/components/FeedSourceTableRow.js | 11 ++++++++++- lib/types/index.js | 3 +-- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/lib/manager/components/FeedSourceTableRow.js b/lib/manager/components/FeedSourceTableRow.js index d7aeaeefe..0ac8a7dd7 100644 --- a/lib/manager/components/FeedSourceTableRow.js +++ b/lib/manager/components/FeedSourceTableRow.js @@ -45,6 +45,15 @@ type Props = ContainerProps & { user: ManagerUserState } +type VersionData = { + className: string, + endDate?: string, + errorCount: number | string, + icon: string, + startDate?: string, + status: string +} + const statusAttributeLookup = { 'active': { className: 'status-active', @@ -165,7 +174,7 @@ export default class FeedSourceTableRow extends PureComponent { } } - renderDetailCells (versionData, lastVersionUpdate) { + renderDetailCells (versionData: VersionData, lastVersionUpdate: any) { return ( <> diff --git a/lib/types/index.js b/lib/types/index.js index 03334e7f8..592e3c220 100644 --- a/lib/types/index.js +++ b/lib/types/index.js @@ -547,13 +547,12 @@ export type FeedVersionSummary = { fileSize: number, id: string, lastUpdated: number, - latestSentToExternalPublisher?: ?number, name: string, namespace: string, originNamespace: ?string, publishState?: 'PUBLISHED' | 'PUBLISHING' | 'PUBLISH_BLOCKED' | 'READY_TO_PUBLISH', retrievalMethod: ?RetrievalMethod, - sentToExternalPublisher?: number, + sentToExternalPublisher?: number | null, updated: number, // HACK: validationSummary is fully populated in FeedVersion. // Only startDate and endDate are available in FeedVersionSummary. From ff50210e2da66a328005ccbad7b2d62ab1281757 Mon Sep 17 00:00:00 2001 From: binh-dam-ibigroup Date: Tue, 6 Oct 2026 05:42:20 -0400 Subject: [PATCH 11/22] refactor(PublishStatus): Use same subtext formatting as Status. --- lib/manager/components/PublishStatus.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/manager/components/PublishStatus.js b/lib/manager/components/PublishStatus.js index cedcd31c4..4ee4ea6d2 100644 --- a/lib/manager/components/PublishStatus.js +++ b/lib/manager/components/PublishStatus.js @@ -87,7 +87,7 @@ export class PublishStatus extends PureComponent { {this.messages('publishingInProgress')}
-

+

{elapsed ? `Processing for ${elapsed}` : null}

From 0756e57d5b45ec3704d5378c35954c1cc4ceabb1 Mon Sep 17 00:00:00 2001 From: binh-dam-ibigroup Date: Tue, 6 Oct 2026 05:52:37 -0400 Subject: [PATCH 12/22] refactor(FeedSourceTableRow): Move publish status rendering inside renderDetailCells --- lib/manager/components/FeedSourceTableRow.js | 24 ++++++++------------ 1 file changed, 9 insertions(+), 15 deletions(-) diff --git a/lib/manager/components/FeedSourceTableRow.js b/lib/manager/components/FeedSourceTableRow.js index 0ac8a7dd7..e4c47c9d6 100644 --- a/lib/manager/components/FeedSourceTableRow.js +++ b/lib/manager/components/FeedSourceTableRow.js @@ -24,7 +24,7 @@ import WatchButton from '../../common/containers/WatchButton' import FeedLabel from '../../common/components/FeedLabel' import LabelAssignerModal from '../components/LabelAssignerModal' import type { Props as ContainerProps } from '../containers/FeedSourceTableRow' -import type { Feed, ValidationSummary, Project } from '../../types' +import type { Feed, FeedVersionSummary, ValidationSummary, Project } from '../../types' import type { FeedSourceTableComparisonColumns, ManagerUserState @@ -174,7 +174,7 @@ export default class FeedSourceTableRow extends PureComponent { } } - renderDetailCells (versionData: VersionData, lastVersionUpdate: any) { + renderDetailCells (versionData: VersionData, lastVersionUpdate: any, publishedVersion?: FeedVersionSummary) { return ( <> @@ -193,6 +193,11 @@ export default class FeedSourceTableRow extends PureComponent { {versionData.endDate} {versionData.errorCount} + {isExtensionEnabled('mtc') && ( + + + + )} ) } @@ -235,7 +240,6 @@ export default class FeedSourceTableRow extends PureComponent { const hasPendingVersion = feedSource.latestActiveVersion && feedSource.latestActiveVersion.id !== latestVersionId const rowsRequired = hasPendingVersion ? 2 : 1 - const isMtcEnabled = isExtensionEnabled('mtc') // Render the active or expired version first. // If there is a future version, show it underneath. @@ -266,24 +270,14 @@ export default class FeedSourceTableRow extends PureComponent { } } - {this.renderDetailCells(activeVersionData, lastVersionUpdate)} - {isMtcEnabled && ( - - - - )} + {this.renderDetailCells(activeVersionData, lastVersionUpdate, defaultVersion)} {hasPendingVersion && - {this.renderDetailCells(latestVersionData, lastVersionUpdate)} - {isMtcEnabled && ( - - - - )} + {this.renderDetailCells(latestVersionData, lastVersionUpdate, pendingVersion)} } From 06169501cec8f2fa307a02bc46125ed89a4af219 Mon Sep 17 00:00:00 2001 From: binh-dam-ibigroup Date: Tue, 6 Oct 2026 06:12:18 -0400 Subject: [PATCH 13/22] refactor(TimedStatus): Extract and reuse component --- lib/manager/components/FeedSourceTableRow.js | 27 +----------- lib/manager/components/PublishStatus.js | 45 ++++++++++---------- lib/manager/components/TimedStatus.js | 37 ++++++++++++++++ 3 files changed, 61 insertions(+), 48 deletions(-) create mode 100644 lib/manager/components/TimedStatus.js diff --git a/lib/manager/components/FeedSourceTableRow.js b/lib/manager/components/FeedSourceTableRow.js index e4c47c9d6..7b91af598 100644 --- a/lib/manager/components/FeedSourceTableRow.js +++ b/lib/manager/components/FeedSourceTableRow.js @@ -31,6 +31,7 @@ import type { } from '../../types/reducers' import { PublishStatus } from './PublishStatus' +import Status from './TimedStatus' type Props = ContainerProps & { comparisonColumn: FeedSourceTableComparisonColumns, @@ -381,32 +382,6 @@ class FeedInfo extends PureComponent<{ feedSource: Feed, project: Project, user: } } -class Status extends PureComponent<{ - dateFormat: string, - icon: string, - statusSpanClass: string, - statusText: string, - subtext: ?string, - subtextDate?: string -}> { - render () { - const {icon, dateFormat, subtext, statusSpanClass, statusText, subtextDate} = this.props - return ( -
- - - {statusText} - -
- {subtext} - {subtextDate &&
} - {subtextDate && `(${moment(subtextDate).format(dateFormat)})`} -
-
- ) - } -} - class FeedActionsDropdown extends PureComponent { messages = getComponentMessages('FeedActionsDropdown') diff --git a/lib/manager/components/PublishStatus.js b/lib/manager/components/PublishStatus.js index 4ee4ea6d2..c0d6bded8 100644 --- a/lib/manager/components/PublishStatus.js +++ b/lib/manager/components/PublishStatus.js @@ -1,5 +1,4 @@ // @flow -import Icon from '@conveyal/woonerf/components/icon' import humanizeDuration from 'humanize-duration' import moment from 'moment' import React, { PureComponent } from 'react' @@ -7,6 +6,8 @@ import React, { PureComponent } from 'react' import { getComponentMessages } from '../../common/util/config' import type { FeedVersionSummary } from '../../types' +import TimedStatus from './TimedStatus' + type Props = { version?: FeedVersionSummary }; @@ -75,36 +76,36 @@ export class PublishStatus extends PureComponent { if (publishState === 'PUBLISHED') { return ( - - - {this.messages('published')} - + ) } else if (publishState === 'PUBLISHING') { return ( - <> - - - {this.messages('publishingInProgress')} - -

- {elapsed ? `Processing for ${elapsed}` : null} -

- + ) } else if (publishState === 'PUBLISH_BLOCKED') { return ( - - - {this.messages('publishDisabled')} - + ) } else if (publishState === 'READY_TO_PUBLISH') { return ( - - - {this.messages('canPublish')} - + ) } return null diff --git a/lib/manager/components/TimedStatus.js b/lib/manager/components/TimedStatus.js new file mode 100644 index 000000000..45b78878a --- /dev/null +++ b/lib/manager/components/TimedStatus.js @@ -0,0 +1,37 @@ +// @flow + +import Icon from '@conveyal/woonerf/components/icon' +import moment from 'moment' +import React from 'react' + +type Props = { + dateFormat?: string, + icon: string, + statusSpanClass: string, + statusText: string, + subtext?: string, + subtextDate?: string +} + +export default function TimedStatus ({ + dateFormat, + icon, + statusSpanClass, + statusText, + subtext, + subtextDate +}: Props) { + return ( +
+ + + {statusText} + +
+ {subtext} + {subtextDate &&
} + {subtextDate && dateFormat && `(${moment(subtextDate).format(dateFormat)})`} +
+
+ ) +} From e1a7f4cd4008b4225c0ec2e0f05b08807d3820c6 Mon Sep 17 00:00:00 2001 From: binh-dam-ibigroup Date: Tue, 6 Oct 2026 06:33:47 -0400 Subject: [PATCH 14/22] refactor(FeedSourceTableRow): Use destructured vars --- lib/manager/components/FeedSourceTableRow.js | 21 ++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/lib/manager/components/FeedSourceTableRow.js b/lib/manager/components/FeedSourceTableRow.js index 7b91af598..bb54db073 100644 --- a/lib/manager/components/FeedSourceTableRow.js +++ b/lib/manager/components/FeedSourceTableRow.js @@ -224,14 +224,15 @@ export default class FeedSourceTableRow extends PureComponent { ) // data for latest validation columns - const latestVersionData = this.getVersionDisplayData(feedSource.latestValidation) - const latestVersionId = feedSource.latestValidation && feedSource.latestValidation.feedVersionId - const comparisonVersionId = comparisonValidationSummary && comparisonValidationSummary.feedVersionId - const hasComparisonDates = comparisonValidationSummary && comparisonValidationSummary.startDate && comparisonValidationSummary.endDate + const { latestActiveFeedValidation, latestActiveVersion, latestValidation, latestVersion } = feedSource + const { feedVersionId: latestVersionId } = latestValidation || {} - const activeVersionData = this.getVersionDisplayData(feedSource.latestActiveFeedValidation || feedSource.latestValidation) - const defaultVersion = feedSource.latestActiveVersion || feedSource.latestVersion - const pendingVersion = feedSource.latestVersion + const latestVersionData = this.getVersionDisplayData(latestValidation) + const { endDate, feedVersionId: comparisonVersionId, startDate } = comparisonValidationSummary || {} + const hasComparisonDates = startDate && endDate + + const activeVersionData = this.getVersionDisplayData(latestActiveFeedValidation || latestValidation) + const defaultVersion = latestActiveVersion || latestVersion if (latestVersionId && latestVersionId === comparisonVersionId) { (latestVersionData.status) = comparisonColumn === 'DEPLOYED' @@ -239,14 +240,14 @@ export default class FeedSourceTableRow extends PureComponent { : 'same-as-published' } - const hasPendingVersion = feedSource.latestActiveVersion && feedSource.latestActiveVersion.id !== latestVersionId + const hasPendingVersion = latestActiveVersion && latestActiveVersion.id !== latestVersionId const rowsRequired = hasPendingVersion ? 2 : 1 // Render the active or expired version first. // If there is a future version, show it underneath. return ( <> - + @@ -278,7 +279,7 @@ export default class FeedSourceTableRow extends PureComponent { {hasPendingVersion && - {this.renderDetailCells(latestVersionData, lastVersionUpdate, pendingVersion)} + {this.renderDetailCells(latestVersionData, lastVersionUpdate, latestVersion)} } From 39a6e52819341a721eb3db8fe7dfbd32690aef84 Mon Sep 17 00:00:00 2001 From: binh-dam-ibigroup Date: Tue, 6 Oct 2026 06:38:27 -0400 Subject: [PATCH 15/22] refactor(FeedStatus): rename component --- lib/manager/components/FeedSourceTableRow.js | 2 +- .../components/{TimedStatus.js => FeedStatus.js} | 2 +- lib/manager/components/PublishStatus.js | 10 +++++----- 3 files changed, 7 insertions(+), 7 deletions(-) rename lib/manager/components/{TimedStatus.js => FeedStatus.js} (94%) diff --git a/lib/manager/components/FeedSourceTableRow.js b/lib/manager/components/FeedSourceTableRow.js index bb54db073..a0024c35b 100644 --- a/lib/manager/components/FeedSourceTableRow.js +++ b/lib/manager/components/FeedSourceTableRow.js @@ -31,7 +31,7 @@ import type { } from '../../types/reducers' import { PublishStatus } from './PublishStatus' -import Status from './TimedStatus' +import Status from './FeedStatus' type Props = ContainerProps & { comparisonColumn: FeedSourceTableComparisonColumns, diff --git a/lib/manager/components/TimedStatus.js b/lib/manager/components/FeedStatus.js similarity index 94% rename from lib/manager/components/TimedStatus.js rename to lib/manager/components/FeedStatus.js index 45b78878a..c65e19f8f 100644 --- a/lib/manager/components/TimedStatus.js +++ b/lib/manager/components/FeedStatus.js @@ -13,7 +13,7 @@ type Props = { subtextDate?: string } -export default function TimedStatus ({ +export default function FeedStatus ({ dateFormat, icon, statusSpanClass, diff --git a/lib/manager/components/PublishStatus.js b/lib/manager/components/PublishStatus.js index c0d6bded8..faedf66bc 100644 --- a/lib/manager/components/PublishStatus.js +++ b/lib/manager/components/PublishStatus.js @@ -6,7 +6,7 @@ import React, { PureComponent } from 'react' import { getComponentMessages } from '../../common/util/config' import type { FeedVersionSummary } from '../../types' -import TimedStatus from './TimedStatus' +import FeedStatus from './FeedStatus' type Props = { version?: FeedVersionSummary @@ -76,7 +76,7 @@ export class PublishStatus extends PureComponent { if (publishState === 'PUBLISHED') { return ( - { ) } else if (publishState === 'PUBLISHING') { return ( - { ) } else if (publishState === 'PUBLISH_BLOCKED') { return ( - { ) } else if (publishState === 'READY_TO_PUBLISH') { return ( - Date: Tue, 6 Oct 2026 09:48:21 -0400 Subject: [PATCH 16/22] fix(FeedSourceTableRow): Update active vers render status. --- lib/manager/components/FeedSourceTableRow.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/manager/components/FeedSourceTableRow.js b/lib/manager/components/FeedSourceTableRow.js index a0024c35b..ea27af08e 100644 --- a/lib/manager/components/FeedSourceTableRow.js +++ b/lib/manager/components/FeedSourceTableRow.js @@ -235,7 +235,7 @@ export default class FeedSourceTableRow extends PureComponent { const defaultVersion = latestActiveVersion || latestVersion if (latestVersionId && latestVersionId === comparisonVersionId) { - (latestVersionData.status) = comparisonColumn === 'DEPLOYED' + activeVersionData.status = latestVersionData.status = comparisonColumn === 'DEPLOYED' ? 'same-as-deployed' : 'same-as-published' } From f90dd8a090656f699b6177fb766601756ebdf38d Mon Sep 17 00:00:00 2001 From: binh-dam-ibigroup Date: Tue, 6 Oct 2026 09:48:39 -0400 Subject: [PATCH 17/22] test(FeedSourceTable): Update snapshot --- .../__snapshots__/FeedSourceTable.js.snap | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/lib/manager/containers/__tests__/__snapshots__/FeedSourceTable.js.snap b/lib/manager/containers/__tests__/__snapshots__/FeedSourceTable.js.snap index bb1359560..41992fbf3 100644 --- a/lib/manager/containers/__tests__/__snapshots__/FeedSourceTable.js.snap +++ b/lib/manager/containers/__tests__/__snapshots__/FeedSourceTable.js.snap @@ -3516,10 +3516,10 @@ exports[`lib > manager > FeedSourceTable should render with a project with feeds > manager > FeedSourceTable should render with a project with feeds - manager > FeedSourceTable should render with a project with feeds (Aug 1, 2019) - + - manager > FeedSourceTable should render with a project with feeds Last updated 5 months ago - + manager > FeedSourceTable should render with a project with feeds > 78 - + Date: Tue, 6 Oct 2026 11:06:54 -0400 Subject: [PATCH 18/22] refactor(FeedSourceTableRow): Simplify vars --- lib/manager/components/FeedSourceTableRow.js | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/lib/manager/components/FeedSourceTableRow.js b/lib/manager/components/FeedSourceTableRow.js index ea27af08e..9ce78e43b 100644 --- a/lib/manager/components/FeedSourceTableRow.js +++ b/lib/manager/components/FeedSourceTableRow.js @@ -226,21 +226,23 @@ export default class FeedSourceTableRow extends PureComponent { // data for latest validation columns const { latestActiveFeedValidation, latestActiveVersion, latestValidation, latestVersion } = feedSource const { feedVersionId: latestVersionId } = latestValidation || {} + const defaultVersion = latestActiveVersion || latestVersion + const defaultValidation = latestActiveFeedValidation || latestValidation + const { feedVersionId: activeVersionId } = defaultValidation || {} const latestVersionData = this.getVersionDisplayData(latestValidation) const { endDate, feedVersionId: comparisonVersionId, startDate } = comparisonValidationSummary || {} const hasComparisonDates = startDate && endDate - const activeVersionData = this.getVersionDisplayData(latestActiveFeedValidation || latestValidation) - const defaultVersion = latestActiveVersion || latestVersion + const activeVersionData = this.getVersionDisplayData(defaultValidation) - if (latestVersionId && latestVersionId === comparisonVersionId) { - activeVersionData.status = latestVersionData.status = comparisonColumn === 'DEPLOYED' + if (activeVersionId && activeVersionId === comparisonVersionId) { + activeVersionData.status = comparisonColumn === 'DEPLOYED' ? 'same-as-deployed' : 'same-as-published' } - const hasPendingVersion = latestActiveVersion && latestActiveVersion.id !== latestVersionId + const hasPendingVersion = activeVersionId !== latestVersionId const rowsRequired = hasPendingVersion ? 2 : 1 // Render the active or expired version first. From 3c85fd1c8cda21da3644e0b058f0cbdbbd378149 Mon Sep 17 00:00:00 2001 From: binh-dam-ibigroup Date: Tue, 6 Oct 2026 15:50:10 -0400 Subject: [PATCH 19/22] fix(FeedSourceTableRow): Display version last updated. Update tests. --- __tests__/test-utils/mock-data/manager.js | 4 + lib/manager/components/FeedSourceTableRow.js | 21 +++--- .../__snapshots__/DeploymentsPanel.js.snap | 36 +++++++++ .../__snapshots__/FeedSourceTable.js.snap | 75 +++++++++++++++++++ 4 files changed, 127 insertions(+), 9 deletions(-) diff --git a/__tests__/test-utils/mock-data/manager.js b/__tests__/test-utils/mock-data/manager.js index ac4fb3129..9f2d5c86e 100644 --- a/__tests__/test-utils/mock-data/manager.js +++ b/__tests__/test-utils/mock-data/manager.js @@ -153,6 +153,10 @@ export const mockFeedWithVersion = { tripCount: 415 }, latestVersionId: 'mock-feed-version-id', + // Include version as sometimes, this object is used as a FeedSourceSummary too. + latestVersion: { + lastUpdated: 1543389038810 + }, labelIds: [], name: 'test feed with a version', noteCount: 0, diff --git a/lib/manager/components/FeedSourceTableRow.js b/lib/manager/components/FeedSourceTableRow.js index 9ce78e43b..b578bb7e8 100644 --- a/lib/manager/components/FeedSourceTableRow.js +++ b/lib/manager/components/FeedSourceTableRow.js @@ -104,6 +104,13 @@ export default class FeedSourceTableRow extends PureComponent { messages = getComponentMessages('FeedSourceTableRow') dateFormat = this.messages('dateFormat') + getLastUpdateRelative (lastUpdated?: any) { + const lastVersionUpdate = !!lastUpdated && relativeDuration(lastUpdated) + return lastVersionUpdate + ? this.messages('lastUpdated').replace('%lastVersionUpdate%', lastVersionUpdate) + : '' + } + /** * Get some UI data from a ValidationSummary */ @@ -140,11 +147,7 @@ export default class FeedSourceTableRow extends PureComponent { */ generateFeedSourceLabelRenderVars (feedSource: Feed, comparisonValidationSummary: ?ValidationSummary) { // data for feed source info column - let lastVersionUpdate = !!feedSource.lastUpdated && - relativeDuration(feedSource.lastUpdated) - lastVersionUpdate = lastVersionUpdate - ? this.messages('lastUpdated').replace('%lastVersionUpdate%', lastVersionUpdate) - : '' + const lastVersionUpdate = this.getLastUpdateRelative(feedSource.lastUpdated) // data for comparison column const comparisonData = comparisonValidationSummary && @@ -175,7 +178,8 @@ export default class FeedSourceTableRow extends PureComponent { } } - renderDetailCells (versionData: VersionData, lastVersionUpdate: any, publishedVersion?: FeedVersionSummary) { + renderDetailCells (versionData: VersionData, publishedVersion?: FeedVersionSummary) { + const lastVersionUpdate = this.getLastUpdateRelative(publishedVersion && publishedVersion.lastUpdated) return ( <> @@ -214,7 +218,6 @@ export default class FeedSourceTableRow extends PureComponent { } = this.props const { - lastVersionUpdate, comparisonSubtext, comparisonData, comparisonSubtextDate @@ -274,14 +277,14 @@ export default class FeedSourceTableRow extends PureComponent { } } - {this.renderDetailCells(activeVersionData, lastVersionUpdate, defaultVersion)} + {this.renderDetailCells(activeVersionData, defaultVersion)} {hasPendingVersion && - {this.renderDetailCells(latestVersionData, lastVersionUpdate, latestVersion)} + {this.renderDetailCells(latestVersionData, latestVersion)} } diff --git a/lib/manager/containers/__tests__/__snapshots__/DeploymentsPanel.js.snap b/lib/manager/containers/__tests__/__snapshots__/DeploymentsPanel.js.snap index 662cd1976..13c8e8203 100644 --- a/lib/manager/containers/__tests__/__snapshots__/DeploymentsPanel.js.snap +++ b/lib/manager/containers/__tests__/__snapshots__/DeploymentsPanel.js.snap @@ -74,6 +74,9 @@ exports[`lib > manager > DeploymentsPanel should render with the list of deploym "stopTimesCount": 11170, "tripCount": 415, }, + "latestVersion": Object { + "lastUpdated": 1543389038810, + }, "latestVersionId": "mock-feed-version-id", "name": "test feed with a version", "noteCount": 0, @@ -212,6 +215,9 @@ exports[`lib > manager > DeploymentsPanel should render with the list of deploym "stopTimesCount": 11170, "tripCount": 415, }, + "latestVersion": Object { + "lastUpdated": 1543389038810, + }, "latestVersionId": "mock-feed-version-id", "name": "test feed with a version", "noteCount": 0, @@ -314,6 +320,9 @@ exports[`lib > manager > DeploymentsPanel should render with the list of deploym "stopTimesCount": 11170, "tripCount": 415, }, + "latestVersion": Object { + "lastUpdated": 1543389038810, + }, "latestVersionId": "mock-feed-version-id", "name": "test feed with a version", "noteCount": 0, @@ -452,6 +461,9 @@ exports[`lib > manager > DeploymentsPanel should render with the list of deploym "stopTimesCount": 11170, "tripCount": 415, }, + "latestVersion": Object { + "lastUpdated": 1543389038810, + }, "latestVersionId": "mock-feed-version-id", "name": "test feed with a version", "noteCount": 0, @@ -611,6 +623,9 @@ exports[`lib > manager > DeploymentsPanel should render with the list of deploym "stopTimesCount": 11170, "tripCount": 415, }, + "latestVersion": Object { + "lastUpdated": 1543389038810, + }, "latestVersionId": "mock-feed-version-id", "name": "test feed with a version", "noteCount": 0, @@ -777,6 +792,9 @@ exports[`lib > manager > DeploymentsPanel should render with the list of deploym "stopTimesCount": 11170, "tripCount": 415, }, + "latestVersion": Object { + "lastUpdated": 1543389038810, + }, "latestVersionId": "mock-feed-version-id", "name": "test feed with a version", "noteCount": 0, @@ -915,6 +933,9 @@ exports[`lib > manager > DeploymentsPanel should render with the list of deploym "stopTimesCount": 11170, "tripCount": 415, }, + "latestVersion": Object { + "lastUpdated": 1543389038810, + }, "latestVersionId": "mock-feed-version-id", "name": "test feed with a version", "noteCount": 0, @@ -1133,6 +1154,9 @@ exports[`lib > manager > DeploymentsPanel should render with the list of deploym "stopTimesCount": 11170, "tripCount": 415, }, + "latestVersion": Object { + "lastUpdated": 1543389038810, + }, "latestVersionId": "mock-feed-version-id", "name": "test feed with a version", "noteCount": 0, @@ -1263,6 +1287,9 @@ exports[`lib > manager > DeploymentsPanel should render with the list of deploym "stopTimesCount": 11170, "tripCount": 415, }, + "latestVersion": Object { + "lastUpdated": 1543389038810, + }, "latestVersionId": "mock-feed-version-id", "name": "test feed with a version", "noteCount": 0, @@ -1401,6 +1428,9 @@ exports[`lib > manager > DeploymentsPanel should render with the list of deploym "stopTimesCount": 11170, "tripCount": 415, }, + "latestVersion": Object { + "lastUpdated": 1543389038810, + }, "latestVersionId": "mock-feed-version-id", "name": "test feed with a version", "noteCount": 0, @@ -1676,6 +1706,9 @@ exports[`lib > manager > DeploymentsPanel should render with the list of deploym "stopTimesCount": 11170, "tripCount": 415, }, + "latestVersion": Object { + "lastUpdated": 1543389038810, + }, "latestVersionId": "mock-feed-version-id", "name": "test feed with a version", "noteCount": 0, @@ -1814,6 +1847,9 @@ exports[`lib > manager > DeploymentsPanel should render with the list of deploym "stopTimesCount": 11170, "tripCount": 415, }, + "latestVersion": Object { + "lastUpdated": 1543389038810, + }, "latestVersionId": "mock-feed-version-id", "name": "test feed with a version", "noteCount": 0, diff --git a/lib/manager/containers/__tests__/__snapshots__/FeedSourceTable.js.snap b/lib/manager/containers/__tests__/__snapshots__/FeedSourceTable.js.snap index 41992fbf3..87414e452 100644 --- a/lib/manager/containers/__tests__/__snapshots__/FeedSourceTable.js.snap +++ b/lib/manager/containers/__tests__/__snapshots__/FeedSourceTable.js.snap @@ -73,6 +73,9 @@ exports[`lib > manager > FeedSourceTable should render with a project with feeds "stopTimesCount": 11170, "tripCount": 415, }, + "latestVersion": Object { + "lastUpdated": 1543389038810, + }, "latestVersionId": "mock-feed-version-id", "name": "test feed with a version", "noteCount": 0, @@ -175,6 +178,9 @@ exports[`lib > manager > FeedSourceTable should render with a project with feeds "stopTimesCount": 11170, "tripCount": 415, }, + "latestVersion": Object { + "lastUpdated": 1543389038810, + }, "latestVersionId": "mock-feed-version-id", "name": "test feed with a version", "noteCount": 0, @@ -248,6 +254,9 @@ exports[`lib > manager > FeedSourceTable should render with a project with feeds "stopTimesCount": 11170, "tripCount": 415, }, + "latestVersion": Object { + "lastUpdated": 1543389038810, + }, "latestVersionId": "mock-feed-version-id", "name": "test feed with a version", "noteCount": 0, @@ -296,6 +305,9 @@ exports[`lib > manager > FeedSourceTable should render with a project with feeds "stopTimesCount": 11170, "tripCount": 415, }, + "latestVersion": Object { + "lastUpdated": 1543389038810, + }, "latestVersionId": "mock-feed-version-id", "name": "test feed with a version", "noteCount": 0, @@ -373,6 +385,9 @@ exports[`lib > manager > FeedSourceTable should render with a project with feeds "stopTimesCount": 11170, "tripCount": 415, }, + "latestVersion": Object { + "lastUpdated": 1543389038810, + }, "latestVersionId": "mock-feed-version-id", "name": "test feed with a version", "noteCount": 0, @@ -475,6 +490,9 @@ exports[`lib > manager > FeedSourceTable should render with a project with feeds "stopTimesCount": 11170, "tripCount": 415, }, + "latestVersion": Object { + "lastUpdated": 1543389038810, + }, "latestVersionId": "mock-feed-version-id", "name": "test feed with a version", "noteCount": 0, @@ -669,6 +687,9 @@ exports[`lib > manager > FeedSourceTable should render with a project with feeds "stopTimesCount": 11170, "tripCount": 415, }, + "latestVersion": Object { + "lastUpdated": 1543389038810, + }, "latestVersionId": "mock-feed-version-id", "name": "test feed with a version", "noteCount": 0, @@ -771,6 +792,9 @@ exports[`lib > manager > FeedSourceTable should render with a project with feeds "stopTimesCount": 11170, "tripCount": 415, }, + "latestVersion": Object { + "lastUpdated": 1543389038810, + }, "latestVersionId": "mock-feed-version-id", "name": "test feed with a version", "noteCount": 0, @@ -898,6 +922,9 @@ exports[`lib > manager > FeedSourceTable should render with a project with feeds "stopTimesCount": 11170, "tripCount": 415, }, + "latestVersion": Object { + "lastUpdated": 1543389038810, + }, "latestVersionId": "mock-feed-version-id", "name": "test feed with a version", "noteCount": 0, @@ -1000,6 +1027,9 @@ exports[`lib > manager > FeedSourceTable should render with a project with feeds "stopTimesCount": 11170, "tripCount": 415, }, + "latestVersion": Object { + "lastUpdated": 1543389038810, + }, "latestVersionId": "mock-feed-version-id", "name": "test feed with a version", "noteCount": 0, @@ -2951,6 +2981,9 @@ exports[`lib > manager > FeedSourceTable should render with a project with feeds "stopTimesCount": 11170, "tripCount": 415, }, + "latestVersion": Object { + "lastUpdated": 1543389038810, + }, "latestVersionId": "mock-feed-version-id", "name": "test feed with a version", "noteCount": 0, @@ -3025,6 +3058,9 @@ exports[`lib > manager > FeedSourceTable should render with a project with feeds "stopTimesCount": 11170, "tripCount": 415, }, + "latestVersion": Object { + "lastUpdated": 1543389038810, + }, "latestVersionId": "mock-feed-version-id", "name": "test feed with a version", "noteCount": 0, @@ -3127,6 +3163,9 @@ exports[`lib > manager > FeedSourceTable should render with a project with feeds "stopTimesCount": 11170, "tripCount": 415, }, + "latestVersion": Object { + "lastUpdated": 1543389038810, + }, "latestVersionId": "mock-feed-version-id", "name": "test feed with a version", "noteCount": 0, @@ -3226,6 +3265,9 @@ exports[`lib > manager > FeedSourceTable should render with a project with feeds "stopTimesCount": 11170, "tripCount": 415, }, + "latestVersion": Object { + "lastUpdated": 1543389038810, + }, "latestVersionId": "mock-feed-version-id", "name": "test feed with a version", "noteCount": 0, @@ -3299,6 +3341,9 @@ exports[`lib > manager > FeedSourceTable should render with a project with feeds "stopTimesCount": 11170, "tripCount": 415, }, + "latestVersion": Object { + "lastUpdated": 1543389038810, + }, "latestVersionId": "mock-feed-version-id", "name": "test feed with a version", "noteCount": 0, @@ -3401,6 +3446,9 @@ exports[`lib > manager > FeedSourceTable should render with a project with feeds "stopTimesCount": 11170, "tripCount": 415, }, + "latestVersion": Object { + "lastUpdated": 1543389038810, + }, "latestVersionId": "mock-feed-version-id", "name": "test feed with a version", "noteCount": 0, @@ -3553,6 +3601,9 @@ exports[`lib > manager > FeedSourceTable should render with a project with feeds "stopTimesCount": 11170, "tripCount": 415, }, + "latestVersion": Object { + "lastUpdated": 1543389038810, + }, "latestVersionId": "mock-feed-version-id", "name": "test feed with a version", "noteCount": 0, @@ -3626,6 +3677,9 @@ exports[`lib > manager > FeedSourceTable should render with a project with feeds "stopTimesCount": 11170, "tripCount": 415, }, + "latestVersion": Object { + "lastUpdated": 1543389038810, + }, "latestVersionId": "mock-feed-version-id", "name": "test feed with a version", "noteCount": 0, @@ -3728,6 +3782,9 @@ exports[`lib > manager > FeedSourceTable should render with a project with feeds "stopTimesCount": 11170, "tripCount": 415, }, + "latestVersion": Object { + "lastUpdated": 1543389038810, + }, "latestVersionId": "mock-feed-version-id", "name": "test feed with a version", "noteCount": 0, @@ -3954,6 +4011,9 @@ exports[`lib > manager > FeedSourceTable should render with a project with feeds "stopTimesCount": 11170, "tripCount": 415, }, + "latestVersion": Object { + "lastUpdated": 1543389038810, + }, "latestVersionId": "mock-feed-version-id", "name": "test feed with a version", "noteCount": 0, @@ -4027,6 +4087,9 @@ exports[`lib > manager > FeedSourceTable should render with a project with feeds "stopTimesCount": 11170, "tripCount": 415, }, + "latestVersion": Object { + "lastUpdated": 1543389038810, + }, "latestVersionId": "mock-feed-version-id", "name": "test feed with a version", "noteCount": 0, @@ -4129,6 +4192,9 @@ exports[`lib > manager > FeedSourceTable should render with a project with feeds "stopTimesCount": 11170, "tripCount": 415, }, + "latestVersion": Object { + "lastUpdated": 1543389038810, + }, "latestVersionId": "mock-feed-version-id", "name": "test feed with a version", "noteCount": 0, @@ -4376,6 +4442,9 @@ exports[`lib > manager > FeedSourceTable should render with a project with feeds "stopTimesCount": 11170, "tripCount": 415, }, + "latestVersion": Object { + "lastUpdated": 1543389038810, + }, "latestVersionId": "mock-feed-version-id", "name": "test feed with a version", "noteCount": 0, @@ -4449,6 +4518,9 @@ exports[`lib > manager > FeedSourceTable should render with a project with feeds "stopTimesCount": 11170, "tripCount": 415, }, + "latestVersion": Object { + "lastUpdated": 1543389038810, + }, "latestVersionId": "mock-feed-version-id", "name": "test feed with a version", "noteCount": 0, @@ -4551,6 +4623,9 @@ exports[`lib > manager > FeedSourceTable should render with a project with feeds "stopTimesCount": 11170, "tripCount": 415, }, + "latestVersion": Object { + "lastUpdated": 1543389038810, + }, "latestVersionId": "mock-feed-version-id", "name": "test feed with a version", "noteCount": 0, From b3336291f29c7b5761c09263da633f4e98424e99 Mon Sep 17 00:00:00 2001 From: binh-dam-ibigroup Date: Tue, 6 Oct 2026 15:59:01 -0400 Subject: [PATCH 20/22] test(manager): Add flow exception --- __tests__/test-utils/mock-data/manager.js | 1 + 1 file changed, 1 insertion(+) diff --git a/__tests__/test-utils/mock-data/manager.js b/__tests__/test-utils/mock-data/manager.js index 9f2d5c86e..5d7e3c6c0 100644 --- a/__tests__/test-utils/mock-data/manager.js +++ b/__tests__/test-utils/mock-data/manager.js @@ -402,6 +402,7 @@ mockProjectWithDeployment.name = 'mock-project-with-deployments' export const mockDeployment = makeMockDeployment( mockProjectWithDeployment, + // $FlowFixMe, Passing partial data under FeedSourceSummary.latestVersion [mockFeedVersion] ) export const mockDeploymentSummary = makeMockDeploymentSummary() From ad702d3a9742bf73586b701d3ba0d3f94df20845 Mon Sep 17 00:00:00 2001 From: binh-dam-ibigroup Date: Tue, 6 Oct 2026 16:02:41 -0400 Subject: [PATCH 21/22] refactor(FeedSourceTableRow): Destructure vars --- lib/manager/components/FeedSourceTableRow.js | 24 +++++++++++--------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/lib/manager/components/FeedSourceTableRow.js b/lib/manager/components/FeedSourceTableRow.js index b578bb7e8..211710b4f 100644 --- a/lib/manager/components/FeedSourceTableRow.js +++ b/lib/manager/components/FeedSourceTableRow.js @@ -179,25 +179,27 @@ export default class FeedSourceTableRow extends PureComponent { } renderDetailCells (versionData: VersionData, publishedVersion?: FeedVersionSummary) { - const lastVersionUpdate = this.getLastUpdateRelative(publishedVersion && publishedVersion.lastUpdated) + const { className, endDate, errorCount, icon, startDate, status } = versionData + const { lastUpdated } = publishedVersion || {} + const lastVersionUpdate = this.getLastUpdateRelative(lastUpdated) return ( <> - {versionData.startDate} - {versionData.startDate && ' -'} - {versionData.endDate &&
} - {versionData.endDate} + {startDate} + {startDate && ' -'} + {endDate &&
} + {endDate} - {versionData.errorCount} + {errorCount} {isExtensionEnabled('mtc') && ( @@ -228,15 +230,15 @@ export default class FeedSourceTableRow extends PureComponent { // data for latest validation columns const { latestActiveFeedValidation, latestActiveVersion, latestValidation, latestVersion } = feedSource - const { feedVersionId: latestVersionId } = latestValidation || {} const defaultVersion = latestActiveVersion || latestVersion const defaultValidation = latestActiveFeedValidation || latestValidation + const { feedVersionId: latestVersionId } = latestValidation || {} const { feedVersionId: activeVersionId } = defaultValidation || {} - const latestVersionData = this.getVersionDisplayData(latestValidation) const { endDate, feedVersionId: comparisonVersionId, startDate } = comparisonValidationSummary || {} const hasComparisonDates = startDate && endDate + const latestVersionData = this.getVersionDisplayData(latestValidation) const activeVersionData = this.getVersionDisplayData(defaultValidation) if (activeVersionId && activeVersionId === comparisonVersionId) { From affcafd064aed35532d75b640192fe1098e6d96b Mon Sep 17 00:00:00 2001 From: binh-dam-ibigroup Date: Tue, 6 Oct 2026 17:35:24 -0400 Subject: [PATCH 22/22] refactor: Remove publishState from FeedSourceSummary --- lib/manager/util/index.js | 5 ++++- lib/types/index.js | 3 +-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/lib/manager/util/index.js b/lib/manager/util/index.js index 44a1d24a3..8c2260970 100644 --- a/lib/manager/util/index.js +++ b/lib/manager/util/index.js @@ -412,7 +412,10 @@ export function projectHasAtLeastOneDeployment (project: ?Project): boolean { export function projectHasAtLeastOneFeedWithAPublishedVersion (project: ?Project): boolean { return !!project && !!project.feedSources && - project.feedSources.some(feedSource => feedSource.publishState === 'PUBLISHED') + project.feedSources.some(feedSource => ( + (feedSource.latestActiveVersion && feedSource.latestActiveVersion.publishState === 'PUBLISHED') || + (feedSource.latestVersion && feedSource.latestVersion.publishState === 'PUBLISHED') + )) } export function validationState (val: ?boolean): ?string { diff --git a/lib/types/index.js b/lib/types/index.js index 592e3c220..58b4a8e4d 100644 --- a/lib/types/index.js +++ b/lib/types/index.js @@ -412,8 +412,7 @@ export type FeedSourceSummary = { latestValidation?: ValidationSummary, latestVersion?: FeedVersionSummary, name: string, - projectId: string, - publishState?: ?string + projectId: string } export type Feed = FeedSourceSummary & {