Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
@@ -1,5 +1,6 @@
import ConnectionLayout from '@components/ConnectionLayout';
import MenuItemWithTopDescription from '@components/MenuItemWithTopDescription';
import MenuItem from '@components/MenuItem';
import MenuItemField from '@components/MenuItem/presets/MenuItemField';
import OfflineWithFeedback from '@components/OfflineWithFeedback';

import useCanConfigureCurrencyConversionFees from '@hooks/useCanConfigureCurrencyConversionFees';
Expand Down Expand Up @@ -128,14 +129,15 @@ function CertiniaAdvancedPage({policy}: WithPolicyConnectionsProps) {
)}
{isCertiniaFFAConnection(config) && canConfigureCurrencyConversionFees && (
<OfflineWithFeedback pendingAction={settingsPendingAction([CONST.CERTINIA_CONFIG.FX_EXPENSE_ACCOUNT], config?.pendingFields)}>
<MenuItemWithTopDescription
shouldShowRightIcon
title={selectedFxExpenseAccountName}
description={translate('workspace.certinia.fxExpenseAccount')}
wrapperStyle={[styles.ph5, styles.pv3]}
<MenuItemField
name={translate('workspace.certinia.fxExpenseAccount')}
value={selectedFxExpenseAccountName}
onPress={!policyID ? undefined : () => Navigation.navigate(createDynamicRoute(DYNAMIC_ROUTES.POLICY_ACCOUNTING_CERTINIA_FX_EXPENSE_ACCOUNT.path))}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Add a Sentry label to the FX account row

When an administrator opens the FX expense-account selector, this modified interactive MenuItemField has no sentryLabel, so its web interaction cannot be identified by the required Sentry/FullStory label. Add a stable entry from CONST.SENTRY_LABEL for this action.

AGENTS.md reference: AGENTS.md:L76-L77

Useful? React with 👍 / 👎.

@Pujan92 Pujan92 Nov 2, 2026 •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

No sentryLabel is configured for this item in the main

brickRoadIndicator={areSettingsInErrorFields([CONST.CERTINIA_CONFIG.FX_EXPENSE_ACCOUNT], config?.errorFields) ? CONST.BRICK_ROAD_INDICATOR_STATUS.ERROR : undefined}
/>
>
{areSettingsInErrorFields([CONST.CERTINIA_CONFIG.FX_EXPENSE_ACCOUNT], config?.errorFields) && (
<MenuItem.BrickRoadIndicator status={CONST.BRICK_ROAD_INDICATOR_STATUS.ERROR} />
)}
</MenuItemField>
</OfflineWithFeedback>
)}
</ConnectionLayout>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import AmountForm from '@components/AmountForm';
import FormProvider from '@components/Form/FormProvider';
import InputWrapper from '@components/Form/InputWrapper';
import HeaderWithBackButton from '@components/HeaderWithBackButton';
import MenuItemWithTopDescription from '@components/MenuItemWithTopDescription';
import MenuItemField from '@components/MenuItem/presets/MenuItemField';
import ScreenWrapper from '@components/ScreenWrapper';
import Text from '@components/Text';

Expand Down Expand Up @@ -111,13 +111,13 @@ function DynamicCategoryFlagAmountsOverPage({
/>
<Text style={[styles.mutedTextLabel, styles.mt2]}>{translate('workspace.rules.categoryRules.flagAmountsOverSubtitle')}</Text>
</View>
<MenuItemWithTopDescription
shouldShowRightIcon
title={translate(`workspace.rules.categoryRules.expenseLimitTypes.${expenseLimitType}`)}
description={translate('common.type')}
onPress={() => Navigation.navigate(createDynamicRoute(DYNAMIC_ROUTES.EXPENSE_LIMIT_TYPE_SELECTOR.path))}
wrapperStyle={[styles.ph5, styles.mt3]}
/>
<View style={styles.mt3}>
<MenuItemField
name={translate('common.type')}
value={translate(`workspace.rules.categoryRules.expenseLimitTypes.${expenseLimitType}`)}
onPress={() => Navigation.navigate(createDynamicRoute(DYNAMIC_ROUTES.EXPENSE_LIMIT_TYPE_SELECTOR.path))}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Add a Sentry label to the expense type row

When an administrator opens the expense-limit type selector, this modified interactive MenuItemField has no sentryLabel, leaving the press without the required Sentry/FullStory identifier. Add a stable entry from CONST.SENTRY_LABEL for this action.

AGENTS.md reference: AGENTS.md:L76-L77

Useful? React with 👍 / 👎.

/>
</View>
</FormProvider>
</ScreenWrapper>
</AccessOrNotFoundWrapper>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import CollapsibleHeaderOnKeyboard from '@components/CollapsibleHeaderOnKeyboard
import FixedFooter from '@components/FixedFooter';
import FormHelpMessage from '@components/FormHelpMessage';
import HeaderWithBackButton from '@components/HeaderWithBackButton';
import MenuItemWithTopDescription from '@components/MenuItemWithTopDescription';
import MenuItemField from '@components/MenuItem/presets/MenuItemField';
import OfflineWithFeedback from '@components/OfflineWithFeedback';
import ScreenWrapper from '@components/ScreenWrapper';
import SelectionList from '@components/SelectionList';
Expand Down Expand Up @@ -237,16 +237,14 @@ function PolicyCommuterExclusionsPage({route}: PolicyCommuterExclusionsPageProps
const isHomeAndOfficeSelected = selectedKey === CONST.POLICY.COMMUTER_EXCLUSION_METHOD.HOME_AND_OFFICE;

const workArrangementFooter = (
<MenuItemWithTopDescription
shouldShowRightIcon
title={translate(
<MenuItemField
name={translate('workspace.distanceRates.commuterExclusions.workArrangement.title')}
value={translate(
hasOfficeWorkArrangement(existingCommuterExclusions)
? 'workspace.distanceRates.commuterExclusions.workArrangement.officeBasedTitle'
: 'workspace.distanceRates.commuterExclusions.workArrangement.noRegularWorkplaceTitle',
)}
description={translate('workspace.distanceRates.commuterExclusions.workArrangement.title')}
onPress={() => Navigation.navigate(ROUTES.WORKSPACE_DISTANCE_RATES_WORK_ARRANGEMENT.getRoute(policyID))}
wrapperStyle={[styles.ph5, styles.pt3]}
/>
);

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import FullPageOfflineBlockingView from '@components/BlockingViews/FullPageOfflineBlockingView';
import CustomUnitDefaultCategorySelector from '@components/CustomUnitDefaultCategorySelector';
import HeaderWithBackButton from '@components/HeaderWithBackButton';
import MenuItemWithTopDescription from '@components/MenuItemWithTopDescription';
import MenuItemField from '@components/MenuItem/presets/MenuItemField';
import OfflineWithFeedback from '@components/OfflineWithFeedback';
import RenderHTML from '@components/RenderHTML';
import ScreenWrapper from '@components/ScreenWrapper';
Expand Down Expand Up @@ -227,15 +227,14 @@ function PolicyDistanceRatesSettingsPage({route}: PolicyDistanceRatesSettingsPag
errorRowStyles={styles.mh5}
onClose={() => clearErrorFields('attributes')}
>
<MenuItemWithTopDescription
shouldShowRightIcon={canWriteDistanceRates}
title={defaultUnit ? Str.recapitalize(translate(getUnitTranslationKey(defaultUnit))) : ''}
description={translate('workspace.distanceRates.unit')}
onPress={() => Navigation.navigate(ROUTES.WORKSPACE_DISTANCE_RATES_UNIT.getRoute(policyID))}
interactive={canWriteDistanceRates}
wrapperStyle={[styles.ph5, styles.mt3]}
sentryLabel={CONST.SENTRY_LABEL.WORKSPACE.DISTANCE_RATES.UNIT_SELECTOR}
/>
<View style={styles.mt3}>
<MenuItemField
name={translate('workspace.distanceRates.unit')}
value={defaultUnit ? Str.recapitalize(translate(getUnitTranslationKey(defaultUnit))) : ''}
onPress={canWriteDistanceRates ? () => Navigation.navigate(ROUTES.WORKSPACE_DISTANCE_RATES_UNIT.getRoute(policyID)) : undefined}
sentryLabel={CONST.SENTRY_LABEL.WORKSPACE.DISTANCE_RATES.UNIT_SELECTOR}
/>
</View>
</OfflineWithFeedback>
)}
{!!policy?.areCategoriesEnabled && hasEnabledOptions(policyCategories ?? {}) && !!customUnit?.customUnitID && (
Expand Down Expand Up @@ -298,13 +297,10 @@ function PolicyDistanceRatesSettingsPage({route}: PolicyDistanceRatesSettingsPag
errorRowStyles={[styles.mh5, styles.gap3]}
onClose={() => clearWorkspaceDistanceAutoUpdateErrors(policyID)}
>
<MenuItemWithTopDescription
shouldShowRightIcon={canWriteDistanceRates}
title={autoUpdateCountry ? translate(`allCountries.${autoUpdateCountry}`) : ''}
description={translate('common.country')}
onPress={() => Navigation.navigate(ROUTES.WORKSPACE_DISTANCE_RATES_GOVERNMENT_RATE_COUNTRY.getRoute(policyID))}
interactive={canWriteDistanceRates}
wrapperStyle={[styles.ph5]}
<MenuItemField
name={translate('common.country')}
value={autoUpdateCountry ? translate(`allCountries.${autoUpdateCountry}`) : ''}
onPress={canWriteDistanceRates ? () => Navigation.navigate(ROUTES.WORKSPACE_DISTANCE_RATES_GOVERNMENT_RATE_COUNTRY.getRoute(policyID)) : undefined}
sentryLabel={CONST.SENTRY_LABEL.WORKSPACE.DISTANCE_RATES.COUNTRY_SELECTOR}
/>
</OfflineWithFeedback>
Expand Down Expand Up @@ -333,13 +329,13 @@ function PolicyDistanceRatesSettingsPage({route}: PolicyDistanceRatesSettingsPag
errorRowStyles={styles.mh5}
onClose={() => clearPolicyCommuterExclusionsErrors(policyID)}
>
<MenuItemWithTopDescription
shouldShowRightIcon
title={getCommuterExclusionsSummary(policy?.commuterExclusions, defaultUnit, translate)}
description={translate('workspace.distanceRates.commuterExclusions.title')}
onPress={() => Navigation.navigate(ROUTES.WORKSPACE_DISTANCE_RATES_COMMUTER_EXCLUSIONS.getRoute(policyID))}
wrapperStyle={[styles.ph5, styles.mt3]}
/>
<View style={styles.mt3}>
<MenuItemField
name={translate('workspace.distanceRates.commuterExclusions.title')}
value={getCommuterExclusionsSummary(policy?.commuterExclusions, defaultUnit, translate)}
onPress={() => Navigation.navigate(ROUTES.WORKSPACE_DISTANCE_RATES_COMMUTER_EXCLUSIONS.getRoute(policyID))}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Add a Sentry label to the commuter exclusions row

When an administrator opens the commuter-exclusions page, this modified interactive MenuItemField lacks a sentryLabel, so the navigation press is not available under the repository's required Sentry/FullStory label. Add a stable entry from CONST.SENTRY_LABEL.

AGENTS.md reference: AGENTS.md:L76-L77

Useful? React with 👍 / 👎.

/>
</View>
</OfflineWithFeedback>
)}
<OfflineWithFeedback
Expand Down
17 changes: 8 additions & 9 deletions src/pages/workspace/tags/DynamicWorkspaceViewTagsPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import ActivityIndicator from '@components/ActivityIndicator';
import ButtonWithDropdownMenu from '@components/ButtonWithDropdownMenu';
import type {DropdownOption} from '@components/ButtonWithDropdownMenu/types';
import HeaderWithBackButton from '@components/HeaderWithBackButton';
import MenuItemWithTopDescription from '@components/MenuItemWithTopDescription';
import MenuItemField from '@components/MenuItem/presets/MenuItemField';
import {ModalActions} from '@components/Modal/Global/ModalContext';
import OfflineWithFeedback from '@components/OfflineWithFeedback';
import ScreenWrapper from '@components/ScreenWrapper';
Expand Down Expand Up @@ -323,14 +323,13 @@ function DynamicWorkspaceViewTagsPage({route}: DynamicWorkspaceViewTagsProps) {
pendingAction={currentPolicyTag.pendingAction}
errorRowStyles={styles.mh5}
>
<MenuItemWithTopDescription
title={getCleanedTagName(currentPolicyTag.name)}
description={translate(`workspace.tags.customTagName`)}
onPress={navigateToEditTag}
shouldShowRightIcon={canWriteTags}
interactive={canWriteTags}
wrapperStyle={styles.mb5}
/>
<View style={styles.mb5}>
<MenuItemField
name={translate(`workspace.tags.customTagName`)}
value={getCleanedTagName(currentPolicyTag.name)}
onPress={canWriteTags ? navigateToEditTag : undefined}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Add a Sentry label to the custom tag name row

When a user with tag write access opens the tag-name editor, this modified interactive MenuItemField has no sentryLabel, preventing the press from receiving the required Sentry/FullStory identifier. Add a stable entry from CONST.SENTRY_LABEL for this action.

AGENTS.md reference: AGENTS.md:L76-L77

Useful? React with 👍 / 👎.

/>
</View>
</OfflineWithFeedback>
</>
);
Expand Down
Loading