Skip to content

feat(rain-sunset): show a closed card for holders whose card the sunset closed - #2911

Open
MusabShakeel576 wants to merge 1 commit into
masterfrom
claude/rain-sunset-bulk-cancel
Open

MusabShakeel576 wants to merge 1 commit into
masterfrom
claude/rain-sunset-bulk-cancel

Conversation

@MusabShakeel576

@MusabShakeel576 MusabShakeel576 commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Rain sunset: the backend can now close, in bulk, the Rain cards of users who never got the new card (Solid-Money/solid-backend#2345). In the app a closed card used to read as "no card":

  • Home offered "Activate card".
  • The card flow showed "Start spending".
  • A card-info link drew the card as if it still worked.
  • Every way to the money left on it disappeared, because the balance was only read while the card was held.

/cards/status now carries rainSunset.cardClosed, and the app uses it:

  • Balance stays reachable. The closed card's balance is still read, and the withdraw screen still opens. The collateral read is enabled for a closed card even when the card provider no longer resolves.
  • Home banner:
    • closed-balance: "Your card was closed" / "Withdraw the $X left on it to your wallet", with Withdraw and, where available, "Get new card". Not closable while money is left.
    • closed-empty: for users with no new card where they live. Closable.
    • Otherwise the new-card banner, worded "Your previous card was closed".
  • New screen, /card/closed: explains the closed card, with Withdraw and/or "Get your new card".
    • /card, the activate screen, Home's card tap and ?screen=card-info links send closed-card users there, or to the new card.
    • The new-card and withdraw screens return them there instead of to the card pane.
  • Card notice and pane show "Card closed" and hide the card actions (Add funds, Freeze, Manage).
  • Home prompt ladder no longer offers to activate a card the sunset closed.
  • Copy: the withdraw screen and the new-card intro have closed-card wording. Rain is never named.

Works with older backends: without cardClosed nothing changes.

Tests

  • lib/utils/__tests__/rainSunset.test.ts covers, for a closed card:
    • the balance read;
    • each banner state;
    • the copy;
    • routing (routesToClosedCard).
  • lib/utils/__tests__/homePromptStep.test.ts: no "Activate card" for a sunset-closed card.
  • Full jest run: everything passes except 24 suites that also fail on unchanged master in this environment (a Jest transform problem and private @wirexapp / Firebase packages that aren't installed). None of them touch these files.
  • tsc --noEmit: no errors in the changed files. The 24 remaining errors are the same missing-package ones as on master.
  • ESLint and Prettier: clean.

Release

This is JS-only (no native changes), so it can ship as an OTA update to 2.1.0.


Generated by Claude Code


See it in action
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

Summary by CodeRabbit

  • New Features
    • Added a dedicated screen for cards closed during the Rain sunset, with guidance based on card status, available balance, and new-card availability.
    • Customers with a remaining balance can access withdrawal options; closed-card screens and notices clarify that the balance remains theirs.
    • Home banners and card entry points now direct customers to the appropriate withdrawal, new-card, or home option.
    • Closing notices now display for closed cards, with updated headings and country-aware messaging.

…et closed

The Rain sunset's bulk cancel closes the cards of users who never got the
new card. Until now a closed card read as "no card":
- Home offered to "Activate card".
- The card flow showed "Start spending".
- A card-info link drew the card as if it still worked.
- Every way to the money left on it was hidden, because the balance was
  only read while the card was held.

/cards/status now carries rainSunset.cardClosed, and the app uses it:
- The balance on a closed card is still read, and its withdrawal stays
  reachable. The collateral read is enabled for it even when the
  provider no longer resolves.
- Home banner, closed-balance state: "Your card was closed - withdraw
  what is left", plus the new card where it is available. Not closable
  while money is left.
- Home banner, closed-empty state: closable, for users with no new card
  where they live. Otherwise the banner offers the new card, with
  "your previous card was closed" copy.
- A new /card/closed screen explains the closed card, with Withdraw
  and/or "Get your new card".
  - /card, the activate screen, Home's card, and card-info links send
    closed-card users there or to the new card.
  - The new-card and withdraw screens send them back there, not to the
    card pane.
- The card notice and the pane show "Card closed" and hide the card
  actions (Add funds, Freeze, Manage).
- The Home prompt ladder no longer offers to activate a card the sunset
  closed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015YMpab2Vw47wWsFWh3YQxz
@vercel

vercel Bot commented Nov 24, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

2 Skipped Deployments
Project Deployment Actions Updated
solid-app Ignored Ignored Nov 24, 2026 8:00am UTC
solid-app-staging Ignored Ignored Nov 24, 2026 8:00am UTC

Request Review

@coderabbitai

coderabbitai Bot commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

Note

CodeRabbit ASCII loading animation

Currently processing new changes in this PR. This may take a few minutes, please wait...

Review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 16e7fed and 83486af.

Files selected for processing: 20

  • app/(protected)/(tabs)/card/_layout.tsx
  • app/(protected)/(tabs)/card/activate.tsx
  • app/(protected)/(tabs)/card/closed.tsx
  • app/(protected)/(tabs)/card/index.tsx
  • components/Card/NewCardDetails/CardDetailsPane.tsx
  • components/Card/RainSunset/RainCardClosedScreen.tsx
  • components/Card/RainSunset/RainClosingCardNotice.tsx
  • components/Card/RainSunset/RainClosingHomeBanner.tsx
  • components/Card/RainSunset/RainClosingWithdraw.tsx
  • components/Card/RainSunset/RainNewCardScreen.tsx
  • components/Home/NewHome/HomeScreenNew.tsx
  • components/Home/NewHome/HomeWalletCard.tsx
  • constants/path.ts
  • hooks/useCardCollateralAvailable.ts
  • hooks/useRainSunset.ts
  • lib/types.ts
  • lib/utils/__tests__/homePromptStep.test.ts
  • lib/utils/__tests__/rainSunset.test.ts
  • lib/utils/homePromptStep.ts
  • lib/utils/rainSunset.ts

Copy link
Copy Markdown
Contributor Author

@coderabbitai review


Generated by Claude Code

@coderabbitai

coderabbitai Bot commented Nov 24, 2026

Copy link
Copy Markdown
Contributor
Action performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants