Skip to content

feat(home): refresh home screen chrome - #2936

Draft
CassioMG wants to merge 5 commits into
masterfrom
feature/home-refresh-chrome
Draft

feat(home): refresh home screen chrome#2936
CassioMG wants to merge 5 commits into
masterfrom
feature/home-refresh-chrome

Conversation

@CassioMG

@CassioMG CassioMG commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Part of the Home refresh project. This is the Home screen's chrome — header, action row, tab row, and the new add button. The token and collectible lists are a separate PR.

What changed

Per Figma frames 9567-17044 (Home) and 9673-19461 (Add Collectible):

  • History moves into the top icon row, between the options button and the network globe. The order is now options → history → network.
  • The action row becomes three equal columns — Add / Send / Swap — filling the width. History left the row to make space.
  • The tab row is just Tokens | Collectibles, active tab purple with an underline. The Sliders01 manage button and its whole dropdown are deleted.
  • New floating "Add token" / "Add collectible" pill replaces that dropdown, labelled and routed by the active tab.
  • Hidden collectibles moved from the deleted dropdown to a purple "Show hidden" button on the Add Collectible screen, with new helper text and an X header icon.

Out of scope, deliberately

The frames show an Earn button and a Positions tab. Neither is built — they're separate future features. The action row is a 3-column CSS grid specifically so Earn later becomes repeat(4, 1fr) with no layout rework.

Two real bugs found during verification

Both caught by actually driving the UI, not by reading the diff:

  1. autoFocus on the collection-address input made the new "Show hidden" button unclickable — a blur → validation → layout-shift race meant the click landed somewhere else. Removed the attribute.
  2. The floating pill could overlap and swallow clicks on the last row of a short token list. Found by accountHistory.test.ts's own "Orders failed transactions" case — a test this PR doesn't touch. Fixed with reserved bottom padding in views/Account/styles.scss, not by adjusting the test.

accountHistory.test.ts passes with zero edits

Thirteen call sites depend on data-testid="nav-link-account-history", and the History button moved. NavButton's props interface is closed — it can't accept data-testid at all — so the testid lives on a wrapper <div>, matching how account-options-dropdown and network-selector-open already work in that file. Verified by both running the spec and diffing the file against master.

Analytics

Unchanged. history.full_history_opened moved position but kept its event name and source: "account_header" verbatim — still accurate, since both the old and new positions are in the header.

Note "Manage tokens" is not orphaned by deleting the tab dropdown: the menu already routes to ROUTES.manageAssets.

Also removed a genuinely dead isIncludingIcons prop from TabButtons — its JSDoc claimed it was "used in Send flow", but a grep across src and e2e-tests finds no consumer.

Merge note

Touches views/Account/index.tsx, which the home-lists PR also edits in a different region (this one mounts the pill and trims AccountHeader props; that one moves the unfunded empty state into the Tokens pane). Expect a trivial rebase for whichever merges second.

Verification

  • yarn test:ci — 1520/1571 tests, identical to baseline
  • yarn build:extension — clean
  • e2e: accountHistory (11 passed, unedited), addCollectible, hideCollectible, loadAccount, addAsset — all green
  • Both add-collectible-page snapshots regenerated and visually inspected

Known repo issue

yarn build:extension:translations is broken on master (i18next-scanner-webpack needs .default, extension/webpack.extension.js:3) and the pre-commit hook swallows the failure. New locale keys added by hand to en and pt. Worth its own fix.

🤖 Generated with Claude Code

…e screen

Hand-added the new "Add collectible", "Add token", "Show hidden",
"View history", and helper-copy translation keys to en/pt directly --
yarn build:extension:translations is broken on master
(I18nextWebpackPlugin is not a constructor).

Also drops autoFocus from the collection-address field: with it
focused on mount, the first click anywhere else blurs it and Formik's
validation error shifts the layout down between mousedown and
mouseup, so a first click on the new Show hidden button (or any
control in that area) can land under the wrong element. Confirmed
by instrumenting the click in a throwaway e2e run: the handler never
fired with a real (non-forced) click until autoFocus was removed.
--update-snapshots=all only regenerated add-collectible-page-chromium-
darwin.png; the project has a `name` field so Playwright never writes
the plain -darwin.png variant. Both are the same chromium/darwin
capture, so the plain file is synced to match byte-for-byte after
visually confirming the regenerated PNG. Both were inspected: X close
icon, Show hidden link, and helper text render correctly with no other
regressions. Also noticed the prior checked-in snapshot was already
stale on master (old "Collectible address" placeholder copy and a
paste-icon affordance neither exists in current source) -- unrelated
pre-existing drift that this regeneration incidentally corrects.
Task 7's full e2e pass caught a real click-interception bug:
accountHistory.test.ts "Orders failed transactions..." clicks the USDC
row after returning to the Tokens tab, and with only two balances the
last row sits where the absolutely-positioned FloatingAddButton is
pinned, so the pill silently ate the click (Playwright reported the
row's own click as intercepted by the pill's subtree). Reserving
bottom padding on the sliding pane so real content never renders
underneath the pill fixes it for both the Tokens and Collectibles
panes without touching accountHistory.test.ts.
@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-a6949e94933b9a488a8a (SDF collaborators only — install instructions in the release description)

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.

1 participant