Skip to content

Commit 30e2fe5

Browse files
committed
Merge branch 'main' into fix/67122-open-existing-report
2 parents 0008f2d + e5de046 commit 30e2fe5

File tree

1,014 files changed

+45022
-13097
lines changed

Some content is hidden

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

1,014 files changed

+45022
-13097
lines changed

.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/scripts/createInlineComment.sh

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,7 @@ readonly LINE_ARG="${3:-}"
4747
validate_rule "$BODY_ARG"
4848
echo "Comment approved: $COMMENT_STATUS_REASON"
4949

50-
# Append footer to comment body
51-
readonly FOOTER="\n\n---\n\nPlease rate this suggestion with 👍 or 👎 to help us improve! Reactions are used to monitor reviewer efficiency."
50+
readonly FOOTER=$'\n\n---\n\nPlease rate this suggestion with 👍 or 👎 to help us improve! Reactions are used to monitor reviewer efficiency.'
5251
readonly COMMENT_BODY="${BODY_ARG}${FOOTER}"
5352

5453
COMMIT_ID=$(gh api "/repos/$GITHUB_REPOSITORY/pulls/$PR_NUMBER" --jq '.head.sha')

.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
}
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
---
2+
name: Exploratory issue template
3+
about: A template to follow when creating a new issue in this repository that was found during Exploratory testing by QA
4+
labels: Monthly, Not a priority
5+
---
6+
7+
If you haven’t already, check out our [contributing guidelines](https://github.com/Expensify/ReactNativeChat/blob/main/contributingGuides/CONTRIBUTING.md) for onboarding and email [email protected] to request to join our Slack channel!
8+
___
9+
**For all Exploratory issues, start the title of the issue with `[Exploratory]`** (and, do **not** add the `External` label.
10+
11+
**Version Number:**
12+
**Reproducible in staging?:**
13+
**Reproducible in production?:**
14+
**If this was caught during regression testing, add the test name, ID and link from BrowserStack:**
15+
**Email or phone of affected tester (no customers):**
16+
**Logs:** https://stackoverflow.com/c/expensify/questions/4856
17+
**Expensify/Expensify Issue URL:**
18+
**Issue reported by:**
19+
**Slack conversation** (hyperlinked to channel name):
20+
21+
## Action Performed:
22+
Break down in numbered steps
23+
24+
## Expected Result:
25+
Describe what you think should've happened
26+
27+
## Actual Result:
28+
Describe what actually happened
29+
30+
## Workaround:
31+
Can the user still use Expensify without this being fixed? Have you informed them of the workaround?
32+
33+
## Platforms:
34+
Select the officially supported platforms where the issue was reproduced:
35+
- [ ] Android: App
36+
- [ ] Android: mWeb Chrome
37+
- [ ] iOS: App
38+
- [ ] iOS: mWeb Safari
39+
- [ ] iOS: mWeb Chrome
40+
- [ ] Windows: Chrome
41+
- [ ] MacOS: Chrome / Safari
42+
43+
## Screenshots/Videos
44+
45+
46+
[View all open jobs on GitHub](https://github.com/Expensify/App/issues?q=is%3Aopen+is%3Aissue+label%3A%22Help+Wanted%22)

.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/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

0 commit comments

Comments
 (0)