Identified by automated analysis of ZKUI-486
Analysis Report
Root Cause
During the v4.1 → v4.2 refactor of the bucket overview to use the data-browser-library's extraBucketOverviewGeneral prop, the "Async Metadata updates" field was dropped. The EXTRA_BUCKET_OVERVIEW_GENERAL constant in DataBrowser.tsx (line 32-38) only includes a single entry for "Location" but omits the entry for "Async Metadata updates" that should display the ingestion state (Active/Paused) for buckets in XDM environments. The HelpAsyncNotification component (Help.tsx:3-9) and the getLocationIngestionState utility function (storageOptions.ts:199-220) both still exist in the codebase but are orphaned — neither is imported or used anywhere. The ingestion state is currently only visible at the location level via the PauseAndResume component, but is completely absent from the bucket overview.
Affected Component
- Repo: scality/zenko-ui
- Path:
src/react/databrowser/DataBrowser.tsx
- Version: 4.2.15
Evidence
src/react/databrowser/DataBrowser.tsx
├── L32: const EXTRA_BUCKET_OVERVIEW_GENERAL = [ ... — This constant defines the extra fields shown in the bucket overview General section. It only includes 'Location' — the 'Async Metadata updates' entry showing ingestion state (Active/Paused) is completely absent. This array is passed directly as the extraBucketOverviewGeneral prop to DataBrowserUI at line 117.
└── L117: extraBucketOverviewGeneral={EXTRA_BUCKET_OVERVIEW_GENERAL} — The prop passed to DataBrowserUI only carries the Location field. A second entry for 'Async Metadata updates' with its render component (showing ingestion state) and HelpAsyncNotification tooltip is missing.
src/react/ui-elements/Help.tsx
└── L3: export const HelpAsyncNotification = () => ( ... — HelpAsyncNotification is defined and exported but never imported or used anywhere in the codebase. It was previously rendered alongside the ingestion state field in the bucket overview and should be re-integrated.
src/react/utils/storageOptions.ts
└── L199: export function getLocationIngestionState(ingestionStates, locationName) { ... — This utility function maps ingestion states to 'Active'/'Paused' display values. It is currently dead code — defined but never called. It should be used by the new Async Metadata updates render component in the bucket overview.
src/react/databrowser/buckets/BucketCreateLocationEffects.tsx
└── L38: const { features } = useConfig(); ... — The XDM feature flag conditional rendering pattern is already established in bucket creation. The same pattern (conditionally showing the Async Metadata updates field only when XDM_FEATURE is active) should be applied to the bucket overview General section.
Impact
Medium severity. In XDM environments, users cannot see the ingestion state (Active/Paused) of their buckets from the bucket overview. This information was available in v4.1 and is a regression in v4.2. Users must navigate to the location-level view to check ingestion status, which is less convenient and breaks the expected workflow. Only XDM environments are affected — standard deployments do not use async metadata updates.
Confidence
high
Recommendation
Add an "Async Metadata updates" entry to the EXTRA_BUCKET_OVERVIEW_GENERAL array in src/react/databrowser/DataBrowser.tsx. This requires:
-
Create an AsyncMetadataSection render component (similar to LocationSection) that:
- Uses
useBucketOverviewContext() to get the bucket name
- Fetches the bucket's location from bucket metadata
- Uses
useLocationReplicationControl (or the existing getLocationIngestionState utility) to determine the ingestion state
- Renders the state as "Active" or "Paused" (or "-" if not applicable)
- Includes the
HelpAsyncNotification tooltip component
-
Conditionally include the entry in EXTRA_BUCKET_OVERVIEW_GENERAL only when XDM_FEATURE is active, following the same pattern as BucketCreateLocationEffects.tsx (line 38: features.includes(XDM_FEATURE)). Since EXTRA_BUCKET_OVERVIEW_GENERAL is currently a static constant, convert it to a useMemo inside the DataBrowser component that checks the XDM feature flag:
const extraBucketOverviewGeneral = useMemo(() => {
const fields = [
{ id: 'location', label: 'Location', render: LocationSection },
];
if (features.includes(XDM_FEATURE)) {
fields.push({
id: 'asyncMetadata',
label: 'Async Metadata updates',
render: AsyncMetadataSection,
});
}
return fields;
}, [features]);
- Re-use existing orphaned code:
getLocationIngestionState from storageOptions.ts and HelpAsyncNotification from Help.tsx are already defined — import and use them in the new component.
Analysis Report
Root Cause
During the v4.1 → v4.2 refactor of the bucket overview to use the data-browser-library's
extraBucketOverviewGeneralprop, the "Async Metadata updates" field was dropped. TheEXTRA_BUCKET_OVERVIEW_GENERALconstant inDataBrowser.tsx(line 32-38) only includes a single entry for "Location" but omits the entry for "Async Metadata updates" that should display the ingestion state (Active/Paused) for buckets in XDM environments. TheHelpAsyncNotificationcomponent (Help.tsx:3-9) and thegetLocationIngestionStateutility function (storageOptions.ts:199-220) both still exist in the codebase but are orphaned — neither is imported or used anywhere. The ingestion state is currently only visible at the location level via thePauseAndResumecomponent, but is completely absent from the bucket overview.Affected Component
src/react/databrowser/DataBrowser.tsxEvidence
Impact
Medium severity. In XDM environments, users cannot see the ingestion state (Active/Paused) of their buckets from the bucket overview. This information was available in v4.1 and is a regression in v4.2. Users must navigate to the location-level view to check ingestion status, which is less convenient and breaks the expected workflow. Only XDM environments are affected — standard deployments do not use async metadata updates.
Confidence
high
Recommendation
Add an "Async Metadata updates" entry to the
EXTRA_BUCKET_OVERVIEW_GENERALarray insrc/react/databrowser/DataBrowser.tsx. This requires:Create an
AsyncMetadataSectionrender component (similar toLocationSection) that:useBucketOverviewContext()to get the bucket nameuseLocationReplicationControl(or the existinggetLocationIngestionStateutility) to determine the ingestion stateHelpAsyncNotificationtooltip componentConditionally include the entry in
EXTRA_BUCKET_OVERVIEW_GENERALonly whenXDM_FEATUREis active, following the same pattern asBucketCreateLocationEffects.tsx(line 38:features.includes(XDM_FEATURE)). Since EXTRA_BUCKET_OVERVIEW_GENERAL is currently a static constant, convert it to a useMemo inside the DataBrowser component that checks the XDM feature flag:getLocationIngestionStatefromstorageOptions.tsandHelpAsyncNotificationfromHelp.tsxare already defined — import and use them in the new component.