@hot-updater/console 1.2.0-rc.5 → 1.2.0-rc.50

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 (398) hide show
  1. package/.output/nitro.json +1 -1
  2. package/.output/public/assets/-native-builds-search-6aptbS4G.js +1 -0
  3. package/.output/public/assets/BundleIdDisplay-C0X-k49t.js +1 -0
  4. package/.output/public/assets/ChannelPicker-DPR-7lqV.js +1 -0
  5. package/.output/public/assets/CompositeItem-UhIlCBg4.js +1 -0
  6. package/.output/public/assets/{ConsoleFeatureUnavailable-CUtcXuY2.js → ConsoleFeatureUnavailable-B3VCINom.js} +1 -1
  7. package/.output/public/assets/EventDetails-LQ8ejbsd.js +1 -0
  8. package/.output/public/assets/FoldedRows-1NvB9gAS.js +1 -0
  9. package/.output/public/assets/HashValueDisplay-DTSMSH9O.js +1 -0
  10. package/.output/public/assets/InsightsPageHeader-ypKKV3rL.js +1 -0
  11. package/.output/public/assets/IosInstall-BRuSakxm.js +1 -0
  12. package/.output/public/assets/NativeBuildsNav-ChBahvFN.js +1 -0
  13. package/.output/public/assets/{NotFoundPage-DZ3DxyRA.js → NotFoundPage-BEpesHEm.js} +1 -1
  14. package/.output/public/assets/{PlatformIcon-BBWQlWm9.js → PlatformIcon-D4KPXCHL.js} +1 -1
  15. package/.output/public/assets/QrCode-BFSCkbPj.js +1 -0
  16. package/.output/public/assets/RelativeTime-m-FKh1Jb.js +1 -0
  17. package/.output/public/assets/RolloutPercentageBadge-DF4EeZIJ.js +1 -0
  18. package/.output/public/assets/RowReason-BvIxbpPP.js +1 -0
  19. package/.output/public/assets/SandboxBadge-DPmJn40v.js +1 -0
  20. package/.output/public/assets/TargetDisplay-Ctuz3qIp.js +1 -0
  21. package/.output/public/assets/alert-dialog-DGPqJBCk.js +1 -0
  22. package/.output/public/assets/api-keys-CAVLgicI.js +1 -0
  23. package/.output/public/assets/api-keys-ztwXoKcj.js +1 -0
  24. package/.output/public/assets/api-znPyglTl.js +1 -0
  25. package/.output/public/assets/arrow-left-68S4uy4I.js +1 -0
  26. package/.output/public/assets/arrow-right-DjRwIoF1.js +1 -0
  27. package/.output/public/assets/arrow-up-right-C_1ALUCD.js +1 -0
  28. package/.output/public/assets/badge-zMibJGR5.js +1 -0
  29. package/.output/public/assets/card-BAs80yql.js +1 -0
  30. package/.output/public/assets/check-C3VCvMOV.js +1 -0
  31. package/.output/public/assets/chevron-down-BkoJHAll.js +1 -0
  32. package/.output/public/assets/chevron-right-RAuPv9r1.js +1 -0
  33. package/.output/public/assets/{circle-off-C7Muo0ss.js → circle-off-DvYMC5yF.js} +1 -1
  34. package/.output/public/assets/{clipboard-DQbOcrL7.js → clipboard-D0JWZ1KF.js} +1 -1
  35. package/.output/public/assets/{console-features-api-DEXSwFtc.js → console-features-api-CtbGqKyr.js} +1 -1
  36. package/.output/public/assets/{uuidv7-zXMtwR9Q.js → constants-yj-e3ahf.js} +1 -1
  37. package/.output/public/assets/{copy-DsuLj3oj.js → copy-BjVLMKbo.js} +1 -1
  38. package/.output/public/assets/dialog-BvZDZzdQ.js +1 -0
  39. package/.output/public/assets/dist-BEmib-ZM.js +1 -0
  40. package/.output/public/assets/{download-Cf24LBde.js → download-CgpaZb23.js} +1 -1
  41. package/.output/public/assets/empty-C5GqArX9.js +1 -0
  42. package/.output/public/assets/field-DInLQ5oV.js +1 -0
  43. package/.output/public/assets/git-branch-BGatQV8Q.js +1 -0
  44. package/.output/public/assets/history-Ci4dhphE.js +1 -0
  45. package/.output/public/assets/index-oTXLdUR-.js +10 -0
  46. package/.output/public/assets/input-group-CIjTdxCW.js +1 -0
  47. package/.output/public/assets/insights-BL6Z8zFv.js +42 -0
  48. package/.output/public/assets/insights-BMjBMtJU.js +2 -0
  49. package/.output/public/assets/insights-V3D8tYPQ.js +1 -0
  50. package/.output/public/assets/insights-api-C4Dmm34n.js +1 -0
  51. package/.output/public/assets/insights-search-B4NkHGeC.js +1 -0
  52. package/.output/public/assets/insights-usage-rpc-Dw5_pmRH.js +1 -0
  53. package/.output/public/assets/insights_.distribution-Br_CW9s9.js +2 -0
  54. package/.output/public/assets/insights_.distribution-C4E-JuVI.js +1 -0
  55. package/.output/public/assets/insights_.distribution-oIFSv2TC.js +1 -0
  56. package/.output/public/assets/installations-CcPrSZwW.js +1 -0
  57. package/.output/public/assets/installations-Cjx0648C.js +1 -0
  58. package/.output/public/assets/installations-m1v6oE-2.js +2 -0
  59. package/.output/public/assets/{key-round-DwNKkHhy.js → key-round-BkeLvA1m.js} +1 -1
  60. package/.output/public/assets/{link-DTEyW70e.js → link-CRMwpc7-.js} +2 -2
  61. package/.output/public/assets/{list--NIee1FZ.js → list-DQ9YBIDW.js} +1 -1
  62. package/.output/public/assets/loader-circle-8lunBReu.js +1 -0
  63. package/.output/public/assets/native-builds-B0zJ4wjg.js +1 -0
  64. package/.output/public/assets/native-builds-BC0sjxPC.js +2 -0
  65. package/.output/public/assets/native-builds-B_pQ4D5H.js +1 -0
  66. package/.output/public/assets/native-builds_._buildId-CSyC7YAA.js +1 -0
  67. package/.output/public/assets/native-builds_._buildId-GPlkI_2m.js +2 -0
  68. package/.output/public/assets/native-builds_.devices-Cox001IR.js +2 -0
  69. package/.output/public/assets/native-builds_.devices-DAW19hcQ.js +1 -0
  70. package/.output/public/assets/plus-DztQIXYL.js +1 -0
  71. package/.output/public/assets/{relativeTime-YQt84dYr.js → relativeTime-RUNbaMyO.js} +1 -1
  72. package/.output/public/assets/remote-config-BCQHNGRY.js +1 -0
  73. package/.output/public/assets/remote-config-BIIj0Faf.js +1 -0
  74. package/.output/public/assets/remote-config-CDlB7JK8.js +6 -0
  75. package/.output/public/assets/rotate-ccw-tITIe0Bd.js +1 -0
  76. package/.output/public/assets/{rotate-cw-Cv2aVbYr.js → rotate-cw-BFQcpUTO.js} +1 -1
  77. package/.output/public/assets/routes-C7Pv3Cfg.js +1 -0
  78. package/.output/public/assets/routes-JJGRGqsf.js +2 -0
  79. package/.output/public/assets/search-BfEqtE64.js +1 -0
  80. package/.output/public/assets/select-iSWTEY9t.js +1 -0
  81. package/.output/public/assets/sidebar-BmzmPGuv.js +3 -0
  82. package/.output/public/assets/smartphone-Dy13ukaU.js +1 -0
  83. package/.output/public/assets/styles-D5kpHu-Z.css +2 -0
  84. package/.output/public/assets/switch-ByNYRVTN.js +1 -0
  85. package/.output/public/assets/table-DbZPkzdz.js +1 -0
  86. package/.output/public/assets/tabs-Byfy8Qls.js +1 -0
  87. package/.output/public/assets/trash-2-DI0biNI-.js +1 -0
  88. package/.output/public/assets/{undo-2-CUX96_BG.js → undo-2-CxhBbgJw.js} +1 -1
  89. package/.output/public/assets/useAnchoredPopupScrollLock-Cvx6CdPD.js +1 -0
  90. package/.output/public/assets/useCompositeListItem-BEDqZ9Ni.js +1 -0
  91. package/.output/public/assets/{useMutation-DbYw7boA.js → useMutation-D7IuoOLE.js} +1 -1
  92. package/.output/public/assets/valueToPercent-Db73Kirz.js +1 -0
  93. package/.output/server/{__23tanstack-start-server-fn-resolver-BsXXRtkN.mjs → __23tanstack-start-server-fn-resolver-DY-niJR4.mjs} +94 -46
  94. package/.output/server/_chunks/ssr-renderer.mjs +2 -2
  95. package/.output/server/_libs/@base-ui/react+[...].mjs +4436 -3131
  96. package/.output/server/_libs/@tanstack/react-router+[...].mjs +1 -1
  97. package/.output/server/_libs/@tanstack/react-router-ssr-query+[...].mjs +2 -2
  98. package/.output/server/_libs/_.mjs +2 -0
  99. package/.output/server/_libs/lucide-react.mjs +50 -28
  100. package/.output/server/_libs/next-themes.mjs +1 -1
  101. package/.output/server/_libs/react-redux+[...].mjs +1 -1
  102. package/.output/server/_libs/recharts+[...].mjs +1 -1
  103. package/.output/server/_libs/sonner.mjs +1 -1
  104. package/.output/server/_libs/tanstack__react-query.mjs +1 -1
  105. package/.output/server/_ssr/-native-builds-search-D10dMZzL.mjs +62 -0
  106. package/.output/server/_ssr/{BundleIdDisplay-CFz1sCQl.mjs → BundleIdDisplay-CGdSiouM.mjs} +3 -3
  107. package/.output/server/_ssr/ChannelPicker-J5HfKxSS.mjs +251 -0
  108. package/.output/server/_ssr/{ConsoleFeatureUnavailable-CGHVL37b.mjs → ConsoleFeatureUnavailable-C52o4oew.mjs} +8 -8
  109. package/.output/server/_ssr/{EventDetails-DdJyaBZ5.mjs → EventDetails-CDLSkVNA.mjs} +9 -9
  110. package/.output/server/_ssr/FoldedRows-CrRYEVkd.mjs +152 -0
  111. package/.output/server/_ssr/HashValueDisplay-BrT2wgxk.mjs +65 -0
  112. package/.output/server/_ssr/{InsightsPageHeader-KtHEf8Q0.mjs → InsightsPageHeader-DVrudLMJ.mjs} +13 -13
  113. package/.output/server/_ssr/IosInstall-DcKlZU_q.mjs +767 -0
  114. package/.output/server/_ssr/NativeBuildsNav-BC1WIQ1W.mjs +39 -0
  115. package/.output/server/_ssr/{NotFoundPage-DZB6K98c.mjs → NotFoundPage-CEhZtcst.mjs} +3 -3
  116. package/.output/server/_ssr/{PlatformIcon-CFLiTjh1.mjs → PlatformIcon-C22qEcwo.mjs} +13 -3
  117. package/.output/server/_ssr/QrCode-Dj9BKV3l.mjs +50 -0
  118. package/.output/server/_ssr/RelativeTime-Dgbh4UPb.mjs +242 -0
  119. package/.output/server/_ssr/{git-CTA8Aqr0.mjs → RolloutPercentageBadge-BYEDUW1d.mjs} +20 -4
  120. package/.output/server/_ssr/RowReason-BweNBWkA.mjs +59 -0
  121. package/.output/server/_ssr/SandboxBadge-O8-kbXAw.mjs +85 -0
  122. package/.output/server/_ssr/TargetDisplay-D3JAXwcF.mjs +105 -0
  123. package/.output/server/_ssr/{alert-dialog-CDr-Nsoo.mjs → alert-dialog-CxEcyUb6.mjs} +4 -4
  124. package/.output/server/_ssr/{api-DGWwi1WN.mjs → api-IIqxWeDx.mjs} +186 -39
  125. package/.output/server/_ssr/{api-keys-e_eDCNr2.mjs → api-keys-CYefExfc.mjs} +2 -2
  126. package/.output/server/_ssr/{api-keys-rpc-BXiXUAm9.mjs → api-keys-rpc-qkGQ3Sp3.mjs} +4 -4
  127. package/.output/server/_ssr/{api-keys-BBb3xSox.mjs → api-keys-wFak2vKN.mjs} +14 -11
  128. package/.output/server/_ssr/{api-rpc-CLreF5Vr.mjs → api-rpc-3NKc545A.mjs} +83 -35
  129. package/.output/server/_ssr/{auth-rpc-Bbf80tQK.mjs → auth-rpc-PCSJzNJf.mjs} +5 -5
  130. package/.output/server/_ssr/{auth.server-DGwe3eds.mjs → auth.server-NGj7G3bq.mjs} +1334 -279
  131. package/.output/server/_ssr/{badge-BXk5c2yv.mjs → badge-CxSJ-pjU.mjs} +4 -45
  132. package/.output/server/_ssr/{bundleActivity-MLrjNJCT.mjs → bundleActivity-a-pEDiqu.mjs} +1 -1
  133. package/.output/server/_ssr/card-BDXDcrk_.mjs +49 -0
  134. package/.output/server/_ssr/{config.server-BIBSZpZE.mjs → config.server-CwUGPk-F.mjs} +4 -4
  135. package/.output/server/_ssr/{console-access-Cwha8dww.mjs → console-access-BOt-Xxd7.mjs} +2 -2
  136. package/.output/server/_ssr/{console-features-BTV-XuhQ.mjs → console-features-DTYyXrWO.mjs} +1 -1
  137. package/.output/server/_ssr/{console-features-api-Bk24XYA5.mjs → console-features-api-Dw_Tktev.mjs} +5 -5
  138. package/.output/server/_ssr/{console-features-rpc-5WFiUFxb.mjs → console-features-rpc-D8VFHwYj.mjs} +4 -4
  139. package/.output/server/_ssr/constants-D-2jpCiJ.mjs +11 -0
  140. package/.output/server/_ssr/{createServerRpc-BVvRVOz5.mjs → createServerRpc-DJZel12M.mjs} +1 -1
  141. package/.output/server/_ssr/{databaseConfig-B_Bg7qS5.mjs → databaseConfig-B56IJxlu.mjs} +1 -1
  142. package/.output/server/_ssr/{databaseJsonValue-kS7cvEtz.mjs → databaseJsonValue-DuUoft8j.mjs} +1 -1
  143. package/.output/server/_ssr/{databaseRows-B6H8Cmgq.mjs → databaseRows-BZMFl5QV.mjs} +3 -3
  144. package/.output/server/_ssr/deviceProfileToken-xzDLfE0T.mjs +98 -0
  145. package/.output/server/_ssr/{dialog-BG-juN_g.mjs → dialog-CJ4zMagm.mjs} +5 -5
  146. package/.output/server/_ssr/dist-CiOq3ygH.mjs +148 -0
  147. package/.output/server/_ssr/{downloadBundle-DCmr7vsj.mjs → downloadBundle-C1KOnpiF.mjs} +1 -1
  148. package/.output/server/_ssr/{empty-DF3o-H8c.mjs → empty-DYy36pwa.mjs} +3 -3
  149. package/.output/server/_ssr/{empty-plugin-adapters-zrZ0xs6n.mjs → empty-plugin-adapters-BYBYBaxo.mjs} +1 -1
  150. package/.output/server/_ssr/{failureReports-Cn_zU9S8.mjs → failureReports-BVufgM3l.mjs} +3 -3
  151. package/.output/server/_ssr/{field-5zvNofJH.mjs → field-MI8oNc5n.mjs} +3 -3
  152. package/.output/server/_ssr/foldedPage-CUjJqtlF.mjs +176 -0
  153. package/.output/server/_ssr/{getBundleChildren-rtkEEJw5.mjs → getBundleChildren-CnOf4Frp.mjs} +2 -2
  154. package/.output/server/_ssr/{input-group-rcPxMqYq.mjs → input-group-Bf7wHa21.mjs} +3 -3
  155. package/.output/server/_ssr/{insights-BwEiSUUy.mjs → insights-CKTR62Ox.mjs} +5 -5
  156. package/.output/server/_ssr/{insights-BDa6T_cj.mjs → insights-CbGG5htV.mjs} +2 -2
  157. package/.output/server/_ssr/{insights-api-BESfPrTq.mjs → insights-api-CqjIxe1A.mjs} +5 -5
  158. package/.output/server/_ssr/{insights-Din0R0k-.mjs → insights-b3XeQlzF.mjs} +62 -203
  159. package/.output/server/_ssr/{insights-errors-7BCwFybo.mjs → insights-errors-DwUaDs0Z.mjs} +2 -2
  160. package/.output/server/_ssr/{insights-failures-B9VPkzZE.mjs → insights-failures-DGO2_3Vx.mjs} +2 -2
  161. package/.output/server/_ssr/{insights-failures-rpc-BD3vjHse.mjs → insights-failures-rpc-fmWHkLhL.mjs} +11 -11
  162. package/.output/server/_ssr/{insights-recovery-BtXVU3ro.mjs → insights-recovery-Cdg3Msrj.mjs} +1 -1
  163. package/.output/server/_ssr/{insights-recovery-rpc-sVwplV7s.mjs → insights-recovery-rpc-BpwoS9XL.mjs} +7 -7
  164. package/.output/server/_ssr/{insights-rpc-BdtBheBi.mjs → insights-rpc-qwXzuBUQ.mjs} +4 -4
  165. package/.output/server/_ssr/{insights-search-BAaycSRp.mjs → insights-search-B_8PizlM.mjs} +6 -8
  166. package/.output/server/_ssr/{insights-usage-DiGnuxW8.mjs → insights-usage-BVm7CDw9.mjs} +1 -1
  167. package/.output/server/_ssr/{insights-usage-rpc-Bo5p-cuB.mjs → insights-usage-rpc-Cbg82l2g.mjs} +5 -5
  168. package/.output/server/_ssr/{insights-usage-rpc-DCkLNAlG.mjs → insights-usage-rpc-D8lgk1Sk.mjs} +7 -7
  169. package/.output/server/_ssr/{insightsUsage-ClAmoUz8.mjs → insightsUsage-lPKyRC2o.mjs} +3 -3
  170. package/.output/server/_ssr/{insights_.distribution-D4QQxZmG.mjs → insights_.distribution--XTBM-oT.mjs} +17 -16
  171. package/.output/server/_ssr/{insights_.distribution-DoO2NDvS.mjs → insights_.distribution-DTaKryjw.mjs} +2 -2
  172. package/.output/server/_ssr/{insights_.distribution-5sgau7rB.mjs → insights_.distribution-Ed2vqrwP.mjs} +5 -5
  173. package/.output/server/_ssr/{installations-W6DXZ5Tp.mjs → installations-Ce_9dNq0.mjs} +2 -2
  174. package/.output/server/_ssr/{installations-C4MwFvp6.mjs → installations-DyfuFp3L.mjs} +13 -13
  175. package/.output/server/_ssr/{installations-CZZsFoXb.mjs → installations-W8W7AYwn.mjs} +4 -4
  176. package/.output/server/_ssr/ios-devices-rpc-5kZM1bgU.mjs +149 -0
  177. package/.output/server/_ssr/iosDeviceCookie-BTfPOUhS.mjs +155 -0
  178. package/.output/server/_ssr/iosDeviceProfile-BAoo32s_.mjs +176 -0
  179. package/.output/server/_ssr/iosDevices-DuNmS3td.mjs +132 -0
  180. package/.output/server/_ssr/listReleases-QF91GLE7.mjs +94 -0
  181. package/.output/server/_ssr/{request-guard-CPdRBuGW.mjs → local-console-Dtxlsav0.mjs} +2 -9
  182. package/.output/server/_ssr/native-artifact-0tXDLTsd.mjs +1517 -0
  183. package/.output/server/_ssr/{native-builds-BhBltXq2.mjs → native-builds-1s5DIHa2.mjs} +3 -3
  184. package/.output/server/_ssr/native-builds-DEyFHKDa.mjs +696 -0
  185. package/.output/server/_ssr/native-builds-lEyKQemV.mjs +262 -0
  186. package/.output/server/_ssr/native-builds_._buildId-ElCXKaXI.mjs +1194 -0
  187. package/.output/server/_ssr/{native-builds_._buildId-B5QgMg7D.mjs → native-builds_._buildId-mJ8i0pL8.mjs} +3 -3
  188. package/.output/server/_ssr/native-builds_.devices-DNWZLCra.mjs +858 -0
  189. package/.output/server/_ssr/native-builds_.devices-Dz8b48Fo.mjs +10 -0
  190. package/.output/server/_ssr/nativeBuildDownloadLink-D8Se_CCi.mjs +96 -0
  191. package/.output/server/_ssr/nativeBuildInstall-DemC_4Zc.mjs +256 -0
  192. package/.output/server/_ssr/nativeBuilds-BFSeuC75.mjs +306 -0
  193. package/.output/server/_ssr/plistText-BORUpyEb.mjs +15 -0
  194. package/.output/server/_ssr/{plugins-RIryUNWj.mjs → plugins-D9CCkDjn.mjs} +7 -6
  195. package/.output/server/_ssr/publicConsoleBase-C3sNbafy.mjs +15 -0
  196. package/.output/server/_ssr/{release-adoption-DoAtNPED.mjs → release-adoption-gfhE5tz5.mjs} +2 -2
  197. package/.output/server/_ssr/{release-adoption-rpc-T00z1y9o.mjs → release-adoption-rpc-1mKibOdV.mjs} +9 -9
  198. package/.output/server/_ssr/{releaseAdoption-a2byXMfz.mjs → releaseAdoption-DfEYq7I4.mjs} +4 -4
  199. package/.output/server/_ssr/{releaseCatalogCompiler-DLcean2k.mjs → releaseCatalogCompiler-CuL3ptgg.mjs} +5 -4
  200. package/.output/server/_ssr/{releaseManagement-DHUux2az.mjs → releaseManagement-CqIc-SDE.mjs} +1 -1
  201. package/.output/server/_ssr/{releaseReachability-DZOK_dH-.mjs → releaseReachability-Ch1JpJkY.mjs} +2 -2
  202. package/.output/server/_ssr/{remote-config-bTCPTVky.mjs → remote-config-C_HNYPZ_.mjs} +24 -23
  203. package/.output/server/_ssr/{remote-config-Wjia3haX.mjs → remote-config-D2Cohnwn.mjs} +3 -3
  204. package/.output/server/_ssr/{remote-config-D6YMPi4J.mjs → remote-config-q9fegj-G.mjs} +2 -2
  205. package/.output/server/_ssr/{remote-config-rpc-7Zvra2dm.mjs → remote-config-rpc-6hfHFrO6.mjs} +5 -5
  206. package/.output/server/_ssr/request-guard-BPLyogIN.mjs +11 -0
  207. package/.output/server/_ssr/{router-CLK13IPD.mjs → router-DODxASKG.mjs} +137 -64
  208. package/.output/server/_ssr/{routes-CbdYptnV.mjs → routes-BJjTUNSe.mjs} +489 -474
  209. package/.output/server/_ssr/{routes-h_nOUmOr.mjs → routes-C-nYThl0.mjs} +50 -18
  210. package/.output/server/_ssr/{runtime.server-BdMY1blX.mjs → runtime.server-BUbb281Z.mjs} +4 -4
  211. package/.output/server/_ssr/{schema-ChlRtZIo.mjs → schema-CaIuQCXb.mjs} +1 -1
  212. package/.output/server/_ssr/{schema-migration-rpc-yB9ioGZE.mjs → schema-migration-rpc-C31JquTn.mjs} +5 -5
  213. package/.output/server/_ssr/{select-BdzEzz-x.mjs → select-CjACvu9s.mjs} +12 -10
  214. package/.output/server/_ssr/{server-CddZkHk2.mjs → server-Dyw2qgSR.mjs} +7 -7
  215. package/.output/server/_ssr/{sidebar-DabmjV5E.mjs → sidebar-DQkRAO_e.mjs} +17 -10
  216. package/.output/server/_ssr/ssr.mjs +1 -1
  217. package/.output/server/_ssr/{start-BvDsQehg.mjs → start-BSkL2B6C.mjs} +2 -2
  218. package/.output/server/_ssr/{switch-84dzb1yG.mjs → switch-DZJSRVl3.mjs} +4 -4
  219. package/.output/server/_ssr/{table-DP978C4F.mjs → table-BA-6GQFs.mjs} +2 -2
  220. package/.output/server/_ssr/tabs-CtB3PIts.mjs +45 -0
  221. package/.output/server/_ssr/{updateFailures-n-tGv90S.mjs → updateFailures-DcCONz23.mjs} +8 -5
  222. package/.output/server/_ssr/{dist-TEpM_UAD.mjs → uuid-kZvLA0Ly-DNL0qBSj.mjs} +2 -147
  223. package/.output/server/_ssr/{uuidv7-BIF4nb_q.mjs → uuidv7-C0jNe2Om.mjs} +2 -2
  224. package/.output/server/_ssr/{version-CQ98ZBpL-CWSkTT9J.mjs → version-CQ98ZBpL-zW2fpHOZ.mjs} +1 -1
  225. package/.output/server/_tanstack-start-manifest_v-Bfv6fYk6.mjs +229 -0
  226. package/.output/server/index.mjs +487 -375
  227. package/lib/index.d.mts +9 -0
  228. package/package.json +7 -30
  229. package/src/components/AppSidebar.tsx +11 -2
  230. package/src/components/ChannelBadge.tsx +9 -9
  231. package/src/components/ChannelPicker.tsx +227 -0
  232. package/src/components/DataTable.tsx +363 -0
  233. package/src/components/FoldedRows.tsx +219 -0
  234. package/src/components/HashValueDisplay.tsx +27 -8
  235. package/src/components/PlatformIcon.tsx +10 -0
  236. package/src/components/RelativeTime.tsx +31 -0
  237. package/src/components/RowReason.tsx +63 -0
  238. package/src/components/TargetDisplay.tsx +95 -0
  239. package/src/components/ThemeProvider.tsx +11 -2
  240. package/src/components/features/api-keys/ApiKeysPage.tsx +5 -3
  241. package/src/components/features/bundles/BundleMetadata.tsx +22 -1
  242. package/src/components/features/bundles/RolloutCohortsDialog.tsx +8 -1
  243. package/src/components/features/channels/ChannelManagementDialog.tsx +10 -11
  244. package/src/components/features/insights/AppUsage.tsx +3 -5
  245. package/src/components/features/insights/FailureReports.tsx +3 -2
  246. package/src/components/features/insights/InsightsControls.tsx +10 -69
  247. package/src/components/features/insights/InsightsOverview.tsx +7 -1
  248. package/src/components/features/insights/InsightsPageHeader.tsx +10 -15
  249. package/src/components/features/insights/ReleaseActivity.tsx +6 -2
  250. package/src/components/features/insights/ReleaseCombobox.tsx +1 -1
  251. package/src/components/features/insights/UpdateFailures.tsx +36 -10
  252. package/src/components/features/native-builds/BuiltInBundleCard.tsx +122 -61
  253. package/src/components/features/native-builds/CommitLink.tsx +3 -2
  254. package/src/components/features/native-builds/ImportBuild.tsx +1 -1
  255. package/src/components/features/native-builds/InstallCard.tsx +378 -93
  256. package/src/components/features/native-builds/IosDevicesPage.tsx +1145 -0
  257. package/src/components/features/native-builds/IosInstall.tsx +732 -0
  258. package/src/components/features/native-builds/IpaDevicesCard.tsx +123 -0
  259. package/src/components/features/native-builds/NativeBuildDetailPage.tsx +36 -9
  260. package/src/components/features/native-builds/NativeBuildsNav.tsx +45 -0
  261. package/src/components/features/native-builds/NativeBuildsPage.tsx +94 -108
  262. package/src/components/features/native-builds/NativeBuildsTable.tsx +649 -323
  263. package/src/components/features/native-builds/OlderBuildLabel.tsx +61 -0
  264. package/src/components/features/native-builds/PatchesCard.tsx +28 -19
  265. package/src/components/features/native-builds/ReleaseNativeBuildLink.tsx +5 -5
  266. package/src/components/features/native-builds/SandboxBadge.tsx +21 -0
  267. package/src/components/features/native-builds/ServedNowCard.tsx +33 -1
  268. package/src/components/features/native-builds/ShortHash.tsx +6 -3
  269. package/src/components/features/native-builds/StoreSubmission.tsx +18 -12
  270. package/src/components/features/native-builds/playTracks.ts +7 -0
  271. package/src/components/features/releases/ReleaseEditorSheet.tsx +8 -6
  272. package/src/components/features/remote-config/PublishDialog.tsx +4 -1
  273. package/src/components/features/remote-config/VersionsCard.tsx +5 -2
  274. package/src/components/ui/alert-dialog.tsx +2 -2
  275. package/src/components/ui/badge.tsx +2 -0
  276. package/src/components/ui/button.tsx +11 -2
  277. package/src/components/ui/combobox.tsx +2 -2
  278. package/src/components/ui/dialog.tsx +3 -3
  279. package/src/components/ui/input.tsx +1 -1
  280. package/src/components/ui/select.tsx +15 -7
  281. package/src/components/ui/sheet.tsx +1 -1
  282. package/src/components/ui/sidebar.tsx +2 -2
  283. package/src/components/ui/slider.tsx +1 -1
  284. package/src/components/ui/sonner.tsx +3 -1
  285. package/src/components/ui/switch.tsx +1 -1
  286. package/src/components/ui/tabs.tsx +1 -1
  287. package/src/components/ui/textarea.tsx +1 -1
  288. package/src/index.ts +9 -0
  289. package/src/lib/api-rpc.ts +125 -35
  290. package/src/lib/api.ts +171 -16
  291. package/src/lib/constants.ts +18 -0
  292. package/src/lib/insights-search.ts +0 -3
  293. package/src/lib/ios-devices-api.ts +304 -0
  294. package/src/lib/ios-devices-rpc.ts +215 -0
  295. package/src/lib/native-builds.ts +261 -20
  296. package/src/lib/schema-migration-rpc.ts +1 -1
  297. package/src/lib/server/console-runtime.server.ts +9 -2
  298. package/src/lib/server/deviceProfileToken.ts +221 -0
  299. package/src/lib/server/foldedPage.ts +360 -0
  300. package/src/lib/server/iosDeviceCookie.ts +239 -0
  301. package/src/lib/server/iosDeviceProfile.ts +232 -0
  302. package/src/lib/server/iosDevices.ts +232 -0
  303. package/src/lib/server/listReleases.ts +101 -62
  304. package/src/lib/server/local-console.ts +1 -1
  305. package/src/lib/server/nativeBuildDownloadLink.ts +193 -0
  306. package/src/lib/server/nativeBuildInstall.ts +513 -0
  307. package/src/lib/server/nativeBuilds.ts +327 -59
  308. package/src/lib/server/plistText.ts +17 -0
  309. package/src/lib/server/publicConsoleBase.ts +17 -0
  310. package/src/lib/server/updateFailures.ts +6 -1
  311. package/src/routeTree.gen.ts +129 -18
  312. package/src/routes/-native-builds-search.ts +61 -4
  313. package/src/routes/-releases-search.ts +63 -2
  314. package/src/routes/[_]hot-updater/devices/device-response.ts +21 -0
  315. package/src/routes/[_]hot-updater/devices/device[.]mobileconfig.ts +17 -0
  316. package/src/routes/[_]hot-updater/devices/receipt.ts +28 -0
  317. package/src/routes/[_]hot-updater/devices/request.ts +28 -0
  318. package/src/routes/[_]hot-updater/native-builds/$buildId/manifest[.]plist.ts +22 -0
  319. package/src/routes/api/native-builds/$buildId/download.ts +22 -1
  320. package/src/routes/index.tsx +657 -577
  321. package/src/routes/insights.tsx +3 -5
  322. package/src/routes/insights_.distribution.tsx +2 -2
  323. package/src/routes/native-builds_.devices.tsx +21 -0
  324. package/src/styles.css +24 -0
  325. package/.output/public/assets/-native-builds-search-C-TGpFAm.js +0 -1
  326. package/.output/public/assets/EventDetails-Dl2RvPAk.js +0 -1
  327. package/.output/public/assets/HashValueDisplay-6lNRxDJX.js +0 -1
  328. package/.output/public/assets/InsightsPageHeader-DHhqY3DT.js +0 -1
  329. package/.output/public/assets/RolloutPercentageBadge-Cxogpi8F.js +0 -1
  330. package/.output/public/assets/StoreSubmission-ViTkW4eJ.js +0 -1
  331. package/.output/public/assets/alert-dialog-BqYScr9y.js +0 -1
  332. package/.output/public/assets/api-P2g8dCNg.js +0 -1
  333. package/.output/public/assets/api-keys-DWQC2q6y.js +0 -1
  334. package/.output/public/assets/api-keys-FueRkF9q.js +0 -1
  335. package/.output/public/assets/arrow-left-g9cKqXuC.js +0 -1
  336. package/.output/public/assets/arrow-right-CNII8TYn.js +0 -1
  337. package/.output/public/assets/arrow-up-right-DK8Zdg40.js +0 -1
  338. package/.output/public/assets/badge-DWFcDWho.js +0 -1
  339. package/.output/public/assets/check-CXVR3s3X.js +0 -1
  340. package/.output/public/assets/chevron-right-BoUXo82O.js +0 -1
  341. package/.output/public/assets/dialog-CNUPxNxH.js +0 -1
  342. package/.output/public/assets/dist-CPlO6ko9.js +0 -1
  343. package/.output/public/assets/empty-B3Uwdd6k.js +0 -1
  344. package/.output/public/assets/field-D-2-mnNh.js +0 -1
  345. package/.output/public/assets/history-DqHlgSuV.js +0 -1
  346. package/.output/public/assets/index-CqP5HPV6.js +0 -10
  347. package/.output/public/assets/input-group-D3OUBk4n.js +0 -1
  348. package/.output/public/assets/insights-B-0odqpt.js +0 -42
  349. package/.output/public/assets/insights-BSVGfxSL.js +0 -1
  350. package/.output/public/assets/insights-NK5B6ReS.js +0 -2
  351. package/.output/public/assets/insights-api-BVCXJsoV.js +0 -1
  352. package/.output/public/assets/insights-search-DghCbEnk.js +0 -1
  353. package/.output/public/assets/insights-usage-rpc-CKQH0pUS.js +0 -1
  354. package/.output/public/assets/insights_.distribution-CJvgwcVZ.js +0 -2
  355. package/.output/public/assets/insights_.distribution-DblZM0mO.js +0 -1
  356. package/.output/public/assets/insights_.distribution-dvk6vYDM.js +0 -1
  357. package/.output/public/assets/installations-B674P5Z5.js +0 -2
  358. package/.output/public/assets/installations-BWxczZ2t.js +0 -1
  359. package/.output/public/assets/installations-Dv4kWQYz.js +0 -1
  360. package/.output/public/assets/native-builds-BOC71grI.js +0 -1
  361. package/.output/public/assets/native-builds-D6rldpSh.js +0 -2
  362. package/.output/public/assets/native-builds-DAy2678K.js +0 -1
  363. package/.output/public/assets/native-builds_._buildId-DD58_Phd.js +0 -1
  364. package/.output/public/assets/native-builds_._buildId-DvQDKnUQ.js +0 -2
  365. package/.output/public/assets/plus-BReVKct-.js +0 -1
  366. package/.output/public/assets/preload-helper-B44EvKhG.js +0 -1
  367. package/.output/public/assets/refresh-cw-B9HHjLej.js +0 -1
  368. package/.output/public/assets/remote-config-B7ujqhLa.js +0 -6
  369. package/.output/public/assets/remote-config-WjpozBG5.js +0 -1
  370. package/.output/public/assets/remote-config-gXeH6PBW.js +0 -1
  371. package/.output/public/assets/routes-BDdBIxYS.js +0 -1
  372. package/.output/public/assets/routes-CCD33Azv.js +0 -2
  373. package/.output/public/assets/search-BCel4Oy6.js +0 -1
  374. package/.output/public/assets/select-CBIU0_M1.js +0 -1
  375. package/.output/public/assets/sidebar-Di9SN47G.js +0 -3
  376. package/.output/public/assets/smartphone-CMaSy_ir.js +0 -1
  377. package/.output/public/assets/styles-uK-0vUMk.css +0 -2
  378. package/.output/public/assets/switch-BpdiHL_t.js +0 -1
  379. package/.output/public/assets/table-Bpy3SvSo.js +0 -1
  380. package/.output/public/assets/tabs-Xmt7tZeG.js +0 -1
  381. package/.output/public/assets/useCompositeListItem-JmyDfo3-.js +0 -1
  382. package/.output/public/assets/useInfiniteQuery-DX4WpBRG.js +0 -1
  383. package/.output/public/assets/valueToPercent-BLwGy_xK.js +0 -1
  384. package/.output/server/_ssr/-native-builds-search-CwNcoXf4.mjs +0 -37
  385. package/.output/server/_ssr/HashValueDisplay-B85-LoBW.mjs +0 -55
  386. package/.output/server/_ssr/RolloutPercentageBadge-CKFY5OIh.mjs +0 -21
  387. package/.output/server/_ssr/StoreSubmission-CNukW8xF.mjs +0 -139
  388. package/.output/server/_ssr/listReleases-D_GY00SQ.mjs +0 -79
  389. package/.output/server/_ssr/native-builds-CoOxssXa.mjs +0 -510
  390. package/.output/server/_ssr/native-builds-DhXL5zf_.mjs +0 -137
  391. package/.output/server/_ssr/native-builds_._buildId-CysSVBT5.mjs +0 -813
  392. package/.output/server/_ssr/nativeBuildQr-84cnFQPX.mjs +0 -59
  393. package/.output/server/_ssr/nativeBuilds-B_7BPjt_.mjs +0 -133
  394. package/.output/server/_ssr/qr-code-C7kNRIDX.mjs +0 -22
  395. package/.output/server/_ssr/tabs-kQRMEiQT.mjs +0 -45
  396. package/.output/server/_tanstack-start-manifest_v-B5nsO5L4.mjs +0 -184
  397. package/src/lib/server/nativeBuildQr.ts +0 -73
  398. package/src/routes/[_]hot-updater/native-builds/qr.ts +0 -14
@@ -0,0 +1,1145 @@
1
+ import {
2
+ extractTimestampFromUUIDv7,
3
+ type IosDeviceRow,
4
+ type IosDeviceStatus,
5
+ } from "@hot-updater/plugin-core";
6
+ import { useQueryClient } from "@tanstack/react-query";
7
+ import { Link } from "@tanstack/react-router";
8
+ import dayjs from "dayjs";
9
+ import {
10
+ AlertTriangle,
11
+ Check,
12
+ HardDrive,
13
+ Loader2,
14
+ MoreHorizontal,
15
+ Pencil,
16
+ RefreshCw,
17
+ Smartphone,
18
+ Trash2,
19
+ } from "lucide-react";
20
+ import { type FormEvent, useEffect, useRef, useState } from "react";
21
+
22
+ import {
23
+ DataCard,
24
+ DataCardSkeletons,
25
+ DataCardsEmpty,
26
+ DataTable,
27
+ DataTableEmpty,
28
+ DataTableFrame,
29
+ DataTableFullRow,
30
+ DataTablePagination,
31
+ DataTableSkeletonRows,
32
+ } from "@/components/DataTable";
33
+ import { QrCode } from "@/components/QrCode";
34
+ import { RelativeTime } from "@/components/RelativeTime";
35
+ import { NoValue } from "@/components/TargetDisplay";
36
+ import {
37
+ Alert,
38
+ AlertAction,
39
+ AlertDescription,
40
+ AlertTitle,
41
+ } from "@/components/ui/alert";
42
+ import {
43
+ AlertDialog,
44
+ AlertDialogAction,
45
+ AlertDialogCancel,
46
+ AlertDialogContent,
47
+ AlertDialogDescription,
48
+ AlertDialogFooter,
49
+ AlertDialogHeader,
50
+ AlertDialogTitle,
51
+ } from "@/components/ui/alert-dialog";
52
+ import { Badge } from "@/components/ui/badge";
53
+ import { Button, buttonVariants } from "@/components/ui/button";
54
+ import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card";
55
+ import {
56
+ Dialog,
57
+ DialogContent,
58
+ DialogDescription,
59
+ DialogFooter,
60
+ DialogHeader,
61
+ DialogTitle,
62
+ } from "@/components/ui/dialog";
63
+ import {
64
+ DropdownMenu,
65
+ DropdownMenuContent,
66
+ DropdownMenuItem,
67
+ DropdownMenuSeparator,
68
+ DropdownMenuTrigger,
69
+ } from "@/components/ui/dropdown-menu";
70
+ import {
71
+ Field,
72
+ FieldDescription,
73
+ FieldError,
74
+ FieldGroup,
75
+ FieldLabel,
76
+ } from "@/components/ui/field";
77
+ import { Input } from "@/components/ui/input";
78
+ import {
79
+ Select,
80
+ SelectContent,
81
+ SelectGroup,
82
+ SelectItem,
83
+ SelectTrigger,
84
+ SelectValue,
85
+ } from "@/components/ui/select";
86
+ import { SidebarTrigger } from "@/components/ui/sidebar";
87
+ import { Skeleton } from "@/components/ui/skeleton";
88
+ import { TableCell, TableHead, TableRow } from "@/components/ui/table";
89
+ import { useIsMobile } from "@/hooks/use-mobile";
90
+ import {
91
+ iosDeviceKeys,
92
+ useApproveIosDeviceMutation,
93
+ keptIsThisIphone,
94
+ useIosDeviceProfileLinkQuery,
95
+ useIosDeviceQuery,
96
+ useKeptIosDeviceQuery,
97
+ useRequestThisIphoneMutation,
98
+ useIosDevicesQuery,
99
+ useRemoveIosDeviceMutation,
100
+ useRenameIosDeviceMutation,
101
+ } from "@/lib/ios-devices-api";
102
+ import type { IosDevicesView } from "@/lib/ios-devices-rpc";
103
+ import {
104
+ consolePathOf,
105
+ IOS_DEVICES_ADD_COMMAND,
106
+ IOS_DEVICES_PATH,
107
+ iosDeviceProfileUrl,
108
+ maskIosUdid,
109
+ } from "@/lib/native-builds";
110
+ import type { IosDevicesSearch } from "@/routes/-native-builds-search";
111
+
112
+ import { CopyableText } from "./CopyableText";
113
+ import {
114
+ AppleRefusal,
115
+ type IosDevice,
116
+ useAdoptKeptIosDevice,
117
+ useIosDevice,
118
+ } from "./IosInstall";
119
+ import { NativeBuildsNav } from "./NativeBuildsNav";
120
+
121
+ const STATUS_LABELS: Record<IosDeviceStatus, string> = {
122
+ pending: "Requested",
123
+ approved: "Approved",
124
+ registered: "Registered",
125
+ };
126
+
127
+ /**
128
+ * Only a request waits on someone, so only it takes a status color; the
129
+ * other states are the normal course and stay neutral.
130
+ */
131
+ const STATUS_BADGES: Record<
132
+ IosDeviceStatus,
133
+ "warning" | "secondary" | "muted"
134
+ > = {
135
+ pending: "warning",
136
+ approved: "secondary",
137
+ registered: "muted",
138
+ };
139
+
140
+ const ALL = "all";
141
+ const COLUMNS = 6;
142
+
143
+ type Viewer = IosDevicesView["viewer"];
144
+
145
+ /** The Console's path from this page, so links work under a base path. */
146
+ const consolePath = () =>
147
+ window.location.pathname.endsWith(IOS_DEVICES_PATH)
148
+ ? window.location.pathname.slice(0, -IOS_DEVICES_PATH.length)
149
+ : consolePathOf(window.location, "");
150
+
151
+ /** Who may act on a row, decided again on the server. */
152
+ const actionsFor = (device: IosDeviceRow, viewer: Viewer) => ({
153
+ approve: viewer.canApprove && device.status === "pending",
154
+ rename: viewer.canApprove,
155
+ remove: viewer.canApprove,
156
+ withdraw:
157
+ !viewer.canApprove &&
158
+ device.status === "pending" &&
159
+ device.requested_by === viewer.email,
160
+ });
161
+
162
+ /**
163
+ * Apple's refusal of an approved device is the row an approver acts on, so it
164
+ * takes the warning in place of Approved; the other states stay neutral.
165
+ */
166
+ const appleRefused = (device: IosDeviceRow) =>
167
+ device.status === "approved" && device.apple_error !== null;
168
+
169
+ /** Who asked for a device: a person, or a terminal for one the CLI added. */
170
+ const requesterOf = (device: IosDeviceRow) =>
171
+ device.requested_by ?? "Added from a terminal";
172
+
173
+ /**
174
+ * Apple's reason. In a table cell it wraps at most two lines in a narrow
175
+ * column, the full text on hover and to a screen reader, so a long reason
176
+ * never widens the table past its frame; a card shows all of it.
177
+ */
178
+ function AppleError({
179
+ device,
180
+ inTable = false,
181
+ }: {
182
+ readonly device: IosDeviceRow;
183
+ readonly inTable?: boolean;
184
+ }) {
185
+ if (device.apple_error === null) return null;
186
+ return inTable ? (
187
+ <span
188
+ className="line-clamp-2 max-w-48 text-xs whitespace-normal text-muted-foreground"
189
+ title={device.apple_error}
190
+ >
191
+ {device.apple_error}
192
+ </span>
193
+ ) : (
194
+ <span className="max-w-64 text-xs whitespace-normal text-muted-foreground">
195
+ {device.apple_error}
196
+ </span>
197
+ );
198
+ }
199
+
200
+ function DeviceStatus({
201
+ device,
202
+ withError = true,
203
+ }: {
204
+ readonly device: IosDeviceRow;
205
+ /** Apple's reason under the badge; a card shows it on its own line. */
206
+ readonly withError?: boolean;
207
+ }) {
208
+ return (
209
+ <div className="flex min-w-0 shrink-0 flex-col items-start gap-1">
210
+ {appleRefused(device) ? (
211
+ <Badge variant="warning">Apple refused</Badge>
212
+ ) : (
213
+ <Badge variant={STATUS_BADGES[device.status]}>
214
+ {STATUS_LABELS[device.status]}
215
+ </Badge>
216
+ )}
217
+ {withError ? <AppleError device={device} inTable /> : null}
218
+ </div>
219
+ );
220
+ }
221
+
222
+ function DeviceBuild({ device }: { readonly device: IosDeviceRow }) {
223
+ if (device.build_id === null) {
224
+ return <NoValue />;
225
+ }
226
+ let label = "A build";
227
+ try {
228
+ label = `Build of ${dayjs(extractTimestampFromUUIDv7(device.build_id)).format("MMM D")}`;
229
+ } catch {
230
+ // An ID that isn't a UUIDv7 keeps the plain label.
231
+ }
232
+ return (
233
+ <Link
234
+ className="text-xs font-medium underline-offset-4 hover:underline"
235
+ params={{ buildId: device.build_id }}
236
+ to="/native-builds/$buildId"
237
+ >
238
+ {label}
239
+ </Link>
240
+ );
241
+ }
242
+
243
+ type NameTarget = {
244
+ readonly kind: "approve" | "rename";
245
+ readonly device: IosDeviceRow;
246
+ };
247
+ type DialogTarget =
248
+ | NameTarget
249
+ | { readonly kind: "remove"; readonly device: IosDeviceRow }
250
+ | null;
251
+
252
+ function DeviceActions({
253
+ device,
254
+ viewer,
255
+ onOpen,
256
+ }: {
257
+ readonly device: IosDeviceRow;
258
+ readonly viewer: Viewer;
259
+ readonly onOpen: (target: DialogTarget) => void;
260
+ }) {
261
+ const can = actionsFor(device, viewer);
262
+ if (!can.approve && !can.rename && !can.remove && !can.withdraw) return null;
263
+ return (
264
+ <div className="flex items-center justify-end gap-1">
265
+ {can.approve ? (
266
+ <Button
267
+ className="h-11 sm:h-8"
268
+ onClick={() => onOpen({ kind: "approve", device })}
269
+ size="sm"
270
+ >
271
+ <Check data-icon="inline-start" />
272
+ Approve
273
+ </Button>
274
+ ) : null}
275
+ {can.withdraw ? (
276
+ <Button
277
+ className="h-11 sm:h-8"
278
+ onClick={() => onOpen({ kind: "remove", device })}
279
+ size="sm"
280
+ variant="outline"
281
+ >
282
+ Withdraw
283
+ </Button>
284
+ ) : null}
285
+ {can.rename || can.remove ? (
286
+ <DropdownMenu>
287
+ <DropdownMenuTrigger
288
+ render={
289
+ <Button
290
+ aria-label={`More actions for ${device.name}`}
291
+ className="size-11 sm:size-8"
292
+ size="icon-sm"
293
+ variant="ghost"
294
+ />
295
+ }
296
+ >
297
+ <MoreHorizontal aria-hidden="true" />
298
+ </DropdownMenuTrigger>
299
+ <DropdownMenuContent align="end">
300
+ <DropdownMenuItem
301
+ onClick={() => onOpen({ kind: "rename", device })}
302
+ >
303
+ <Pencil aria-hidden="true" />
304
+ Rename
305
+ </DropdownMenuItem>
306
+ <DropdownMenuSeparator />
307
+ <DropdownMenuItem
308
+ onClick={() => onOpen({ kind: "remove", device })}
309
+ variant="destructive"
310
+ >
311
+ <Trash2 aria-hidden="true" />
312
+ {device.status === "pending" ? "Decline" : "Remove"}
313
+ </DropdownMenuItem>
314
+ </DropdownMenuContent>
315
+ </DropdownMenu>
316
+ ) : null}
317
+ </div>
318
+ );
319
+ }
320
+
321
+ /**
322
+ * "This iPhone" on the row of the iPhone this page is open on: a quiet tag,
323
+ * as "Sandbox" is on a build, so its actions are found where every row's are.
324
+ */
325
+ function ThisIphoneTag() {
326
+ return (
327
+ <Badge className="shrink-0 px-1.5" variant="muted">
328
+ This iPhone
329
+ </Badge>
330
+ );
331
+ }
332
+
333
+ function DeviceRow({
334
+ device,
335
+ viewer,
336
+ onOpen,
337
+ isThisIphone,
338
+ }: {
339
+ readonly device: IosDeviceRow;
340
+ readonly viewer: Viewer;
341
+ readonly onOpen: (target: DialogTarget) => void;
342
+ readonly isThisIphone: boolean;
343
+ }) {
344
+ return (
345
+ <TableRow>
346
+ <TableCell className="font-medium">
347
+ <span className="flex items-center gap-1.5">
348
+ {device.name}
349
+ {isThisIphone ? <ThisIphoneTag /> : null}
350
+ </span>
351
+ </TableCell>
352
+ <TableCell>
353
+ <span className="font-mono text-xs" title={device.udid} translate="no">
354
+ {maskIosUdid(device.udid)}
355
+ </span>
356
+ </TableCell>
357
+ <TableCell className="text-xs">
358
+ {device.requested_by ?? (
359
+ <span className="text-muted-foreground">{requesterOf(device)}</span>
360
+ )}
361
+ </TableCell>
362
+ <TableCell>
363
+ <DeviceStatus device={device} />
364
+ </TableCell>
365
+ <TableCell className="text-xs">
366
+ <RelativeTime ms={device.created_at_ms} />
367
+ </TableCell>
368
+ <TableCell>
369
+ <DeviceBuild device={device} />
370
+ </TableCell>
371
+ <TableCell className="text-right">
372
+ <DeviceActions device={device} onOpen={onOpen} viewer={viewer} />
373
+ </TableCell>
374
+ </TableRow>
375
+ );
376
+ }
377
+
378
+ function DeviceCard({
379
+ device,
380
+ viewer,
381
+ onOpen,
382
+ isThisIphone,
383
+ }: {
384
+ readonly device: IosDeviceRow;
385
+ readonly viewer: Viewer;
386
+ readonly onOpen: (target: DialogTarget) => void;
387
+ readonly isThisIphone: boolean;
388
+ }) {
389
+ return (
390
+ <DataCard className="cursor-default gap-3">
391
+ <div className="flex min-w-0 items-start justify-between gap-3">
392
+ <div className="flex min-w-0 flex-col gap-0.5">
393
+ <p className="flex min-w-0 items-center gap-1.5 text-sm font-medium">
394
+ <span className="truncate">{device.name}</span>
395
+ {isThisIphone ? <ThisIphoneTag /> : null}
396
+ </p>
397
+ <p className="font-mono text-xs text-muted-foreground" translate="no">
398
+ {maskIosUdid(device.udid)}
399
+ </p>
400
+ </div>
401
+ <DeviceStatus device={device} withError={false} />
402
+ </div>
403
+ <AppleError device={device} />
404
+ <p className="flex flex-wrap items-center gap-x-1.5 text-xs text-muted-foreground">
405
+ <span>{requesterOf(device)}</span>
406
+ <span aria-hidden="true">·</span>
407
+ <RelativeTime ms={device.created_at_ms} />
408
+ {device.build_id === null ? null : (
409
+ <>
410
+ <span aria-hidden="true">·</span>
411
+ <DeviceBuild device={device} />
412
+ </>
413
+ )}
414
+ </p>
415
+ <DeviceActions device={device} onOpen={onOpen} viewer={viewer} />
416
+ </DataCard>
417
+ );
418
+ }
419
+
420
+ /** Name a device: approving a request, or renaming any device. */
421
+ function NameDialog({
422
+ target,
423
+ onClose,
424
+ }: {
425
+ readonly target: NameTarget;
426
+ readonly onClose: () => void;
427
+ }) {
428
+ const approve = useApproveIosDeviceMutation();
429
+ const rename = useRenameIosDeviceMutation();
430
+ const mutation = target.kind === "approve" ? approve : rename;
431
+ const [name, setName] = useState(target.device.name);
432
+ const trimmed = name.trim();
433
+ const submit = (event: FormEvent) => {
434
+ event.preventDefault();
435
+ if (trimmed === "") return;
436
+ mutation.mutate(
437
+ { id: target.device.id, name: trimmed },
438
+ { onSuccess: onClose },
439
+ );
440
+ };
441
+ return (
442
+ <Dialog onOpenChange={(open) => (open ? null : onClose())} open>
443
+ <DialogContent>
444
+ <DialogHeader>
445
+ <DialogTitle>
446
+ {target.kind === "approve"
447
+ ? `Approve ${target.device.name}?`
448
+ : `Rename ${target.device.name}`}
449
+ </DialogTitle>
450
+ <DialogDescription>
451
+ {target.kind === "approve"
452
+ ? "The next ad hoc build registers this iPhone with your Apple account. Each new iPhone uses one of the account's 100 a year, and removing it never gives the slot back."
453
+ : "The registry shows this name. The next ad hoc build doesn't rename it at Apple."}
454
+ </DialogDescription>
455
+ </DialogHeader>
456
+ <form onSubmit={submit}>
457
+ <FieldGroup>
458
+ {target.kind === "approve" ? (
459
+ <dl className="grid grid-cols-[auto_minmax(0,1fr)] gap-x-4 gap-y-1 text-sm">
460
+ <dt className="text-muted-foreground">Requested by</dt>
461
+ <dd className="truncate">
462
+ {target.device.requested_by ?? "Terminal (CLI)"}
463
+ </dd>
464
+ <dt className="text-muted-foreground">UDID</dt>
465
+ {/* All of it, to check against Finder: a phone has no hover. */}
466
+ <dd
467
+ className="font-mono text-xs break-all select-all"
468
+ translate="no"
469
+ >
470
+ {target.device.udid}
471
+ </dd>
472
+ </dl>
473
+ ) : null}
474
+ <Field data-invalid={mutation.isError || undefined}>
475
+ <FieldLabel htmlFor="ios-device-dialog-name">Name</FieldLabel>
476
+ <Input
477
+ autoComplete="off"
478
+ id="ios-device-dialog-name"
479
+ maxLength={100}
480
+ onChange={(event) => setName(event.target.value)}
481
+ value={name}
482
+ />
483
+ {target.kind === "approve" ? (
484
+ <FieldDescription>
485
+ The iPhone's ID comes from the person who asked. Approve
486
+ devices you recognize.
487
+ </FieldDescription>
488
+ ) : null}
489
+ <FieldError>
490
+ {mutation.isError
491
+ ? `Couldn't ${target.kind === "approve" ? "approve" : "rename"} ${target.device.name}. Check your connection and try again.`
492
+ : null}
493
+ </FieldError>
494
+ </Field>
495
+ </FieldGroup>
496
+ <DialogFooter className="mt-4">
497
+ <Button
498
+ className="h-11 sm:h-8"
499
+ disabled={trimmed === "" || mutation.isPending}
500
+ type="submit"
501
+ >
502
+ {mutation.isPending ? (
503
+ <Loader2
504
+ className="animate-spin motion-reduce:animate-none"
505
+ data-icon="inline-start"
506
+ />
507
+ ) : (
508
+ <Check data-icon="inline-start" />
509
+ )}
510
+ {target.kind === "approve" ? "Approve" : "Rename"}
511
+ </Button>
512
+ </DialogFooter>
513
+ </form>
514
+ </DialogContent>
515
+ </Dialog>
516
+ );
517
+ }
518
+
519
+ function RemoveDialog({
520
+ device,
521
+ viewer,
522
+ onClose,
523
+ }: {
524
+ readonly device: IosDeviceRow;
525
+ readonly viewer: Viewer;
526
+ readonly onClose: () => void;
527
+ }) {
528
+ const remove = useRemoveIosDeviceMutation();
529
+ const withdraw = !viewer.canApprove;
530
+ const decline = device.status === "pending";
531
+ return (
532
+ <AlertDialog onOpenChange={(open) => (open ? null : onClose())} open>
533
+ <AlertDialogContent>
534
+ <AlertDialogHeader>
535
+ <AlertDialogTitle>
536
+ {withdraw
537
+ ? `Withdraw ${device.name}?`
538
+ : decline
539
+ ? `Decline ${device.name}?`
540
+ : `Remove ${device.name}?`}
541
+ </AlertDialogTitle>
542
+ <AlertDialogDescription>
543
+ {decline
544
+ ? "It leaves the list. Its owner can request it again."
545
+ : "It leaves the list. New ad hoc builds keep it until it's disabled at Apple."}
546
+ </AlertDialogDescription>
547
+ </AlertDialogHeader>
548
+ {remove.isError ? (
549
+ <p className="text-xs text-destructive" role="alert">
550
+ Couldn't {withdraw ? "withdraw" : decline ? "decline" : "remove"}{" "}
551
+ {device.name}. Check your connection and try again.
552
+ </p>
553
+ ) : null}
554
+ <AlertDialogFooter>
555
+ <AlertDialogCancel disabled={remove.isPending}>
556
+ Cancel
557
+ </AlertDialogCancel>
558
+ <AlertDialogAction
559
+ disabled={remove.isPending}
560
+ onClick={(event) => {
561
+ event.preventDefault();
562
+ remove.mutate({ udid: device.udid }, { onSuccess: onClose });
563
+ }}
564
+ variant="destructive"
565
+ >
566
+ {remove.isPending ? (
567
+ <Loader2
568
+ className="animate-spin motion-reduce:animate-none"
569
+ data-icon="inline-start"
570
+ />
571
+ ) : null}
572
+ {withdraw ? "Withdraw" : decline ? "Decline" : "Remove"}
573
+ </AlertDialogAction>
574
+ </AlertDialogFooter>
575
+ </AlertDialogContent>
576
+ </AlertDialog>
577
+ );
578
+ }
579
+
580
+ /**
581
+ * Where this iPhone stands, once its profile has answered: its row's name,
582
+ * status, and what happens next, in place of the form that registered it.
583
+ * It has no actions: they are on its row in the list, tagged "This iPhone",
584
+ * as every row's are. Apple's refusal reads as on a build's page.
585
+ */
586
+ function ThisIphone({
587
+ device,
588
+ viewer,
589
+ }: {
590
+ readonly device: IosDeviceRow;
591
+ /** Unknown until the list loads. */
592
+ readonly viewer: Viewer | undefined;
593
+ }) {
594
+ const canApprove = viewer?.canApprove === true;
595
+ if (device.apple_error !== null) {
596
+ return (
597
+ <AppleRefusal canApprove={canApprove} device={device} onDevicesPage />
598
+ );
599
+ }
600
+ return (
601
+ <div className="flex min-w-0 flex-col gap-3">
602
+ <div className="flex min-w-0 items-start justify-between gap-3">
603
+ <div className="flex min-w-0 flex-col gap-0.5">
604
+ <p className="truncate text-sm font-medium">{device.name}</p>
605
+ <p className="font-mono text-xs text-muted-foreground" translate="no">
606
+ {maskIosUdid(device.udid)}
607
+ </p>
608
+ </div>
609
+ <DeviceStatus device={device} withError={false} />
610
+ </div>
611
+ <p className="text-xs text-muted-foreground" role="status">
612
+ {device.status === "pending"
613
+ ? canApprove
614
+ ? "Approve it below, and it joins the next ad hoc build."
615
+ : "A maintainer approves it next."
616
+ : device.status === "approved"
617
+ ? "It joins the next ad hoc build."
618
+ : "New ad hoc builds install on it."}
619
+ </p>
620
+ </div>
621
+ );
622
+ }
623
+
624
+ /** Why iPhones can't register through this Console. */
625
+ function RegistrationNotice({
626
+ status,
627
+ secretName,
628
+ }: {
629
+ readonly status: "local-console" | "no-secret";
630
+ /** The secret to set, for `no-secret`. */
631
+ readonly secretName?: string;
632
+ }) {
633
+ return (
634
+ <p className="text-xs text-muted-foreground" role="status">
635
+ {status === "local-console"
636
+ ? "iPhones register through your hosted Console: an iPhone can't reach this computer's."
637
+ : `Set ${secretName} on this Console to register iPhones.`}
638
+ </p>
639
+ );
640
+ }
641
+
642
+ /**
643
+ * Where an iPhone joins the list: on a computer, a QR code of this page; on
644
+ * the iPhone, its name and the profile that reads its UDID, signed for the
645
+ * person who is signed in.
646
+ */
647
+ function RegisterCard({
648
+ view,
649
+ phone,
650
+ }: {
651
+ readonly view: IosDevicesView | undefined;
652
+ /** This iPhone as `useIosDevice` reads it, null until the page mounts. */
653
+ readonly phone: IosDevice | null;
654
+ }) {
655
+ const [name, setName] = useState<string | null>(null);
656
+ const typed = name ?? view?.defaultName ?? "";
657
+ // The link is signed for the name as typed; a pause before signing again.
658
+ const [signed, setSigned] = useState(typed);
659
+ useEffect(() => {
660
+ const timer = setTimeout(() => setSigned(typed.trim()), 400);
661
+ return () => clearTimeout(timer);
662
+ }, [typed]);
663
+ const onPhone = phone?.ios === true;
664
+ const link = useIosDeviceProfileLinkQuery(
665
+ { mode: "register", name: signed || "iPhone" },
666
+ onPhone && view?.registration === "ready",
667
+ );
668
+ const https = phone === null || window.location.protocol === "https:";
669
+ // Once its profile has answered, this iPhone's own row, whatever the list
670
+ // shows: after a reload, or in the tab Safari came back to.
671
+ const udid = onPhone ? phone.udid : null;
672
+ const mine = useIosDeviceQuery(udid);
673
+ // A new answer with the same UDID, such as a removed iPhone registering
674
+ // again, reads its row again: the key didn't change, so nothing else would.
675
+ // A new UDID changes the key, which reads it; a computer reads nothing.
676
+ const answers = phone?.answers ?? 0;
677
+ const { refetch } = mine;
678
+ const seen = useRef({ udid, answers });
679
+ useEffect(() => {
680
+ const before = seen.current;
681
+ seen.current = { udid, answers };
682
+ if (udid !== null && udid === before.udid && answers > before.answers) {
683
+ void refetch();
684
+ }
685
+ }, [udid, answers, refetch]);
686
+ // This Safari's proof of the iPhone, an HttpOnly cookie: the register
687
+ // answer's fresh receipt is traded for it, and a phone with no row requests
688
+ // itself again with it, without the profile, for the same person only.
689
+ const path = phone === null ? "" : consolePath();
690
+ // Also the identity of a phone whose storage Safari wiped: the cookie
691
+ // names it, once, and the page adopts it.
692
+ const kept = useKeptIosDeviceQuery(
693
+ path,
694
+ phone?.receipt ?? null,
695
+ onPhone &&
696
+ view?.registration === "ready" &&
697
+ (udid === null || phone.receipt !== null || mine.data === null),
698
+ );
699
+ useAdoptKeptIosDevice(phone, kept.data?.udid);
700
+ const again = useRequestThisIphoneMutation(path);
701
+ const proved = onPhone && keptIsThisIphone(kept.data?.udid, phone.udid);
702
+
703
+ const body = (() => {
704
+ // The server renders this without a browser: where it is and what it is
705
+ // are read once the page mounts.
706
+ if (phone === null) {
707
+ return <Skeleton aria-label="Loading" className="h-36 w-full" />;
708
+ }
709
+ if (onPhone && phone.udid !== null && mine.isPending) {
710
+ return <Skeleton aria-label="Loading" className="h-36 w-full" />;
711
+ }
712
+ if (onPhone && mine.data) {
713
+ return <ThisIphone device={mine.data} viewer={view?.viewer} />;
714
+ }
715
+ if (
716
+ view !== undefined &&
717
+ (view.registration === "local-console" ||
718
+ view.registration === "no-secret")
719
+ ) {
720
+ return (
721
+ <RegistrationNotice
722
+ secretName={view.secretName}
723
+ status={view.registration}
724
+ />
725
+ );
726
+ }
727
+ if (!onPhone) {
728
+ return (
729
+ <div className="flex flex-col items-start gap-4 sm:flex-row sm:items-center">
730
+ <QrCode
731
+ className="size-36 shrink-0"
732
+ label="Open this page on an iPhone"
733
+ value={`${window.location.origin}${consolePath()}${IOS_DEVICES_PATH}`}
734
+ />
735
+ <div className="flex min-w-0 flex-col gap-1">
736
+ <p className="text-sm font-medium">
737
+ Open this page on the iPhone, in Safari.
738
+ </p>
739
+ <p className="text-xs text-muted-foreground">
740
+ It installs a profile that reads the iPhone's ID, then lists the
741
+ iPhone here as requested. Nothing stays installed.
742
+ </p>
743
+ </div>
744
+ </div>
745
+ );
746
+ }
747
+ if (!https) {
748
+ return (
749
+ <p className="text-xs text-muted-foreground" role="status">
750
+ iPhones need this Console on HTTPS.
751
+ </p>
752
+ );
753
+ }
754
+ if (mine.data === null && kept.isFetching && !proved) {
755
+ return <Skeleton aria-label="Loading" className="h-36 w-full" />;
756
+ }
757
+ if (proved) {
758
+ const trimmed = typed.trim();
759
+ return (
760
+ <form
761
+ className="flex min-w-0 flex-col gap-3"
762
+ onSubmit={(event) => {
763
+ event.preventDefault();
764
+ if (trimmed === "") return;
765
+ again.mutate({ name: trimmed, receipt: phone.receipt });
766
+ }}
767
+ >
768
+ <Field data-invalid={again.isError || undefined}>
769
+ <FieldLabel htmlFor="ios-device-register-name">
770
+ This iPhone's name
771
+ </FieldLabel>
772
+ <Input
773
+ autoComplete="off"
774
+ className="h-11"
775
+ id="ios-device-register-name"
776
+ maxLength={100}
777
+ onChange={(event) => setName(event.target.value)}
778
+ value={typed}
779
+ />
780
+ <FieldDescription>
781
+ This Safari checked it before, so no profile is needed.
782
+ </FieldDescription>
783
+ <FieldError>
784
+ {again.isError
785
+ ? "The request didn't go through. Try again."
786
+ : null}
787
+ </FieldError>
788
+ </Field>
789
+ <Button
790
+ className="h-11 w-full"
791
+ disabled={trimmed === "" || again.isPending}
792
+ type="submit"
793
+ >
794
+ {again.isPending ? (
795
+ <Loader2
796
+ className="animate-spin motion-reduce:animate-none"
797
+ data-icon="inline-start"
798
+ />
799
+ ) : (
800
+ <Smartphone data-icon="inline-start" />
801
+ )}
802
+ Request this iPhone
803
+ </Button>
804
+ </form>
805
+ );
806
+ }
807
+ if (link.data?.status === "local-console") {
808
+ return <RegistrationNotice status="local-console" />;
809
+ }
810
+ if (link.data?.status === "no-secret") {
811
+ return (
812
+ <RegistrationNotice
813
+ secretName={link.data.secretName}
814
+ status="no-secret"
815
+ />
816
+ );
817
+ }
818
+ return (
819
+ <div className="flex min-w-0 flex-col gap-3">
820
+ <Field>
821
+ <FieldLabel htmlFor="ios-device-register-name">
822
+ This iPhone's name
823
+ </FieldLabel>
824
+ <Input
825
+ autoComplete="off"
826
+ className="h-11"
827
+ id="ios-device-register-name"
828
+ maxLength={100}
829
+ onChange={(event) => setName(event.target.value)}
830
+ value={typed}
831
+ />
832
+ </Field>
833
+ {link.data?.status === "issued" && signed === typed.trim() ? (
834
+ <a
835
+ className={buttonVariants({
836
+ className: "h-auto min-h-11 w-full whitespace-normal",
837
+ })}
838
+ href={iosDeviceProfileUrl(consolePath(), link.data.token)}
839
+ >
840
+ <Smartphone data-icon="inline-start" />
841
+ Install profile
842
+ </a>
843
+ ) : (
844
+ <Skeleton
845
+ aria-label="Preparing the profile"
846
+ className="h-11 w-full"
847
+ />
848
+ )}
849
+ <p className="text-xs text-muted-foreground">
850
+ Safari only. Allow the download, then install it in Settings, where
851
+ iOS calls it not signed. Safari comes back here, and nothing stays
852
+ installed.
853
+ </p>
854
+ </div>
855
+ );
856
+ })();
857
+
858
+ return (
859
+ <Card className="shadow-sm">
860
+ <CardHeader className="border-b px-4 py-3">
861
+ <CardTitle className="text-sm">
862
+ <h2>Register an iPhone</h2>
863
+ </CardTitle>
864
+ </CardHeader>
865
+ <CardContent className="p-4 sm:p-6">{body}</CardContent>
866
+ </Card>
867
+ );
868
+ }
869
+
870
+ /**
871
+ * The iOS device registry inside Native builds: the iPhones and iPads a team
872
+ * asked to install ad hoc builds on. Testers register from an iPhone,
873
+ * approvers approve, rename, and remove, and the next ad hoc build registers
874
+ * what was approved with Apple. Android builds need none of this.
875
+ */
876
+ export function IosDevicesPage({
877
+ search,
878
+ onSearchChange,
879
+ }: {
880
+ readonly search: IosDevicesSearch;
881
+ readonly onSearchChange: (search: IosDevicesSearch) => void;
882
+ }) {
883
+ const isMobile = useIsMobile();
884
+ const query = useIosDevicesQuery(search);
885
+ const view = query.data;
886
+ const rows = view?.devices;
887
+ // A page other than the newest, whose status the page links keep.
888
+ const paged = search.before !== undefined || search.after !== undefined;
889
+ const statusSearch: IosDevicesSearch =
890
+ search.status === undefined ? {} : { status: search.status };
891
+ const queryClient = useQueryClient();
892
+ // Refresh and Retry read every registry query the page shows: the list,
893
+ // and this iPhone's own row on a phone. A disabled read, such as the row
894
+ // on a computer, stays unread.
895
+ const refresh = () =>
896
+ void queryClient.invalidateQueries({ queryKey: iosDeviceKeys.all });
897
+ const [dialog, setDialog] = useState<DialogTarget>(null);
898
+ const phone = useIosDevice();
899
+ // The row of the iPhone this page is open on, tagged where its actions are.
900
+ const thisUdid =
901
+ phone?.ios === true ? (phone.udid?.toLowerCase() ?? null) : null;
902
+ const close = () => setDialog(null);
903
+
904
+ const empty = paged ? (
905
+ <DataTableEmpty icon={Smartphone} title="No more iPhones">
906
+ <Link
907
+ className={buttonVariants({
908
+ className: "mt-1 min-h-11 sm:min-h-8",
909
+ variant: "outline",
910
+ })}
911
+ search={statusSearch}
912
+ to={IOS_DEVICES_PATH}
913
+ >
914
+ Show the newest iPhones
915
+ </Link>
916
+ </DataTableEmpty>
917
+ ) : (
918
+ <DataTableEmpty
919
+ icon={Smartphone}
920
+ title={
921
+ search.status === undefined
922
+ ? "No iPhones yet"
923
+ : `No ${STATUS_LABELS[search.status].toLowerCase()} iPhones`
924
+ }
925
+ >
926
+ {search.status === undefined ? (
927
+ <p>Open this page on an iPhone to register it.</p>
928
+ ) : (
929
+ <Button
930
+ className="h-11 sm:h-8"
931
+ onClick={() => onSearchChange({})}
932
+ size="sm"
933
+ variant="outline"
934
+ >
935
+ Show all
936
+ </Button>
937
+ )}
938
+ </DataTableEmpty>
939
+ );
940
+
941
+ return (
942
+ <div className="flex h-svh min-h-0 min-w-0 flex-col">
943
+ <header className="sticky top-0 z-10 flex shrink-0 flex-wrap items-center gap-x-3 gap-y-1 border-b bg-background px-3 py-3 sm:min-h-12 sm:flex-nowrap sm:bg-card/70 sm:px-4 sm:backdrop-blur-sm">
944
+ <SidebarTrigger className="-ml-1 size-11 lg:size-7" />
945
+ <div className="flex items-center gap-1.5">
946
+ <HardDrive
947
+ aria-hidden="true"
948
+ className="size-3.5 text-muted-foreground"
949
+ />
950
+ <h1 className="text-sm font-medium">Native builds</h1>
951
+ </div>
952
+ <p className="basis-full pl-12 text-xs text-muted-foreground sm:basis-auto sm:pl-0">
953
+ The iPhones and iPads ad hoc builds install on. Android needs none.
954
+ </p>
955
+ </header>
956
+
957
+ <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">
958
+ <NativeBuildsNav current="devices" />
959
+ <RegisterCard phone={phone} view={view} />
960
+ {view !== undefined && !view.viewer.approversConfigured ? (
961
+ <div className="flex min-w-0 flex-col gap-1.5 text-xs text-muted-foreground">
962
+ <p>Nobody approves in this Console. Approve from a terminal:</p>
963
+ <CopyableText
964
+ label="the approve command"
965
+ value={IOS_DEVICES_ADD_COMMAND}
966
+ />
967
+ </div>
968
+ ) : null}
969
+ <div className="flex items-center gap-2">
970
+ <Select
971
+ items={[
972
+ { label: "All statuses", value: ALL },
973
+ ...(Object.keys(STATUS_LABELS) as IosDeviceStatus[]).map(
974
+ (status) => ({ label: STATUS_LABELS[status], value: status }),
975
+ ),
976
+ ]}
977
+ onValueChange={(value) =>
978
+ onSearchChange(
979
+ value === null || value === ALL
980
+ ? {}
981
+ : { status: value as IosDeviceStatus },
982
+ )
983
+ }
984
+ value={search.status ?? ALL}
985
+ >
986
+ <SelectTrigger
987
+ aria-label="Status"
988
+ className="min-w-0 flex-1 text-xs data-[size=default]:h-11 sm:w-44 sm:flex-none sm:data-[size=default]:h-8"
989
+ >
990
+ <SelectValue />
991
+ </SelectTrigger>
992
+ <SelectContent>
993
+ <SelectGroup>
994
+ <SelectItem value={ALL}>All statuses</SelectItem>
995
+ {(Object.keys(STATUS_LABELS) as IosDeviceStatus[]).map(
996
+ (status) => (
997
+ <SelectItem key={status} value={status}>
998
+ {STATUS_LABELS[status]}
999
+ </SelectItem>
1000
+ ),
1001
+ )}
1002
+ </SelectGroup>
1003
+ </SelectContent>
1004
+ </Select>
1005
+ <Button
1006
+ aria-label="Refresh iOS devices"
1007
+ className="ml-auto size-11 sm:size-7"
1008
+ disabled={query.isFetching}
1009
+ onClick={refresh}
1010
+ size="icon-sm"
1011
+ variant="ghost"
1012
+ >
1013
+ <RefreshCw aria-hidden="true" />
1014
+ </Button>
1015
+ </div>
1016
+ {query.isError ? (
1017
+ <Alert variant="destructive">
1018
+ <AlertTriangle />
1019
+ <AlertTitle>iOS devices couldn't be loaded</AlertTitle>
1020
+ <AlertDescription>
1021
+ Check your connection and try again.
1022
+ </AlertDescription>
1023
+ <AlertAction>
1024
+ <Button onClick={refresh} size="xs" variant="outline">
1025
+ <RefreshCw data-icon="inline-start" />
1026
+ Retry
1027
+ </Button>
1028
+ </AlertAction>
1029
+ </Alert>
1030
+ ) : (
1031
+ // The page scrolls as a whole, the Register card above the list.
1032
+ <DataTableFrame className="flex-none">
1033
+ {isMobile ? (
1034
+ <div
1035
+ aria-busy={query.isPlaceholderData}
1036
+ aria-label="iOS devices"
1037
+ className="aria-busy:opacity-60"
1038
+ role="list"
1039
+ >
1040
+ {query.isLoading ? (
1041
+ <DataCardSkeletons label="Loading iOS devices" />
1042
+ ) : rows?.length === 0 ? (
1043
+ <DataCardsEmpty>{empty}</DataCardsEmpty>
1044
+ ) : (
1045
+ rows?.map((device) => (
1046
+ <div
1047
+ className="border-b last:border-b-0"
1048
+ key={device.id}
1049
+ role="listitem"
1050
+ >
1051
+ <DeviceCard
1052
+ device={device}
1053
+ isThisIphone={device.udid === thisUdid}
1054
+ onOpen={setDialog}
1055
+ viewer={view!.viewer}
1056
+ />
1057
+ </div>
1058
+ ))
1059
+ )}
1060
+ </div>
1061
+ ) : (
1062
+ <DataTable
1063
+ aria-busy={query.isPlaceholderData}
1064
+ aria-label="iOS devices"
1065
+ className="aria-busy:opacity-60"
1066
+ header={
1067
+ <>
1068
+ <TableHead>Name</TableHead>
1069
+ <TableHead>UDID</TableHead>
1070
+ <TableHead>Requested by</TableHead>
1071
+ <TableHead>Status</TableHead>
1072
+ <TableHead>Added</TableHead>
1073
+ <TableHead>Build</TableHead>
1074
+ <TableHead className="text-right">
1075
+ <span className="sr-only">Actions</span>
1076
+ </TableHead>
1077
+ </>
1078
+ }
1079
+ >
1080
+ {query.isLoading ? (
1081
+ <DataTableSkeletonRows
1082
+ columns={COLUMNS + 1}
1083
+ label="Loading iOS devices"
1084
+ />
1085
+ ) : rows?.length === 0 ? (
1086
+ <DataTableFullRow columns={COLUMNS + 1}>
1087
+ {empty}
1088
+ </DataTableFullRow>
1089
+ ) : (
1090
+ rows?.map((device) => (
1091
+ <DeviceRow
1092
+ device={device}
1093
+ isThisIphone={device.udid === thisUdid}
1094
+ key={device.id}
1095
+ onOpen={setDialog}
1096
+ viewer={view!.viewer}
1097
+ />
1098
+ ))
1099
+ )}
1100
+ </DataTable>
1101
+ )}
1102
+ </DataTableFrame>
1103
+ )}
1104
+ {query.isError || rows === undefined ? null : (
1105
+ <DataTablePagination
1106
+ count={rows.length}
1107
+ label="iOS device pages"
1108
+ newest={
1109
+ paged ? { search: statusSearch, to: IOS_DEVICES_PATH } : undefined
1110
+ }
1111
+ next={
1112
+ view?.next === undefined
1113
+ ? undefined
1114
+ : {
1115
+ search: { ...statusSearch, before: view.next },
1116
+ to: IOS_DEVICES_PATH,
1117
+ }
1118
+ }
1119
+ noun={["device", "devices"]}
1120
+ pending={query.isPlaceholderData}
1121
+ previous={
1122
+ view?.previous === undefined
1123
+ ? undefined
1124
+ : {
1125
+ search: { ...statusSearch, after: view.previous },
1126
+ to: IOS_DEVICES_PATH,
1127
+ }
1128
+ }
1129
+ />
1130
+ )}
1131
+ </div>
1132
+ {dialog !== null && dialog.kind !== "remove" ? (
1133
+ <NameDialog key={dialog.device.id} onClose={close} target={dialog} />
1134
+ ) : null}
1135
+ {dialog?.kind === "remove" && view !== undefined ? (
1136
+ <RemoveDialog
1137
+ device={dialog.device}
1138
+ key={dialog.device.id}
1139
+ onClose={close}
1140
+ viewer={view.viewer}
1141
+ />
1142
+ ) : null}
1143
+ </div>
1144
+ );
1145
+ }