Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
80 commits
Select commit Hold shift + click to select a range
b243f11
Fix React Compiler warning in Avatar
roryabraham Feb 24, 2026
f4442f8
Fix React Compiler warning in ThumbnailImage
roryabraham Feb 24, 2026
de2d12c
Fix React Compiler warning in RadioButtons
roryabraham Feb 24, 2026
0be8e54
Fix React Compiler warning in PlaidCardFeedIcon
roryabraham Feb 24, 2026
ab0b41b
Fix React Compiler warning in TermsStep
roryabraham Feb 24, 2026
f1ff5f9
Fix React Compiler warning in FreeTrial
roryabraham Feb 24, 2026
2d0b782
Fix React Compiler warning in NewTaskDetailsPage
roryabraham Feb 24, 2026
d20dbcc
Fix React Compiler warning in NewTaskPage
roryabraham Feb 24, 2026
6fe38a8
Fix React Compiler warning in AutoUpdateTime
roryabraham Feb 24, 2026
3eef7c6
Fix React Compiler warning in TransactionStartDateStep
roryabraham Feb 24, 2026
329eef9
Fix React Compiler warning in AmexCustomFeed
roryabraham Feb 24, 2026
8cb0de6
Fix React Compiler warning in TextInputWithSymbol (Android)
roryabraham Feb 24, 2026
3ef5135
Fix React Compiler warning in AnimatedCollapsible
roryabraham Feb 24, 2026
795142d
Fix React Compiler warning in useFilteredSelection
roryabraham Feb 24, 2026
2d89602
Fix React Compiler warning in ReportCardLostConfirmMagicCodePage
roryabraham Feb 24, 2026
f72e00a
Fix React Compiler warnings in VideoPlayerPreview
roryabraham Feb 24, 2026
6e96db4
Fix React Compiler warning in TabSelectorItem
roryabraham Feb 24, 2026
62f792d
Fix React Compiler warning in CountryFullStep
roryabraham Feb 24, 2026
0281b5e
Fix React Compiler warnings in AnimatedSettlementButton
roryabraham Feb 24, 2026
a87d9ec
Fix React Compiler warning in useDismissModalForUSD
roryabraham Feb 24, 2026
62773af
Fix React Compiler warning in SearchMultipleSelectionPicker
roryabraham Feb 24, 2026
477b833
Fix React Compiler warning in LocaleContextProvider
roryabraham Feb 24, 2026
822be79
Fix React Compiler warning in withPolicyConnections
roryabraham Feb 24, 2026
ffa9ca5
Fix React Compiler warning in useFilteredOptions
roryabraham Feb 24, 2026
a074b43
Fix React Compiler warning in WorkspaceOverviewPage
roryabraham Feb 24, 2026
276af30
Fix React Compiler warning in ExpensifyCardContextProvider
roryabraham Feb 24, 2026
6e73814
Fix React Compiler warning in WorkspaceInitialPage
roryabraham Feb 24, 2026
d49c2ae
Fix React Compiler warnings in useAutoFocusInput
roryabraham Feb 24, 2026
fda8a5c
Fix React Compiler warning in OptionListContextProvider
roryabraham Feb 24, 2026
f7a8419
Fix React Compiler warning in useDragAndDrop
roryabraham Feb 24, 2026
e1fc520
Fix React Compiler warnings in Lightbox
roryabraham Feb 24, 2026
b74383b
Reduce ESLint max-warnings from 383 to 350
roryabraham Feb 24, 2026
805d4d6
Simplify prev-tracking patterns, fix typecheck errors, reduce max-war…
roryabraham Feb 24, 2026
028bdb8
Fix WalletStatementPage typecheck: pass encryptedAuthToken to addEncr…
roryabraham Feb 24, 2026
7cc0332
Fix behavioral regressions from Codex review
roryabraham Feb 24, 2026
fa7c39a
Replace prevX state patterns with derived values and better alternatives
roryabraham Feb 24, 2026
dfc51ba
Remove manual memoization from Lightbox and simplify LightboxConcurre…
roryabraham Feb 25, 2026
6373f79
Refactor WalletStatementPage to avoid React Compiler limitations
roryabraham Feb 25, 2026
5f472fe
Fix clearErrors running every render and remove stale eslint suppresses
roryabraham Feb 25, 2026
0a93147
Refactor SearchMultipleSelectionPicker to store IDs instead of objects
roryabraham Feb 25, 2026
5a74319
Remove manual memoization from LocaleContextProvider
roryabraham Feb 25, 2026
f9a2fa4
Merge remote-tracking branch 'origin/main' into rory-react-compiler-s…
roryabraham Feb 25, 2026
3e701ea
Merge remote-tracking branch 'origin/main' into rory-react-compiler-s…
roryabraham Feb 26, 2026
0da3f79
Refactor AnimatedSettlementButton: move reset logic into animation ca…
roryabraham Feb 26, 2026
de2c1ef
Remove unused viewRef from AnimatedSettlementButton
roryabraham Feb 26, 2026
9314fe7
Merge remote-tracking branch 'origin/main' into rory-react-compiler-s…
roryabraham Feb 26, 2026
25e1c4a
Use key={uri} to reset Lightbox state on URI change
roryabraham Feb 26, 2026
d6b5cd2
Remove prevReports dead code from OptionListContextProvider
roryabraham Feb 26, 2026
45e296a
Derive options during render in OptionListContextProvider
roryabraham Feb 26, 2026
9d78a3f
Remove all manual memoization from OptionListContextProvider
roryabraham Feb 26, 2026
7c34a2c
Restore leftElement property on SearchMultipleSelectionPickerItem
roryabraham Feb 26, 2026
a1d4d07
Remove OptionListContextProvider changes (moved to separate PR)
roryabraham Feb 26, 2026
9787471
Remove no-op isLoadingMore state from useFilteredOptions
roryabraham Feb 26, 2026
da6fc94
Derive filtered selection during render in useFilteredSelection
roryabraham Feb 26, 2026
6263cb1
Remove useMemo from ExpensifyCardContextProvider
roryabraham Feb 26, 2026
686897f
Derive newCardID in ReportCardLostConfirmMagicCodePage
roryabraham Feb 26, 2026
47fbe5a
Derive task title/description from local state with Onyx fallback
roryabraham Feb 26, 2026
f640865
Derive date option and start date with Onyx fallback in TransactionSt…
roryabraham Feb 26, 2026
f64fc62
Fix React Compiler error and clean up WorkspaceInitialPage
roryabraham Feb 26, 2026
bc417f8
Remove manual memoization and inline header buttons in WorkspaceOverv…
roryabraham Feb 26, 2026
cef11d7
Merge remote-tracking branch 'origin/main' into rory-react-compiler-s…
roryabraham Feb 26, 2026
e54cb09
Fix CI: ESLint, Prettier, and spellcheck issues
roryabraham Feb 26, 2026
1d1dbc0
Fix CI: restore useState/useEffect for currentLocale in LocaleContext…
roryabraham Feb 26, 2026
17fa51f
Merge remote-tracking branch 'origin/main' into rory-react-compiler-s…
roryabraham Feb 26, 2026
a591414
Fix typecheck: remove non-existent areAllConnectionsSet from test
roryabraham Feb 26, 2026
074678b
Merge remote-tracking branch 'origin/main' into rory-react-compiler-s…
roryabraham Mar 2, 2026
5d91dd8
Merge remote-tracking branch 'origin/main' into rory-react-compiler-s…
roryabraham Mar 5, 2026
a371ffd
Merge remote-tracking branch 'origin/main' into rory-react-compiler-s…
roryabraham Mar 5, 2026
b9d4fff
Fix drag-and-drop overlay not dismissing after drop
roryabraham Mar 5, 2026
4110911
Move scheduleOnRN function to component scope
roryabraham Mar 6, 2026
bf80a6a
Fix prettier
roryabraham Mar 6, 2026
c001093
Drop max warning count
roryabraham Mar 6, 2026
737479b
Add useInitialOnyxValue hook and fix ReportCardLostConfirmMagicCodePa…
roryabraham Mar 6, 2026
c16a7ea
Guard SearchMultipleSelectionPicker consumers against Onyx hydration
roryabraham Mar 6, 2026
0ee3536
Fix prettier
roryabraham Mar 6, 2026
0e76e00
Refactor WorkspaceExpensifyCardPageEmptyState to use global useConfir…
roryabraham Mar 6, 2026
2ea889a
Simplify WorkspaceInitialPage feature state management
roryabraham Mar 6, 2026
a9320cc
Fix prettier
roryabraham Mar 6, 2026
ef63654
Remove manual memoization from SearchFiltersCurrencyBase
roryabraham Mar 6, 2026
b252f5d
Fix subpath alias lint warning in useInitialOnyxValue
roryabraham Mar 6, 2026
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
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
"perf-test": "NODE_OPTIONS=--experimental-vm-modules npx reassure",
"typecheck": "NODE_OPTIONS=--max_old_space_size=8192 tsc",
"typecheck-tsgo": "tsgo --project tsconfig.tsgo.json",
"lint": "NODE_OPTIONS=--max_old_space_size=8192 eslint . --max-warnings=381 --cache --cache-location=node_modules/.cache/eslint --cache-strategy content --concurrency=auto",
"lint": "NODE_OPTIONS=--max_old_space_size=8192 eslint . --max-warnings=335 --cache --cache-location=node_modules/.cache/eslint --cache-strategy content --concurrency=auto",
"lint-changed": "NODE_OPTIONS=--max_old_space_size=8192 ./scripts/lintChanged.sh",
"check-lazy-loading": "ts-node scripts/checkLazyLoading.ts",
"lint-watch": "npx eslint-watch --watch --changed",
Expand Down
17 changes: 9 additions & 8 deletions src/components/AnimatedCollapsible/index.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, {useEffect} from 'react';
import React, {useState} from 'react';
import type {ReactNode} from 'react';
import {View} from 'react-native';
import type {StyleProp, ViewStyle} from 'react-native';
Expand Down Expand Up @@ -76,13 +76,14 @@ function AnimatedCollapsible({
const contentHeight = useSharedValue(0);
const descriptionHeight = useSharedValue(0);
const hasExpanded = useSharedValue(isExpanded);
const [isRendered, setIsRendered] = React.useState(isExpanded);
useEffect(() => {
hasExpanded.set(isExpanded);
if (isExpanded) {
setIsRendered(true);
}
}, [isExpanded, hasExpanded]);
const [isRendered, setIsRendered] = useState(isExpanded);

// Keep Reanimated shared value in sync with prop (idempotent when unchanged)
hasExpanded.set(isExpanded);
// Mount content for collapse animation once expanded; unmount after animation via scheduleOnRN
if (isExpanded && !isRendered) {
setIsRendered(true);
Comment thread
chuckdries marked this conversation as resolved.
}

const animatedHeight = useDerivedValue(() => {
if (!contentHeight.get()) {
Expand Down
29 changes: 9 additions & 20 deletions src/components/AutoUpdateTime.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* Displays the user's local time and updates it every minute.
* The time auto-update logic is extracted to this component to avoid re-rendering a more complex component, e.g. DetailsPage.
*/
import React, {useCallback, useEffect, useMemo, useRef, useState} from 'react';
import React, {useEffect, useRef, useState} from 'react';
import {View} from 'react-native';
import useLocalize from '@hooks/useLocalize';
import useThemeStyles from '@hooks/useThemeStyles';
Expand All @@ -18,33 +18,22 @@ type AutoUpdateTimeProps = {
function AutoUpdateTime({timezone}: AutoUpdateTimeProps) {
const {translate, getLocalDateFromDatetime} = useLocalize();
const styles = useThemeStyles();
/** @returns Returns the locale Date object */
const getCurrentUserLocalTime = useCallback(() => getLocalDateFromDatetime(undefined, timezone.selected), [getLocalDateFromDatetime, timezone.selected]);

const [currentUserLocalTime, setCurrentUserLocalTime] = useState(getCurrentUserLocalTime);
const [, setTick] = useState(0);
Comment thread
roryabraham marked this conversation as resolved.
const minuteRef = useRef(new Date().getMinutes());
const timezoneName = useMemo(() => {
if (timezone.selected) {
return DateUtils.getZoneAbbreviation(currentUserLocalTime, timezone.selected);
}
return '';
}, [currentUserLocalTime, timezone.selected]);
const currentUserLocalTime = getLocalDateFromDatetime(undefined, timezone.selected);
const timezoneName = timezone.selected ? DateUtils.getZoneAbbreviation(currentUserLocalTime, timezone.selected) : '';

useEffect(() => {
// If any of the props that getCurrentUserLocalTime depends on change, we want to update the displayed time immediately
setCurrentUserLocalTime(getCurrentUserLocalTime());

// Also, if the user leaves this page open, we want to make sure the displayed time is updated every minute when the clock changes
// To do this we create an interval to check if the minute has changed every second and update the displayed time if it has
const interval = setInterval(() => {
const currentMinute = new Date().getMinutes();
if (currentMinute !== minuteRef.current) {
setCurrentUserLocalTime(getCurrentUserLocalTime());
minuteRef.current = currentMinute;
if (new Date().getMinutes() === minuteRef.current) {
return;
}
setTick((t) => t + 1);
minuteRef.current = new Date().getMinutes();
}, 1000);
return () => clearInterval(interval);
}, [getCurrentUserLocalTime]);
}, []);

return (
<View style={[styles.w100, styles.detailsPageSectionContainer]}>
Expand Down
13 changes: 5 additions & 8 deletions src/components/Avatar.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, {useEffect, useState} from 'react';
import React, {useState} from 'react';
import type {ImageStyle, StyleProp, ViewStyle} from 'react-native';
import {View} from 'react-native';
import useDefaultAvatars from '@hooks/useDefaultAvatars';
Expand Down Expand Up @@ -77,13 +77,10 @@ function Avatar({
const theme = useTheme();
const styles = useThemeStyles();
const StyleUtils = useStyleUtils();
const [imageError, setImageError] = useState(false);
const [errorSource, setErrorSource] = useState<string | undefined>(undefined);
const imageError = errorSource !== undefined && errorSource === originalSource;

useNetwork({onReconnect: () => setImageError(false)});

useEffect(() => {
setImageError(false);
}, [originalSource]);
useNetwork({onReconnect: () => setErrorSource(undefined)});

const isWorkspace = type === CONST.ICON_TYPE_WORKSPACE;
const userAccountID = isWorkspace ? undefined : (avatarID as number);
Expand Down Expand Up @@ -124,7 +121,7 @@ function Avatar({
<Image
source={{uri: avatarSource}}
style={imageStyle}
onError={() => setImageError(true)}
onError={() => setErrorSource(typeof originalSource === 'string' ? originalSource : undefined)}
cachePolicy="memory-disk"
/>
</View>
Expand Down
1 change: 1 addition & 0 deletions src/components/ImageView/index.native.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import type ImageViewProps from './types';
function ImageView({attachmentID, isAuthTokenRequired = false, url, style, zoomRange = DEFAULT_ZOOM_RANGE, onError}: ImageViewProps) {
return (
<Lightbox
key={url}
attachmentID={attachmentID}
uri={url}
zoomRange={zoomRange}
Expand Down
1 change: 1 addition & 0 deletions src/components/ImageView/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,7 @@ function ImageView({isAuthTokenRequired = false, url, fileName, onError}: ImageV
if (canUseTouchScreen) {
return (
<Lightbox
key={url}
uri={url}
isAuthTokenRequired={isAuthTokenRequired}
onError={onError}
Expand Down
Loading
Loading