Skip to content

Commit 5031919

Browse files
committed
Merge branch 'main' of https://github.com/TaduJR/App into fix-Hide-assigned-Guide/AM-from-invite-and-assign-card-contact-lists
2 parents c582c91 + 0649d6e commit 5031919

940 files changed

Lines changed: 45927 additions & 9952 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.claude/agents/code-inline-reviewer.md

Lines changed: 150 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -825,6 +825,156 @@ async function submitForm(data: FormData) {
825825

826826
---
827827

828+
### [CLEAN-REACT-PATTERNS-1] Favor composition over configuration
829+
830+
- **Search patterns**: `shouldShow`, `shouldEnable`, `canSelect`, `enable`, `disable`, configuration props patterns
831+
832+
- **Condition**: Flag ONLY when ALL of these are true:
833+
834+
- A **new feature** is being introduced OR an **existing component's API is being expanded with new props**
835+
- The change adds configuration properties (flags, conditional logic)
836+
- These configuration options control feature presence or behavior within the component
837+
- These features could instead be expressed as composable child components
838+
839+
**Features that should be expressed as child components:**
840+
- Optional UI elements that could be composed in
841+
- New behavior that could be introduced as new children
842+
- Features that currently require parent component code changes
843+
844+
**DO NOT flag if:**
845+
- Props are narrow, stable values needed for coordination between composed parts (e.g., `reportID`, `data`, `columns`)
846+
- The component uses composition and child components for features
847+
- Parent components stay stable as features are added
848+
849+
- **Reasoning**: When new features are implemented by adding configuration (props, flags, conditional logic) to existing components, if requirements change, then those components must be repeatedly modified, increasing coupling, surface area, and regression risk. Composition ensures features scale horizontally, limits the scope of changes, and prevents components from becoming configuration-driven "mega components".
850+
851+
Good (composition):
852+
853+
- Features expressed as composable children
854+
- Parent stays stable; add features by adding children
855+
856+
```tsx
857+
<Table data={items} columns={columns}>
858+
<Table.SearchBar />
859+
<Table.Header />
860+
<Table.Body />
861+
</Table>
862+
```
863+
864+
```tsx
865+
<SelectionList data={items}>
866+
<SelectionList.TextInput />
867+
<SelectionList.Body />
868+
</SelectionList>
869+
```
870+
871+
Bad (configuration):
872+
873+
- Features controlled by boolean flags
874+
- Adding a new feature requires modifying the Table component's API
875+
876+
```tsx
877+
<Table
878+
data={items}
879+
columns={columns}
880+
shouldShowSearchBar
881+
shouldShowHeader
882+
shouldEnableSorting
883+
shouldShowPagination
884+
shouldHighlightOnHover
885+
/>
886+
887+
type TableProps = {
888+
data: Item[];
889+
columns: Column[];
890+
shouldShowSearchBar?: boolean; // ❌ Could be <Table.SearchBar />
891+
shouldShowHeader?: boolean; // ❌ Could be <Table.Header />
892+
shouldEnableSorting?: boolean; // ❌ Configuration for header behavior
893+
shouldShowPagination?: boolean; // ❌ Could be <Table.Pagination />
894+
shouldHighlightOnHover?: boolean; // ❌ Configuration for styling behavior
895+
};
896+
```
897+
898+
```tsx
899+
<SelectionList
900+
data={items}
901+
shouldShowTextInput
902+
shouldShowTooltips
903+
shouldScrollToFocusedIndex
904+
shouldDebounceScrolling
905+
shouldUpdateFocusedIndex
906+
canSelectMultiple
907+
disableKeyboardShortcuts
908+
/>
909+
910+
type SelectionListProps = {
911+
shouldShowTextInput?: boolean; // ❌ Could be <SelectionList.TextInput />
912+
shouldShowConfirmButton?: boolean; // ❌ Could be <SelectionList.ConfirmButton />
913+
textInputOptions?: {...}; // ❌ Configuration object for the above
914+
};
915+
```
916+
917+
Good (children manage their own state):
918+
919+
```tsx
920+
// Children are self-contained and manage their own state
921+
// Parent only passes minimal data (IDs)
922+
// Adding new features doesn't require changing the parent
923+
function ReportScreen({ params: { reportID }}) {
924+
return (
925+
<>
926+
<ReportActionsView reportID={reportID} />
927+
// other features
928+
<Composer />
929+
</>
930+
);
931+
}
932+
933+
// Component accesses stores and calculates its own state
934+
// Parent doesn't know the internals
935+
function ReportActionsView({ reportID }) {
936+
const [reportOnyx] = useOnyx(`${ONYXKEYS.COLLECTION.REPORT}${reportID}`);
937+
const reportActions = getFilteredReportActionsForReportView(unfilteredReportActions);
938+
// ...
939+
}
940+
```
941+
942+
Bad (parent manages child state):
943+
944+
```tsx
945+
// Parent fetches and manages state for its children
946+
// Parent has to know child implementation details
947+
function ReportScreen({ params: { reportID }}) {
948+
const [reportOnyx] = useOnyx(`${ONYXKEYS.COLLECTION.REPORT}${reportID}`, {allowStaleData: true, canBeMissing: true});
949+
const reportActions = useMemo(() => getFilteredReportActionsForReportView(unfilteredReportActions), [unfilteredReportActions]);
950+
const [reportMetadata = defaultReportMetadata] = useOnyx(`${ONYXKEYS.COLLECTION.REPORT_METADATA}${reportIDFromRoute}`, {canBeMissing: true, allowStaleData: true});
951+
const {reportActions: unfilteredReportActions, linkedAction, sortedAllReportActions, hasNewerActions, hasOlderActions} = usePaginatedReportActions(reportID, reportActionIDFromRoute);
952+
const parentReportAction = useParentReportAction(reportOnyx);
953+
const transactionThreadReportID = getOneTransactionThreadReportID(report, chatReport, reportActions ?? [], isOffline, reportTransactionIDs);
954+
const isTransactionThreadView = isReportTransactionThread(report);
955+
// other onyx connections etc
956+
957+
return (
958+
<>
959+
<ReportActionsView
960+
report={report}
961+
reportActions={reportActions}
962+
isLoadingInitialReportActions={reportMetadata?.isLoadingInitialReportActions}
963+
hasNewerActions={hasNewerActions}
964+
hasOlderActions={hasOlderActions}
965+
parentReportAction={parentReportAction}
966+
transactionThreadReportID={transactionThreadReportID}
967+
isReportTransactionThread={isTransactionThreadView}
968+
/>
969+
// other features
970+
<Composer />
971+
</>
972+
);
973+
}
974+
```
975+
976+
---
977+
828978
## Instructions
829979

830980
1. **First, get the list of changed files and their diffs:**

.claude/settings.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,5 +19,8 @@
1919
"mcp__playwright__browser_evaluate",
2020
"mcp__playwright__browser_handle_dialog"
2121
]
22+
},
23+
"enabledPlugins": {
24+
"react-native-best-practices@callstack-agent-skills": true
2225
}
2326
}

.github/ISSUE_TEMPLATE/OnboardOffboardExpertContributor.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ labels: Daily, Task, Access Change
1111
- [ ] Add / remove from the following Slack channels via Slack Connect
1212
- [ ] [#quality](https://expensify.enterprise.slack.com/archives/C05LX9D6E07)
1313
- [ ] [#convert](https://expensify.enterprise.slack.com/archives/C07HPDRELLD)
14-
- [ ] [#retain](https://expensify.enterprise.slack.com/archives/C07NZ8B1VTQ)
1514
- [ ] [#migrate](https://expensify.enterprise.slack.com/archives/C07NMDKEFMH)
1615
- [ ] [#expensify-bugs](https://expensify.enterprise.slack.com/archives/C049HHMV9SM)
1716
- [ ] [#expensify-open-source](https://expensify.enterprise.slack.com/archives/C01GTK53T8Q)

.github/workflows/deploy.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,7 @@ jobs:
298298
needs: prep
299299
runs-on: macos-15-xlarge
300300
env:
301-
DEVELOPER_DIR: /Applications/Xcode_26.0.app/Contents/Developer
301+
DEVELOPER_DIR: /Applications/Xcode_26.2.app/Contents/Developer
302302
SHOULD_BUILD_APP: ${{ github.ref == 'refs/heads/staging' || fromJSON(needs.prep.outputs.IS_CHERRY_PICK) }}
303303
steps:
304304
- name: Checkout

.github/workflows/generateTranslations.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,7 @@ jobs:
141141
EOF
142142
)"
143143
readonly PARROT_FOOTER
144+
readonly WORKFLOW_RUN_LINK="[View workflow run](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }})"
144145
145146
if [ "$PATCH_SIZE" -le "$MAX_COMMENT_SIZE" ]; then
146147
# Small diff - include in comment
@@ -159,6 +160,8 @@ jobs:
159160
echo '</details>'
160161
echo
161162
echo "$PARROT_FOOTER 😉"
163+
echo
164+
echo "${WORKFLOW_RUN_LINK}"
162165
} > "$TEMP_COMMENT_FILE"
163166
else
164167
# Large diff - upload as gist and link
@@ -176,6 +179,8 @@ jobs:
176179
echo "📋 **[View the translation diff here](${GIST_URL})** 📋"
177180
echo
178181
echo "$PARROT_FOOTER_WITH_CMD 😉"
182+
echo
183+
echo "${WORKFLOW_RUN_LINK}"
179184
} > "$TEMP_COMMENT_FILE"
180185
fi
181186

.github/workflows/remote-build-ios.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
build:
2121
runs-on: ${{ github.repository_owner == 'Expensify' && 'macos-15-xlarge' || 'macos-15' }}
2222
env:
23-
DEVELOPER_DIR: /Applications/Xcode_26.0.app/Contents/Developer
23+
DEVELOPER_DIR: /Applications/Xcode_26.2.app/Contents/Developer
2424
strategy:
2525
fail-fast: false
2626
matrix:

.github/workflows/testBuild.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -330,7 +330,7 @@ jobs:
330330
if: ${{ inputs.IOS }}
331331
needs: [prep, getMobileExpensifyPR, getMobileExpensifyRef]
332332
env:
333-
DEVELOPER_DIR: /Applications/Xcode_26.0.app/Contents/Developer
333+
DEVELOPER_DIR: /Applications/Xcode_26.2.app/Contents/Developer
334334
PULL_REQUEST_NUMBER: ${{ needs.prep.outputs.APP_PR_NUMBER }}
335335
runs-on: macos-15-xlarge
336336
outputs:

.github/workflows/verifyHybridApp.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ jobs:
113113
name: Verify iOS HybridApp builds on main
114114
runs-on: macos-15-xlarge
115115
env:
116-
DEVELOPER_DIR: /Applications/Xcode_26.0.app/Contents/Developer
116+
DEVELOPER_DIR: /Applications/Xcode_26.2.app/Contents/Developer
117117
# Only run on pull requests that are *not* on a fork
118118
if: ${{ !github.event.pull_request.head.repo.fork && github.event_name == 'pull_request' }}
119119
steps:

CLAUDE.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,18 @@ Key GitHub Actions workflows:
172172

173173
## Development Practices
174174

175+
### React Native Best Practices
176+
Use the `/react-native-best-practices` skill when working on performance-sensitive code, native modules, or release preparation. This ensures code respects established best practices from the start, resulting in more consistent code, fewer review iterations, and better resilience against regressions.
177+
178+
The skill provides guidance on:
179+
- **Performance**: FPS optimization, virtualized lists (FlashList), memoization, atomic state, animations
180+
- **Bundle & App Size**: Barrel imports, tree shaking, bundle analysis, R8 shrinking
181+
- **Startup (TTI)**: Hermes bytecode optimization, native navigation, deferred work
182+
- **Native Modules**: Turbo Module development, threading model, Swift/Kotlin/C++ patterns
183+
- **Memory**: JS and native memory leak detection and patterns
184+
- **Build Compliance**: Android 16KB page alignment (Google Play requirement)
185+
- **Platform Tooling**: Xcode/Android Studio profiling and debugging setup
186+
175187
### Code Quality
176188
- **TypeScript**: Strict mode enabled
177189
- **ESLint**: Linter

Mobile-Expensify

0 commit comments

Comments
 (0)