Repository navigation
Conversation
Co-authored-by: Pujan Shah <Pujan92@users.noreply.github.com>
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4f27886e43
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| const renderMenuItems = (items: BasicRuleMenuItem[]) => | ||
| items.map((item) => ( | ||
| <OfflineWithFeedback | ||
| pendingAction={item.pendingAction} | ||
| <IndividualExpenseRuleRow | ||
| key={item.key} | ||
| > | ||
| <MenuItem | ||
| title={item.title} | ||
| description={item.description} | ||
| icon={item.icon} | ||
| iconWidth={variables.iconSizeNormal} | ||
| iconHeight={variables.iconSizeNormal} | ||
| shouldIconUseAutoWidthStyle | ||
| shouldShowBasicTitle | ||
| innerContainerStyle={styles.gap5} | ||
| titleStyle={[styles.ml0, !item.description && styles.colorMuted]} | ||
| descriptionTextStyle={[styles.ml0, styles.breakWord]} | ||
| shouldShowRightIcon={canWriteRules} | ||
| onPress={() => handleMenuItemPress(item)} | ||
| interactive={canWriteRules} | ||
| wrapperStyle={[styles.sectionMenuItemTopDescription]} | ||
| sentryLabel={CONST.SENTRY_LABEL.WORKSPACE.RULES.INDIVIDUAL_EXPENSES_MENU_ITEM} | ||
| numberOfLinesDescription={1} | ||
| /> | ||
| </OfflineWithFeedback> | ||
| item={item} | ||
| onPress={canWriteRules ? callIfAuthenticated(() => handleMenuItemPress(item), session) : undefined} |
There was a problem hiding this comment.
Compose fixed rule rows without a configuration-driven renderer
The newly extracted IndividualExpenseRuleRow still interprets the fixed policyControlItems and productDefaultItems configuration arrays, so adding or changing a rule continues to require updating a configuration schema and its generic renderer rather than composing a dedicated row. AGENTS.md requires the app coding standards; CLEAN-REACT-PATTERNS-1 explicitly covers refactorings that create configuration-driven components and states that compound components inside a static-array mapping do not resolve the violation. Declare these finite rule rows as JSX or dedicated components instead. The new ExpenseDefaultRuleField extraction has the same issue for the statically defined fields; the runtime-generated tag rows can remain mapped.
AGENTS.md reference: AGENTS.md:L7-L9
Useful? React with 👍 / 👎.
Codecov Report✅ Changes either increased or maintained existing code coverage, great job!
|
|
🤖 Android test steps verification results: Limited Android coverage verified: workspace rename succeeded, but Control-gated Rules and unavailable fixtures prevented full verification. Recording capture could not be confirmed.
|
|
🤖 Web test steps verification results: Admin workspace rename and General rule navigation worked on dev NewDot web, but Control-plan gating and unavailable fixtures/capabilities blocked full QA. ❌ below means incomplete verification, not a confirmed regression.
view run · no recording available |









Explanation of Change
Migrate the workspace-name row, individual expense rule rows and expense-default rule fields to composable MenuItem. Preserve the workspace name's header accessibility role and unlimited wrapping, authenticated edit handlers, read-only presentation, HTML values, validation and existing navigation/upgrade flows.
Primary text now forwards an optional accessibilityRole, and Row accepts a layout style so callers can preserve their existing spacing. Narrow icon leaves, explicit icon margins and the existing section insets retain the legacy layout. Row renderers are extracted into small local components. This is a partial Phase 6 migration.
AI Tests
Contributor branch ownership
This PR uses an upstream branch because MelvinBot cannot push to
Pujan92's fork. To copy it to your fork:You can then close this PR and open a replacement from your fork if desired.
Fixed Issues
#105531
PROPOSAL: #105531 (comment)
Tests
// TODO: The human co-author must record manual testing performed. AI validation and its limitations are listed above.
Offline tests
// TODO: The human co-author must record offline testing performed. Expected offline behavior is included below.
QA Steps
These instructions have not been completed manually. Repeat relevant checks on narrow/wide web and supported native platforms.
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectionAvatar, I verified the components usingAvatarare working as expected)npm run compress-svg)Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari