Skip to content

fix(gestures): wrap root in GestureHandlerRootView#3

Merged
Magicred-1 merged 2 commits into
anonmesh:v3from
epicexcelsior:fix/gesture-root
Apr 23, 2026
Merged

fix(gestures): wrap root in GestureHandlerRootView#3
Magicred-1 merged 2 commits into
anonmesh:v3from
epicexcelsior:fix/gesture-root

Conversation

@epicexcelsior
Copy link
Copy Markdown
Collaborator

Summary

One-line root wrap fix. MeshMap.tsx (and any future GestureDetector usage) crashes without it:

```
ERROR GestureDetector must be used as a descendant of GestureHandlerRootView.
Otherwise the gestures will not be recognized.
at MeshMap.tsx:387
```

Standard pattern per `react-native-gesture-handler` install docs. `react-native-gesture-handler` is already in `mobile_app/package.json` deps (`~2.28.0`), so no new dependency added.

Diff

+1 import, wrap `` subtree in `<GestureHandlerRootView style={{ flex: 1 }}>`. That's it.

Test plan

  • Reload app → tap Nodes tab → MeshMap renders without red screen
  • No new tsc errors introduced
  • Merge-safe — does not touch any component, route, or context file

Note

Separate small PR ahead of larger wallet-ui-port work so it merges quickly. Also unblocks incoming primitives (SlideToConfirm, PressSurface) which also use GestureDetector.

Crash in MeshMap.tsx:387 on nodes tab — GestureDetector requires
GestureHandlerRootView ancestor per react-native-gesture-handler install
docs. Standard one-line wrap.

Also prerequisite for incoming wallet-ui-port work (SlideToConfirm +
PressSurface use GestureDetector).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@Magicred-1 Magicred-1 merged commit 4a99bdd into anonmesh:v3 Apr 23, 2026
Magicred-1 added a commit that referenced this pull request Apr 25, 2026
fix(gestures): wrap root in GestureHandlerRootView
epicexcelsior added a commit that referenced this pull request May 15, 2026
* refactor(wallet): move dead Send/Swap/Yield panels out of barrel

These four files (WalletTabs, SendPanel, SwapPanel, YieldPanel) are roadmap-preview surfaces with no live behavior — grep confirms zero consumers outside the barrel. The barrel re-export keeps them one casual import away from showing up in the wallet bento with theatre copy (MPC 3/3, JITO_RATE, dead Deposit/Withdraw).

Removes the four exports from components/wallet/index.ts and adds a FUTURE header comment to each panel pointing back to AUDIT A6 / ROADMAP § 0.A.8. Files stay so the design isn't lost — re-export when each is wired and wrapped in <PreviewBadge>.

* refactor(network): extract solanaConnection singleton

Connection construction lived inside sendTransaction.ts, which made the singleton's existence a side-effect of importing the send service. Three hooks already reached past it. Pulls the RPC_URL resolution + new Connection into src/infrastructure/network/connection.ts; sendTransaction.ts now imports and re-exports it so existing callers don't churn. useNetworkMode + useWalletBalance read from the new module directly. ARCH P2 #1.

* refactor: consolidate sliceNewEvents to single util

The 'detect newly-prepended LXMF events given prev head + prev count' helper had drifted into three copies — LxmfContext (most defensive: handles old anchor falling off the end), MessagesScreen, useMessageNotifications. The notification + screen copies returned [] when the previous head disappeared from the (capped) buffer, silently dropping a window of events on restart.

Pulls the LxmfContext semantics into src/utils/sliceNewEvents.ts and points all three callers at it. ARCH P2 #4.

* refactor: consolidate relTime formatter

WalletScreen + PendingCosigns each carried their own 'X ago' helper. PendingCosigns was missing the days branch so cosign requests over 24h stale would say '36h ago' instead of '1d ago'. Hoists the WalletScreen version (with the days branch) into src/utils/relTime.ts.

Spec said WalletScreen + RecentActivity, but RecentActivity actually uses Intl.DateTimeFormat — the duplication is in PendingCosigns. Logged the drift in WORK_LOG.

* refactor(network): promote useNetworkMode to context

Five active call sites each got their own NetInfo subscription + a fresh MeshRpcAdapter — adapter has a stateful pending-request map and the rpcResponse routing useEffect ran in only one of them, so simultaneous mounts could mute responses for the others (T23).

Lifts the entire hook logic into context/NetworkModeContext.tsx with a Provider mounted in app/_layout.tsx inside LxmfProvider (depends on it) and outside WalletBalanceProvider (consumer). src/hooks/useNetworkMode.ts is now a 4-line re-export shim so existing imports stay valid.

ROADMAP § 2.6 / ARCH P2 #3.
@epicexcelsior epicexcelsior deleted the fix/gesture-root branch May 15, 2026 09:09
Magicred-1 pushed a commit that referenced this pull request May 16, 2026
* refactor(wallet): move dead Send/Swap/Yield panels out of barrel

These four files (WalletTabs, SendPanel, SwapPanel, YieldPanel) are roadmap-preview surfaces with no live behavior — grep confirms zero consumers outside the barrel. The barrel re-export keeps them one casual import away from showing up in the wallet bento with theatre copy (MPC 3/3, JITO_RATE, dead Deposit/Withdraw).

Removes the four exports from components/wallet/index.ts and adds a FUTURE header comment to each panel pointing back to AUDIT A6 / ROADMAP § 0.A.8. Files stay so the design isn't lost — re-export when each is wired and wrapped in <PreviewBadge>.

* refactor(network): extract solanaConnection singleton

Connection construction lived inside sendTransaction.ts, which made the singleton's existence a side-effect of importing the send service. Three hooks already reached past it. Pulls the RPC_URL resolution + new Connection into src/infrastructure/network/connection.ts; sendTransaction.ts now imports and re-exports it so existing callers don't churn. useNetworkMode + useWalletBalance read from the new module directly. ARCH P2 #1.

* refactor: consolidate sliceNewEvents to single util

The 'detect newly-prepended LXMF events given prev head + prev count' helper had drifted into three copies — LxmfContext (most defensive: handles old anchor falling off the end), MessagesScreen, useMessageNotifications. The notification + screen copies returned [] when the previous head disappeared from the (capped) buffer, silently dropping a window of events on restart.

Pulls the LxmfContext semantics into src/utils/sliceNewEvents.ts and points all three callers at it. ARCH P2 #4.

* refactor: consolidate relTime formatter

WalletScreen + PendingCosigns each carried their own 'X ago' helper. PendingCosigns was missing the days branch so cosign requests over 24h stale would say '36h ago' instead of '1d ago'. Hoists the WalletScreen version (with the days branch) into src/utils/relTime.ts.

Spec said WalletScreen + RecentActivity, but RecentActivity actually uses Intl.DateTimeFormat — the duplication is in PendingCosigns. Logged the drift in WORK_LOG.

* refactor(network): promote useNetworkMode to context

Five active call sites each got their own NetInfo subscription + a fresh MeshRpcAdapter — adapter has a stateful pending-request map and the rpcResponse routing useEffect ran in only one of them, so simultaneous mounts could mute responses for the others (T23).

Lifts the entire hook logic into context/NetworkModeContext.tsx with a Provider mounted in app/_layout.tsx inside LxmfProvider (depends on it) and outside WalletBalanceProvider (consumer). src/hooks/useNetworkMode.ts is now a 4-line re-export shim so existing imports stay valid.

ROADMAP § 2.6 / ARCH P2 #3.
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