Skip to content

chore(wallets): extract WalletRow, RenameWallet and AddWallet into components - #2929

Merged
CassioMG merged 3 commits into
masterfrom
chore/wallets-extract-subcomponents
Aug 4, 2026
Merged

CassioMG merged 3 commits into
masterfrom
chore/wallets-extract-subcomponents

Conversation

@CassioMG

@CassioMG CassioMG commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Why this PR exists

This is the first step of the Home refresh project. That work redesigns the Home screen plus
six related screens, and it's being split into small, independently reviewable PRs rather than one
large one.

Three of those upcoming PRs each restyle a different piece of the Wallets screen:

Upcoming PR Restyles
Wallets list the account rows + a new 4-button header
Rename modal the rename dialog
Add wallet the "add a wallet" sheet

The problem: all three of those components currently live in the same 494-line file,
views/Wallets/index.tsx. Three PRs rewriting one file would conflict on every merge, and each
review would show the other two PRs' churn as noise.

This PR splits that file so those three PRs can each touch a different file and be reviewed on
their own.

What this PR does

Pure extraction — no behavior changes. Nothing about the app changes: same rendered DOM, same
CSS, same props, same analytics. Only which file the code lives in.

Three components move out of views/Wallets/index.tsx into their own directories, following the
existing convention of the 28 other components already under popup/components/account/:

Demo sample (no behavior changes)

pr0-code-extraction.mov

Deliberately not done

  • No new unit tests. These components are moved, not written. The existing
    loadAccount.test.ts flow is the regression guard, and any test written against the ellipsis
    dropdown would be deleted by the Wallets-list PR, which removes that dropdown.
  • Four dead/undefined CSS classes are carried unchanged.Wallets__fail,
    .detail-indentifier (typo'd, no consumer), .WalletRow__options-actions, and
    .AddWallet__row-link. Removing them would have changed the compiled CSS and forfeited the
    equivalence check above. Each is assigned to the follow-up PR that rewrites its area.
  • Two pre-existing 'await' has no effect warnings in views/Wallets/index.tsx are left
    alone. They come from await dispatch(...) on plain createSlice actions and are unchanged
    from master — only their line numbers shifted. The Wallets-list PR rewrites that exact block
    and will clean them up.

Merge note for the follow-ups

The three follow-up PRs each own a different component file, but all three still touch small
regions of views/Wallets/styles.scss (the two overlay wrapper classes plus the dropdown block
being deleted). Merging Wallets list → Rename modal → Add wallet in that order keeps the
rebases trivial.

🤖 Generated with Claude Code

@github-actions

github-actions Bot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

PR Preview build is ready: https://github.com/stellar/freighter/releases/tag/untagged-8e3e0781bee67998aacf (SDF collaborators only — install instructions in the release description)

@CassioMG
CassioMG marked this pull request as ready for review August 4, 2026 02:16
Copilot AI review requested due to automatic review settings August 4, 2026 02:16
@CassioMG CassioMG self-assigned this Aug 4, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Extracts Wallets subcomponents into dedicated account component directories without changing behavior.

Changes:

  • Extracts WalletRow, RenameWallet, and AddWallet.
  • Moves component-specific styles alongside each component.
  • Retains parent-owned overlay and dropdown styles in the Wallets view.

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated no comments.

Show a summary per file
File Description
views/Wallets/index.tsx Uses extracted components.
views/Wallets/styles.scss Retains view-level styles.
components/account/WalletRow/index.tsx Defines the extracted wallet row.
components/account/WalletRow/styles.scss Holds wallet-row styles.
components/account/RenameWallet/index.tsx Defines the extracted rename form.
components/account/RenameWallet/styles.scss Holds rename-form styles.
components/account/AddWallet/index.tsx Defines the extracted add-wallet view.
components/account/AddWallet/styles.scss Holds add-wallet styles.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@CassioMG

CassioMG commented Aug 4, 2026

Copy link
Copy Markdown
Contributor Author

Code review

No issues found. Checked for bugs and CLAUDE.md compliance.

🤖 Generated with Claude Code

@CassioMG
CassioMG merged commit a8633aa into master Aug 4, 2026
12 checks passed
@CassioMG
CassioMG deleted the chore/wallets-extract-subcomponents branch August 4, 2026 02:29
@CassioMG

CassioMG commented Aug 4, 2026

Copy link
Copy Markdown
Contributor Author

Merged this right away since it's pure component extraction verbatim with no behavior change to unblock other work as described on the PR

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