@hot-updater/console 1.2.0-rc.30 → 1.2.0-rc.32

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 (286) hide show
  1. package/.output/nitro.json +1 -1
  2. package/.output/public/assets/-native-builds-search-BvCftqF2.js +1 -0
  3. package/.output/public/assets/{BundleIdDisplay-CTBdtFQ8.js → BundleIdDisplay-D8oR8mcP.js} +1 -1
  4. package/.output/public/assets/{ChannelBadge-CEabmopB.js → ChannelBadge-Do-lWsLM.js} +1 -1
  5. package/.output/public/assets/{CompositeItem-KUM5yQVr.js → CompositeItem-Ci-Dvjc7.js} +1 -1
  6. package/.output/public/assets/{ConsoleFeatureUnavailable-Be-0iTww.js → ConsoleFeatureUnavailable-C0iDIboF.js} +1 -1
  7. package/.output/public/assets/{EventDetails-bDOYte1z.js → EventDetails-DglqzK6l.js} +1 -1
  8. package/.output/public/assets/{HashValueDisplay-D2f0HmyU.js → HashValueDisplay-DKziWjEg.js} +1 -1
  9. package/.output/public/assets/{InsightsPageHeader-Cj2ROSQO.js → InsightsPageHeader-DLH1MntM.js} +1 -1
  10. package/.output/public/assets/IosInstall-2R2o1IXd.js +1 -0
  11. package/.output/public/assets/NativeBuildsNav-BgeUSMqw.js +1 -0
  12. package/.output/public/assets/{NotFoundPage-CVBtl68B.js → NotFoundPage-CijSy63W.js} +1 -1
  13. package/.output/public/assets/{PlatformIcon-DVnzzGqM.js → PlatformIcon-Kq3q98tU.js} +1 -1
  14. package/.output/public/assets/QrCode-D3-Vuudy.js +1 -0
  15. package/.output/public/assets/RelativeTime-CP7nosYx.js +1 -0
  16. package/.output/public/assets/{RolloutPercentageBadge-D_I0Raj2.js → RolloutPercentageBadge-DnmU8XbU.js} +1 -1
  17. package/.output/public/assets/{RowReason-B7VM1ztc.js → RowReason-D7TZ2xwW.js} +1 -1
  18. package/.output/public/assets/SandboxBadge-BPf2uve4.js +1 -0
  19. package/.output/public/assets/TargetDisplay-DzSkf5yP.js +1 -0
  20. package/.output/public/assets/alert-dialog-Dihztkem.js +1 -0
  21. package/.output/public/assets/{api-C1OPeiG1.js → api-B1z_XXrQ.js} +1 -1
  22. package/.output/public/assets/api-keys-DL9HeC8e.js +1 -0
  23. package/.output/public/assets/api-keys-DPuPM7ag.js +1 -0
  24. package/.output/public/assets/arrow-left-CxxDwBQs.js +1 -0
  25. package/.output/public/assets/arrow-right-jHG0fJt7.js +1 -0
  26. package/.output/public/assets/arrow-up-right-BPRe5soE.js +1 -0
  27. package/.output/public/assets/{badge-FZMD5vvS.js → badge-D4Tiwei-.js} +1 -1
  28. package/.output/public/assets/{card-CyHYmHue.js → card-BfeRlTvj.js} +1 -1
  29. package/.output/public/assets/check-Dz_5aNwx.js +1 -0
  30. package/.output/public/assets/chevron-right-CuYrscDY.js +1 -0
  31. package/.output/public/assets/{circle-off-BCkZpskJ.js → circle-off-BZFOMb8J.js} +1 -1
  32. package/.output/public/assets/{clipboard-DZrZK5gR.js → clipboard-D8uvj6FN.js} +1 -1
  33. package/.output/public/assets/{console-features-api-BO5V64P3.js → console-features-api-De6tXQnd.js} +1 -1
  34. package/.output/public/assets/{copy-CH1__JAW.js → copy-BxI24-g-.js} +1 -1
  35. package/.output/public/assets/dialog-e9AF5T6h.js +1 -0
  36. package/.output/public/assets/{dist-DAM__Tdz.js → dist-BEIz5ojx.js} +1 -1
  37. package/.output/public/assets/{download-B2GjTySo.js → download-ekENI2Sw.js} +1 -1
  38. package/.output/public/assets/{empty--YaE5Z4p.js → empty-DpSPWLc2.js} +1 -1
  39. package/.output/public/assets/{field-CdhSgWhI.js → field-PkdRPD3A.js} +1 -1
  40. package/.output/public/assets/{git-branch-DG1VDaKq.js → git-branch-BWrvONjc.js} +1 -1
  41. package/.output/public/assets/{history-C0wv4htz.js → history-DwdBLzJP.js} +1 -1
  42. package/.output/public/assets/index-DZdzmvWS.js +10 -0
  43. package/.output/public/assets/input-group-DNfVeeYZ.js +1 -0
  44. package/.output/public/assets/{insights-_j_ieOyh.js → insights-6d-iISFa.js} +2 -2
  45. package/.output/public/assets/insights-DotP9eJn.js +2 -0
  46. package/.output/public/assets/insights-MQrx_wbP.js +1 -0
  47. package/.output/public/assets/{insights-api-B6Gj74n5.js → insights-api-CXXCRZhF.js} +1 -1
  48. package/.output/public/assets/{insights-search-Bgvg6wSP.js → insights-search-CtEcj6lz.js} +1 -1
  49. package/.output/public/assets/{insights-usage-rpc-BUCinjSN.js → insights-usage-rpc-DdmD1Nuy.js} +1 -1
  50. package/.output/public/assets/{insights_.distribution-CRkGNelG.js → insights_.distribution-DATeWpQS.js} +1 -1
  51. package/.output/public/assets/insights_.distribution-DYgsR7-7.js +2 -0
  52. package/.output/public/assets/insights_.distribution-REbBAqgL.js +1 -0
  53. package/.output/public/assets/installations-Di02gX_V.js +1 -0
  54. package/.output/public/assets/{installations-CYTzndfP.js → installations-Ds-MhfsQ.js} +1 -1
  55. package/.output/public/assets/{installations-BsD6LgNc.js → installations-Lm8TxrcB.js} +2 -2
  56. package/.output/public/assets/{key-round-D7UgdXyA.js → key-round-B-vaAsR7.js} +1 -1
  57. package/.output/public/assets/{link-CN3iHC4A.js → link-D95E0fwF.js} +1 -1
  58. package/.output/public/assets/{list-Bm-CfN5g.js → list-Dq40Mmoj.js} +1 -1
  59. package/.output/public/assets/loader-circle-C26cZDSM.js +1 -0
  60. package/.output/public/assets/native-builds-BOSmoLed.js +1 -0
  61. package/.output/public/assets/native-builds-Bs_JroPG.js +2 -0
  62. package/.output/public/assets/native-builds-Chv-kXaS.js +1 -0
  63. package/.output/public/assets/native-builds_._buildId-Bj24bG99.js +2 -0
  64. package/.output/public/assets/native-builds_._buildId-Somk3u9R.js +1 -0
  65. package/.output/public/assets/native-builds_.devices-afOLyzux.js +1 -0
  66. package/.output/public/assets/native-builds_.devices-o6LsPF9Y.js +2 -0
  67. package/.output/public/assets/plus-Bp6IqwOH.js +1 -0
  68. package/.output/public/assets/{preload-helper-CRQjUQaZ.js → preload-helper-52zhjEsw.js} +1 -1
  69. package/.output/public/assets/{refresh-cw-BHhBYjS8.js → refresh-cw-CpCxPYma.js} +1 -1
  70. package/.output/public/assets/{relativeTime-BYRt19mj.js → relativeTime-D_aYJRc7.js} +1 -1
  71. package/.output/public/assets/remote-config-Buy_12p7.js +1 -0
  72. package/.output/public/assets/remote-config-Dmuqm9xx.js +1 -0
  73. package/.output/public/assets/remote-config-g05054op.js +6 -0
  74. package/.output/public/assets/{rotate-cw-Ba-slJea.js → rotate-cw-Bn3fIWmY.js} +1 -1
  75. package/.output/public/assets/routes-5mt1iab-.js +2 -0
  76. package/.output/public/assets/routes-BxJfMpil.js +1 -0
  77. package/.output/public/assets/search-DeKSyo9Q.js +1 -0
  78. package/.output/public/assets/{select-CA8r-UUe.js → select-BAd2hAoW.js} +1 -1
  79. package/.output/public/assets/{sidebar-yC7KdImc.js → sidebar-UnsNYOry.js} +1 -1
  80. package/.output/public/assets/smartphone-lSZWrqxx.js +1 -0
  81. package/.output/public/assets/styles-CN7c7MGr.css +2 -0
  82. package/.output/public/assets/{switch-BsV3d4km.js → switch-C_s67MO4.js} +1 -1
  83. package/.output/public/assets/{table-D8YjT_ht.js → table-r_sYqKTQ.js} +1 -1
  84. package/.output/public/assets/{tabs-RdhEl9sE.js → tabs-B95QcXeT.js} +1 -1
  85. package/.output/public/assets/{trash-2-B5KIvrXy.js → trash-2-BPH7ydek.js} +1 -1
  86. package/.output/public/assets/{undo-2-CFcU9dIB.js → undo-2-CGeTBZjC.js} +1 -1
  87. package/.output/public/assets/{useCompositeListItem-lAmUsXcc.js → useCompositeListItem-B9ONn9qn.js} +1 -1
  88. package/.output/public/assets/{useMutation-w3qYaU2L.js → useMutation-BWX97JX2.js} +1 -1
  89. package/.output/server/{__23tanstack-start-server-fn-resolver-q4YFIDyr.mjs → __23tanstack-start-server-fn-resolver-ET1Ypyyk.mjs} +61 -61
  90. package/.output/server/_libs/_.mjs +1 -1
  91. package/.output/server/_ssr/{-native-builds-search-Mm_AZoRU.mjs → -native-builds-search-OJ8XmaBa.mjs} +2 -2
  92. package/.output/server/_ssr/{BundleIdDisplay-DvzlYWq8.mjs → BundleIdDisplay-CpaKbEYb.mjs} +2 -2
  93. package/.output/server/_ssr/{ChannelBadge-qF_Pc5Ud.mjs → ChannelBadge-dVXs-bYV.mjs} +3 -3
  94. package/.output/server/_ssr/{ConsoleFeatureUnavailable-DKUgr0N_.mjs → ConsoleFeatureUnavailable-DWuWwY4L.mjs} +6 -6
  95. package/.output/server/_ssr/{EventDetails-T1XtYEDD.mjs → EventDetails-CcuGyU26.mjs} +7 -7
  96. package/.output/server/_ssr/{HashValueDisplay-Cas_zjIS.mjs → HashValueDisplay-ClkGq5_0.mjs} +2 -2
  97. package/.output/server/_ssr/{InsightsPageHeader-BrllhUl2.mjs → InsightsPageHeader-Bw6RVpdS.mjs} +7 -7
  98. package/.output/server/_ssr/{IosInstall-CEHI8F2M.mjs → IosInstall-DEceeAVT.mjs} +180 -87
  99. package/.output/server/_ssr/{NativeBuildsNav-2xSHyA1a.mjs → NativeBuildsNav-ChqRZH4E.mjs} +5 -5
  100. package/.output/server/_ssr/{NotFoundPage-D6H9vxj_.mjs → NotFoundPage-aZrAWo5n.mjs} +2 -2
  101. package/.output/server/_ssr/{PlatformIcon-BpGOEXjU.mjs → PlatformIcon-X18AN8Yp.mjs} +1 -1
  102. package/.output/server/_ssr/QrCode-pEaOdaRS.mjs +50 -0
  103. package/.output/server/_ssr/{RelativeTime-DpEVzDP9.mjs → RelativeTime-CFIJbj_r.mjs} +10 -5
  104. package/.output/server/_ssr/{RolloutPercentageBadge-DW8-_w30.mjs → RolloutPercentageBadge-BEqOJXly.mjs} +4 -4
  105. package/.output/server/_ssr/{RowReason-C-PjIxzq.mjs → RowReason-DXbU_Nml.mjs} +4 -4
  106. package/.output/server/_ssr/{SandboxBadge-CDdNew0R.mjs → SandboxBadge-CP76AVxN.mjs} +2 -2
  107. package/.output/server/_ssr/{TargetDisplay-BBsP7IaZ.mjs → TargetDisplay-csC-slf3.mjs} +37 -15
  108. package/.output/server/_ssr/{alert-dialog-Bd4E9xdw.mjs → alert-dialog-Dn5l3Bob.mjs} +3 -3
  109. package/.output/server/_ssr/{api-BT7aA8UM.mjs → api-W0WerUfm.mjs} +6 -6
  110. package/.output/server/_ssr/{api-keys-D2NvcQZv.mjs → api-keys-Btu37Irf.mjs} +2 -2
  111. package/.output/server/_ssr/{api-keys-DjWpM20P.mjs → api-keys-D7kmFdhY.mjs} +10 -9
  112. package/.output/server/_ssr/{api-keys-rpc-nM5H7V7f.mjs → api-keys-rpc-9o4CyzUZ.mjs} +3 -3
  113. package/.output/server/_ssr/{api-rpc-DX4HynbW.mjs → api-rpc-B1HnUZMu.mjs} +19 -19
  114. package/.output/server/_ssr/{auth-rpc-LCxTtYz2.mjs → auth-rpc-BBy2L4Ah.mjs} +4 -4
  115. package/.output/server/_ssr/{auth.server-CERo_xef.mjs → auth.server-ajvR-m99.mjs} +28 -14
  116. package/.output/server/_ssr/{badge-Dpp4q7sD.mjs → badge-DlEpe8yC.mjs} +1 -1
  117. package/.output/server/_ssr/{bundleActivity-BP40zYSt.mjs → bundleActivity-a-pEDiqu.mjs} +1 -1
  118. package/.output/server/_ssr/{card-CFCftDfI.mjs → card-AK7Ms1Oa.mjs} +1 -1
  119. package/.output/server/_ssr/{config.server-5W5WD8x2.mjs → config.server-DswyWSgG.mjs} +4 -4
  120. package/.output/server/_ssr/{console-access-B0S5YFUa.mjs → console-access-DM56j3dM.mjs} +2 -2
  121. package/.output/server/_ssr/{console-features-xaGDhRC9.mjs → console-features-DTYyXrWO.mjs} +1 -1
  122. package/.output/server/_ssr/{console-features-api-CV_EReEj.mjs → console-features-api-g5s9V5sz.mjs} +4 -4
  123. package/.output/server/_ssr/{console-features-rpc-D3xlQsuy.mjs → console-features-rpc-Cnmhvmsk.mjs} +3 -3
  124. package/.output/server/_ssr/{databaseConfig-XAvDetmn.mjs → databaseConfig-B56IJxlu.mjs} +1 -1
  125. package/.output/server/_ssr/{databaseRows-BtRVBD0C.mjs → databaseRows-BZMFl5QV.mjs} +2 -2
  126. package/.output/server/_ssr/{deviceProfileToken-CwWb1lPq.mjs → deviceProfileToken-xzDLfE0T.mjs} +21 -5
  127. package/.output/server/_ssr/{dialog-DQR_QI_X.mjs → dialog-0oBrR9Cj.mjs} +4 -4
  128. package/.output/server/_ssr/dist-CiOq3ygH.mjs +148 -0
  129. package/.output/server/_ssr/{downloadBundle-DnoYpi36.mjs → downloadBundle-C1KOnpiF.mjs} +1 -1
  130. package/.output/server/_ssr/{empty-C7PFnkCH.mjs → empty-tasgkoU9.mjs} +2 -2
  131. package/.output/server/_ssr/{failureReports-BA2eg11O.mjs → failureReports-BVufgM3l.mjs} +3 -3
  132. package/.output/server/_ssr/{field-BqYN8sZT.mjs → field-phtuBLMh.mjs} +2 -2
  133. package/.output/server/_ssr/{foldedPage-CqpVk31Q.mjs → foldedPage-CUjJqtlF.mjs} +1 -1
  134. package/.output/server/_ssr/{getBundleChildren-CdqFonhl.mjs → getBundleChildren-CnOf4Frp.mjs} +2 -2
  135. package/.output/server/_ssr/{input-group-Brv0mmyp.mjs → input-group-BTEoUANX.mjs} +2 -2
  136. package/.output/server/_ssr/{insights-CD1e3EnW.mjs → insights-BBzyKO95.mjs} +2 -2
  137. package/.output/server/_ssr/{insights--xI3A0KI.mjs → insights-CPDtpuXg.mjs} +5 -5
  138. package/.output/server/_ssr/{insights-Dd0VdO-1.mjs → insights-D4le8l6s.mjs} +31 -26
  139. package/.output/server/_ssr/{insights-api-Bt2XVa4Y.mjs → insights-api-D6J2HVtY.mjs} +5 -5
  140. package/.output/server/_ssr/{insights-errors-CXHg1lLV.mjs → insights-errors-DwUaDs0Z.mjs} +2 -2
  141. package/.output/server/_ssr/{insights-failures-7zH97WOO.mjs → insights-failures-DGO2_3Vx.mjs} +2 -2
  142. package/.output/server/_ssr/{insights-failures-rpc-DBGzXP5A.mjs → insights-failures-rpc-ChwlB9sg.mjs} +10 -10
  143. package/.output/server/_ssr/{insights-recovery-BhOg6kz2.mjs → insights-recovery-Cdg3Msrj.mjs} +1 -1
  144. package/.output/server/_ssr/{insights-recovery-rpc-C6fAh-i_.mjs → insights-recovery-rpc-B6_GT-_U.mjs} +6 -6
  145. package/.output/server/_ssr/{insights-rpc-pThKC9oj.mjs → insights-rpc-DG0GxsIL.mjs} +3 -3
  146. package/.output/server/_ssr/{insights-search-iFN4UaUv.mjs → insights-search-LKeSNr4M.mjs} +4 -4
  147. package/.output/server/_ssr/{insights-usage-h8fipPTv.mjs → insights-usage-BVm7CDw9.mjs} +1 -1
  148. package/.output/server/_ssr/{insights-usage-rpc-CGHZQ9jq.mjs → insights-usage-rpc-I0Eh5Z89.mjs} +6 -6
  149. package/.output/server/_ssr/{insights-usage-rpc-B-RLvdLZ.mjs → insights-usage-rpc-qnQWkNn2.mjs} +4 -4
  150. package/.output/server/_ssr/{insightsUsage-BjSiV_X_.mjs → insightsUsage-lPKyRC2o.mjs} +3 -3
  151. package/.output/server/_ssr/{insights_.distribution-xHmfwwa5.mjs → insights_.distribution-BF99IaZu.mjs} +5 -5
  152. package/.output/server/_ssr/{insights_.distribution-E6Ns2aN7.mjs → insights_.distribution-D2dZwvqQ.mjs} +2 -2
  153. package/.output/server/_ssr/{insights_.distribution-C6iXJ93Y.mjs → insights_.distribution-Dgv-_T7g.mjs} +14 -14
  154. package/.output/server/_ssr/{installations-D6Upc9Rt.mjs → installations-BHjU8FUI.mjs} +2 -2
  155. package/.output/server/_ssr/{installations-CZnN6slr.mjs → installations-C7TindNY.mjs} +4 -4
  156. package/.output/server/_ssr/{installations-7V-Xyui8.mjs → installations-DVTUpBGI.mjs} +11 -11
  157. package/.output/server/_ssr/{ios-devices-rpc-CXuHk24G.mjs → ios-devices-rpc-KtosHTCC.mjs} +18 -20
  158. package/.output/server/_ssr/iosDeviceCookie-B-8c7lMJ.mjs +155 -0
  159. package/.output/server/_ssr/{iosDeviceProfile-BESi_onx.mjs → iosDeviceProfile-CIEuY_kV.mjs} +13 -13
  160. package/.output/server/_ssr/{iosDevices-BmvvvZRo.mjs → iosDevices-CkLgS8_U.mjs} +4 -20
  161. package/.output/server/_ssr/{listReleases-DYYA5alS.mjs → listReleases-QF91GLE7.mjs} +3 -3
  162. package/.output/server/_ssr/native-artifact-BRNP_q-y.mjs +1532 -0
  163. package/.output/server/_ssr/{native-builds-BhDCE89P.mjs → native-builds-3WEAnb93.mjs} +22 -20
  164. package/.output/server/_ssr/{native-builds-BUojmVWC.mjs → native-builds-B6rWkcHL.mjs} +3 -3
  165. package/.output/server/_ssr/{native-builds-BXBkklfA.mjs → native-builds-nRuXKypG.mjs} +68 -6
  166. package/.output/server/_ssr/{native-builds_._buildId-DRiCNDdO.mjs → native-builds_._buildId-BaykQRJl.mjs} +3 -3
  167. package/.output/server/_ssr/{native-builds_._buildId-DkMpG-OB.mjs → native-builds_._buildId-RFJXyul0.mjs} +21 -27
  168. package/.output/server/_ssr/{native-builds_.devices-DsOx1R36.mjs → native-builds_.devices-BzkeAX0K.mjs} +213 -93
  169. package/.output/server/_ssr/{native-builds_.devices-DSideebA.mjs → native-builds_.devices-D9EGVV1N.mjs} +3 -3
  170. package/.output/server/_ssr/{nativeBuildDownloadLink-DDAUVU8q.mjs → nativeBuildDownloadLink-A1aWZBDw.mjs} +2 -2
  171. package/.output/server/_ssr/{nativeBuildInstall-CcBrfTsc.mjs → nativeBuildInstall-XzMDX9iY.mjs} +8 -6
  172. package/.output/server/_ssr/{nativeBuilds-Cub0EUGN.mjs → nativeBuilds-DaF-TcfO.mjs} +4 -4
  173. package/.output/server/_ssr/plistText-DkzlCfPI.mjs +15 -0
  174. package/.output/server/_ssr/{plugins-CX7wutet.mjs → plugins-D9CCkDjn.mjs} +6 -5
  175. package/.output/server/_ssr/publicConsoleBase-wTKw3_iB.mjs +15 -0
  176. package/.output/server/_ssr/{release-adoption-DeICczY7.mjs → release-adoption-gfhE5tz5.mjs} +2 -2
  177. package/.output/server/_ssr/{release-adoption-rpc-BjMXMi9A.mjs → release-adoption-rpc-DoDlwfWB.mjs} +8 -8
  178. package/.output/server/_ssr/{releaseAdoption-kHZo8P90.mjs → releaseAdoption-DfEYq7I4.mjs} +4 -4
  179. package/.output/server/_ssr/{releaseCatalogCompiler-D9dAMI17.mjs → releaseCatalogCompiler-CJ2Shida.mjs} +4 -3
  180. package/.output/server/_ssr/{releaseManagement-EPhok_Py.mjs → releaseManagement-CqIc-SDE.mjs} +1 -1
  181. package/.output/server/_ssr/{releaseReachability-DaZ7ifUF.mjs → releaseReachability-Ch1JpJkY.mjs} +2 -2
  182. package/.output/server/_ssr/{remote-config-C_DprbJz.mjs → remote-config-6lhdA4DB.mjs} +18 -18
  183. package/.output/server/_ssr/{remote-config-B1iZuZOF.mjs → remote-config-BMg2UurZ.mjs} +2 -2
  184. package/.output/server/_ssr/{remote-config-rpc-BFTPcMfZ.mjs → remote-config-rpc-Ddg8dyxw.mjs} +4 -4
  185. package/.output/server/_ssr/{remote-config-C_q6FBE4.mjs → remote-config-u_T4AXyi.mjs} +2 -2
  186. package/.output/server/_ssr/{router-BDXPwfwl.mjs → router-CovCAswJ.mjs} +101 -61
  187. package/.output/server/_ssr/{routes-BJeztqpQ.mjs → routes-CTUvEVa6.mjs} +37 -33
  188. package/.output/server/_ssr/{routes-DpapxHLc.mjs → routes-DtkONaBi.mjs} +12 -11
  189. package/.output/server/_ssr/{runtime.server-CkSbWaZm.mjs → runtime.server-BUbb281Z.mjs} +4 -4
  190. package/.output/server/_ssr/{schema-3oDJJFWa.mjs → schema-CaIuQCXb.mjs} +1 -1
  191. package/.output/server/_ssr/{schema-migration-rpc-a4bLEdaP.mjs → schema-migration-rpc-DvmruDB6.mjs} +3 -3
  192. package/.output/server/_ssr/{select-C9HpIZxd.mjs → select-DJLTQgmc.mjs} +1 -1
  193. package/.output/server/_ssr/{server-C8ZmMWnn.mjs → server-BfWxoIjf.mjs} +4 -4
  194. package/.output/server/_ssr/{sidebar-BrVL3L7R.mjs → sidebar-Bsfqid7Q.mjs} +6 -6
  195. package/.output/server/_ssr/ssr.mjs +1 -1
  196. package/.output/server/_ssr/{start-D3noqqOK.mjs → start-BaUpXI0L.mjs} +1 -1
  197. package/.output/server/_ssr/{switch-DtnsoZHO.mjs → switch-DckZkZBS.mjs} +3 -3
  198. package/.output/server/_ssr/{table-Bg7nCnct.mjs → table-DG8aRQBO.mjs} +1 -1
  199. package/.output/server/_ssr/{tabs-BEIoGLTL.mjs → tabs-Dblh3lL2.mjs} +2 -2
  200. package/.output/server/_ssr/{updateFailures-D0bP_Ume.mjs → updateFailures-BwDwIoNu.mjs} +3 -3
  201. package/.output/server/_ssr/{dist-B6-irDRA.mjs → uuid-kZvLA0Ly-DNL0qBSj.mjs} +2 -147
  202. package/.output/server/_ssr/{uuidv7-CmHbryZT.mjs → uuidv7-C0jNe2Om.mjs} +2 -2
  203. package/.output/server/_ssr/{version-CQ98ZBpL-NmbU0MD2.mjs → version-CQ98ZBpL-zW2fpHOZ.mjs} +1 -1
  204. package/.output/server/_tanstack-start-manifest_v-CfDH9vVq.mjs +225 -0
  205. package/.output/server/index.mjs +430 -430
  206. package/package.json +7 -7
  207. package/src/components/AppSidebar.tsx +11 -2
  208. package/src/components/DataTable.tsx +18 -2
  209. package/src/components/TargetDisplay.tsx +33 -7
  210. package/src/components/features/api-keys/ApiKeysPage.tsx +1 -1
  211. package/src/components/features/bundles/BundleMetadata.tsx +1 -1
  212. package/src/components/features/bundles/RolloutCohortsDialog.tsx +8 -1
  213. package/src/components/features/channels/ChannelManagementDialog.tsx +6 -2
  214. package/src/components/features/insights/FailureReports.tsx +1 -0
  215. package/src/components/features/insights/InsightsOverview.tsx +7 -1
  216. package/src/components/features/insights/ReleaseActivity.tsx +5 -1
  217. package/src/components/features/insights/UpdateFailures.tsx +1 -0
  218. package/src/components/features/native-builds/BuiltInBundleCard.tsx +1 -0
  219. package/src/components/features/native-builds/IosDevicesPage.tsx +187 -38
  220. package/src/components/features/native-builds/IosInstall.tsx +122 -58
  221. package/src/components/features/native-builds/NativeBuildDetailPage.tsx +1 -2
  222. package/src/components/features/native-builds/NativeBuildsNav.tsx +2 -2
  223. package/src/components/features/native-builds/NativeBuildsTable.tsx +5 -1
  224. package/src/components/features/native-builds/ReleaseNativeBuildLink.tsx +1 -1
  225. package/src/components/features/releases/ReleaseEditorSheet.tsx +6 -5
  226. package/src/components/ui/alert-dialog.tsx +2 -2
  227. package/src/components/ui/dialog.tsx +3 -3
  228. package/src/components/ui/input.tsx +1 -1
  229. package/src/components/ui/sheet.tsx +1 -1
  230. package/src/components/ui/sidebar.tsx +2 -2
  231. package/src/components/ui/slider.tsx +1 -1
  232. package/src/components/ui/switch.tsx +1 -1
  233. package/src/components/ui/textarea.tsx +1 -1
  234. package/src/lib/ios-devices-api.ts +148 -5
  235. package/src/lib/ios-devices-rpc.ts +17 -12
  236. package/src/lib/native-builds.ts +97 -4
  237. package/src/lib/server/deviceProfileToken.ts +37 -3
  238. package/src/lib/server/iosDeviceCookie.ts +239 -0
  239. package/src/lib/server/iosDeviceProfile.ts +4 -2
  240. package/src/lib/server/iosDevices.ts +0 -30
  241. package/src/routeTree.gen.ts +44 -0
  242. package/src/routes/[_]hot-updater/devices/receipt.ts +28 -0
  243. package/src/routes/[_]hot-updater/devices/request.ts +28 -0
  244. package/.output/public/assets/-native-builds-search-DdHwfe4q.js +0 -1
  245. package/.output/public/assets/IosInstall-CHI2C4Yd.js +0 -1
  246. package/.output/public/assets/NativeBuildsNav-DaqxQPnG.js +0 -1
  247. package/.output/public/assets/RelativeTime-B4PK8qDw.js +0 -1
  248. package/.output/public/assets/SandboxBadge-BVxHg_HF.js +0 -1
  249. package/.output/public/assets/TargetDisplay-KU7JhIWG.js +0 -1
  250. package/.output/public/assets/alert-dialog-Ch0QxRsa.js +0 -1
  251. package/.output/public/assets/api-keys-DLC8jjaM.js +0 -1
  252. package/.output/public/assets/api-keys-eDnzgFAf.js +0 -1
  253. package/.output/public/assets/arrow-left-DQjHJAnT.js +0 -1
  254. package/.output/public/assets/arrow-right-CXp_K3xK.js +0 -1
  255. package/.output/public/assets/arrow-up-right-BFafIOrq.js +0 -1
  256. package/.output/public/assets/check-CqWNyG93.js +0 -1
  257. package/.output/public/assets/chevron-right-DNbYTBX1.js +0 -1
  258. package/.output/public/assets/dialog-BLj71-Nf.js +0 -1
  259. package/.output/public/assets/index-CgwVUC2n.js +0 -10
  260. package/.output/public/assets/input-group-XKLcUGoa.js +0 -1
  261. package/.output/public/assets/insights-C94CdeAA.js +0 -1
  262. package/.output/public/assets/insights-DILMVpk8.js +0 -2
  263. package/.output/public/assets/insights_.distribution-Bb6_S-hD.js +0 -2
  264. package/.output/public/assets/insights_.distribution-CyAu3RN3.js +0 -1
  265. package/.output/public/assets/installations-BA01mqJE.js +0 -1
  266. package/.output/public/assets/loader-circle-iMqC-8ZE.js +0 -1
  267. package/.output/public/assets/native-builds-BMbws1g5.js +0 -2
  268. package/.output/public/assets/native-builds-xgHiHQML.js +0 -1
  269. package/.output/public/assets/native-builds_._buildId-B04z9yfk.js +0 -1
  270. package/.output/public/assets/native-builds_._buildId-DaMmTcHo.js +0 -2
  271. package/.output/public/assets/native-builds_.devices-CTzpCVsb.js +0 -1
  272. package/.output/public/assets/native-builds_.devices-D_kl2-bc.js +0 -2
  273. package/.output/public/assets/package-BmfoZ5Zj.js +0 -1
  274. package/.output/public/assets/plus-Db0KxLZp.js +0 -1
  275. package/.output/public/assets/remote-config-Cxkr7_BP.js +0 -1
  276. package/.output/public/assets/remote-config-DAOyn5xL.js +0 -1
  277. package/.output/public/assets/remote-config-DXv25LX1.js +0 -6
  278. package/.output/public/assets/routes-DM3TyTLW.js +0 -2
  279. package/.output/public/assets/routes-Des97uK_.js +0 -1
  280. package/.output/public/assets/search-dJG2BYmx.js +0 -1
  281. package/.output/public/assets/send-DuMOCzbD.js +0 -1
  282. package/.output/public/assets/smartphone-D1C6BRd_.js +0 -1
  283. package/.output/public/assets/styles-BHLI87EH.css +0 -2
  284. package/.output/server/_ssr/publicConsoleBase-f67NLLXZ.mjs +0 -610
  285. package/.output/server/_tanstack-start-manifest_v-C_TPyfFP.mjs +0 -225
  286. /package/.output/public/assets/{uuidv7-DAoOOpz9.js → uuidv7-DgXZ1zRR.js} +0 -0
@@ -3,6 +3,7 @@ import {
3
3
  type IosDeviceRow,
4
4
  type IosDeviceStatus,
5
5
  } from "@hot-updater/plugin-core";
6
+ import { useQueryClient } from "@tanstack/react-query";
6
7
  import { Link } from "@tanstack/react-router";
7
8
  import dayjs from "dayjs";
8
9
  import {
@@ -16,7 +17,7 @@ import {
16
17
  Smartphone,
17
18
  Trash2,
18
19
  } from "lucide-react";
19
- import { type FormEvent, useEffect, useState } from "react";
20
+ import { type FormEvent, useEffect, useRef, useState } from "react";
20
21
 
21
22
  import {
22
23
  DataCard,
@@ -86,8 +87,13 @@ import { Skeleton } from "@/components/ui/skeleton";
86
87
  import { TableCell, TableHead, TableRow } from "@/components/ui/table";
87
88
  import { useIsMobile } from "@/hooks/use-mobile";
88
89
  import {
90
+ iosDeviceKeys,
89
91
  useApproveIosDeviceMutation,
92
+ keptIsThisIphone,
90
93
  useIosDeviceProfileLinkQuery,
94
+ useIosDeviceQuery,
95
+ useKeptIosDeviceQuery,
96
+ useRequestThisIphoneMutation,
91
97
  useIosDevicesQuery,
92
98
  useRemoveIosDeviceMutation,
93
99
  useRenameIosDeviceMutation,
@@ -103,7 +109,7 @@ import {
103
109
  import type { IosDevicesSearch } from "@/routes/-native-builds-search";
104
110
 
105
111
  import { CopyableText } from "./CopyableText";
106
- import { useIosDevice } from "./IosInstall";
112
+ import { AppleRefusal, type IosDevice, useIosDevice } from "./IosInstall";
107
113
  import { NativeBuildsNav } from "./NativeBuildsNav";
108
114
 
109
115
  const STATUS_LABELS: Record<IosDeviceStatus, string> = {
@@ -306,18 +312,37 @@ function DeviceActions({
306
312
  );
307
313
  }
308
314
 
315
+ /**
316
+ * "This iPhone" on the row of the iPhone this page is open on: a quiet tag,
317
+ * as "Sandbox" is on a build, so its actions are found where every row's are.
318
+ */
319
+ function ThisIphoneTag() {
320
+ return (
321
+ <Badge className="shrink-0 px-1.5" variant="muted">
322
+ This iPhone
323
+ </Badge>
324
+ );
325
+ }
326
+
309
327
  function DeviceRow({
310
328
  device,
311
329
  viewer,
312
330
  onOpen,
331
+ isThisIphone,
313
332
  }: {
314
333
  readonly device: IosDeviceRow;
315
334
  readonly viewer: Viewer;
316
335
  readonly onOpen: (target: DialogTarget) => void;
336
+ readonly isThisIphone: boolean;
317
337
  }) {
318
338
  return (
319
339
  <TableRow>
320
- <TableCell className="font-medium">{device.name}</TableCell>
340
+ <TableCell className="font-medium">
341
+ <span className="flex items-center gap-1.5">
342
+ {device.name}
343
+ {isThisIphone ? <ThisIphoneTag /> : null}
344
+ </span>
345
+ </TableCell>
321
346
  <TableCell>
322
347
  <span className="font-mono text-xs" title={device.udid} translate="no">
323
348
  {maskIosUdid(device.udid)}
@@ -348,16 +373,21 @@ function DeviceCard({
348
373
  device,
349
374
  viewer,
350
375
  onOpen,
376
+ isThisIphone,
351
377
  }: {
352
378
  readonly device: IosDeviceRow;
353
379
  readonly viewer: Viewer;
354
380
  readonly onOpen: (target: DialogTarget) => void;
381
+ readonly isThisIphone: boolean;
355
382
  }) {
356
383
  return (
357
384
  <DataCard className="cursor-default gap-3">
358
385
  <div className="flex min-w-0 items-start justify-between gap-3">
359
386
  <div className="flex min-w-0 flex-col gap-0.5">
360
- <p className="truncate text-sm font-medium">{device.name}</p>
387
+ <p className="flex min-w-0 items-center gap-1.5 text-sm font-medium">
388
+ <span className="truncate">{device.name}</span>
389
+ {isThisIphone ? <ThisIphoneTag /> : null}
390
+ </p>
361
391
  <p className="font-mono text-xs text-muted-foreground" translate="no">
362
392
  {maskIosUdid(device.udid)}
363
393
  </p>
@@ -509,15 +539,6 @@ function RemoveDialog({
509
539
  : "It leaves the list. New ad hoc builds keep it until it's disabled at Apple."}
510
540
  </AlertDialogDescription>
511
541
  </AlertDialogHeader>
512
- {decline || !viewer.canApprove ? null : (
513
- <div className="flex min-w-0 flex-col text-xs text-muted-foreground [&_code]:break-words [&_code]:whitespace-normal">
514
- <CopyableText
515
- label="the command that disables it"
516
- value={`npx hot-updater native-build devices remove --udid ${device.udid}`}
517
- wrap
518
- />
519
- </div>
520
- )}
521
542
  {remove.isError ? (
522
543
  <p className="text-xs text-destructive" role="alert">
523
544
  Couldn't {withdraw ? "withdraw" : decline ? "decline" : "remove"}{" "}
@@ -550,6 +571,50 @@ function RemoveDialog({
550
571
  );
551
572
  }
552
573
 
574
+ /**
575
+ * Where this iPhone stands, once its profile has answered: its row's name,
576
+ * status, and what happens next, in place of the form that registered it.
577
+ * It has no actions: they are on its row in the list, tagged "This iPhone",
578
+ * as every row's are. Apple's refusal reads as on a build's page.
579
+ */
580
+ function ThisIphone({
581
+ device,
582
+ viewer,
583
+ }: {
584
+ readonly device: IosDeviceRow;
585
+ /** Unknown until the list loads. */
586
+ readonly viewer: Viewer | undefined;
587
+ }) {
588
+ const canApprove = viewer?.canApprove === true;
589
+ if (device.apple_error !== null) {
590
+ return (
591
+ <AppleRefusal canApprove={canApprove} device={device} onDevicesPage />
592
+ );
593
+ }
594
+ return (
595
+ <div className="flex min-w-0 flex-col gap-3">
596
+ <div className="flex min-w-0 items-start justify-between gap-3">
597
+ <div className="flex min-w-0 flex-col gap-0.5">
598
+ <p className="truncate text-sm font-medium">{device.name}</p>
599
+ <p className="font-mono text-xs text-muted-foreground" translate="no">
600
+ {maskIosUdid(device.udid)}
601
+ </p>
602
+ </div>
603
+ <DeviceStatus device={device} withError={false} />
604
+ </div>
605
+ <p className="text-xs text-muted-foreground" role="status">
606
+ {device.status === "pending"
607
+ ? canApprove
608
+ ? "Approve it below, and it joins the next ad hoc build."
609
+ : "A maintainer approves it next."
610
+ : device.status === "approved"
611
+ ? "It joins the next ad hoc build."
612
+ : "New ad hoc builds install on it."}
613
+ </p>
614
+ </div>
615
+ );
616
+ }
617
+
553
618
  /** Why iPhones can't register through this Console. */
554
619
  function RegistrationNotice({
555
620
  status,
@@ -575,12 +640,12 @@ function RegistrationNotice({
575
640
  */
576
641
  function RegisterCard({
577
642
  view,
578
- devices,
643
+ phone,
579
644
  }: {
580
645
  readonly view: IosDevicesView | undefined;
581
- readonly devices: readonly IosDeviceRow[] | undefined;
646
+ /** This iPhone as `useIosDevice` reads it, null until the page mounts. */
647
+ readonly phone: IosDevice | null;
582
648
  }) {
583
- const phone = useIosDevice();
584
649
  const [name, setName] = useState<string | null>(null);
585
650
  const typed = name ?? view?.defaultName ?? "";
586
651
  // The link is signed for the name as typed; a pause before signing again.
@@ -595,10 +660,37 @@ function RegisterCard({
595
660
  onPhone && view?.registration === "ready",
596
661
  );
597
662
  const https = phone === null || window.location.protocol === "https:";
598
- const back =
599
- phone?.requested && phone.udid !== null
600
- ? devices?.find((device) => device.udid === phone.udid?.toLowerCase())
601
- : undefined;
663
+ // Once its profile has answered, this iPhone's own row, whatever the list
664
+ // shows: after a reload, or in the tab Safari came back to.
665
+ const udid = onPhone ? phone.udid : null;
666
+ const mine = useIosDeviceQuery(udid);
667
+ // A new answer with the same UDID, such as a removed iPhone registering
668
+ // again, reads its row again: the key didn't change, so nothing else would.
669
+ // A new UDID changes the key, which reads it; a computer reads nothing.
670
+ const answers = phone?.answers ?? 0;
671
+ const { refetch } = mine;
672
+ const seen = useRef({ udid, answers });
673
+ useEffect(() => {
674
+ const before = seen.current;
675
+ seen.current = { udid, answers };
676
+ if (udid !== null && udid === before.udid && answers > before.answers) {
677
+ void refetch();
678
+ }
679
+ }, [udid, answers, refetch]);
680
+ // This Safari's proof of the iPhone, an HttpOnly cookie: the register
681
+ // answer's fresh receipt is traded for it, and a phone with no row requests
682
+ // itself again with it, without the profile, for the same person only.
683
+ const path = phone === null ? "" : consolePath();
684
+ const kept = useKeptIosDeviceQuery(
685
+ path,
686
+ phone ?? { udid: null, receipt: null },
687
+ onPhone &&
688
+ udid !== null &&
689
+ view?.registration === "ready" &&
690
+ (phone.receipt !== null || mine.data === null),
691
+ );
692
+ const again = useRequestThisIphoneMutation(path);
693
+ const proved = onPhone && keptIsThisIphone(kept.data?.udid, phone.udid);
602
694
 
603
695
  const body = (() => {
604
696
  // The server renders this without a browser: where it is and what it is
@@ -606,16 +698,11 @@ function RegisterCard({
606
698
  if (phone === null) {
607
699
  return <Skeleton aria-label="Loading" className="h-36 w-full" />;
608
700
  }
609
- if (back !== undefined) {
610
- return (
611
- <p className="text-sm" role="status">
612
- <span className="font-medium">{back.name}</span> ·{" "}
613
- {STATUS_LABELS[back.status]}.{" "}
614
- {back.status === "pending"
615
- ? "A maintainer approves it next, and it joins the next ad hoc build."
616
- : "It joins the next ad hoc build."}
617
- </p>
618
- );
701
+ if (onPhone && phone.udid !== null && mine.isPending) {
702
+ return <Skeleton aria-label="Loading" className="h-36 w-full" />;
703
+ }
704
+ if (onPhone && mine.data) {
705
+ return <ThisIphone device={mine.data} viewer={view?.viewer} />;
619
706
  }
620
707
  if (
621
708
  view !== undefined &&
@@ -656,6 +743,59 @@ function RegisterCard({
656
743
  </p>
657
744
  );
658
745
  }
746
+ if (mine.data === null && kept.isFetching && !proved) {
747
+ return <Skeleton aria-label="Loading" className="h-36 w-full" />;
748
+ }
749
+ if (proved) {
750
+ const trimmed = typed.trim();
751
+ return (
752
+ <form
753
+ className="flex min-w-0 flex-col gap-3"
754
+ onSubmit={(event) => {
755
+ event.preventDefault();
756
+ if (trimmed === "") return;
757
+ again.mutate({ name: trimmed, receipt: phone.receipt });
758
+ }}
759
+ >
760
+ <Field data-invalid={again.isError || undefined}>
761
+ <FieldLabel htmlFor="ios-device-register-name">
762
+ This iPhone's name
763
+ </FieldLabel>
764
+ <Input
765
+ autoComplete="off"
766
+ className="h-11"
767
+ id="ios-device-register-name"
768
+ maxLength={100}
769
+ onChange={(event) => setName(event.target.value)}
770
+ value={typed}
771
+ />
772
+ <FieldDescription>
773
+ This Safari checked it before, so no profile is needed.
774
+ </FieldDescription>
775
+ <FieldError>
776
+ {again.isError
777
+ ? "The request didn't go through. Try again."
778
+ : null}
779
+ </FieldError>
780
+ </Field>
781
+ <Button
782
+ className="h-11 w-full"
783
+ disabled={trimmed === "" || again.isPending}
784
+ type="submit"
785
+ >
786
+ {again.isPending ? (
787
+ <Loader2
788
+ className="animate-spin motion-reduce:animate-none"
789
+ data-icon="inline-start"
790
+ />
791
+ ) : (
792
+ <Smartphone data-icon="inline-start" />
793
+ )}
794
+ Request this iPhone
795
+ </Button>
796
+ </form>
797
+ );
798
+ }
659
799
  if (link.data?.status === "local-console") {
660
800
  return <RegistrationNotice status="local-console" />;
661
801
  }
@@ -736,7 +876,17 @@ export function IosDevicesPage({
736
876
  const query = useIosDevicesQuery(search.status);
737
877
  const view = query.data;
738
878
  const rows = view?.devices;
879
+ const queryClient = useQueryClient();
880
+ // Refresh and Retry read every registry query the page shows: the list,
881
+ // and this iPhone's own row on a phone. A disabled read, such as the row
882
+ // on a computer, stays unread.
883
+ const refresh = () =>
884
+ void queryClient.invalidateQueries({ queryKey: iosDeviceKeys.all });
739
885
  const [dialog, setDialog] = useState<DialogTarget>(null);
886
+ const phone = useIosDevice();
887
+ // The row of the iPhone this page is open on, tagged where its actions are.
888
+ const thisUdid =
889
+ phone?.ios === true ? (phone.udid?.toLowerCase() ?? null) : null;
740
890
  const close = () => setDialog(null);
741
891
 
742
892
  const empty = (
@@ -781,7 +931,7 @@ export function IosDevicesPage({
781
931
 
782
932
  <div className="flex min-h-0 min-w-0 flex-1 flex-col gap-4 overflow-y-auto bg-muted/5 p-3 sm:p-6">
783
933
  <NativeBuildsNav current="devices" />
784
- <RegisterCard devices={rows} view={view} />
934
+ <RegisterCard phone={phone} view={view} />
785
935
  {view !== undefined && !view.viewer.approversConfigured ? (
786
936
  <div className="flex min-w-0 flex-col gap-1.5 text-xs text-muted-foreground">
787
937
  <p>Nobody approves in this Console. Approve from a terminal:</p>
@@ -831,7 +981,7 @@ export function IosDevicesPage({
831
981
  aria-label="Refresh iOS devices"
832
982
  className="ml-auto size-11 sm:size-7"
833
983
  disabled={query.isFetching}
834
- onClick={() => void query.refetch()}
984
+ onClick={refresh}
835
985
  size="icon-sm"
836
986
  variant="ghost"
837
987
  >
@@ -846,18 +996,15 @@ export function IosDevicesPage({
846
996
  Check your connection and try again.
847
997
  </AlertDescription>
848
998
  <AlertAction>
849
- <Button
850
- onClick={() => void query.refetch()}
851
- size="xs"
852
- variant="outline"
853
- >
999
+ <Button onClick={refresh} size="xs" variant="outline">
854
1000
  <RefreshCw data-icon="inline-start" />
855
1001
  Retry
856
1002
  </Button>
857
1003
  </AlertAction>
858
1004
  </Alert>
859
1005
  ) : (
860
- <DataTableFrame>
1006
+ // The page scrolls as a whole, the Register card above the list.
1007
+ <DataTableFrame className="flex-none">
861
1008
  {isMobile ? (
862
1009
  <div
863
1010
  aria-busy={query.isPlaceholderData}
@@ -878,6 +1025,7 @@ export function IosDevicesPage({
878
1025
  >
879
1026
  <DeviceCard
880
1027
  device={device}
1028
+ isThisIphone={device.udid === thisUdid}
881
1029
  onOpen={setDialog}
882
1030
  viewer={view!.viewer}
883
1031
  />
@@ -917,6 +1065,7 @@ export function IosDevicesPage({
917
1065
  rows?.map((device) => (
918
1066
  <DeviceRow
919
1067
  device={device}
1068
+ isThisIphone={device.udid === thisUdid}
920
1069
  key={device.id}
921
1070
  onOpen={setDialog}
922
1071
  viewer={view!.viewer}
@@ -23,10 +23,16 @@ import { Skeleton } from "@/components/ui/skeleton";
23
23
  import { useNativeBuildInstallEligibilityQuery } from "@/lib/api";
24
24
  import {
25
25
  useIosDeviceProfileLinkQuery,
26
- useRequestIosDeviceAccessMutation,
26
+ keepIosDeviceReceipt,
27
+ keptIsThisIphone,
28
+ useKeptIosDeviceQuery,
29
+ useRequestThisIphoneMutation,
27
30
  } from "@/lib/ios-devices-api";
28
31
  import {
29
32
  consolePathOf,
33
+ consolePathOfNativeBuildsPage,
34
+ holdPendingReceipt,
35
+ readPendingReceipt,
30
36
  IOS_DEVICE_RECEIPT_STORAGE_KEY,
31
37
  IOS_UDID_PATTERN,
32
38
  IOS_UDID_STORAGE_KEY,
@@ -74,10 +80,18 @@ const fragmentOf = () => {
74
80
  export interface IosDevice {
75
81
  readonly ios: boolean;
76
82
  readonly udid: string | null;
77
- /** The receipt of `udid` that Request access takes, when a check made one. */
83
+ /**
84
+ * The profile's fresh receipt of `udid`, from the fragment, in memory only:
85
+ * the page trades it for the HttpOnly cookie that proves this iPhone later.
86
+ */
78
87
  readonly receipt: string | null;
79
88
  /** Whether this page opened from a registration's answer. */
80
89
  readonly requested: boolean;
90
+ /**
91
+ * How many of the profile's answers this page has taken, at its opening or
92
+ * when Safari came back to it: one more for each, the same UDID's too.
93
+ */
94
+ readonly answers: number;
81
95
  }
82
96
 
83
97
  const readKept = (key: string) => {
@@ -99,7 +113,8 @@ const keep = (key: string, value: string) => {
99
113
  /**
100
114
  * Whether this page is open on an iPhone, its UDID, and a receipt of it: the
101
115
  * ones this phone kept, else the ones the profile's answer passed in the
102
- * fragment, which are kept then. Read after the page mounts: the server
116
+ * fragment, which are kept then, whether the answer opened this page or came
117
+ * back to it already open. Read after the page mounts: the server
103
118
  * renders it without a browser. Null until then.
104
119
  */
105
120
  export const useIosDevice = (): IosDevice | null => {
@@ -110,49 +125,67 @@ export const useIosDevice = (): IosDevice | null => {
110
125
  useEffect(() => {
111
126
  const valid = (udid: string | null | undefined) =>
112
127
  udid != null && IOS_UDID_PATTERN.test(udid) ? udid : null;
113
- // Only the profile's own answer, which carries a receipt or says it
114
- // registered, replaces the ID this phone kept: a plain link's ID never does.
115
- const answered = passed.receipt !== null || passed.requested;
116
- if (passed.udid !== null && answered) {
117
- keep(IOS_UDID_STORAGE_KEY, passed.udid);
118
- if (passed.receipt !== null) {
119
- keep(
120
- IOS_DEVICE_RECEIPT_STORAGE_KEY,
121
- JSON.stringify({ udid: passed.udid, receipt: passed.receipt }),
128
+ // The fragment this page last took: the one it opened with, or one Safari
129
+ // brought back to this same tab, which changes only the fragment.
130
+ let latest = passed;
131
+ let answers = 0;
132
+ const absorb = (fragment: ReturnType<typeof fragmentOf>) => {
133
+ // Only the profile's own answer, which carries a receipt or says it
134
+ // registered, replaces the ID this phone kept: a plain link's ID never
135
+ // does.
136
+ const answered = fragment.receipt !== null || fragment.requested;
137
+ if (fragment.udid !== null && answered) {
138
+ answers += 1;
139
+ keep(IOS_UDID_STORAGE_KEY, fragment.udid);
140
+ // Kept as this Safari's cookie on any page, whatever it shows next;
141
+ // held in this tab's session until then, so a reload can trade it.
142
+ if (fragment.receipt !== null) {
143
+ holdPendingReceipt(fragment.udid, fragment.receipt);
144
+ keepIosDeviceReceipt(
145
+ consolePathOfNativeBuildsPage(window.location),
146
+ fragment.receipt,
147
+ ).catch(() => undefined);
148
+ }
149
+ }
150
+ if (fragment.udid !== null && window.location.hash !== "") {
151
+ window.history.replaceState(
152
+ window.history.state,
153
+ "",
154
+ `${window.location.pathname}${window.location.search}`,
122
155
  );
123
156
  }
124
- }
125
- if (passed.udid !== null && window.location.hash !== "") {
126
- window.history.replaceState(
127
- window.history.state,
128
- "",
129
- `${window.location.pathname}${window.location.search}`,
130
- );
157
+ };
158
+ absorb(passed);
159
+ // A receipt is no longer kept here: the page trades the fragment's for an
160
+ // HttpOnly cookie that script can't read. One an earlier version kept goes.
161
+ try {
162
+ window.localStorage.removeItem(IOS_DEVICE_RECEIPT_STORAGE_KEY);
163
+ } catch {
164
+ // A browser that keeps nothing kept none.
131
165
  }
132
166
  const read = () => {
133
167
  // A browser that keeps nothing still has the fragment's, in memory.
134
- const udid = valid(readKept(IOS_UDID_STORAGE_KEY)) ?? passed.udid;
135
- let receipt: string | null = null;
136
- try {
137
- const kept = JSON.parse(
138
- readKept(IOS_DEVICE_RECEIPT_STORAGE_KEY) ?? "null",
139
- ) as { udid?: unknown; receipt?: unknown } | null;
140
- receipt =
141
- kept?.udid === udid && typeof kept?.receipt === "string"
142
- ? kept.receipt
143
- : null;
144
- } catch {
145
- receipt = null;
146
- }
147
- if (receipt === null && passed.udid === udid) receipt = passed.receipt;
168
+ const udid = valid(readKept(IOS_UDID_STORAGE_KEY)) ?? latest.udid;
169
+ // The fragment's receipt until the cookie holds it: in memory, or held
170
+ // in this tab's session through a reload during an outage.
171
+ const receipt =
172
+ (latest.udid === udid ? latest.receipt : null) ??
173
+ readPendingReceipt(udid);
174
+ const requested = latest.requested;
175
+ const taken = answers;
148
176
  setDevice((current) =>
149
- current !== null && current.udid === udid && current.receipt === receipt
177
+ current !== null &&
178
+ current.udid === udid &&
179
+ current.receipt === receipt &&
180
+ current.requested === requested &&
181
+ current.answers === taken
150
182
  ? current
151
183
  : {
152
184
  ios: isIosBrowser(navigator),
153
185
  udid,
154
186
  receipt,
155
- requested: passed.requested,
187
+ requested,
188
+ answers: taken,
156
189
  },
157
190
  );
158
191
  };
@@ -160,21 +193,30 @@ export const useIosDevice = (): IosDevice | null => {
160
193
  // The profile's answer may land in another tab, which keeps the ID there:
161
194
  // this tab reads it when that tab writes it, or when Safari shows it again.
162
195
  const onStorage = (event: StorageEvent) => {
163
- if (
164
- event.key === null ||
165
- event.key === IOS_UDID_STORAGE_KEY ||
166
- event.key === IOS_DEVICE_RECEIPT_STORAGE_KEY
167
- ) {
196
+ if (event.key === null || event.key === IOS_UDID_STORAGE_KEY) {
168
197
  read();
169
198
  }
170
199
  };
200
+ // Or it lands in this tab, already open on the same page: Safari changes
201
+ // only the fragment, so nothing mounts again. Whichever event Safari sends
202
+ // on the way back, the fragment is read again before what was kept.
203
+ const onReturn = () => {
204
+ const fragment = fragmentOf();
205
+ if (fragment.udid !== null) {
206
+ latest = fragment;
207
+ absorb(fragment);
208
+ }
209
+ read();
210
+ };
171
211
  window.addEventListener("storage", onStorage);
172
- window.addEventListener("pageshow", read);
173
- document.addEventListener("visibilitychange", read);
212
+ window.addEventListener("hashchange", onReturn);
213
+ window.addEventListener("pageshow", onReturn);
214
+ document.addEventListener("visibilitychange", onReturn);
174
215
  return () => {
175
216
  window.removeEventListener("storage", onStorage);
176
- window.removeEventListener("pageshow", read);
177
- document.removeEventListener("visibilitychange", read);
217
+ window.removeEventListener("hashchange", onReturn);
218
+ window.removeEventListener("pageshow", onReturn);
219
+ document.removeEventListener("visibilitychange", onReturn);
178
220
  };
179
221
  }, [passed]);
180
222
  return device;
@@ -339,14 +381,18 @@ const shortDate = (ms: number) => dayjs(ms).format("MMM D");
339
381
 
340
382
  /**
341
383
  * Apple's refusal of this iPhone, in its own words, and the one next step: the
342
- * iOS devices page for an approver, else whom to ask.
384
+ * iOS devices page for an approver, unless this is that page, else whom to
385
+ * ask.
343
386
  */
344
- function AppleRefusal({
387
+ export function AppleRefusal({
345
388
  device,
346
389
  canApprove,
390
+ onDevicesPage = false,
347
391
  }: {
348
392
  readonly device: IosDeviceRow;
349
393
  readonly canApprove: boolean;
394
+ /** On the iOS devices page, where an approver already has the row. */
395
+ readonly onDevicesPage?: boolean;
350
396
  }) {
351
397
  return (
352
398
  <div className="flex min-w-0 flex-col gap-3">
@@ -356,15 +402,17 @@ function AppleRefusal({
356
402
  <AlertDescription>{device.apple_error}</AlertDescription>
357
403
  </Alert>
358
404
  {canApprove ? (
359
- <Link
360
- className={buttonVariants({
361
- className: ACTION_CLASS,
362
- variant: "outline",
363
- })}
364
- to="/native-builds/devices"
365
- >
366
- iOS devices
367
- </Link>
405
+ onDevicesPage ? null : (
406
+ <Link
407
+ className={buttonVariants({
408
+ className: ACTION_CLASS,
409
+ variant: "outline",
410
+ })}
411
+ to="/native-builds/devices"
412
+ >
413
+ iOS devices
414
+ </Link>
415
+ )
368
416
  ) : (
369
417
  <p className="text-xs text-muted-foreground">
370
418
  {device.status === "approved"
@@ -401,7 +449,18 @@ function NotInThisBuild({
401
449
  /** When the page last read `registry`. */
402
450
  readonly registryReadAt: number;
403
451
  }) {
404
- const request = useRequestIosDeviceAccessMutation();
452
+ const consolePath = consolePathOf(window.location, build.id);
453
+ const request = useRequestThisIphoneMutation(consolePath);
454
+ // This Safari's proof of the iPhone: the profile's fresh receipt, traded
455
+ // for the cookie, or the cookie an earlier check left.
456
+ // Read only where it decides something: a phone the registry doesn't know.
457
+ const kept = useKeptIosDeviceQuery(
458
+ consolePath,
459
+ device,
460
+ device.ios && device.udid !== null && registry === null,
461
+ );
462
+ const proved =
463
+ device.receipt !== null || keptIsThisIphone(kept.data?.udid, device.udid);
405
464
  const [name, setName] = useState("");
406
465
  // The request's answer stands in only while the page still shows the
407
466
  // registry read before the request started: any read after that wins, an
@@ -450,7 +509,12 @@ function NotInThisBuild({
450
509
  </div>
451
510
  );
452
511
  }
453
- if (device.receipt === null) {
512
+ if (!proved && kept.isPending && device.udid !== null) {
513
+ return (
514
+ <Skeleton aria-label="Reading this iPhone" className="h-11 w-full" />
515
+ );
516
+ }
517
+ if (!proved) {
454
518
  return (
455
519
  <div className="flex min-w-0 flex-col gap-3">
456
520
  {heading}
@@ -470,7 +534,7 @@ function NotInThisBuild({
470
534
  if (trimmed === "") return;
471
535
  const readBefore = registryReadAt;
472
536
  request.mutate(
473
- { receipt: device.receipt!, name: trimmed },
537
+ { receipt: device.receipt, name: trimmed },
474
538
  {
475
539
  onSuccess: ({ device: saved }) =>
476
540
  setRequested({ device: saved, readBefore }),
@@ -142,8 +142,7 @@ export function NativeBuildDetailPage({
142
142
  </EmptyMedia>
143
143
  <EmptyTitle>Native build not found</EmptyTitle>
144
144
  <EmptyDescription>
145
- No native build has this ID. It may have been deleted with{" "}
146
- <code className="font-mono">native-build delete</code>, or be
145
+ No native build has this ID. It may have been deleted, or be
147
146
  from another console.
148
147
  </EmptyDescription>
149
148
  </EmptyHeader>