Skip to content

Remove Points and Self Apps screens, update navigation and copy#1945

Merged
transphorm merged 8 commits intodevfrom
justin/self-2311-clean-up-app
Apr 9, 2026
Merged

Remove Points and Self Apps screens, update navigation and copy#1945
transphorm merged 8 commits intodevfrom
justin/self-2311-clean-up-app

Conversation

@transphorm
Copy link
Copy Markdown
Member

@transphorm transphorm commented Apr 8, 2026

Summary

  • Remove all Points, PointsInfo, and Gratification screens and their entry points (~3,300 lines deleted) to unblock the 3.0 release
  • Simplify the HomeScreen referral flow to register directly via useRegisterReferral instead of routing through the points/gratification pipeline
  • Update all user-facing copy referencing "points", "earn", "rewards", or "explore apps"
  • Clean up dead navigation routes, stale types, and orphaned constants (appsUrl, returnToScreen: 'Points')
  • Route support form and self.xyz through the in-app WebView instead of opening externally
  • Fix referral attribution bug where clearDeepLinkReferrer ran even on registration failure
  • Guard cleanSelfApp() delayed cleanup against a new proof session starting within the 2s window

Changes

React Native app

  • Deleted screens: Points.tsx, PointsNavBar.tsx, PointsInfoScreen.tsx, GratificationScreen.tsx
  • Deleted components: PointHistoryList.tsx
  • Deleted hooks: useEarnPointsFlow.ts, usePointsGuardrail.ts, usePoints.ts
  • New hook: useOpenSupportForm — navigates to the in-app WebView with the support form URL, replacing openSupportForm() which used Linking.openURL
  • HomeScreen: removed the bottom "Self Points" panel and "Earn points" button; referral confirmation now calls useRegisterReferral directly instead of routing through useEarnPointsFlow; fixed handleReferralConfirmed to preserve deepLinkReferrer when registerReferral fails (early return on failure)
  • ReferralScreen: updated copy from "Invite friends and earn points" / "exclusive points" → "Invite friends to Self" / "get rewarded"
  • ProofRequestStatusScreen: removed Gratification navigation and whitelist points check; always navigates Home after proof completion; guarded delayed cleanSelfApp() to only run when the proving session hasn't changed (prevents race condition if user starts a new proof within 2s)
  • SettingsScreen: support form now opens in-app WebView; self.xyz social link now opens in-app WebView instead of external browser
  • FeedbackModal, ComingSoonScreen, DocumentNFCScanScreen, DocumentNFCTroubleScreen, QRCodeTroubleScreen: migrated from openSupportForm() to useOpenSupportForm hook
  • support.ts: removed openSupportForm function and Linking/Alert imports (text constants retained)
  • webview.ts: added notion.site to TRUSTED_DOMAINS for the support form
  • CloudBackupScreen: removed returnToScreen: 'Points' type and navigation; cleaned stale commented-out references
  • WebViewScreen: changed fallback URL from apps.self.xyzself.xyz
  • Navigation: removed Points, PointsInfo, Gratification routes and types
  • Constants: removed appsUrl from links.ts

Tests

  • Updated navigation.test.tsx expected screen list (removed Points, PointsInfo, Gratification)
  • Updated links.test.ts (removed appsUrl assertion)
  • Deleted useEarnPointsFlow.test.ts, GratificationScreen.test.tsx, PointsInfoScreen.test.tsx

Linear Issues

  • Closes SELF-2311 — Remove Points and Self Apps screens — update navigation and copy

Figma

Test Plan

  • tsc --noEmit passes
  • eslint passes (zero errors/warnings on all changed files)
  • Navigation test passes (updated expected screen list)
  • Links test passes (removed appsUrl assertion)
  • Manual: verify no "Points", "Earn points", "Explore apps", or "Self Apps" surfaces visible
  • Manual: verify referral deep link flow still registers correctly
  • Manual: verify referral is preserved and retryable after network failure
  • Manual: verify proof completion navigates Home (not Gratification)
  • Manual: verify "Get support" opens Notion form in the in-app WebView (not external browser)
  • Manual: verify self.xyz social link in Settings opens in the in-app WebView
  • Manual: settings menu matches updated Figma design

Native Consolidation Checklist

  • CONTRACTS.md reviewed - no unintended contract changes
  • Layer 1 bridge contract tests pass (cd app && yarn jest:run / yarn workspace @selfxyz/rn-sdk-test-app test)
  • Layer 3 builds pass (app iOS, RN test app iOS, RN test app Android)
  • Layer 4 manual smoke test signed off (if consolidation PR)
  • No new native business logic added (logic belongs in TypeScript)

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Removed Features

    • Points-related screens, Point history UI, Earn Points flows, nav bar components, and the Gratification celebration screen removed.
  • Updates

    • Referral text changed to "Invite friends to Self".
    • WebView fallback now uses the main site.
  • Improvements

    • Support form opening moved to a reusable hook; Notion added to trusted WebView domains.
    • Splash flow now has a timeout to proceed to Home if initialization stalls.
  • Tests

    • Multiple Points/Gratification tests removed; tests added for the new support hook and proof status behavior.

@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 8, 2026

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

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
self-webview-app Ignored Ignored Preview Apr 9, 2026 2:06am

Request Review

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 8, 2026

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

Removes points-related UI, screens, hooks, routes, and tests; replaces direct support-form calls with a new hook; updates WebView fallback/trusted domains and referral/proof flows; and adds a 30s SplashScreen initialization timeout plus assorted small refactors.

Changes

Cohort / File(s) Summary
Removed Points UI & Nav
app/src/components/PointHistoryList.tsx, app/src/components/navbar/Points.tsx, app/src/components/navbar/PointsNavBar.tsx, app/src/screens/app/GratificationScreen.tsx, app/src/screens/home/PointsInfoScreen.tsx
Deleted points history component, Points screen/navbar, Gratification screen, and PointsInfo explainer (UI, handlers, styles, and exports removed).
Removed Points Hooks & Guardrail
app/src/hooks/useEarnPointsFlow.ts, app/src/hooks/usePoints.ts, app/src/hooks/usePointsGuardrail.ts
Removed earn-points orchestration hook, points data hooks, and guardrail hook.
Navigation & Types Pruned
app/src/navigation/app.tsx, app/src/navigation/home.ts, app/src/navigation/types.ts
Removed Gratification, Points, PointsInfo routes/param types; removed returnToScreen?: 'Points' from cloud backup params.
Home & Referral Flow
app/src/screens/home/HomeScreen.tsx
Removed Earn Points footer/button and useEarnPointsFlow usage; inlined referral confirmation and registration/clear logic.
Proof Completion & Tests
app/src/screens/verification/ProofRequestStatusScreen.tsx, app/tests/src/screens/verification/ProofRequestStatusScreen.test.tsx
Removed whitelist/Gratification routing; completion now always goes home and schedules self-app cleanup with UUID guard; added tests for completion, cleanup timing, and deeplink-callback behavior.
Support form -> hook
app/src/hooks/useOpenSupportForm.ts, app/src/components/FeedbackModal.tsx, app/src/services/support.ts, app/tests/src/hooks/useOpenSupportForm.test.ts, app/src/screens/.../DocumentNFCScanScreen.tsx, app/src/screens/.../DocumentNFCTroubleScreen.tsx, app/src/screens/shared/ComingSoonScreen.tsx, app/src/screens/verification/QRCodeTroubleScreen.tsx, app/src/screens/account/settings/SettingsScreen.tsx
Added useOpenSupportForm hook and test; replaced direct openSupportForm calls with hook usage across components; removed openSupportForm export from services/support; updated FeedbackModal to call hook result synchronously.
Settings SocialButton & WebView nav
app/src/screens/account/settings/SettingsScreen.tsx
Added optional SocialButtonProps.onPress, memoized custom handling, and openSelfWebsite to navigate to WebView (selfUrl).
WebView & Trusted Domains / Links
app/src/screens/shared/WebViewScreen.tsx, app/src/utils/webview.ts, app/src/consts/links.ts, app/tests/src/consts/links.test.ts
WebView fallback changed to https://self.xyz; added 'notion.site' to TRUSTED_DOMAINS; removed appsUrl constant and updated link test expectation.
Tests Removed/Updated
app/tests/src/hooks/useEarnPointsFlow.test.ts, app/tests/src/screens/GratificationScreen.test.tsx, app/tests/src/screens/home/PointsInfoScreen.test.tsx, app/tests/src/navigation.test.tsx
Deleted earn-points/referral/gratification test suites; updated navigation enumeration expectations; added/updated tests for useOpenSupportForm and ProofRequestStatusScreen.
Copy tweak
app/src/screens/app/ReferralScreen.tsx
Changed title to “Invite friends to Self” and updated description wording.
Splash initialization timeout
app/src/screens/app/SplashScreen.tsx
Added INIT_TIMEOUT_MS = 30_000 and a settledRef guard to force Home navigation on timeout and prevent duplicate settle actions; added timing logs.
Misc & repo
.gitignore, small dependency/cleanup edits across files`
Ignored .mcp.json; minor callback/dependency list adjustments and small refactors.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60 minutes

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title 'Remove Points and Self Apps screens, update navigation and copy' clearly and concisely describes the primary changes in the changeset—removal of screen components and UI updates.
Description check ✅ Passed The PR description is comprehensive and follows the template with a detailed Summary, well-structured Changes section, clear Linear issue reference, and an explicit Test Plan including both automated and manual verification steps.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch justin/self-2311-clean-up-app

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@transphorm transphorm changed the title Remove Points and Self Apps screens (SELF-2311) Remove Points and Self Apps screens, update navigation and copy Apr 8, 2026
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 2978a361bf

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread app/src/screens/home/HomeScreen.tsx Outdated
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2


ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 2b277c2e-5d6a-4b2e-be0a-e4be18c8ce20

📥 Commits

Reviewing files that changed from the base of the PR and between 77df53b and 2978a36.

📒 Files selected for processing (23)
  • app/src/components/PointHistoryList.tsx
  • app/src/components/navbar/Points.tsx
  • app/src/components/navbar/PointsNavBar.tsx
  • app/src/consts/links.ts
  • app/src/hooks/useEarnPointsFlow.ts
  • app/src/hooks/usePoints.ts
  • app/src/hooks/usePointsGuardrail.ts
  • app/src/hooks/useTestReferralFlow.ts
  • app/src/navigation/app.tsx
  • app/src/navigation/home.ts
  • app/src/navigation/types.ts
  • app/src/screens/account/settings/CloudBackupScreen.tsx
  • app/src/screens/app/GratificationScreen.tsx
  • app/src/screens/app/ReferralScreen.tsx
  • app/src/screens/home/HomeScreen.tsx
  • app/src/screens/home/PointsInfoScreen.tsx
  • app/src/screens/shared/WebViewScreen.tsx
  • app/src/screens/verification/ProofRequestStatusScreen.tsx
  • app/tests/src/consts/links.test.ts
  • app/tests/src/hooks/useEarnPointsFlow.test.ts
  • app/tests/src/navigation.test.tsx
  • app/tests/src/screens/GratificationScreen.test.tsx
  • app/tests/src/screens/home/PointsInfoScreen.test.tsx
💤 Files with no reviewable changes (17)
  • app/tests/src/consts/links.test.ts
  • app/src/consts/links.ts
  • app/tests/src/navigation.test.tsx
  • app/src/components/navbar/PointsNavBar.tsx
  • app/src/navigation/app.tsx
  • app/src/hooks/usePointsGuardrail.ts
  • app/src/screens/app/GratificationScreen.tsx
  • app/src/navigation/home.ts
  • app/tests/src/screens/home/PointsInfoScreen.test.tsx
  • app/src/hooks/usePoints.ts
  • app/src/navigation/types.ts
  • app/tests/src/screens/GratificationScreen.test.tsx
  • app/src/screens/home/PointsInfoScreen.tsx
  • app/tests/src/hooks/useEarnPointsFlow.test.ts
  • app/src/components/navbar/Points.tsx
  • app/src/components/PointHistoryList.tsx
  • app/src/hooks/useEarnPointsFlow.ts

Comment thread app/src/screens/home/HomeScreen.tsx
Comment thread app/src/screens/verification/ProofRequestStatusScreen.tsx
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
app/src/screens/app/SplashScreen.tsx (1)

51-69: ⚠️ Potential issue | 🟠 Major

Initialize native modules before biometrics access

checkBiometricsAvailable() runs before initializeNativeModules(). On cold start, this can fail or mis-detect biometrics support and persist the wrong value to settings. Move the biometrics check after native initialization (or gate it on modulesReady).

Proposed fix
-      checkBiometricsAvailable()
-        .then(setBiometricsAvailable)
-        .catch(err => {
-          console.warn('Error checking biometrics availability', err);
-        });
-
       const loadDataAndDetermineNextScreen = async () => {
         const startTime = Date.now();
         const elapsed = () => `${Date.now() - startTime}ms`;

         try {
           const modulesReady = await initializeNativeModules();
           console.log(
             `SplashScreen: initializeNativeModules complete (${elapsed()})`,
           );
           if (!modulesReady) {
             console.warn(
               'Native modules not ready, proceeding with limited functionality',
             );
+          } else {
+            await checkBiometricsAvailable()
+              .then(setBiometricsAvailable)
+              .catch(err => {
+                console.warn('Error checking biometrics availability', err);
+              });
           }

As per coding guidelines: "Native module initialization with initializeNativeModules() must occur before any native operations."


ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 98319d2e-f9a3-4e6c-9b25-049cabf27052

📥 Commits

Reviewing files that changed from the base of the PR and between 04a126b and f5a5319.

📒 Files selected for processing (1)
  • app/src/screens/app/SplashScreen.tsx

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1


ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: b7f1babc-748f-4dc9-a3d0-a3a4c4a68e92

📥 Commits

Reviewing files that changed from the base of the PR and between f5a5319 and 82a4dd9.

📒 Files selected for processing (2)
  • app/src/screens/documents/scanning/DocumentNFCTroubleScreen.tsx
  • app/tests/src/navigation.test.tsx
💤 Files with no reviewable changes (1)
  • app/tests/src/navigation.test.tsx

Comment thread app/src/screens/documents/scanning/DocumentNFCTroubleScreen.tsx Outdated
@transphorm transphorm merged commit b13ec9a into dev Apr 9, 2026
26 checks passed
@transphorm transphorm deleted the justin/self-2311-clean-up-app branch April 9, 2026 09:48
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