@oxyhq/services 13.0.2 → 13.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (362) hide show
  1. package/lib/commonjs/index.js +0 -11
  2. package/lib/commonjs/index.js.map +1 -1
  3. package/lib/commonjs/ui/components/AccountMenuButton.js +8 -10
  4. package/lib/commonjs/ui/components/AccountMenuButton.js.map +1 -1
  5. package/lib/commonjs/ui/components/AccountSwitcher.js +65 -35
  6. package/lib/commonjs/ui/components/AccountSwitcher.js.map +1 -1
  7. package/lib/commonjs/ui/context/OxyContext.js +124 -93
  8. package/lib/commonjs/ui/context/OxyContext.js.map +1 -1
  9. package/lib/commonjs/ui/hooks/queries/useAccountQueries.js +2 -2
  10. package/lib/commonjs/ui/hooks/queries/useAccountQueries.js.map +1 -1
  11. package/lib/commonjs/ui/hooks/queries/usePaymentQueries.js +12 -12
  12. package/lib/commonjs/ui/hooks/queries/usePaymentQueries.js.map +1 -1
  13. package/lib/commonjs/ui/hooks/queries/useServicesQueries.js +8 -7
  14. package/lib/commonjs/ui/hooks/queries/useServicesQueries.js.map +1 -1
  15. package/lib/commonjs/ui/screens/AccountSettingsScreen.js +11 -6
  16. package/lib/commonjs/ui/screens/AccountSettingsScreen.js.map +1 -1
  17. package/lib/commonjs/ui/screens/AccountSwitcherScreen.js +3 -3
  18. package/lib/commonjs/ui/screens/CreateAccountScreen.js +6 -4
  19. package/lib/commonjs/ui/screens/CreateAccountScreen.js.map +1 -1
  20. package/lib/commonjs/ui/screens/EditProfileFieldScreen.js +8 -7
  21. package/lib/commonjs/ui/screens/EditProfileFieldScreen.js.map +1 -1
  22. package/lib/commonjs/ui/screens/FileManagementScreen.js +13 -13
  23. package/lib/commonjs/ui/screens/FileManagementScreen.js.map +1 -1
  24. package/lib/commonjs/ui/screens/HistoryViewScreen.js +7 -7
  25. package/lib/commonjs/ui/screens/HistoryViewScreen.js.map +1 -1
  26. package/lib/commonjs/ui/screens/LanguageSelectorScreen.js +5 -5
  27. package/lib/commonjs/ui/screens/LanguageSelectorScreen.js.map +1 -1
  28. package/lib/commonjs/ui/screens/ManageAccountScreen.js +17 -18
  29. package/lib/commonjs/ui/screens/ManageAccountScreen.js.map +1 -1
  30. package/lib/commonjs/ui/screens/PremiumSubscriptionScreen.js +3 -3
  31. package/lib/commonjs/ui/screens/PremiumSubscriptionScreen.js.map +1 -1
  32. package/lib/commonjs/ui/screens/PrivacySettingsScreen.js +9 -9
  33. package/lib/commonjs/ui/screens/PrivacySettingsScreen.js.map +1 -1
  34. package/lib/commonjs/ui/screens/ProfileScreen.js +1 -1
  35. package/lib/commonjs/ui/screens/ProfileScreen.js.map +1 -1
  36. package/lib/commonjs/ui/screens/SavesCollectionsScreen.js +4 -4
  37. package/lib/commonjs/ui/screens/SavesCollectionsScreen.js.map +1 -1
  38. package/lib/commonjs/ui/screens/SearchSettingsScreen.js +6 -6
  39. package/lib/commonjs/ui/screens/SearchSettingsScreen.js.map +1 -1
  40. package/lib/commonjs/ui/screens/WelcomeNewUserScreen.js +6 -6
  41. package/lib/commonjs/ui/screens/WelcomeNewUserScreen.js.map +1 -1
  42. package/lib/commonjs/ui/screens/trust/TrustCenterScreen.js +4 -4
  43. package/lib/commonjs/ui/screens/trust/TrustCenterScreen.js.map +1 -1
  44. package/lib/commonjs/ui/screens/trust/TrustRewardsScreen.js +4 -4
  45. package/lib/commonjs/ui/screens/trust/TrustRewardsScreen.js.map +1 -1
  46. package/lib/module/index.js +0 -5
  47. package/lib/module/index.js.map +1 -1
  48. package/lib/module/ui/components/AccountMenuButton.js +8 -10
  49. package/lib/module/ui/components/AccountMenuButton.js.map +1 -1
  50. package/lib/module/ui/components/AccountSwitcher.js +65 -35
  51. package/lib/module/ui/components/AccountSwitcher.js.map +1 -1
  52. package/lib/module/ui/context/OxyContext.js +124 -93
  53. package/lib/module/ui/context/OxyContext.js.map +1 -1
  54. package/lib/module/ui/hooks/queries/useAccountQueries.js +2 -2
  55. package/lib/module/ui/hooks/queries/useAccountQueries.js.map +1 -1
  56. package/lib/module/ui/hooks/queries/usePaymentQueries.js +12 -12
  57. package/lib/module/ui/hooks/queries/usePaymentQueries.js.map +1 -1
  58. package/lib/module/ui/hooks/queries/useServicesQueries.js +9 -7
  59. package/lib/module/ui/hooks/queries/useServicesQueries.js.map +1 -1
  60. package/lib/module/ui/screens/AccountSettingsScreen.js +11 -6
  61. package/lib/module/ui/screens/AccountSettingsScreen.js.map +1 -1
  62. package/lib/module/ui/screens/AccountSwitcherScreen.js +3 -3
  63. package/lib/module/ui/screens/CreateAccountScreen.js +6 -4
  64. package/lib/module/ui/screens/CreateAccountScreen.js.map +1 -1
  65. package/lib/module/ui/screens/EditProfileFieldScreen.js +8 -7
  66. package/lib/module/ui/screens/EditProfileFieldScreen.js.map +1 -1
  67. package/lib/module/ui/screens/FileManagementScreen.js +13 -13
  68. package/lib/module/ui/screens/FileManagementScreen.js.map +1 -1
  69. package/lib/module/ui/screens/HistoryViewScreen.js +7 -7
  70. package/lib/module/ui/screens/HistoryViewScreen.js.map +1 -1
  71. package/lib/module/ui/screens/LanguageSelectorScreen.js +5 -5
  72. package/lib/module/ui/screens/LanguageSelectorScreen.js.map +1 -1
  73. package/lib/module/ui/screens/ManageAccountScreen.js +17 -18
  74. package/lib/module/ui/screens/ManageAccountScreen.js.map +1 -1
  75. package/lib/module/ui/screens/PremiumSubscriptionScreen.js +3 -3
  76. package/lib/module/ui/screens/PremiumSubscriptionScreen.js.map +1 -1
  77. package/lib/module/ui/screens/PrivacySettingsScreen.js +9 -9
  78. package/lib/module/ui/screens/PrivacySettingsScreen.js.map +1 -1
  79. package/lib/module/ui/screens/ProfileScreen.js +1 -1
  80. package/lib/module/ui/screens/ProfileScreen.js.map +1 -1
  81. package/lib/module/ui/screens/SavesCollectionsScreen.js +4 -4
  82. package/lib/module/ui/screens/SavesCollectionsScreen.js.map +1 -1
  83. package/lib/module/ui/screens/SearchSettingsScreen.js +6 -6
  84. package/lib/module/ui/screens/SearchSettingsScreen.js.map +1 -1
  85. package/lib/module/ui/screens/WelcomeNewUserScreen.js +6 -6
  86. package/lib/module/ui/screens/WelcomeNewUserScreen.js.map +1 -1
  87. package/lib/module/ui/screens/trust/TrustCenterScreen.js +4 -4
  88. package/lib/module/ui/screens/trust/TrustCenterScreen.js.map +1 -1
  89. package/lib/module/ui/screens/trust/TrustRewardsScreen.js +4 -4
  90. package/lib/module/ui/screens/trust/TrustRewardsScreen.js.map +1 -1
  91. package/lib/typescript/commonjs/index.d.ts +0 -1
  92. package/lib/typescript/commonjs/index.d.ts.map +1 -1
  93. package/lib/typescript/commonjs/ui/components/AccountMenuButton.d.ts +5 -7
  94. package/lib/typescript/commonjs/ui/components/AccountMenuButton.d.ts.map +1 -1
  95. package/lib/typescript/commonjs/ui/components/AccountSwitcher.d.ts.map +1 -1
  96. package/lib/typescript/commonjs/ui/components/ActivityIndicator.d.ts +1 -1
  97. package/lib/typescript/commonjs/ui/components/ActivityIndicator.d.ts.map +1 -1
  98. package/lib/typescript/commonjs/ui/components/CrossFadeIcon.d.ts +2 -1
  99. package/lib/typescript/commonjs/ui/components/CrossFadeIcon.d.ts.map +1 -1
  100. package/lib/typescript/commonjs/ui/components/FontLoader.d.ts +1 -1
  101. package/lib/typescript/commonjs/ui/components/FontLoader.d.ts.map +1 -1
  102. package/lib/typescript/commonjs/ui/components/HelperText.d.ts +1 -1
  103. package/lib/typescript/commonjs/ui/components/HelperText.d.ts.map +1 -1
  104. package/lib/typescript/commonjs/ui/components/TextField/Addons/Outline.d.ts +2 -1
  105. package/lib/typescript/commonjs/ui/components/TextField/Addons/Outline.d.ts.map +1 -1
  106. package/lib/typescript/commonjs/ui/components/TextField/Addons/Underline.d.ts +2 -1
  107. package/lib/typescript/commonjs/ui/components/TextField/Addons/Underline.d.ts.map +1 -1
  108. package/lib/typescript/commonjs/ui/components/TextField/Adornment/TextFieldAffix.d.ts +1 -1
  109. package/lib/typescript/commonjs/ui/components/TextField/Adornment/TextFieldIcon.d.ts +1 -1
  110. package/lib/typescript/commonjs/ui/components/TextField/Label/InputLabel.d.ts +1 -1
  111. package/lib/typescript/commonjs/ui/components/TextField/Label/LabelBackground.d.ts +2 -1
  112. package/lib/typescript/commonjs/ui/components/TextField/Label/LabelBackground.d.ts.map +1 -1
  113. package/lib/typescript/commonjs/ui/components/TextField/TextFieldFlat.d.ts +2 -1
  114. package/lib/typescript/commonjs/ui/components/TextField/TextFieldFlat.d.ts.map +1 -1
  115. package/lib/typescript/commonjs/ui/components/TextField/TextFieldOutlined.d.ts +2 -1
  116. package/lib/typescript/commonjs/ui/components/TextField/TextFieldOutlined.d.ts.map +1 -1
  117. package/lib/typescript/commonjs/ui/context/OxyContext.d.ts +11 -26
  118. package/lib/typescript/commonjs/ui/context/OxyContext.d.ts.map +1 -1
  119. package/lib/typescript/commonjs/ui/context/ThemeContext.d.ts +1 -1
  120. package/lib/typescript/commonjs/ui/context/ThemeContext.d.ts.map +1 -1
  121. package/lib/typescript/commonjs/ui/hooks/queries/useServicesQueries.d.ts.map +1 -1
  122. package/lib/typescript/commonjs/ui/screens/AccountSettingsScreen.d.ts.map +1 -1
  123. package/lib/typescript/commonjs/ui/screens/AccountSwitcherScreen.d.ts +3 -3
  124. package/lib/typescript/commonjs/ui/screens/CreateAccountScreen.d.ts.map +1 -1
  125. package/lib/typescript/commonjs/ui/screens/EditProfileFieldScreen.d.ts.map +1 -1
  126. package/lib/typescript/commonjs/ui/screens/ManageAccountScreen.d.ts.map +1 -1
  127. package/lib/typescript/module/index.d.ts +60 -61
  128. package/lib/typescript/module/index.d.ts.map +1 -1
  129. package/lib/typescript/module/ui/client.d.ts +26 -26
  130. package/lib/typescript/module/ui/client.d.ts.map +1 -1
  131. package/lib/typescript/module/ui/components/AccountMenuButton.d.ts +5 -7
  132. package/lib/typescript/module/ui/components/AccountMenuButton.d.ts.map +1 -1
  133. package/lib/typescript/module/ui/components/AccountSwitcher.d.ts +1 -1
  134. package/lib/typescript/module/ui/components/AccountSwitcher.d.ts.map +1 -1
  135. package/lib/typescript/module/ui/components/ActivityIndicator.d.ts +2 -2
  136. package/lib/typescript/module/ui/components/ActivityIndicator.d.ts.map +1 -1
  137. package/lib/typescript/module/ui/components/BottomSheetRouter.d.ts +1 -1
  138. package/lib/typescript/module/ui/components/BottomSheetRouter.d.ts.map +1 -1
  139. package/lib/typescript/module/ui/components/CrossFadeIcon.d.ts +4 -3
  140. package/lib/typescript/module/ui/components/CrossFadeIcon.d.ts.map +1 -1
  141. package/lib/typescript/module/ui/components/FontLoader.d.ts +1 -1
  142. package/lib/typescript/module/ui/components/FontLoader.d.ts.map +1 -1
  143. package/lib/typescript/module/ui/components/HelperText.d.ts +1 -1
  144. package/lib/typescript/module/ui/components/HelperText.d.ts.map +1 -1
  145. package/lib/typescript/module/ui/components/Icon.d.ts +1 -1
  146. package/lib/typescript/module/ui/components/Icon.d.ts.map +1 -1
  147. package/lib/typescript/module/ui/components/IconButton/IconButton.d.ts +3 -3
  148. package/lib/typescript/module/ui/components/IconButton/IconButton.d.ts.map +1 -1
  149. package/lib/typescript/module/ui/components/IconButton/utils.d.ts +1 -1
  150. package/lib/typescript/module/ui/components/IconButton/utils.d.ts.map +1 -1
  151. package/lib/typescript/module/ui/components/OxyPayButton.d.ts +1 -1
  152. package/lib/typescript/module/ui/components/OxyPayButton.d.ts.map +1 -1
  153. package/lib/typescript/module/ui/components/OxyProvider.d.ts +1 -1
  154. package/lib/typescript/module/ui/components/OxyProvider.d.ts.map +1 -1
  155. package/lib/typescript/module/ui/components/StepBasedScreen.d.ts +2 -2
  156. package/lib/typescript/module/ui/components/StepBasedScreen.d.ts.map +1 -1
  157. package/lib/typescript/module/ui/components/Surface.d.ts +2 -2
  158. package/lib/typescript/module/ui/components/Surface.d.ts.map +1 -1
  159. package/lib/typescript/module/ui/components/TextField/Addons/Outline.d.ts +3 -2
  160. package/lib/typescript/module/ui/components/TextField/Addons/Outline.d.ts.map +1 -1
  161. package/lib/typescript/module/ui/components/TextField/Addons/Underline.d.ts +3 -2
  162. package/lib/typescript/module/ui/components/TextField/Addons/Underline.d.ts.map +1 -1
  163. package/lib/typescript/module/ui/components/TextField/Adornment/TextFieldAdornment.d.ts +3 -3
  164. package/lib/typescript/module/ui/components/TextField/Adornment/TextFieldAdornment.d.ts.map +1 -1
  165. package/lib/typescript/module/ui/components/TextField/Adornment/TextFieldAffix.d.ts +3 -3
  166. package/lib/typescript/module/ui/components/TextField/Adornment/TextFieldAffix.d.ts.map +1 -1
  167. package/lib/typescript/module/ui/components/TextField/Adornment/TextFieldIcon.d.ts +4 -4
  168. package/lib/typescript/module/ui/components/TextField/Adornment/TextFieldIcon.d.ts.map +1 -1
  169. package/lib/typescript/module/ui/components/TextField/Adornment/types.d.ts +1 -1
  170. package/lib/typescript/module/ui/components/TextField/Adornment/types.d.ts.map +1 -1
  171. package/lib/typescript/module/ui/components/TextField/Adornment/utils.d.ts +1 -1
  172. package/lib/typescript/module/ui/components/TextField/Adornment/utils.d.ts.map +1 -1
  173. package/lib/typescript/module/ui/components/TextField/Label/InputLabel.d.ts +2 -2
  174. package/lib/typescript/module/ui/components/TextField/Label/InputLabel.d.ts.map +1 -1
  175. package/lib/typescript/module/ui/components/TextField/Label/LabelBackground.d.ts +3 -2
  176. package/lib/typescript/module/ui/components/TextField/Label/LabelBackground.d.ts.map +1 -1
  177. package/lib/typescript/module/ui/components/TextField/TextFieldFlat.d.ts +3 -2
  178. package/lib/typescript/module/ui/components/TextField/TextFieldFlat.d.ts.map +1 -1
  179. package/lib/typescript/module/ui/components/TextField/TextFieldOutlined.d.ts +3 -2
  180. package/lib/typescript/module/ui/components/TextField/TextFieldOutlined.d.ts.map +1 -1
  181. package/lib/typescript/module/ui/components/TextField/helpers.d.ts +3 -3
  182. package/lib/typescript/module/ui/components/TextField/helpers.d.ts.map +1 -1
  183. package/lib/typescript/module/ui/components/TextField/types.d.ts +1 -1
  184. package/lib/typescript/module/ui/components/TextField/types.d.ts.map +1 -1
  185. package/lib/typescript/module/ui/components/TextField.d.ts +4 -4
  186. package/lib/typescript/module/ui/components/TextField.d.ts.map +1 -1
  187. package/lib/typescript/module/ui/components/TouchableRipple/TouchableRipple.d.ts +3 -3
  188. package/lib/typescript/module/ui/components/TouchableRipple/TouchableRipple.d.ts.map +1 -1
  189. package/lib/typescript/module/ui/components/TouchableRipple/TouchableRipple.native.d.ts +3 -3
  190. package/lib/typescript/module/ui/components/TouchableRipple/TouchableRipple.native.d.ts.map +1 -1
  191. package/lib/typescript/module/ui/components/TouchableRipple/utils.d.ts +1 -1
  192. package/lib/typescript/module/ui/components/TouchableRipple/utils.d.ts.map +1 -1
  193. package/lib/typescript/module/ui/components/Typography/AnimatedText.d.ts +3 -3
  194. package/lib/typescript/module/ui/components/Typography/AnimatedText.d.ts.map +1 -1
  195. package/lib/typescript/module/ui/components/accountMenuRows.d.ts +1 -1
  196. package/lib/typescript/module/ui/components/accountMenuRows.d.ts.map +1 -1
  197. package/lib/typescript/module/ui/components/feedback/ProgressIndicator.d.ts +1 -1
  198. package/lib/typescript/module/ui/components/feedback/ProgressIndicator.d.ts.map +1 -1
  199. package/lib/typescript/module/ui/components/feedback/constants.d.ts +1 -1
  200. package/lib/typescript/module/ui/components/feedback/constants.d.ts.map +1 -1
  201. package/lib/typescript/module/ui/components/feedback/useFeedbackForm.d.ts +1 -1
  202. package/lib/typescript/module/ui/components/feedback/useFeedbackForm.d.ts.map +1 -1
  203. package/lib/typescript/module/ui/components/payment/PaymentDetailsStep.d.ts +1 -1
  204. package/lib/typescript/module/ui/components/payment/PaymentDetailsStep.d.ts.map +1 -1
  205. package/lib/typescript/module/ui/components/payment/PaymentMethodStep.d.ts +1 -1
  206. package/lib/typescript/module/ui/components/payment/PaymentMethodStep.d.ts.map +1 -1
  207. package/lib/typescript/module/ui/components/payment/PaymentReviewStep.d.ts +1 -1
  208. package/lib/typescript/module/ui/components/payment/PaymentReviewStep.d.ts.map +1 -1
  209. package/lib/typescript/module/ui/components/payment/PaymentSuccessStep.d.ts +1 -1
  210. package/lib/typescript/module/ui/components/payment/PaymentSuccessStep.d.ts.map +1 -1
  211. package/lib/typescript/module/ui/components/payment/PaymentSummaryStep.d.ts +1 -1
  212. package/lib/typescript/module/ui/components/payment/PaymentSummaryStep.d.ts.map +1 -1
  213. package/lib/typescript/module/ui/components/payment/constants.d.ts +1 -1
  214. package/lib/typescript/module/ui/components/payment/constants.d.ts.map +1 -1
  215. package/lib/typescript/module/ui/components/payment/paymentStyles.d.ts +1 -1
  216. package/lib/typescript/module/ui/components/payment/paymentStyles.d.ts.map +1 -1
  217. package/lib/typescript/module/ui/components/theming.d.ts +1 -1
  218. package/lib/typescript/module/ui/components/theming.d.ts.map +1 -1
  219. package/lib/typescript/module/ui/context/OxyContext.d.ts +14 -29
  220. package/lib/typescript/module/ui/context/OxyContext.d.ts.map +1 -1
  221. package/lib/typescript/module/ui/context/ThemeContext.d.ts +1 -1
  222. package/lib/typescript/module/ui/context/ThemeContext.d.ts.map +1 -1
  223. package/lib/typescript/module/ui/context/hooks/useAuthOperations.d.ts +2 -2
  224. package/lib/typescript/module/ui/context/hooks/useAuthOperations.d.ts.map +1 -1
  225. package/lib/typescript/module/ui/hooks/queries/usePaymentQueries.d.ts +1 -1
  226. package/lib/typescript/module/ui/hooks/queries/usePaymentQueries.d.ts.map +1 -1
  227. package/lib/typescript/module/ui/hooks/queries/useServicesQueries.d.ts.map +1 -1
  228. package/lib/typescript/module/ui/hooks/queryClient.d.ts +1 -1
  229. package/lib/typescript/module/ui/hooks/queryClient.d.ts.map +1 -1
  230. package/lib/typescript/module/ui/hooks/useAuth.d.ts +1 -1
  231. package/lib/typescript/module/ui/hooks/useAuth.d.ts.map +1 -1
  232. package/lib/typescript/module/ui/hooks/useAvatarPicker.d.ts +1 -1
  233. package/lib/typescript/module/ui/hooks/useAvatarPicker.d.ts.map +1 -1
  234. package/lib/typescript/module/ui/hooks/useLanguageManagement.d.ts +1 -1
  235. package/lib/typescript/module/ui/hooks/useLanguageManagement.d.ts.map +1 -1
  236. package/lib/typescript/module/ui/hooks/useSessionManagement.d.ts +1 -1
  237. package/lib/typescript/module/ui/hooks/useSessionManagement.d.ts.map +1 -1
  238. package/lib/typescript/module/ui/hooks/useStorage.d.ts +1 -1
  239. package/lib/typescript/module/ui/hooks/useStorage.d.ts.map +1 -1
  240. package/lib/typescript/module/ui/index.d.ts +28 -28
  241. package/lib/typescript/module/ui/index.d.ts.map +1 -1
  242. package/lib/typescript/module/ui/navigation/bottomSheetManager.d.ts +1 -1
  243. package/lib/typescript/module/ui/navigation/bottomSheetManager.d.ts.map +1 -1
  244. package/lib/typescript/module/ui/navigation/routes.d.ts +1 -1
  245. package/lib/typescript/module/ui/navigation/routes.d.ts.map +1 -1
  246. package/lib/typescript/module/ui/screens/AccountMembersScreen.d.ts +1 -1
  247. package/lib/typescript/module/ui/screens/AccountMembersScreen.d.ts.map +1 -1
  248. package/lib/typescript/module/ui/screens/AccountSettingsScreen.d.ts +1 -1
  249. package/lib/typescript/module/ui/screens/AccountSettingsScreen.d.ts.map +1 -1
  250. package/lib/typescript/module/ui/screens/AccountSwitcherScreen.d.ts +4 -4
  251. package/lib/typescript/module/ui/screens/AccountSwitcherScreen.d.ts.map +1 -1
  252. package/lib/typescript/module/ui/screens/AccountVerificationScreen.d.ts +1 -1
  253. package/lib/typescript/module/ui/screens/AccountVerificationScreen.d.ts.map +1 -1
  254. package/lib/typescript/module/ui/screens/AppInfoScreen.d.ts +1 -1
  255. package/lib/typescript/module/ui/screens/AppInfoScreen.d.ts.map +1 -1
  256. package/lib/typescript/module/ui/screens/AvatarCropScreen.d.ts +1 -1
  257. package/lib/typescript/module/ui/screens/AvatarCropScreen.d.ts.map +1 -1
  258. package/lib/typescript/module/ui/screens/ConnectedAppsScreen.d.ts +1 -1
  259. package/lib/typescript/module/ui/screens/ConnectedAppsScreen.d.ts.map +1 -1
  260. package/lib/typescript/module/ui/screens/CreateAccountScreen.d.ts +1 -1
  261. package/lib/typescript/module/ui/screens/CreateAccountScreen.d.ts.map +1 -1
  262. package/lib/typescript/module/ui/screens/EditProfileFieldScreen.d.ts +1 -1
  263. package/lib/typescript/module/ui/screens/EditProfileFieldScreen.d.ts.map +1 -1
  264. package/lib/typescript/module/ui/screens/FAQScreen.d.ts +1 -1
  265. package/lib/typescript/module/ui/screens/FAQScreen.d.ts.map +1 -1
  266. package/lib/typescript/module/ui/screens/FeedbackScreen.d.ts +1 -1
  267. package/lib/typescript/module/ui/screens/FeedbackScreen.d.ts.map +1 -1
  268. package/lib/typescript/module/ui/screens/FileManagementScreen.d.ts +1 -1
  269. package/lib/typescript/module/ui/screens/FileManagementScreen.d.ts.map +1 -1
  270. package/lib/typescript/module/ui/screens/FollowersListScreen.d.ts +1 -1
  271. package/lib/typescript/module/ui/screens/FollowersListScreen.d.ts.map +1 -1
  272. package/lib/typescript/module/ui/screens/FollowingListScreen.d.ts +1 -1
  273. package/lib/typescript/module/ui/screens/FollowingListScreen.d.ts.map +1 -1
  274. package/lib/typescript/module/ui/screens/HelpSupportScreen.d.ts +1 -1
  275. package/lib/typescript/module/ui/screens/HelpSupportScreen.d.ts.map +1 -1
  276. package/lib/typescript/module/ui/screens/HistoryViewScreen.d.ts +1 -1
  277. package/lib/typescript/module/ui/screens/HistoryViewScreen.d.ts.map +1 -1
  278. package/lib/typescript/module/ui/screens/LanguageSelectorScreen.d.ts +1 -1
  279. package/lib/typescript/module/ui/screens/LanguageSelectorScreen.d.ts.map +1 -1
  280. package/lib/typescript/module/ui/screens/LearnMoreUsernamesScreen.d.ts +1 -1
  281. package/lib/typescript/module/ui/screens/LearnMoreUsernamesScreen.d.ts.map +1 -1
  282. package/lib/typescript/module/ui/screens/LegalDocumentsScreen.d.ts +1 -1
  283. package/lib/typescript/module/ui/screens/LegalDocumentsScreen.d.ts.map +1 -1
  284. package/lib/typescript/module/ui/screens/ManageAccountScreen.d.ts +1 -1
  285. package/lib/typescript/module/ui/screens/ManageAccountScreen.d.ts.map +1 -1
  286. package/lib/typescript/module/ui/screens/NotificationsScreen.d.ts +1 -1
  287. package/lib/typescript/module/ui/screens/NotificationsScreen.d.ts.map +1 -1
  288. package/lib/typescript/module/ui/screens/OxyAuthScreen.d.ts +1 -1
  289. package/lib/typescript/module/ui/screens/OxyAuthScreen.d.ts.map +1 -1
  290. package/lib/typescript/module/ui/screens/PaymentGatewayScreen.d.ts +2 -2
  291. package/lib/typescript/module/ui/screens/PaymentGatewayScreen.d.ts.map +1 -1
  292. package/lib/typescript/module/ui/screens/PreferencesScreen.d.ts +1 -1
  293. package/lib/typescript/module/ui/screens/PreferencesScreen.d.ts.map +1 -1
  294. package/lib/typescript/module/ui/screens/PremiumSubscriptionScreen.d.ts +1 -1
  295. package/lib/typescript/module/ui/screens/PremiumSubscriptionScreen.d.ts.map +1 -1
  296. package/lib/typescript/module/ui/screens/PrivacySettingsScreen.d.ts +1 -1
  297. package/lib/typescript/module/ui/screens/PrivacySettingsScreen.d.ts.map +1 -1
  298. package/lib/typescript/module/ui/screens/ProfileScreen.d.ts +1 -1
  299. package/lib/typescript/module/ui/screens/ProfileScreen.d.ts.map +1 -1
  300. package/lib/typescript/module/ui/screens/SavesCollectionsScreen.d.ts +1 -1
  301. package/lib/typescript/module/ui/screens/SavesCollectionsScreen.d.ts.map +1 -1
  302. package/lib/typescript/module/ui/screens/SearchSettingsScreen.d.ts +1 -1
  303. package/lib/typescript/module/ui/screens/SearchSettingsScreen.d.ts.map +1 -1
  304. package/lib/typescript/module/ui/screens/UserLinksScreen.d.ts +1 -1
  305. package/lib/typescript/module/ui/screens/UserLinksScreen.d.ts.map +1 -1
  306. package/lib/typescript/module/ui/screens/UserListScreen.d.ts +1 -1
  307. package/lib/typescript/module/ui/screens/UserListScreen.d.ts.map +1 -1
  308. package/lib/typescript/module/ui/screens/WelcomeNewUserScreen.d.ts +1 -1
  309. package/lib/typescript/module/ui/screens/WelcomeNewUserScreen.d.ts.map +1 -1
  310. package/lib/typescript/module/ui/screens/trust/TrustAboutScreen.d.ts +1 -1
  311. package/lib/typescript/module/ui/screens/trust/TrustAboutScreen.d.ts.map +1 -1
  312. package/lib/typescript/module/ui/screens/trust/TrustCenterScreen.d.ts +1 -1
  313. package/lib/typescript/module/ui/screens/trust/TrustCenterScreen.d.ts.map +1 -1
  314. package/lib/typescript/module/ui/screens/trust/TrustFAQScreen.d.ts +1 -1
  315. package/lib/typescript/module/ui/screens/trust/TrustFAQScreen.d.ts.map +1 -1
  316. package/lib/typescript/module/ui/screens/trust/TrustLeaderboardScreen.d.ts +1 -1
  317. package/lib/typescript/module/ui/screens/trust/TrustLeaderboardScreen.d.ts.map +1 -1
  318. package/lib/typescript/module/ui/screens/trust/TrustRewardsScreen.d.ts +1 -1
  319. package/lib/typescript/module/ui/screens/trust/TrustRewardsScreen.d.ts.map +1 -1
  320. package/lib/typescript/module/ui/screens/trust/TrustRulesScreen.d.ts +1 -1
  321. package/lib/typescript/module/ui/screens/trust/TrustRulesScreen.d.ts.map +1 -1
  322. package/lib/typescript/module/ui/server.d.ts +2 -2
  323. package/lib/typescript/module/ui/server.d.ts.map +1 -1
  324. package/lib/typescript/module/ui/types/fileManagement.d.ts +1 -1
  325. package/lib/typescript/module/ui/types/fileManagement.d.ts.map +1 -1
  326. package/lib/typescript/module/ui/types/navigation.d.ts +1 -1
  327. package/lib/typescript/module/ui/types/navigation.d.ts.map +1 -1
  328. package/lib/typescript/module/ui/utils/fileManagement.d.ts +1 -1
  329. package/lib/typescript/module/ui/utils/fileManagement.d.ts.map +1 -1
  330. package/package.json +21 -20
  331. package/src/index.ts +0 -5
  332. package/src/ui/components/AccountMenuButton.tsx +9 -11
  333. package/src/ui/components/AccountSwitcher.tsx +71 -37
  334. package/src/ui/context/OxyContext.tsx +127 -122
  335. package/src/ui/hooks/queries/useAccountQueries.ts +2 -2
  336. package/src/ui/hooks/queries/usePaymentQueries.ts +12 -12
  337. package/src/ui/hooks/queries/useServicesQueries.ts +9 -6
  338. package/src/ui/screens/AccountSettingsScreen.tsx +9 -5
  339. package/src/ui/screens/AccountSwitcherScreen.tsx +3 -3
  340. package/src/ui/screens/CreateAccountScreen.tsx +6 -4
  341. package/src/ui/screens/EditProfileFieldScreen.tsx +8 -7
  342. package/src/ui/screens/FileManagementScreen.tsx +13 -13
  343. package/src/ui/screens/HistoryViewScreen.tsx +7 -7
  344. package/src/ui/screens/LanguageSelectorScreen.tsx +5 -5
  345. package/src/ui/screens/ManageAccountScreen.tsx +17 -18
  346. package/src/ui/screens/PremiumSubscriptionScreen.tsx +3 -3
  347. package/src/ui/screens/PrivacySettingsScreen.tsx +9 -9
  348. package/src/ui/screens/ProfileScreen.tsx +1 -1
  349. package/src/ui/screens/SavesCollectionsScreen.tsx +5 -5
  350. package/src/ui/screens/SearchSettingsScreen.tsx +6 -6
  351. package/src/ui/screens/WelcomeNewUserScreen.tsx +6 -6
  352. package/src/ui/screens/trust/TrustCenterScreen.tsx +5 -5
  353. package/src/ui/screens/trust/TrustRewardsScreen.tsx +4 -4
  354. package/lib/commonjs/ui/components/ActiveAccountBanner.js +0 -144
  355. package/lib/commonjs/ui/components/ActiveAccountBanner.js.map +0 -1
  356. package/lib/module/ui/components/ActiveAccountBanner.js +0 -141
  357. package/lib/module/ui/components/ActiveAccountBanner.js.map +0 -1
  358. package/lib/typescript/commonjs/ui/components/ActiveAccountBanner.d.ts +0 -4
  359. package/lib/typescript/commonjs/ui/components/ActiveAccountBanner.d.ts.map +0 -1
  360. package/lib/typescript/module/ui/components/ActiveAccountBanner.d.ts +0 -4
  361. package/lib/typescript/module/ui/components/ActiveAccountBanner.d.ts.map +0 -1
  362. package/src/ui/components/ActiveAccountBanner.tsx +0 -130
@@ -34,10 +34,10 @@ import type {
34
34
  * API's `{ plan: 'basic' }` fallback when the user has never subscribed.
35
35
  */
36
36
  export const useUserSubscription = (options?: { enabled?: boolean }) => {
37
- const { oxyServices, isAuthenticated, activeSessionId, activeAccount } = useOxy();
37
+ const { oxyServices, isAuthenticated, activeSessionId, user } = useOxy();
38
38
 
39
39
  return useQuery({
40
- queryKey: queryKeys.payments.subscription(activeAccount?.id),
40
+ queryKey: queryKeys.payments.subscription(user?.id),
41
41
  queryFn: async () => {
42
42
  return authenticatedApiCall<Subscription>(
43
43
  oxyServices,
@@ -45,7 +45,7 @@ export const useUserSubscription = (options?: { enabled?: boolean }) => {
45
45
  () => oxyServices.getCurrentUserSubscription(),
46
46
  );
47
47
  },
48
- enabled: (options?.enabled !== false) && isAuthenticated && !!activeAccount?.id,
48
+ enabled: (options?.enabled !== false) && isAuthenticated && !!user?.id,
49
49
  // Subscription state changes rarely; tolerate a longer fresh window.
50
50
  staleTime: 5 * 60 * 1000, // 5 minutes
51
51
  gcTime: 30 * 60 * 1000, // 30 minutes
@@ -59,10 +59,10 @@ export const useUserSubscription = (options?: { enabled?: boolean }) => {
59
59
  * returns the user's `deposit` and `purchase` transactions newest-first.
60
60
  */
61
61
  export const useUserPayments = (options?: { enabled?: boolean }) => {
62
- const { oxyServices, isAuthenticated, activeSessionId, activeAccount } = useOxy();
62
+ const { oxyServices, isAuthenticated, activeSessionId, user } = useOxy();
63
63
 
64
64
  return useQuery({
65
- queryKey: queryKeys.payments.history(activeAccount?.id),
65
+ queryKey: queryKeys.payments.history(user?.id),
66
66
  queryFn: async () => {
67
67
  return authenticatedApiCall<Payment[]>(
68
68
  oxyServices,
@@ -70,7 +70,7 @@ export const useUserPayments = (options?: { enabled?: boolean }) => {
70
70
  () => oxyServices.getUserPayments(),
71
71
  );
72
72
  },
73
- enabled: (options?.enabled !== false) && isAuthenticated && !!activeAccount?.id,
73
+ enabled: (options?.enabled !== false) && isAuthenticated && !!user?.id,
74
74
  // Billing history is append-mostly; a short fresh window is fine.
75
75
  staleTime: 2 * 60 * 1000, // 2 minutes
76
76
  gcTime: 30 * 60 * 1000, // 30 minutes
@@ -84,10 +84,10 @@ export const useUserPayments = (options?: { enabled?: boolean }) => {
84
84
  * Balance changes frequently, so the fresh window is intentionally short.
85
85
  */
86
86
  export const useUserWallet = (options?: { enabled?: boolean }) => {
87
- const { oxyServices, isAuthenticated, activeSessionId, activeAccount } = useOxy();
87
+ const { oxyServices, isAuthenticated, activeSessionId, user } = useOxy();
88
88
 
89
89
  return useQuery({
90
- queryKey: queryKeys.payments.wallet(activeAccount?.id),
90
+ queryKey: queryKeys.payments.wallet(user?.id),
91
91
  queryFn: async () => {
92
92
  return authenticatedApiCall<Wallet>(
93
93
  oxyServices,
@@ -95,7 +95,7 @@ export const useUserWallet = (options?: { enabled?: boolean }) => {
95
95
  () => oxyServices.getCurrentUserWallet(),
96
96
  );
97
97
  },
98
- enabled: (options?.enabled !== false) && isAuthenticated && !!activeAccount?.id,
98
+ enabled: (options?.enabled !== false) && isAuthenticated && !!user?.id,
99
99
  staleTime: 60 * 1000, // 1 minute (balance moves often)
100
100
  gcTime: 10 * 60 * 1000, // 10 minutes
101
101
  });
@@ -116,12 +116,12 @@ export const useUserWalletTransactions = (
116
116
  params?: { limit?: number; offset?: number },
117
117
  options?: { enabled?: boolean },
118
118
  ) => {
119
- const { oxyServices, isAuthenticated, activeSessionId, activeAccount } = useOxy();
119
+ const { oxyServices, isAuthenticated, activeSessionId, user } = useOxy();
120
120
  const limit = params?.limit;
121
121
  const offset = params?.offset;
122
122
 
123
123
  return useQuery({
124
- queryKey: queryKeys.payments.walletTransactions(limit, offset, activeAccount?.id),
124
+ queryKey: queryKeys.payments.walletTransactions(limit, offset, user?.id),
125
125
  queryFn: async () => {
126
126
  return authenticatedApiCall<WalletTransactionsResponse>(
127
127
  oxyServices,
@@ -129,7 +129,7 @@ export const useUserWalletTransactions = (
129
129
  () => oxyServices.getCurrentUserWalletTransactions({ limit, offset }),
130
130
  );
131
131
  },
132
- enabled: (options?.enabled !== false) && isAuthenticated && !!activeAccount?.id,
132
+ enabled: (options?.enabled !== false) && isAuthenticated && !!user?.id,
133
133
  staleTime: 60 * 1000, // 1 minute (ledger updates frequently)
134
134
  gcTime: 10 * 60 * 1000, // 10 minutes
135
135
  });
@@ -5,8 +5,11 @@ import { queryKeys } from './queryKeys';
5
5
  import { useOxy } from '../../context/OxyContext';
6
6
  import { fetchSessionsWithFallback, mapSessionsToClient } from '../../utils/sessionHelpers';
7
7
 
8
- const accountQueryScope = (activeSessionId: string | null, actingAs?: string | null): string =>
9
- `${activeSessionId ?? 'no-session'}:${actingAs ?? 'self'}`;
8
+ // Per-account query scope. In the real-session switch model the active session
9
+ // id uniquely identifies the active account (switching mints a new session), so
10
+ // it alone scopes the cache — no separate acting-as key is needed.
11
+ const accountQueryScope = (activeSessionId: string | null): string =>
12
+ `${activeSessionId ?? 'no-session'}`;
10
13
 
11
14
  /**
12
15
  * Get all active sessions for the current user
@@ -93,10 +96,10 @@ export const useDeviceSessions = (options?: { enabled?: boolean }) => {
93
96
  * Get user devices
94
97
  */
95
98
  export const useUserDevices = (options?: { enabled?: boolean }) => {
96
- const { oxyServices, isAuthenticated, activeSessionId, actingAs } = useOxy();
99
+ const { oxyServices, isAuthenticated, activeSessionId } = useOxy();
97
100
 
98
101
  return useQuery({
99
- queryKey: queryKeys.devices.list(accountQueryScope(activeSessionId, actingAs)),
102
+ queryKey: queryKeys.devices.list(accountQueryScope(activeSessionId)),
100
103
  queryFn: async () => {
101
104
  return authenticatedApiCall(
102
105
  oxyServices,
@@ -135,10 +138,10 @@ export const useSecurityInfo = (options?: { enabled?: boolean }) => {
135
138
  * `useEffect` fetches.
136
139
  */
137
140
  export const useAccountStorageUsage = (options?: { enabled?: boolean }) => {
138
- const { oxyServices, isAuthenticated, activeSessionId, actingAs } = useOxy();
141
+ const { oxyServices, isAuthenticated, activeSessionId } = useOxy();
139
142
 
140
143
  return useQuery<AccountStorageUsageResponse>({
141
- queryKey: queryKeys.storage.usage(accountQueryScope(activeSessionId, actingAs)),
144
+ queryKey: queryKeys.storage.usage(accountQueryScope(activeSessionId)),
142
145
  queryFn: async () => {
143
146
  return authenticatedApiCall(
144
147
  oxyServices,
@@ -38,7 +38,7 @@ const AccountSettingsScreen: React.FC<BaseScreenProps> = ({ onClose, goBack, nav
38
38
  const bloomTheme = useTheme();
39
39
  const colors = bloomTheme.colors;
40
40
  const { t } = useI18n();
41
- const { oxyServices, canUsePrivateApi, actingAs, setActingAs } = useOxy();
41
+ const { oxyServices, canUsePrivateApi, user, accounts, switchToAccount } = useOxy();
42
42
  const queryClient = useQueryClient();
43
43
 
44
44
  const id = typeof accountId === 'string' ? accountId : '';
@@ -91,10 +91,14 @@ const AccountSettingsScreen: React.FC<BaseScreenProps> = ({ onClose, goBack, nav
91
91
  const archiveMutation = useMutation({
92
92
  mutationKey: ['accounts', 'archive', id],
93
93
  mutationFn: () => oxyServices.archiveAccount(id),
94
- onSuccess: () => {
95
- // If this was the active account, drop back to the personal account.
96
- if (actingAs === id) {
97
- setActingAs(null);
94
+ onSuccess: async () => {
95
+ // If we archived the account we're currently signed in AS, switch back to
96
+ // the personal account so the app isn't left as an archived identity.
97
+ if (user?.id === id) {
98
+ const personal = accounts.find((node) => node.relationship === 'self');
99
+ if (personal) {
100
+ await switchToAccount(personal.accountId).catch(() => undefined);
101
+ }
98
102
  }
99
103
  queryClient.invalidateQueries({ queryKey: ['accounts'] });
100
104
  toast.success(t('accounts.settings.toasts.archived') || 'Account archived');
@@ -8,9 +8,9 @@ import { useI18n } from '../hooks/useI18n';
8
8
 
9
9
  /**
10
10
  * Bottom-sheet route wrapper around {@link AccountSwitcherView}. Used when the
11
- * switcher is opened as a sheet (e.g. from the `ActiveAccountBanner` cue or the
12
- * "Your accounts" entry in ManageAccount) rather than as the header-chip
13
- * popover (which uses the `AccountSwitcher` modal directly).
11
+ * switcher is opened as a sheet (e.g. from the "Your accounts" entry in
12
+ * ManageAccount) rather than as the header-chip popover (which uses the
13
+ * `AccountSwitcher` modal directly).
14
14
  */
15
15
  const AccountSwitcherScreen: React.FC<BaseScreenProps> = ({ onClose, goBack, navigate }) => {
16
16
  const { t } = useI18n();
@@ -84,7 +84,7 @@ const CreateAccountScreen: React.FC<BaseScreenProps> = ({
84
84
  parentAccountId,
85
85
  }) => {
86
86
  const bloomTheme = useTheme();
87
- const { oxyServices, createAccount, setActingAs } = useOxy();
87
+ const { oxyServices, createAccount, switchToAccount } = useOxy();
88
88
  const { t } = useI18n();
89
89
 
90
90
  const parentId = typeof parentAccountId === 'string' ? parentAccountId : undefined;
@@ -181,9 +181,11 @@ const CreateAccountScreen: React.FC<BaseScreenProps> = ({
181
181
 
182
182
  toast.success(t('accounts.create.toasts.success') || 'Account created');
183
183
 
184
- // Switch to the new account
184
+ // Switch INTO the new account (real-session switch — the whole app becomes
185
+ // it). Best-effort: creation already succeeded, so a switch hiccup should
186
+ // not surface as a create failure.
185
187
  if (account.accountId) {
186
- setActingAs(account.accountId);
188
+ await switchToAccount(account.accountId).catch(() => undefined);
187
189
  }
188
190
 
189
191
  onClose?.();
@@ -195,7 +197,7 @@ const CreateAccountScreen: React.FC<BaseScreenProps> = ({
195
197
  } finally {
196
198
  setIsCreating(false);
197
199
  }
198
- }, [canCreate, kind, username, displayName, bio, parentId, createAccount, setActingAs, onClose, t]);
200
+ }, [canCreate, kind, username, displayName, bio, parentId, createAccount, switchToAccount, onClose, t]);
199
201
 
200
202
  // Status icon + color shown alongside the username field message
201
203
  const usernameIsInvalid = usernameStatus === 'taken' || usernameStatus === 'invalid';
@@ -88,10 +88,11 @@ const EditProfileFieldScreen: React.FC<EditProfileFieldScreenProps> = ({
88
88
  theme,
89
89
  fieldType = 'displayName',
90
90
  }) => {
91
- // Editing "my" profile targets the ACTIVE account — writes already route to
92
- // it via the X-Acting-As header, so the initial field values must mirror the
93
- // active account (an org/project/bot when switched, else the personal user).
94
- const { activeAccount } = useOxy();
91
+ // Editing "my" profile targets the ACTIVE account — writes authenticate as
92
+ // the active session, which IS that account — so the initial field values
93
+ // must mirror the active account (an org/project/bot when switched, else the
94
+ // personal user).
95
+ const { user } = useOxy();
95
96
  const { t } = useI18n();
96
97
  const { saveProfile, updateField, isSaving } = useProfileEditing();
97
98
  const bloomTheme = useTheme();
@@ -267,9 +268,9 @@ const EditProfileFieldScreen: React.FC<EditProfileFieldScreenProps> = ({
267
268
 
268
269
  // Initialize field values from the active account's data
269
270
  useEffect(() => {
270
- if (!activeAccount) return;
271
+ if (!user) return;
271
272
 
272
- const userData = activeAccount;
273
+ const userData = user;
273
274
 
274
275
  if (fieldConfig.isList) {
275
276
  if (fieldType === 'locations') {
@@ -319,7 +320,7 @@ const EditProfileFieldScreen: React.FC<EditProfileFieldScreenProps> = ({
319
320
  });
320
321
  setFieldValues(initialValues);
321
322
  }
322
- }, [activeAccount, fieldConfig, fieldType]);
323
+ }, [user, fieldConfig, fieldType]);
323
324
 
324
325
  // Field change handler
325
326
  const handleFieldChange = useCallback((key: string, value: string) => {
@@ -766,8 +766,8 @@ const FileManagementScreen: React.FC<FileManagementScreenProps> = ({
766
766
  // Use useOxy() hook for OxyContext values. Files are owned by the ACTIVE
767
767
  // account (the org/project/bot when switched, else the personal user): the
768
768
  // default file owner and every "is this mine?" ownership check resolve
769
- // against `activeAccount`, so switching shows/manages that account's files.
770
- const { activeAccount, oxyServices } = useOxy();
769
+ // against `user`, so switching shows/manages that account's files.
770
+ const { user, oxyServices } = useOxy();
771
771
  const { t } = useI18n();
772
772
  const uploadFileMutation = useUploadFile();
773
773
  // Prompt controls
@@ -1036,7 +1036,7 @@ const FileManagementScreen: React.FC<FileManagementScreenProps> = ({
1036
1036
  const backgroundColor = colors.backgroundSecondary;
1037
1037
  const borderColor = colors.border;
1038
1038
 
1039
- const targetUserId = userId || activeAccount?.id;
1039
+ const targetUserId = userId || user?.id;
1040
1040
 
1041
1041
  const storeSetUploading = useFileStore(s => s.setUploading);
1042
1042
  const storeSetUploadProgress = useFileStore(s => s.setUploadProgress);
@@ -2290,11 +2290,11 @@ const FileManagementScreen: React.FC<FileManagementScreenProps> = ({
2290
2290
  <Ionicons name="images-outline" size={64} color={colors.textTertiary} />
2291
2291
  <Text style={[fileManagementStyles.emptyStateTitle, { color: colors.text }]}>{t('fileManagement.emptyPhotos.title')}</Text>
2292
2292
  <Text style={[fileManagementStyles.emptyStateDescription, { color: colors.textSecondary }]}> {
2293
- activeAccount?.id === targetUserId
2293
+ user?.id === targetUserId
2294
2294
  ? t('fileManagement.emptyPhotos.ownDescription')
2295
2295
  : t('fileManagement.emptyPhotos.otherDescription')
2296
2296
  } </Text>
2297
- {activeAccount?.id === targetUserId && (
2297
+ {user?.id === targetUserId && (
2298
2298
  <TouchableOpacity
2299
2299
  style={[fileManagementStyles.emptyStateButton, { backgroundColor: colors.primary }]}
2300
2300
  onPress={handleFileUpload}
@@ -2360,7 +2360,7 @@ const FileManagementScreen: React.FC<FileManagementScreenProps> = ({
2360
2360
  }, [
2361
2361
  filteredFiles,
2362
2362
  colors,
2363
- activeAccount?.id,
2363
+ user?.id,
2364
2364
  targetUserId,
2365
2365
  uploading,
2366
2366
  handleFileUpload,
@@ -2384,12 +2384,12 @@ const FileManagementScreen: React.FC<FileManagementScreenProps> = ({
2384
2384
  <Ionicons name="folder-open-outline" size={64} color={colors.textTertiary} />
2385
2385
  <Text style={[fileManagementStyles.emptyStateTitle, { color: colors.text }]}>{t('fileManagement.emptyFiles.title')}</Text>
2386
2386
  <Text style={[fileManagementStyles.emptyStateDescription, { color: colors.textSecondary }]}>
2387
- {activeAccount?.id === targetUserId
2387
+ {user?.id === targetUserId
2388
2388
  ? t('fileManagement.emptyFiles.ownDescription')
2389
2389
  : t('fileManagement.emptyFiles.otherDescription')
2390
2390
  }
2391
2391
  </Text>
2392
- {activeAccount?.id === targetUserId && (
2392
+ {user?.id === targetUserId && (
2393
2393
  <TouchableOpacity
2394
2394
  style={[fileManagementStyles.emptyStateButton, { backgroundColor: colors.primary }]}
2395
2395
  onPress={handleFileUpload}
@@ -2599,7 +2599,7 @@ const FileManagementScreen: React.FC<FileManagementScreenProps> = ({
2599
2599
  const photosOnly = filteredFiles.filter(
2600
2600
  (file) => file.contentType.startsWith('image/'),
2601
2601
  );
2602
- const isOwner = activeAccount?.id === targetUserId;
2602
+ const isOwner = user?.id === targetUserId;
2603
2603
  const allowUpload = isOwner && allowUploadInSelectMode;
2604
2604
 
2605
2605
  return (
@@ -2657,14 +2657,14 @@ const FileManagementScreen: React.FC<FileManagementScreenProps> = ({
2657
2657
  onClose={handleCloseFile}
2658
2658
  onDownload={handleFileDownload}
2659
2659
  onDelete={confirmFileDelete}
2660
- isOwner={activeAccount?.id === targetUserId}
2660
+ isOwner={user?.id === targetUserId}
2661
2661
  />
2662
2662
  <FileDetailsModal
2663
2663
  control={fileDetailsControl}
2664
2664
  file={selectedFile}
2665
2665
  onDownload={handleFileDownload}
2666
2666
  onDelete={confirmFileDelete}
2667
- isOwner={activeAccount?.id === targetUserId}
2667
+ isOwner={user?.id === targetUserId}
2668
2668
  />
2669
2669
  </>
2670
2670
  );
@@ -2840,7 +2840,7 @@ const FileManagementScreen: React.FC<FileManagementScreenProps> = ({
2840
2840
  color={colors.textSecondary}
2841
2841
  />
2842
2842
  </TouchableOpacity>
2843
- {activeAccount?.id === targetUserId && (!selectMode || (selectMode && allowUploadInSelectMode)) && (
2843
+ {user?.id === targetUserId && (!selectMode || (selectMode && allowUploadInSelectMode)) && (
2844
2844
  <TouchableOpacity
2845
2845
  style={[
2846
2846
  fileManagementStyles.uploadButton,
@@ -3013,7 +3013,7 @@ const FileManagementScreen: React.FC<FileManagementScreenProps> = ({
3013
3013
  file={selectedFile}
3014
3014
  onDownload={handleFileDownload}
3015
3015
  onDelete={confirmFileDelete}
3016
- isOwner={activeAccount?.id === targetUserId}
3016
+ isOwner={user?.id === targetUserId}
3017
3017
  />
3018
3018
  )}
3019
3019
 
@@ -17,7 +17,7 @@ interface HistoryItem { id: string; query: string; type: 'search' | 'browse'; ti
17
17
  const HistoryViewScreen: React.FC<BaseScreenProps> = ({ onClose, goBack }) => {
18
18
  // History is scoped to the ACTIVE account so a switch into an org/project/bot
19
19
  // shows that account's history, not the device-session owner's.
20
- const { activeAccount } = useOxy();
20
+ const { user } = useOxy();
21
21
  const { t } = useI18n();
22
22
  const bloomTheme = useTheme();
23
23
  const [history, setHistory] = useState<HistoryItem[]>([]);
@@ -47,13 +47,13 @@ const HistoryViewScreen: React.FC<BaseScreenProps> = ({ onClose, goBack }) => {
47
47
  try {
48
48
  setIsLoading(true);
49
49
  const storage = await getStorage();
50
- const stored = await storage.getItem(`history_${activeAccount?.id || 'guest'}`);
50
+ const stored = await storage.getItem(`history_${user?.id || 'guest'}`);
51
51
  if (stored) { const parsed = JSON.parse(stored); setHistory(parsed.map((i: HistoryItem) => ({ ...i, timestamp: new Date(i.timestamp) }))); }
52
52
  else setHistory([]);
53
53
  } catch { setHistory([]); } finally { setIsLoading(false); }
54
54
  };
55
55
  load();
56
- }, [activeAccount?.id]);
56
+ }, [user?.id]);
57
57
 
58
58
  const handleDeleteLast15Minutes = useCallback(async () => {
59
59
  try {
@@ -62,21 +62,21 @@ const HistoryViewScreen: React.FC<BaseScreenProps> = ({ onClose, goBack }) => {
62
62
  const filtered = history.filter(item => item.timestamp < cutoff);
63
63
  setHistory(filtered);
64
64
  const storage = await getStorage();
65
- await storage.setItem(`history_${activeAccount?.id || 'guest'}`, JSON.stringify(filtered));
65
+ await storage.setItem(`history_${user?.id || 'guest'}`, JSON.stringify(filtered));
66
66
  toast.success(t('history.deleteLast15Minutes.success') || 'Last 15 minutes deleted');
67
67
  } catch (e) { if (__DEV__) console.error('Failed to delete history:', e); toast.error(t('history.deleteLast15Minutes.error') || 'Failed to delete history'); }
68
68
  finally { setIsDeleting(false); }
69
- }, [history, activeAccount?.id, t]);
69
+ }, [history, user?.id, t]);
70
70
 
71
71
  const handleClearAll = useCallback(async () => {
72
72
  try {
73
73
  setIsDeleting(true); setHistory([]);
74
74
  const storage = await getStorage();
75
- await storage.removeItem(`history_${activeAccount?.id || 'guest'}`);
75
+ await storage.removeItem(`history_${user?.id || 'guest'}`);
76
76
  toast.success(t('history.clearAll.success') || 'History cleared');
77
77
  } catch (e) { if (__DEV__) console.error('Failed to clear history:', e); toast.error(t('history.clearAll.error') || 'Failed to clear history'); }
78
78
  finally { setIsDeleting(false); }
79
- }, [activeAccount?.id, t]);
79
+ }, [user?.id, t]);
80
80
 
81
81
  const formatTime = (date: Date) => {
82
82
  const diff = new Date().getTime() - date.getTime();
@@ -34,9 +34,9 @@ const LanguageSelectorScreen: React.FC<LanguageSelectorScreenProps> = ({
34
34
  theme,
35
35
  }) => {
36
36
  // Use useOxy() hook for OxyContext values. The language preference persists
37
- // on the ACTIVE account's profile via the X-Acting-As header, so gate the
38
- // server sync on the active account.
39
- const { activeAccount, currentLanguage, setLanguage, oxyServices, isAuthenticated } = useOxy();
37
+ // on the ACTIVE account's profile the active session IS that account — so
38
+ // gate the server sync on the active account.
39
+ const { user, currentLanguage, setLanguage, oxyServices, isAuthenticated } = useOxy();
40
40
  const { t } = useI18n();
41
41
  const bloomTheme = useTheme();
42
42
  const normalizedTheme = normalizeTheme(theme);
@@ -55,7 +55,7 @@ const LanguageSelectorScreen: React.FC<LanguageSelectorScreenProps> = ({
55
55
  let serverSyncFailed = false;
56
56
 
57
57
  // If signed in, persist preference to backend user settings
58
- if (isAuthenticated && activeAccount?.id) {
58
+ if (isAuthenticated && user?.id) {
59
59
  try {
60
60
  await oxyServices.updateProfile({ language: languageId });
61
61
  } catch (e: unknown) {
@@ -92,7 +92,7 @@ const LanguageSelectorScreen: React.FC<LanguageSelectorScreenProps> = ({
92
92
  toast.error(t('language.saveFailed'));
93
93
  setIsLoading(false);
94
94
  }
95
- }, [currentLanguage, isLoading, isAuthenticated, activeAccount?.id, oxyServices, setLanguage, t, onClose, goBack]);
95
+ }, [currentLanguage, isLoading, isAuthenticated, user?.id, oxyServices, setLanguage, t, onClose, goBack]);
96
96
 
97
97
  // Filter the supported languages by the search query (name + native name).
98
98
  const filteredLanguages = useMemo(() => {
@@ -89,7 +89,6 @@ const ManageAccountScreen: React.FC<BaseScreenProps> = ({
89
89
  const { t, locale } = useI18n();
90
90
  const {
91
91
  user: contextUser,
92
- activeAccount,
93
92
  isAuthenticated,
94
93
  oxyServices,
95
94
  activeSessionId,
@@ -101,11 +100,11 @@ const ManageAccountScreen: React.FC<BaseScreenProps> = ({
101
100
  const { data: userFromQuery, isLoading: userLoading } = useCurrentUser({
102
101
  enabled: isAuthenticated,
103
102
  });
104
- // `user` is the device-session OWNER (the human login) used only for
105
- // account/session MANAGEMENT and GDPR-level actions (sign-out, device
106
- // sessions, download-data, delete-account). Identity-of-me surfaces (the
107
- // profile header, preview-profile target, premium state) read
108
- // `activeAccount` so a switch into an org/project/bot is reflected here.
103
+ // `user` IS the active account. In the real-session switch model, switching
104
+ // into an org/project/bot makes it the active session, so `useOxy().user`
105
+ // (and the freshest `useCurrentUser` copy) already reflects the switched
106
+ // account everywhere — identity-of-me surfaces and management/GDPR actions
107
+ // alike read this single `user`.
109
108
  const user = userFromQuery ?? contextUser;
110
109
 
111
110
  const { data: subscription } = useUserSubscription({ enabled: isAuthenticated });
@@ -127,13 +126,13 @@ const ManageAccountScreen: React.FC<BaseScreenProps> = ({
127
126
  const [signingOutAllDevices, setSigningOutAllDevices] = useState(false);
128
127
  const [signingOut, setSigningOut] = useState(false);
129
128
 
130
- const displayName = useMemo(() => getAccountDisplayName(activeAccount, locale), [activeAccount, locale]);
131
- const handle = useMemo(() => getAccountFallbackHandle(activeAccount), [activeAccount]);
129
+ const displayName = useMemo(() => getAccountDisplayName(user, locale), [user, locale]);
130
+ const handle = useMemo(() => getAccountFallbackHandle(user), [user]);
132
131
  const avatarUri = useMemo(() => {
133
- return activeAccount?.avatar
134
- ? oxyServices.getFileDownloadUrl(activeAccount.avatar, 'thumb')
132
+ return user?.avatar
133
+ ? oxyServices.getFileDownloadUrl(user.avatar, 'thumb')
135
134
  : undefined;
136
- }, [activeAccount?.avatar, oxyServices]);
135
+ }, [user?.avatar, oxyServices]);
137
136
 
138
137
  const handleSignOut = useCallback(async () => {
139
138
  if (signingOut) {
@@ -361,12 +360,12 @@ const ManageAccountScreen: React.FC<BaseScreenProps> = ({
361
360
  </H4>
362
361
  {handle ? (
363
362
  <Text className="text-text-secondary text-sm mt-space-2" numberOfLines={1}>
364
- {activeAccount?.username ? `@${handle}` : handle}
363
+ {user?.username ? `@${handle}` : handle}
365
364
  </Text>
366
365
  ) : null}
367
- {activeAccount?.email ? (
366
+ {user?.email ? (
368
367
  <Text className="text-text-secondary text-sm mt-space-2" numberOfLines={1}>
369
- {activeAccount.email}
368
+ {user.email}
370
369
  </Text>
371
370
  ) : null}
372
371
  </View>
@@ -418,9 +417,9 @@ const ManageAccountScreen: React.FC<BaseScreenProps> = ({
418
417
  || 'See how your profile looks to others'
419
418
  }
420
419
  onPress={() =>
421
- activeAccount?.id ? navigate?.('Profile', { userId: activeAccount.id }) : undefined
420
+ user?.id ? navigate?.('Profile', { userId: user.id }) : undefined
422
421
  }
423
- disabled={!activeAccount?.id}
422
+ disabled={!user?.id}
424
423
  />
425
424
  <SettingsListItem
426
425
  icon={
@@ -587,13 +586,13 @@ const ManageAccountScreen: React.FC<BaseScreenProps> = ({
587
586
  t('accountOverview.items.premium.title') || 'Oxy+'
588
587
  }
589
588
  description={
590
- activeAccount?.isPremium
589
+ user?.isPremium
591
590
  ? (t('accountOverview.items.premium.manage') || 'Manage your premium plan')
592
591
  : (t('accountOverview.items.premium.upgrade') || 'Upgrade to premium features')
593
592
  }
594
593
  onPress={() => navigate?.('PremiumSubscription')}
595
594
  />
596
- {activeAccount?.isPremium || subscription?.status === 'active' ? (
595
+ {user?.isPremium || subscription?.status === 'active' ? (
597
596
  <SettingsListItem
598
597
  icon={
599
598
  <SettingsIcon
@@ -93,7 +93,7 @@ const PremiumSubscriptionScreen: React.FC<BaseScreenProps> = ({
93
93
  }) => {
94
94
  // Premium state belongs to the ACTIVE account (the org/project/bot when
95
95
  // switched, else the personal user), not the device-session owner.
96
- const { activeAccount } = useOxy();
96
+ const { user } = useOxy();
97
97
  const [loading, setLoading] = useState(true);
98
98
  const [subscription, setSubscription] = useState<UserSubscription | null>(null);
99
99
  const [plans, setPlans] = useState<SubscriptionPlan[]>([]);
@@ -329,7 +329,7 @@ const PremiumSubscriptionScreen: React.FC<BaseScreenProps> = ({
329
329
  if (currentAppPackage) {
330
330
  loadSubscriptionData();
331
331
  }
332
- }, [currentAppPackage, activeAccount?.isPremium]);
332
+ }, [currentAppPackage, user?.isPremium]);
333
333
 
334
334
  const detectCurrentApp = () => {
335
335
  const detectedApp = 'mention';
@@ -346,7 +346,7 @@ const PremiumSubscriptionScreen: React.FC<BaseScreenProps> = ({
346
346
  setPlans(availablePlans);
347
347
 
348
348
  let currentSubscription: UserSubscription | null = null;
349
- if (activeAccount?.isPremium) {
349
+ if (user?.isPremium) {
350
350
  currentSubscription = {
351
351
  id: 'sub_12345',
352
352
  planId: 'oxy-insider',
@@ -67,7 +67,7 @@ const PrivacySettingsScreen: React.FC<BaseScreenProps> = ({
67
67
  }) => {
68
68
  // Privacy settings belong to the ACTIVE account (the org/project/bot when
69
69
  // switched, else the personal user).
70
- const { oxyServices, activeAccount } = useOxy();
70
+ const { oxyServices, user } = useOxy();
71
71
  const { t, locale } = useI18n();
72
72
  const bloomTheme = useTheme();
73
73
  const [isLoading, setIsLoading] = useState(true);
@@ -79,8 +79,8 @@ const PrivacySettingsScreen: React.FC<BaseScreenProps> = ({
79
79
  const { values: settings, toggle, savingKeys, setValues } = useSettingToggles<PrivacySettings>({
80
80
  initialValues: DEFAULT_PRIVACY_SETTINGS,
81
81
  onSave: async (key, value) => {
82
- if (!activeAccount?.id || !oxyServices) return;
83
- await oxyServices.updatePrivacySettings({ [key]: value }, activeAccount.id);
82
+ if (!user?.id || !oxyServices) return;
83
+ await oxyServices.updatePrivacySettings({ [key]: value }, user.id);
84
84
  },
85
85
  errorMessage: t('privacySettings.updateError') || 'Failed to update privacy setting',
86
86
  });
@@ -92,8 +92,8 @@ const PrivacySettingsScreen: React.FC<BaseScreenProps> = ({
92
92
  const loadSettings = async () => {
93
93
  try {
94
94
  setIsLoading(true);
95
- if (activeAccount?.id && oxyServices) {
96
- const privacySettings = await oxyServices.getPrivacySettings(activeAccount.id);
95
+ if (user?.id && oxyServices) {
96
+ const privacySettings = await oxyServices.getPrivacySettings(user.id);
97
97
  if (privacySettings) {
98
98
  setValues(privacySettings);
99
99
  }
@@ -109,7 +109,7 @@ const PrivacySettingsScreen: React.FC<BaseScreenProps> = ({
109
109
  };
110
110
 
111
111
  loadSettings();
112
- }, [activeAccount?.id, oxyServices, t, setValues]);
112
+ }, [user?.id, oxyServices, t, setValues]);
113
113
 
114
114
  // Load blocked and restricted users
115
115
  useEffect(() => {
@@ -134,9 +134,9 @@ const PrivacySettingsScreen: React.FC<BaseScreenProps> = ({
134
134
 
135
135
  loadUsers();
136
136
  // Re-load when the active account changes so the block/restrict lists
137
- // reflect the account currently switched into (they resolve via the
138
- // X-Acting-As header).
139
- }, [oxyServices, activeAccount?.id]);
137
+ // reflect the account currently switched into (they resolve from the
138
+ // active session, which IS that account).
139
+ }, [oxyServices, user?.id]);
140
140
 
141
141
  const handleUnblock = useCallback(async (userId: string) => {
142
142
  if (!oxyServices) return;
@@ -31,7 +31,7 @@ const ProfileScreen: React.FC<ProfileScreenProps> = ({ userId, username, theme,
31
31
  // and the own-profile fallback is the ACTIVE account (the account switched
32
32
  // into), so previewing my profile while switched into an org/project/bot
33
33
  // resolves "this is mine" against that account, not the session owner.
34
- const { oxyServices, activeAccount: currentUser } = useOxy();
34
+ const { oxyServices, user: currentUser } = useOxy();
35
35
  const [profile, setProfile] = useState<User | null>(null);
36
36
  const [reputationTotal, setReputationTotal] = useState<number | null>(null);
37
37
  const [postsCount, setPostsCount] = useState<number | null>(null);
@@ -40,7 +40,7 @@ const SavesCollectionsScreen: React.FC<BaseScreenProps> = ({
40
40
  }) => {
41
41
  // Saves & collections belong to the ACTIVE account (the org/project/bot when
42
42
  // switched, else the personal user).
43
- const { oxyServices, activeAccount } = useOxy();
43
+ const { oxyServices, user } = useOxy();
44
44
  const { t } = useI18n();
45
45
  const bloomTheme = useTheme();
46
46
  const [savedItems, setSavedItems] = useState<SavedItem[]>([]);
@@ -53,10 +53,10 @@ const SavesCollectionsScreen: React.FC<BaseScreenProps> = ({
53
53
  const loadData = async () => {
54
54
  try {
55
55
  setIsLoading(true);
56
- if (activeAccount?.id && oxyServices) {
56
+ if (user?.id && oxyServices) {
57
57
  const [saved, cols] = await Promise.all([
58
- oxyServices.getSavedItems(activeAccount.id),
59
- oxyServices.getCollections(activeAccount.id),
58
+ oxyServices.getSavedItems(user.id),
59
+ oxyServices.getCollections(user.id),
60
60
  ]);
61
61
  setSavedItems(saved.map((item) => ({
62
62
  id: item.id,
@@ -80,7 +80,7 @@ const SavesCollectionsScreen: React.FC<BaseScreenProps> = ({
80
80
  };
81
81
 
82
82
  loadData();
83
- }, [activeAccount?.id, oxyServices, t]);
83
+ }, [user?.id, oxyServices, t]);
84
84
 
85
85
  const formatDate = (date: Date) => {
86
86
  return date.toLocaleDateString();