Skip to content
Open
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
25 changes: 4 additions & 21 deletions app/(protected)/(tabs)/_layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,13 @@ import lightningAnimation from '@/assets/tabs-icons/lightning.json';
import { CustomTabBar } from '@/components/CustomTabBar';
import { HapticTab } from '@/components/HapticTab';
import { LottieTabIcon } from '@/components/LottieTabIcon';
import { NewCustomTabBar } from '@/components/tabBar/NewCustomTabBar';
import RewardsTabIcon from '@/components/tabBar/RewardsTabIcon';
import TabBarBackground from '@/components/ui/TabBarBackground';
import { path } from '@/constants/path';
import { useDimension } from '@/hooks/useDimension';
import { useIsTestUser } from '@/hooks/useIsTestUser';

export default function TabLayout() {
const { isDesktop } = useDimension();
const isTestUser = useIsTestUser();

return (
<Tabs
Expand Down Expand Up @@ -51,11 +48,7 @@ export default function TabLayout() {
position: 'absolute',
},
}}
tabBar={
!isDesktop
? props => (isTestUser ? <NewCustomTabBar {...props} /> : <CustomTabBar {...props} />)
: undefined
}
tabBar={!isDesktop ? props => <CustomTabBar {...props} /> : undefined}
backBehavior="history"
>
<Tabs.Screen
Expand Down Expand Up @@ -179,21 +172,11 @@ export default function TabLayout() {
// Pushed white tier-star image, centered in a full-size box so its
// icon↔label gap matches the other tabs.
tabBarIcon: ({ size }) => <RewardsTabIcon size={size ?? 28} />,
// Only surface the Rewards tab (and its route) for whitelisted users;
// the whitelisted NewCustomTabBar renders Wallet/Savings/Rewards.
href: isTestUser ? path.REWARDS : null,
// Only surface the Rewards tab (and its route) on qa/preview builds;
// the redesigned NewCustomTabBar renders Wallet/Savings/Rewards.
href: null,
}}
/>
{isTestUser && (
<Tabs.Screen
name="stocks"
options={{
title: 'Stocks',
headerShown: false,
href: path.STOCKS,
}}
/>
)}
<Tabs.Screen
name="referral"
options={{
Expand Down
53 changes: 13 additions & 40 deletions app/(protected)/(tabs)/card/details.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@
import { CircularActionButton } from '@/components/Card/CircularActionButton';
import { CreditLineCards } from '@/components/Card/CreditLine/CreditLineCards';
import ManagePinModal from '@/components/Card/ManagePinModal';
import CardHeroTarget from '@/components/Card/NewCardDetails/CardHeroTarget';

Check warning on line 25 in app/(protected)/(tabs)/card/details.tsx

View workflow job for this annotation

GitHub Actions / lint

'CardHeroTarget' is defined but never used. Allowed unused vars must match /^_/u
import NewCardArt from '@/components/Card/NewCardDetails/NewCardArt';
import ShowDetailsButton from '@/components/Card/NewCardDetails/ShowDetailsButton';

Check warning on line 27 in app/(protected)/(tabs)/card/details.tsx

View workflow job for this annotation

GitHub Actions / lint

'ShowDetailsButton' is defined but never used. Allowed unused vars must match /^_/u
import WithdrawToCardModal from '@/components/Card/WithdrawToCardModal';
import PageLayout from '@/components/PageLayout';
import { Button } from '@/components/ui/button';
Expand All @@ -48,7 +48,6 @@
import { useCardWithdrawals } from '@/hooks/useCardWithdrawals';
import { useCustomer } from '@/hooks/useCustomer';
import { useDimension } from '@/hooks/useDimension';
import { useIsTestUser } from '@/hooks/useIsTestUser';
import { freezeCard, unfreezeCard } from '@/lib/api';
import { getAsset } from '@/lib/assets';
import { isProduction } from '@/lib/config';
Expand All @@ -62,13 +61,12 @@
const { provider } = useCardProvider();
const { data: customer } = useCustomer();
const { isScreenMedium } = useDimension();
// Whitelisted internal users get the redesigned mobile card screen (Card
// Balance headline, full-row Show details, card view-transition). Public users
// and desktop keep the existing layout untouched.
const isTestUser = useIsTestUser();
// qa/preview builds get the redesigned mobile card screen (Card Balance
// headline, full-row Show details, card view-transition). Production keeps the
// existing layout untouched.
// While the card hero transition is flying, the real card is hidden; hide the
// peek button too so it doesn't sit detached under the empty card slot.
const heroActive = useCardHeroStore(state => state.active);

Check warning on line 69 in app/(protected)/(tabs)/card/details.tsx

View workflow job for this annotation

GitHub Actions / lint

'heroActive' is assigned a value but never used. Allowed unused vars must match /^_/u

useCardWithdrawals({ limit: 10 }, { refetchInterval: 300000 });

Expand Down Expand Up @@ -230,7 +228,7 @@
}

// Mobile layout
const cardImageSection = (

Check warning on line 231 in app/(protected)/(tabs)/card/details.tsx

View workflow job for this annotation

GitHub Actions / lint

'cardImageSection' is assigned a value but never used. Allowed unused vars must match /^_/u
<CardImageSection
isScreenMedium={isScreenMedium}
isCardFrozen={isCardFrozen}
Expand All @@ -240,46 +238,22 @@
shouldRevealDetails={shouldRevealDetails}
onCardDetailsLoaded={handleCardDetailsLoaded}
provider={provider}
useNewCard={isTestUser}
last4={cardLast4}
/>
);

return (
// Whitelisted screen renders immediately (never the full-screen loader): the
// The redesigned screen renders immediately (never the full-screen loader): the
// card must be laid out right away so the hero transition can measure its
// destination and land smoothly. Data fills in as it arrives (balance/last-4
// are usually already warm from the home screen's query).
<PageLayout isLoading={isTestUser ? false : isLoading}>
{/* Whitelisted screen drops the "Card" heading — the card image is the top
section; public/desktop keep the heading. */}
{!isTestUser && pageHeader}
<PageLayout isLoading={isLoading}>
{/* The redesigned screen drops the "Card" heading — the card image is the top
section; production/desktop keep the heading. */}
{pageHeader}
<View className="mx-auto w-full max-w-lg px-4">
<View className={cn('flex-1', isTestUser && 'pt-4')}>
{!isTestUser && <BalanceDisplay amount={availableAmount} />}
{isTestUser ? (
// Card is the top section, full-bleed (cancel the container's px-4) to
// match the home card width. The Show details button peeks out from
// behind it (card sits above via z-10).
<View style={styles.fullBleedCard} className="relative mb-6">
{/* pointerEvents none: the card sits above the button (z-10) and
its bounds include the transparent bottom-shadow region that
overlaps the button — without this it would swallow the button's
taps. The card itself isn't interactive on this screen. */}
<View className="z-10" style={styles.cardLift} pointerEvents="none">
<CardHeroTarget>{cardImageSection}</CardHeroTarget>
</View>
<ShowDetailsButton
peek
hidden={heroActive}
isFlipped={isCardFlipped}
isLoading={isLoadingCardDetails}
onPress={handleCardFlip}
/>
</View>
) : (
cardImageSection
)}
<View className={cn('flex-1')}>
<BalanceDisplay amount={availableAmount} />
<CardActions
isCardFrozen={isCardFrozen}
canUnfreeze={!!canUnfreeze}
Expand All @@ -290,7 +264,6 @@
onFreezeToggle={handleFreezeToggle}
isWithdrawFromCardAllowed={isWithdrawFromCardAllowed}
isRain={provider === CardProvider.RAIN}
hideCardDetailsButton={isTestUser}
/>
<CreditLineCards className="mb-4" />
<CashbackDisplay cashback={cardDetails?.cashback} />
Expand Down Expand Up @@ -541,7 +514,7 @@
shouldRevealDetails: boolean;
onCardDetailsLoaded: () => void;
provider?: CardProvider | null;
/** Whitelisted screen: render the new VISA Platinum artwork (with code-drawn
/** Redesigned screen: render the new VISA Platinum artwork (with code-drawn
* glyph badge + white "reveal" overlay) instead of the legacy card image. */
useNewCard?: boolean;
/** Last 4 digits for the glyph badge (new card only). */
Expand Down Expand Up @@ -841,7 +814,7 @@
onFreezeToggle: () => Promise<void>;
isWithdrawFromCardAllowed: boolean;
isRain: boolean;
/** Hide the circular "Card details" action (whitelisted screen uses a full-row button instead). */
/** Hide the circular "Card details" action (redesigned screen uses a full-row button instead). */
hideCardDetailsButton?: boolean;
}

Expand Down Expand Up @@ -1096,7 +1069,7 @@
opacity: 0.25,
},

// Whitelisted card: extend past the container's px-4 (16px) padding so the
// Redesigned card: extend past the container's px-4 (16px) padding so the
// card is as wide as the home screen card.
fullBleedCard: { marginHorizontal: -16 },
// The artwork's bottom ~6.5% is transparent drop-shadow. RN resolves % margins
Expand Down
13 changes: 5 additions & 8 deletions app/(protected)/(tabs)/index.native.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import LazyHomeBanners from '@/components/Dashboard/LazyHomeBanners';
import HomeCashbackCard from '@/components/Home/HomeCashbackCard';
import HomeSavingsStatCard from '@/components/Home/HomeSavingsStatCard';
import HomeVirtualCard from '@/components/Home/HomeVirtualCard';
import HomeScreenNew from '@/components/Home/NewHome/HomeScreenNew';
import PageLayout from '@/components/PageLayout';
import SpinWinCard from '@/components/SpinAndWin/SpinWinCard';
import Skeleton from '@/components/ui/skeleton';
Expand All @@ -21,7 +20,6 @@ import { useUserTransactions } from '@/hooks/useAnalytics';
import { useCardDetails } from '@/hooks/useCardDetails';
import { useCardStatus } from '@/hooks/useCardStatus';
import { useCurrentGiveaway, useGiveawayCountdown } from '@/hooks/useGiveaway';
import { useIsTestUser } from '@/hooks/useIsTestUser';
import { MONITORED_COMPONENTS, useRenderMonitor } from '@/hooks/useRenderMonitor';
import { useSpinStatus } from '@/hooks/useSpinWin';
import { useTotalSavingsUSD } from '@/hooks/useTotalSavingsUSD';
Expand All @@ -40,8 +38,8 @@ import { useUserStore } from '@/store/useUserStore';
* Web keeps its own layout in `index.tsx`; this `.native.tsx` variant is used on
* iOS/Android only (resolved by Metro).
*
* Whitelisted internal users see the redesigned `HomeScreenNew`; everyone else
* keeps this `LegacyHome`. The gate lives in the default export below.
* qa/preview builds see the redesigned `HomeScreenNew`; production keeps this
* `LegacyHome`. The gate lives in the default export below.
*/
function LegacyHome() {
useRenderMonitor({ componentName: MONITORED_COMPONENTS.HOME_SCREEN });
Expand Down Expand Up @@ -197,8 +195,7 @@ function LegacyHome() {
}

export default function Home() {
// Whitelisted internal team members see the redesigned wallet screen; all
// other users keep the existing design. Native is never desktop.
const showNewHome = useIsTestUser();
return showNewHome ? <HomeScreenNew /> : <LegacyHome />;
// qa/preview builds see the redesigned wallet screen; production keeps the
// existing design. Native is never desktop.
return <LegacyHome />;
}
7 changes: 1 addition & 6 deletions app/(protected)/(tabs)/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import DashboardHeaderButtons from '@/components/Dashboard/DashboardHeaderButtons';
import LazyHomeBanners from '@/components/Dashboard/LazyHomeBanners';
import HomeEmptyState from '@/components/Home/EmptyState';
import HomeScreenNew from '@/components/Home/NewHome/HomeScreenNew';

Check warning on line 11 in app/(protected)/(tabs)/index.tsx

View workflow job for this annotation

GitHub Actions / lint

'HomeScreenNew' is defined but never used. Allowed unused vars must match /^_/u
import PageLayout from '@/components/PageLayout';
import SpinWinCard from '@/components/SpinAndWin/SpinWinCard';
import Skeleton from '@/components/ui/skeleton';
Expand All @@ -24,7 +24,6 @@
import { useCardStatus } from '@/hooks/useCardStatus';
import { useDimension } from '@/hooks/useDimension';
import { useCurrentGiveaway, useGiveawayCountdown } from '@/hooks/useGiveaway';
import { useIsTestUser } from '@/hooks/useIsTestUser';
import { MONITORED_COMPONENTS, useRenderMonitor } from '@/hooks/useRenderMonitor';
import { useSpinStatus } from '@/hooks/useSpinWin';
import { useTotalSavingsUSD } from '@/hooks/useTotalSavingsUSD';
Expand Down Expand Up @@ -261,9 +260,5 @@
}

export default function Home() {
const { isDesktop } = useDimension();
// Whitelisted internal team members on mobile-web see the redesigned wallet
// screen; desktop web and all other users keep the existing design.
const showNewHome = useIsTestUser() && !isDesktop;
return showNewHome ? <HomeScreenNew /> : <LegacyHome />;
return <LegacyHome />;
}
7 changes: 1 addition & 6 deletions app/(protected)/(tabs)/rewards/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import ReferralProgramModal from '@/components/Referral/ReferralProgramModal';
import CashbackCard from '@/components/Rewards/CashbackCard';
import GetCardRewardsBanner from '@/components/Rewards/GetCardRewardsBanner';
import RewardsScreenNew from '@/components/Rewards/NewRewards/RewardsScreenNew';

Check warning on line 12 in app/(protected)/(tabs)/rewards/index.tsx

View workflow job for this annotation

GitHub Actions / lint

'RewardsScreenNew' is defined but never used. Allowed unused vars must match /^_/u
import RewardsDashboard from '@/components/Rewards/RewardsDashboard';
import RewardsWelcomePopup from '@/components/Rewards/RewardsWelcomePopup';
import TierBenefitsCards from '@/components/Rewards/TierBenefitsCards';
Expand All @@ -18,19 +18,14 @@
import { TRACKING_EVENTS } from '@/constants/tracking-events';
import { useCardStatus } from '@/hooks/useCardStatus';
import { useDimension } from '@/hooks/useDimension';
import { useIsTestUser } from '@/hooks/useIsTestUser';
import { useOptInToRewards, useRewardsUserData } from '@/hooks/useRewards';
import { track } from '@/lib/analytics';
import { hasCard } from '@/lib/utils';
import { useRewards } from '@/store/useRewardsStore';
import { useRewardsWelcomePopupStore } from '@/store/useRewardsWelcomePopupStore';

export default function Rewards() {
// Whitelisted internal team members see the redesigned rewards screen; all
// other users — and every desktop-web user — keep the existing design.
const { isDesktop } = useDimension();
const showNew = useIsTestUser() && !isDesktop;
return showNew ? <RewardsScreenNew /> : <LegacyRewards />;
return <LegacyRewards />;
}

function LegacyRewards() {
Expand Down
7 changes: 1 addition & 6 deletions app/(protected)/(tabs)/savings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ import {
} from '@/hooks/useAnalytics';
import { useDepositCalculations } from '@/hooks/useDepositCalculations';
import { useDimension } from '@/hooks/useDimension';
import { useIsTestUser } from '@/hooks/useIsTestUser';
import { MONITORED_COMPONENTS, useRenderMonitor } from '@/hooks/useRenderMonitor';
import { useSavingsSummary } from '@/hooks/useSavingsSummary';
import useUser from '@/hooks/useUser';
Expand All @@ -44,11 +43,7 @@ import { useDepositStore } from '@/store/useDepositStore';
import { useSavingStore } from '@/store/useSavingStore';

export default function Savings() {
// Whitelisted internal team members see the redesigned savings screen; all
// other users — and every desktop-web user — keep the existing design.
const { isDesktop } = useDimension();
const showNew = useIsTestUser() && !isDesktop;
return showNew ? <SavingsScreenNew /> : <LegacySavings />;
return <LegacySavings />;
}

function LegacySavings() {
Expand Down
5 changes: 2 additions & 3 deletions app/(protected)/(tabs)/settings/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ import { Text } from '@/components/ui/text';
import { path } from '@/constants/path';
import { getTierDisplayName, getTierIcon } from '@/constants/rewards';
import { useDimension } from '@/hooks/useDimension';
import { useIsTestUser } from '@/hooks/useIsTestUser';
import useNotificationPermissionStatus from '@/hooks/useNotificationPermissionStatus';
import { useRewardsUserData } from '@/hooks/useRewards';
import useUser from '@/hooks/useUser';
Expand Down Expand Up @@ -116,8 +115,8 @@ const MobileSettings = () => {
const currentTier = rewardsData?.currentTier ?? RewardsTier.CORE;
const displayName = getUserDisplayName(user, 18);
const [isReferralModalOpen, setIsReferralModalOpen] = useState(false);
// GoodDollar is internal-only: shown only to whitelisted test users.
const canSeeGoodDollar = useIsTestUser();
// GoodDollar is in development: shown only on qa/preview builds, hidden in production.
const canSeeGoodDollar = false;

const rowGroups: MobileSettingsRow[][] = [
[
Expand Down
2 changes: 1 addition & 1 deletion app/(protected)/_layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ export default function ProtectedLayout() {
}}
/>
</Stack>
{/* Root-level hero overlay for the card view-transition (whitelisted new
{/* Root-level hero overlay for the card view-transition (redesigned
screens only — stays dormant/null otherwise). Mounted above the whole
navigator so the card can fly across the home → card/details change. */}
<CardHeroOverlay />
Expand Down
5 changes: 2 additions & 3 deletions components/AccountCenter/AccountCenterDropdown.web.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import {
DropdownMenuSeparator,
DropdownMenuTrigger,
} from '@/components/ui/dropdown-menu';
import { useIsTestUser } from '@/hooks/useIsTestUser';
import useUser from '@/hooks/useUser';
import { cn } from '@/lib/utils';

Expand All @@ -30,8 +29,8 @@ const cursorDefaultClassName =
const AccountCenterDropdown = () => {
const insets = useSafeAreaInsets();
const { handleLogout } = useUser();
// GoodDollar is internal-only: shown only to whitelisted test users.
const canSeeGoodDollar = useIsTestUser();
// GoodDollar is in development: shown only on qa/preview builds, hidden in production.
const canSeeGoodDollar = false;

const contentInsets = {
top: insets.top,
Expand Down
2 changes: 1 addition & 1 deletion components/Card/NewCardDetails/ShowDetailsButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ interface ShowDetailsButtonProps {

/**
* "Show details" / "Hide details" button (lucide eye open/close), replacing the
* small circular "Card details" action for whitelisted users. In `peek` mode it
* small circular "Card details" action on the redesigned screen. In `peek` mode it
* slides out from underneath the card image.
*/
const ShowDetailsButton = ({
Expand Down
6 changes: 2 additions & 4 deletions components/DepositToVault/VaultSelectorDropdown.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import { useShallow } from 'zustand/react/shallow';

import { Text } from '@/components/ui/text';
import { VAULTS } from '@/constants/vaults';
import { useIsTestUser } from '@/hooks/useIsTestUser';
import useVaultDepositConfig from '@/hooks/useVaultDepositConfig';
import { getAsset } from '@/lib/assets';
import { Vault } from '@/lib/types';
Expand All @@ -31,7 +30,6 @@ const VaultSelectorDropdown = () => {
setPrincipalToken: state.setPrincipalToken,
})),
);
const isTestUser = useIsTestUser();

const [isOpen, setIsOpen] = useState(false);

Expand Down Expand Up @@ -62,7 +60,7 @@ const VaultSelectorDropdown = () => {

const handleSelect = (index: number) => {
const vault = VAULTS[index];
const isComingSoon = !!vault?.isComingSoon && !isTestUser;
const isComingSoon = !!vault?.isComingSoon;
if (isComingSoon || !vault) return;

selectVaultForDeposit(index);
Expand Down Expand Up @@ -137,7 +135,7 @@ const VaultSelectorDropdown = () => {
<View className="overflow-hidden rounded-2xl bg-card">
{VAULTS.map((vault, index) => {
const isSelected = vault.name === selectedVault.name;
const isComingSoon = !!vault.isComingSoon && !isTestUser;
const isComingSoon = !!vault.isComingSoon;
return (
<Pressable
key={vault.name}
Expand Down
4 changes: 2 additions & 2 deletions components/Home/NewHome/HomeScreenNew.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ import { formatBalanceUSD, hasCard } from '@/lib/utils';
import { useUserStore } from '@/store/useUserStore';

/**
* Redesigned home/wallet screen (Apple "glass" style), shown only to whitelisted
* internal users via the dispatcher in index(.native).tsx. Public users and all
* Redesigned home/wallet screen (Apple "glass" style), shown only on qa/preview
* builds via the dispatcher in index(.native).tsx. Production and all
* desktop-web users keep LegacyHome.
*
* Big "Wallet Balance" number = wallet token balance (excludes soUSD/soFUSE).
Expand Down
2 changes: 1 addition & 1 deletion components/Navbar/HeaderBellButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { Bell } from 'lucide-react-native';
import { path } from '@/constants/path';

/**
* Circular bell button shown in the top-right of the whitelisted mobile header.
* Circular bell button shown in the top-right of the redesigned mobile header.
* Replaces the Activity bottom tab as the entry point to the Activity feed.
* Styling matches WhatsNewButton / AccountCenterTrigger.
*/
Expand Down
2 changes: 1 addition & 1 deletion components/Navbar/HeaderProfileButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import ProfileIcon from '@/assets/images/profile';
import { path } from '@/constants/path';

/**
* Circular profile button for the top-left of the whitelisted mobile header.
* Circular profile button for the top-left of the redesigned mobile header.
* Icon-only (no chevron) to mirror the bell button on the right. Opens Settings.
*/
const HeaderProfileButton = () => {
Expand Down
Loading
Loading