Skip to content

Redesign settings screen - #464

Merged
Nodirbek75 merged 5 commits into
mainfrom
feat/redesign-settings-screen
Aug 22, 2025
Merged

Nodirbek75 merged 5 commits into
mainfrom
feat/redesign-settings-screen

Conversation

@Nodirbek75

Copy link
Copy Markdown
Contributor
Screenshot_1755796436

@Nodirbek75 Nodirbek75 self-assigned this Aug 21, 2025
@Nodirbek75 Nodirbek75 linked an issue Aug 21, 2025 that may be closed by this pull request
@islandbitcoin

Copy link
Copy Markdown
Contributor

Feedback:

  • move the "increase your limits" and "request business account" from the transaction limits screen to the Account screen. I should be in the same place that "Backup/Upgrade account" is on the screen when upgrading.
  • move "enable bitcoin account" to the Advanced section.
  • remove "Printable Static QR code" from Ways to get paid section.
  • replace "Point of Sale" link with deep link to Flash POS app (android or iOS)
  • Put Enable Chat inside Chat settings under Experimental
  • move "Need Help? Contact Us" out of the Community section and up to the top, above the Account section.

@islandbitcoin

Copy link
Copy Markdown
Contributor

One more thing:
rename "Keys management" to "Key management"

@Nodirbek75

Copy link
Copy Markdown
Contributor Author

Feedback:

  • move the "increase your limits" and "request business account" from the transaction limits screen to the Account screen. I should be in the same place that "Backup/Upgrade account" is on the screen when upgrading.
  • move "enable bitcoin account" to the Advanced section.
  • remove "Printable Static QR code" from Ways to get paid section.
  • replace "Point of Sale" link with deep link to Flash POS app (android or iOS)
  • Put Enable Chat inside Chat settings under Experimental
  • move "Need Help? Contact Us" out of the Community section and up to the top, above the Account section.

Increase your limits and Backup/Upgrade account buttons do the same job. Putting both on the Account screen doesn't make sense. I think the purpose of having Increase your limits button on the transaction limits screen to be able to upgrade account on that screen as well.

@islandbitcoin

Copy link
Copy Markdown
Contributor

Feedback:

  • move the "increase your limits" and "request business account" from the transaction limits screen to the Account screen. I should be in the same place that "Backup/Upgrade account" is on the screen when upgrading.
  • move "enable bitcoin account" to the Advanced section.
  • remove "Printable Static QR code" from Ways to get paid section.
  • replace "Point of Sale" link with deep link to Flash POS app (android or iOS)
  • Put Enable Chat inside Chat settings under Experimental
  • move "Need Help? Contact Us" out of the Community section and up to the top, above the Account section.

Increase your limits and Backup/Upgrade account buttons do the same job. Putting both on the Account screen doesn't make sense. I think the purpose of having Increase your limits button on the transaction limits screen to be able to upgrade account on that screen as well.

yes, but you cannot upgrade from personal to pro or merchant on the account screen, which doesnt make sense. this needs to be more intuitive, no one is going to the limits screen to upgrade.

@Nodirbek75

Copy link
Copy Markdown
Contributor Author

@islandbitcoin
All feedback has been implemented except:

  • remove "Printable Static QR code" from Ways to get paid section.
  • replace "Point of Sale" link with deep link to Flash POS app (android or iOS)

I’ll implement them once I complete Flash-POS for iOS.

@islandbitcoin islandbitcoin 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.

ACK

@Nodirbek75
Nodirbek75 merged commit 452a3d0 into main Aug 22, 2025
islandbitcoin pushed a commit that referenced this pull request Aug 3, 2026
The invite QuickStart card advertises "Get rewards for inviting friends"
but referral rewards are default-disabled and dark in prod, making it a
false promise. Read the new backend Globals.referralRewardEnabled flag
(the same config that gates the payout) and hide the card unless rewards
are actually enabled instance-wide — one source of truth, no drift.
Defaults hidden while the flag loads, so nothing is promised mid-fetch.

- new hook use-referral-reward-flag.ts (mirrors use-transfer-flags)
- QuickStart filters out the invite card when !referralRewardEnabled
- public-schema.graphql + regenerated codegen

Depends on backend Globals.referralRewardEnabled (flash #464) being live
in the queried env; deployed to TEST as of chart 3.2.47.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
Claude-Session: https://claude.ai/code/session_01C7z7o9J18BWbUnYJcemMtg
islandbitcoin added a commit that referenced this pull request Aug 5, 2026
* feat(invite): graft invite/refer-a-friend onto current main

Re-integrates the invite-a-friend feature (previously on the stale RN-0.72
feat/new-invite-friend branch) onto current main (RN 0.77) as a fresh graft
rather than a conflict-ridden rebase.

New files (verbatim): invite-friend screens (InviteFriend, InviteFriendSuccess,
HandleInviteDeepLink, InviteDeepLinkHandler), contact-picker, Email/PhoneNumber
inputs, settings entry, assets, and the screen test.

Grafted onto main's current versions:
- navigation: register InviteFriend/InviteFriendSuccess routes + param types;
  skip invite URLs in the container so InviteDeepLinkHandler owns them.
- graphql: createInvite/redeemInvite mutations + invitePreview query; hand-grafted
  the generated types/hooks (codegen can't run — backend invite schema lives only
  on the unmerged backend feat/invite branch). Kept npubByUsername (the old branch
  diff wrongly deleted it).
- i18n: HomeScreen.invite{Title,Desc}, SettingsScreen.inviteFriend, InviteFriend.*
  in en + raw en.json + i18n-types.
- app.tsx: wrap RootStack in InviteDeepLinkHandler (onto main's new provider tree,
  without the branch's dropped NostrGroupChatProvider).
- QuickStart: invite quick-action, merged with main's disabled/pending item logic.
- welcome/get-started: pending-invite redemption + invite-token registration routing.
- contact-picker: dropped phantom i18n keys (never existed; literal fallbacks kept),
  typed options as AlertButton[], Text type h3->h2.

Native: added react-native-contacts + react-native-permissions (Contacts only) to
Podfile/Info.plist/AndroidManifest/package.json. pod install succeeded and
regenerated Podfile.lock.

Deliberately SKIPPED: the branch's phone-auth pre-fill changes (phone-login/
registration-input, request-phone-code-*). They alter the useRequestPhoneCodeLogin
signature and touch critical shared auth code main has evolved. The feature works
without them — the deep-link handler stores the token and welcome.tsx redeems it;
pre-fill is only a registration UX nicety, deferred pending an auth-flow build.

Verified: full tsc typecheck clean (0 app errors); invite screen test 5/5 pass;
pod install clean. NOT verified here: iOS Xcode build/link, and end-to-end behavior
(gated on the backend feat/invite schema being deployed). react-native-permissions
pinned at ^4.1.5 may want a v5 bump for RN 0.77 New Arch at build time.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01C7z7o9J18BWbUnYJcemMtg

* test(invite): add InviteFriendSuccess + deep-link redemption tests

Expand invite coverage beyond the InviteFriend screen: InviteFriendSuccess
(contact interpolation, fallback, Done->popToTop) and HandleInviteDeepLink
(redeemPendingInvite success/no-token/duplicate/error paths, useInviteDeepLink
token parsing + store->preview->navigate). 18/18 green (5 existing + 13 new).

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01C7z7o9J18BWbUnYJcemMtg

* fix(invite): make mobile feature CI-green (codegen, i18n, QuickStart, lint)

The grafted invite feature was never CI'd on this branch (RN 0.77):

- codegen: add invite types + Mutation/Query fields to the local
  public-schema.graphql so dev:codegen succeeds; regenerate generated.ts/gql
  canonically (replaces the earlier hand-graft).
- i18n: run update-translations (regenerates i18n-types.ts) and propagate the
  12 invite keys into all 23 locales (English fallback) to clear translation-drift.
- QuickStart: fix raster-asset detection (typeof !== 'function' — the old
  'typeof === number' check crashed under jest's PNG stub); make quick-start
  spec load the 'en' locale so it matches real titles order-independently.
- lint: format the never-linted invite files, drop unused vars, type
  redeemInviteMutation as RedeemInviteMutationFn, tidy InviteFriendSuccess styles.

Gates: jest 222 pass / 0 fail, tsc:check clean, translation-drift clean,
lint-changed 0 errors. Native Android/iOS build checks still need a device build.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01C7z7o9J18BWbUnYJcemMtg

* fix(invite): move QuickStart spacer inline style into makeStyles

lint-changed (react-native/no-inline-styles) flagged the graft's spacer
<View style={{ height: 20 }} />. Move it to styles.spacer.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01C7z7o9J18BWbUnYJcemMtg

* fix(invite): harden deep-link redemption per review findings

- Launch URL processed exactly once (useRef guard): no re-storing an
  already-redeemed token or spurious 'new users only' alerts on auth flips.
- Token extraction is format-agnostic ([^&#\s]+ + decodeURIComponent);
  the backend owns token validation.
- Pending token stored only for unauthenticated sessions, as {token, storedAt}
  with a 24h TTL matching backend invite expiry — closes the cross-account
  redemption leak.
- Stored token cleared only on success or terminal errors (expired/used/
  invalid/own); transient failures keep it for retry. Module-level in-flight
  guard collapses concurrent redemptions to one mutation.
- Removed the backend-ignored X-Invite-Recipient header, the dead getStarted
  invite branch, and the unused invite route-param extensions.
- Comment now states the real link model: app registers flash:// only; the
  backend's https://getflash.io/invite links need the landing redirect or
  App/Universal Links (out-of-repo activation dependency).

Tests: HandleInviteDeepLink 10->21 scenarios. Full suite 233/233; tsc,
lint-changed, translation-drift clean.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01C7z7o9J18BWbUnYJcemMtg

* fix(invite): close re-review findings — Android contacts permission, preview-error triage

- Declare READ_CONTACTS in the Android manifest: the Contacts tab (InviteFriend
  default) was permanently dead on Android — request() returns BLOCKED for an
  undeclared permission and Settings offers no toggle. iOS half already existed.
- invitePreview errors are now triaged: network errors keep the stored token
  and ask to retry; GraphQL errors (the backend throws for malformed/unknown
  tokens) clear the token and surface an invalid-invitation alert — no more
  doomed tokens lingering for 24h with repeat alerts.
- decodeURIComponent runs inside try with raw fallback (malformed %-encoding
  no longer escapes the async handler as an unhandled rejection).
- Dropped phantom nav params (declared undefined, consumed by nothing) and
  their as-never casts; redemption rides AsyncStorage as designed.
- TERMINAL_REDEEM_ERRORS gains the resolver's two other permanent errors
  ('for new users only', 'a different phone number').
- Contact picker awaits Contacts.getAll() so the loading state is real.

Tests: HandleInviteDeepLink 20 -> 24 scenarios. Full suite 237/237; tsc,
lint-changed clean.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01C7z7o9J18BWbUnYJcemMtg

* fix(invite): typo + require-atomic-updates false-positive on the in-flight guard

'Unparseable'->'Unparsable' (typos CI); eslint-disable with rationale on the
finally reset of redeemInFlight (guard is set synchronously before any await).

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01C7z7o9J18BWbUnYJcemMtg

* fix(invite): sync terminal-error list with the backend's same-cycle patches

The backend's one-reward-per-invitee and revoked-invite fixes introduced two
new permanent error strings; recognize both ('already redeemed an invitation'
clears silently, 'no longer valid' clears with notice) so doomed tokens are
not kept for 24h of futile retries. Alert suppression generalized to a
SILENT_REDEEM_ERRORS list; test fixture wording aligned with the resolver's
actual prose. +2 tests.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01C7z7o9J18BWbUnYJcemMtg

* fix(invite): route all invitees to phone signup regardless of channel

Email-invite deep links branched to emailLoginInitiate — a dead end.
Email-based signup does not exist on main, so no verification code is
ever sent and the invitee is stranded on an email-entry screen.

Invite channel and signup method are decoupled (redemption ignores
email-match), so route every invitee to the phone signup flow; the
invite token already rides in AsyncStorage and is redeemed at Welcome
after signup, exactly as SMS/WhatsApp invites do. Only the EMAIL branch
was broken.

Drop the now-unused `method` from the preview destructure; flip the
EMAIL routing test to assert phoneFlow. invite-friend suite 35/35,
tsc:check clean.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
Claude-Session: https://claude.ai/code/session_01C7z7o9J18BWbUnYJcemMtg

* feat(invite): gate the home-screen invite card on referralRewardEnabled

The invite QuickStart card advertises "Get rewards for inviting friends"
but referral rewards are default-disabled and dark in prod, making it a
false promise. Read the new backend Globals.referralRewardEnabled flag
(the same config that gates the payout) and hide the card unless rewards
are actually enabled instance-wide — one source of truth, no drift.
Defaults hidden while the flag loads, so nothing is promised mid-fetch.

- new hook use-referral-reward-flag.ts (mirrors use-transfer-flags)
- QuickStart filters out the invite card when !referralRewardEnabled
- public-schema.graphql + regenerated codegen

Depends on backend Globals.referralRewardEnabled (flash #464) being live
in the queried env; deployed to TEST as of chart 3.2.47.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
Claude-Session: https://claude.ai/code/session_01C7z7o9J18BWbUnYJcemMtg

* test(invite): mock useReferralRewardFlag in the QuickStart spec

QuickStart now reads useReferralRewardFlag from @app/hooks; the
quick-start spec mocks that barrel and lacked the new export, so
rendering QuickStart threw "useReferralRewardFlag is not a function".
Add it to the mock (rewards enabled -> the invite card renders). Full
mobile suite 239/239.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
Claude-Session: https://claude.ai/code/session_01C7z7o9J18BWbUnYJcemMtg

* chore(invite): strip debug logging from the shipped deep-link path

This repo has no remove-console babel transform, so console calls
survive into release builds. Drop the welcome-screen success log and the
nav-container skip/listener logs, and stop printing the deep-link URL in
onReceiveURL — invite links carry one-time tokens, which would otherwise
land in device logs (undoing the backend's token-logging hygiene).

lint-changed clean, tsc clean, full suite 239/239.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
Claude-Session: https://claude.ai/code/session_01C7z7o9J18BWbUnYJcemMtg

---------

Co-authored-by: Dread <[email protected]>
Co-authored-by: Claude Opus 4.8 (1M context) <[email protected]>
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.

[Enhancement] - Redesign settings screen

2 participants