@hot-updater/console 1.2.0-rc.26 → 1.2.0-rc.28

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-OlRj4Jz0.js → -native-builds-search-7blX2yQW.js} +1 -1
  3. package/.output/public/assets/BundleIdDisplay-B0gAH01c.js +1 -0
  4. package/.output/public/assets/CompositeItem-Dy4xgOMg.js +1 -0
  5. package/.output/public/assets/{ConsoleFeatureUnavailable-DUqlpHCp.js → ConsoleFeatureUnavailable-cy_snb33.js} +1 -1
  6. package/.output/public/assets/{EventDetails-DZsRlDHk.js → EventDetails-sxag8Hfc.js} +1 -1
  7. package/.output/public/assets/{HashValueDisplay-MoZMmTeP.js → HashValueDisplay-DMweha_0.js} +1 -1
  8. package/.output/public/assets/{InsightsPageHeader-2bTrjXln.js → InsightsPageHeader-D5TJspVe.js} +1 -1
  9. package/.output/public/assets/IosInstall-B5NspihF.js +1 -0
  10. package/.output/public/assets/NativeBuildsNav-CjOOlbEu.js +1 -0
  11. package/.output/public/assets/{NotFoundPage-Ckb5GMhh.js → NotFoundPage-DDOJarFa.js} +1 -1
  12. package/.output/public/assets/{PlatformIcon-CJ69KopR.js → PlatformIcon-BBvlg6JY.js} +1 -1
  13. package/.output/public/assets/RelativeTime-CY1dKZpv.js +1 -0
  14. package/.output/public/assets/{RolloutPercentageBadge-G6qt8rVb.js → RolloutPercentageBadge-BHgHkBGB.js} +1 -1
  15. package/.output/public/assets/RowReason-BMx_vclu.js +1 -0
  16. package/.output/public/assets/SandboxBadge-irEkMf1P.js +1 -0
  17. package/.output/public/assets/TargetDisplay-DB8D019f.js +1 -0
  18. package/.output/public/assets/{alert-dialog-DiRLrFVe.js → alert-dialog-CLC_h1fL.js} +1 -1
  19. package/.output/public/assets/api-DLryz9hA.js +1 -0
  20. package/.output/public/assets/api-keys-Cd-aNt-v.js +1 -0
  21. package/.output/public/assets/api-keys-D3tAc4Uu.js +1 -0
  22. package/.output/public/assets/arrow-left-DQjHJAnT.js +1 -0
  23. package/.output/public/assets/arrow-right-CXp_K3xK.js +1 -0
  24. package/.output/public/assets/arrow-up-right-BFafIOrq.js +1 -0
  25. package/.output/public/assets/{badge-D0NFvUY5.js → badge-DJMW4YVM.js} +1 -1
  26. package/.output/public/assets/card-C4sBAMU-.js +1 -0
  27. package/.output/public/assets/check-CqWNyG93.js +1 -0
  28. package/.output/public/assets/chevron-right-DNbYTBX1.js +1 -0
  29. package/.output/public/assets/{circle-off-C7Muo0ss.js → circle-off-BCkZpskJ.js} +1 -1
  30. package/.output/public/assets/{clipboard-DQbOcrL7.js → clipboard-DZrZK5gR.js} +1 -1
  31. package/.output/public/assets/{console-features-api-DEXSwFtc.js → console-features-api-BO5V64P3.js} +1 -1
  32. package/.output/public/assets/{copy-DsuLj3oj.js → copy-CH1__JAW.js} +1 -1
  33. package/.output/public/assets/dialog-tCTZmAo8.js +1 -0
  34. package/.output/public/assets/{dist-Bf1BPKMs.js → dist-Bw_uSBJn.js} +1 -1
  35. package/.output/public/assets/empty-DsbLxQ1w.js +1 -0
  36. package/.output/public/assets/field-DL4OXTJ7.js +1 -0
  37. package/.output/public/assets/git-branch-ByZMEBxZ.js +1 -0
  38. package/.output/public/assets/history-wYnPoVmT.js +1 -0
  39. package/.output/public/assets/index-CAnjb7M2.js +10 -0
  40. package/.output/public/assets/{input-group-D_NfhUbX.js → input-group-B7jx0icS.js} +1 -1
  41. package/.output/public/assets/insights-DIs4nJI9.js +2 -0
  42. package/.output/public/assets/insights-DTF7C4jb.js +42 -0
  43. package/.output/public/assets/insights-api-B6Gj74n5.js +1 -0
  44. package/.output/public/assets/insights-bUk3ChoU.js +1 -0
  45. package/.output/public/assets/{insights-search-CYPrQVUC.js → insights-search-TfRz5kGG.js} +1 -1
  46. package/.output/public/assets/insights-usage-rpc-B4V-Qqo4.js +1 -0
  47. package/.output/public/assets/insights_.distribution-BPl5oRt4.js +2 -0
  48. package/.output/public/assets/{insights_.distribution-_dZi1_ay.js → insights_.distribution-BqfzAuAf.js} +1 -1
  49. package/.output/public/assets/insights_.distribution-BqtmnGTt.js +1 -0
  50. package/.output/public/assets/installations-6U8c_03X.js +1 -0
  51. package/.output/public/assets/{installations-Y_7QW_p8.js → installations-BU65zztK.js} +1 -1
  52. package/.output/public/assets/installations-D3MbzcFb.js +2 -0
  53. package/.output/public/assets/{key-round-DzBe6DHr.js → key-round-B-P_hhUB.js} +1 -1
  54. package/.output/public/assets/{link-DTEyW70e.js → link-CN3iHC4A.js} +2 -2
  55. package/.output/public/assets/{list-B6GeoQ_b.js → list-fFsS8Wxe.js} +1 -1
  56. package/.output/public/assets/loader-circle-GWIgH0fo.js +1 -0
  57. package/.output/public/assets/native-builds-BdzfAFnF.js +1 -0
  58. package/.output/public/assets/native-builds-CWwvuOXr.js +2 -0
  59. package/.output/public/assets/native-builds-Eh72Vr2G.js +1 -0
  60. package/.output/public/assets/native-builds_._buildId-33ksAlnZ.js +1 -0
  61. package/.output/public/assets/native-builds_._buildId-BVA5GnZP.js +2 -0
  62. package/.output/public/assets/native-builds_.devices-CElovmwq.js +1 -0
  63. package/.output/public/assets/native-builds_.devices-DWtcOVYO.js +2 -0
  64. package/.output/public/assets/{package-ytYrywZH.js → package-CXSDZsME.js} +1 -1
  65. package/.output/public/assets/plus-Cx-yFNd9.js +1 -0
  66. package/.output/public/assets/preload-helper-CRQjUQaZ.js +1 -0
  67. package/.output/public/assets/{refresh-cw-C-tvoCcE.js → refresh-cw-BgiOaFX3.js} +1 -1
  68. package/.output/public/assets/{relativeTime-DvyxGIsm.js → relativeTime-CBmDq8wh.js} +1 -1
  69. package/.output/public/assets/remote-config-B3oq9qR0.js +1 -0
  70. package/.output/public/assets/remote-config-CGbqsPh_.js +6 -0
  71. package/.output/public/assets/remote-config-D1OkfQKt.js +1 -0
  72. package/.output/public/assets/{rotate-cw-Clk5xTeE.js → rotate-cw-C1v7YuN7.js} +1 -1
  73. package/.output/public/assets/{routes-gQXSzO_n.js → routes-BTG3rg0l.js} +2 -2
  74. package/.output/public/assets/routes-CVbPjRKo.js +1 -0
  75. package/.output/public/assets/search-DiOSjaYL.js +1 -0
  76. package/.output/public/assets/select-CA8r-UUe.js +1 -0
  77. package/.output/public/assets/send-BgXZNiEA.js +1 -0
  78. package/.output/public/assets/{sidebar-Di9SN47G.js → sidebar-yC7KdImc.js} +1 -1
  79. package/.output/public/assets/smartphone-CxP0GGT6.js +1 -0
  80. package/.output/public/assets/styles-B0kzy3kp.css +2 -0
  81. package/.output/public/assets/switch-BTHWmKQ5.js +1 -0
  82. package/.output/public/assets/table-CwF7yxj4.js +1 -0
  83. package/.output/public/assets/tabs-CHNnCyvw.js +1 -0
  84. package/.output/public/assets/trash-2-CYISg7ZF.js +1 -0
  85. package/.output/public/assets/{undo-2-Bt0YXG26.js → undo-2-Bod3vw7x.js} +1 -1
  86. package/.output/public/assets/{useCompositeListItem-JmyDfo3-.js → useCompositeListItem-lAmUsXcc.js} +1 -1
  87. package/.output/public/assets/{useMutation-DbYw7boA.js → useMutation-w3qYaU2L.js} +1 -1
  88. package/.output/server/{__23tanstack-start-server-fn-resolver-z8rr63xV.mjs → __23tanstack-start-server-fn-resolver-BFiPs5uv.mjs} +85 -49
  89. package/.output/server/_libs/@base-ui/react+[...].mjs +1488 -183
  90. package/.output/server/_libs/@tanstack/react-router+[...].mjs +1 -1
  91. package/.output/server/_libs/@tanstack/react-router-ssr-query+[...].mjs +1 -1
  92. package/.output/server/_libs/_.mjs +1 -1
  93. package/.output/server/_libs/lucide-react.mjs +22 -2
  94. package/.output/server/_libs/next-themes.mjs +1 -1
  95. package/.output/server/_libs/react-redux+[...].mjs +1 -1
  96. package/.output/server/_libs/recharts+[...].mjs +1 -1
  97. package/.output/server/_libs/sonner.mjs +1 -1
  98. package/.output/server/_libs/tanstack__react-query.mjs +1 -1
  99. package/.output/server/_ssr/{-native-builds-search-M6t7EIt4.mjs → -native-builds-search-Mm_AZoRU.mjs} +8 -2
  100. package/.output/server/_ssr/{BundleIdDisplay-DRnAzJse.mjs → BundleIdDisplay-BSBR5eJ3.mjs} +3 -3
  101. package/.output/server/_ssr/{ConsoleFeatureUnavailable-BEU7r4aH.mjs → ConsoleFeatureUnavailable-DcZ4JBVq.mjs} +8 -8
  102. package/.output/server/_ssr/CopyableText-DgNEsByt.mjs +33 -0
  103. package/.output/server/_ssr/{EventDetails-CjT6o2sJ.mjs → EventDetails-CUHZuwei.mjs} +9 -9
  104. package/.output/server/_ssr/{HashValueDisplay-Bkim8r3-.mjs → HashValueDisplay-B9ORaCcP.mjs} +3 -3
  105. package/.output/server/_ssr/{InsightsPageHeader-Ctw4N3SZ.mjs → InsightsPageHeader-C0bJqC-n.mjs} +9 -9
  106. package/.output/server/_ssr/IosInstall-C5Y5gnDY.mjs +574 -0
  107. package/.output/server/_ssr/NativeBuildsNav-hFiyBaFW.mjs +38 -0
  108. package/.output/server/_ssr/{NotFoundPage-Bh3gFsR6.mjs → NotFoundPage-D4xRjmIA.mjs} +3 -3
  109. package/.output/server/_ssr/{PlatformIcon-CMLs3Wez.mjs → PlatformIcon-BpGOEXjU.mjs} +2 -2
  110. package/.output/server/_ssr/{RelativeTime-DjdCU0J7.mjs → RelativeTime-DnvxB666.mjs} +20 -9
  111. package/.output/server/_ssr/{RolloutPercentageBadge-BiIHw-V2.mjs → RolloutPercentageBadge-NBnIOzY9.mjs} +4 -4
  112. package/.output/server/_ssr/RowReason-B_jZN48d.mjs +169 -0
  113. package/.output/server/_ssr/{StoreSubmission-Cv59joPo.mjs → SandboxBadge-CFtTG1ZJ.mjs} +17 -17
  114. package/.output/server/_ssr/{TargetDisplay-D1PKOupt.mjs → TargetDisplay-0sb03v_6.mjs} +7 -33
  115. package/.output/server/_ssr/{alert-dialog-BOKQTpmP.mjs → alert-dialog-SLr1Q_AI.mjs} +2 -2
  116. package/.output/server/_ssr/{api-CDvGGB1B.mjs → api-CkgOQzSb.mjs} +74 -17
  117. package/.output/server/_ssr/{api-keys-DvbSgd9L.mjs → api-keys-BP7NJtoX.mjs} +2 -2
  118. package/.output/server/_ssr/{api-keys-NYJ0VaDB.mjs → api-keys-BcSzq0TA.mjs} +11 -11
  119. package/.output/server/_ssr/{api-keys-rpc-B0MrcD15.mjs → api-keys-rpc-IWPOq5vn.mjs} +3 -3
  120. package/.output/server/_ssr/{api-rpc-CIB9gcI7.mjs → api-rpc-cNJTB3v4.mjs} +48 -32
  121. package/.output/server/_ssr/{auth-rpc-DsIffEXe.mjs → auth-rpc-oaBbtxSP.mjs} +4 -4
  122. package/.output/server/_ssr/{auth.server-Dt9XHLs_.mjs → auth.server-WQw9JjMm.mjs} +587 -19
  123. package/.output/server/_ssr/{badge-KS3YftV5.mjs → badge-n3c0OTBQ.mjs} +2 -2
  124. package/.output/server/_ssr/{bundleActivity-BGVvqWx7.mjs → bundleActivity-BP40zYSt.mjs} +1 -1
  125. package/.output/server/_ssr/{card-CG5GqIoA.mjs → card-CYgCcRUd.mjs} +2 -2
  126. package/.output/server/_ssr/{config.server-CJs-9Zd_.mjs → config.server-R3KQbcML.mjs} +4 -4
  127. package/.output/server/_ssr/{console-access-ClmTMpo_.mjs → console-access-BLVi82IN.mjs} +2 -2
  128. package/.output/server/_ssr/{console-features-api-CpMYF0Pb.mjs → console-features-api-B2JvJOlE.mjs} +4 -4
  129. package/.output/server/_ssr/{console-features-rpc-D-dr-WF8.mjs → console-features-rpc-LAxQoSNw.mjs} +3 -3
  130. package/.output/server/_ssr/{console-features-CRP-pfov.mjs → console-features-xaGDhRC9.mjs} +1 -1
  131. package/.output/server/_ssr/deviceProfileToken-CwWb1lPq.mjs +82 -0
  132. package/.output/server/_ssr/{dialog-DvHMJkq7.mjs → dialog-eru_h5oK.mjs} +2 -2
  133. package/.output/server/_ssr/{downloadBundle-BX8ODCZT.mjs → downloadBundle-DnoYpi36.mjs} +1 -1
  134. package/.output/server/_ssr/{empty-Bx8DnyWN.mjs → empty-Bu4qodCx.mjs} +3 -3
  135. package/.output/server/_ssr/{failureReports-C_CmBF4x.mjs → failureReports-BA2eg11O.mjs} +3 -3
  136. package/.output/server/_ssr/{field-BVI4lxoz.mjs → field-DA5lwO5U.mjs} +3 -3
  137. package/.output/server/_ssr/foldedPage-CqpVk31Q.mjs +176 -0
  138. package/.output/server/_ssr/{getBundleChildren-BJTufthT.mjs → getBundleChildren-CdqFonhl.mjs} +1 -1
  139. package/.output/server/_ssr/{input-group-CpJwooTk.mjs → input-group-VV5E3q78.mjs} +2 -2
  140. package/.output/server/_ssr/{insights-b1hq1O0p.mjs → insights-BJIt1xuT.mjs} +2 -2
  141. package/.output/server/_ssr/{insights-B-VtObqr.mjs → insights-C23mopzv.mjs} +5 -5
  142. package/.output/server/_ssr/{insights-DxlHHXPK.mjs → insights-Ci82qdkq.mjs} +27 -27
  143. package/.output/server/_ssr/{insights-api-8PWQ7PiR.mjs → insights-api-BwXMKUSe.mjs} +5 -5
  144. package/.output/server/_ssr/{insights-errors-Bz3sWNZm.mjs → insights-errors-CXHg1lLV.mjs} +2 -2
  145. package/.output/server/_ssr/{insights-failures-DNQ9qVVf.mjs → insights-failures-7zH97WOO.mjs} +2 -2
  146. package/.output/server/_ssr/{insights-failures-rpc-pY2KV9HI.mjs → insights-failures-rpc-BuZ-jnby.mjs} +10 -10
  147. package/.output/server/_ssr/{insights-recovery-DOkpqnQ8.mjs → insights-recovery-BhOg6kz2.mjs} +1 -1
  148. package/.output/server/_ssr/{insights-recovery-rpc-CejmWL_y.mjs → insights-recovery-rpc-DrXSy9aA.mjs} +6 -6
  149. package/.output/server/_ssr/{insights-rpc-D_7d_AAJ.mjs → insights-rpc-DyrIZg3a.mjs} +3 -3
  150. package/.output/server/_ssr/{insights-search-CoMkZvRt.mjs → insights-search-CNkNB-aa.mjs} +3 -3
  151. package/.output/server/_ssr/{insights-usage-4KDIN3Kg.mjs → insights-usage-h8fipPTv.mjs} +1 -1
  152. package/.output/server/_ssr/{insights-usage-rpc-CrGZDHzO.mjs → insights-usage-rpc-C7UC1lom.mjs} +6 -6
  153. package/.output/server/_ssr/{insights-usage-rpc-B1XSuara.mjs → insights-usage-rpc-cTgmD-Ej.mjs} +5 -5
  154. package/.output/server/_ssr/{insightsUsage-DmQdJZqT.mjs → insightsUsage-BjSiV_X_.mjs} +3 -3
  155. package/.output/server/_ssr/{insights_.distribution-EOOOOTb6.mjs → insights_.distribution-BauOpBTE.mjs} +2 -2
  156. package/.output/server/_ssr/{insights_.distribution-CpqnDZNG.mjs → insights_.distribution-CIY_IGmh.mjs} +16 -16
  157. package/.output/server/_ssr/{insights_.distribution-B9sPDvG4.mjs → insights_.distribution-wfFKEv-Z.mjs} +5 -5
  158. package/.output/server/_ssr/{installations-BOI_y7Ma.mjs → installations-Ba3YVrAf.mjs} +13 -13
  159. package/.output/server/_ssr/{installations-dWlOOS7Y.mjs → installations-VzacOKHp.mjs} +2 -2
  160. package/.output/server/_ssr/{installations-D0_0hzdi.mjs → installations-jGW7nvEV.mjs} +4 -4
  161. package/.output/server/_ssr/ios-devices-rpc-Bhn7VVIh.mjs +138 -0
  162. package/.output/server/_ssr/iosDeviceProfile-_XT8TpgZ.mjs +176 -0
  163. package/.output/server/_ssr/iosDevices-Bc27J72d.mjs +129 -0
  164. package/.output/server/_ssr/listReleases-DYYA5alS.mjs +94 -0
  165. package/.output/server/_ssr/{native-builds-OUdRtp6m.mjs → native-builds-BXBkklfA.mjs} +28 -6
  166. package/.output/server/_ssr/{native-builds-Bx_az6YZ.mjs → native-builds-DZFJGcHy.mjs} +3 -3
  167. package/.output/server/_ssr/{native-builds-C721Rw23.mjs → native-builds-DiNkKHly.mjs} +221 -86
  168. package/.output/server/_ssr/{native-builds_._buildId-ubi48Sfs.mjs → native-builds_._buildId-CuM1PsT6.mjs} +108 -294
  169. package/.output/server/_ssr/{native-builds_._buildId-YItxv8j9.mjs → native-builds_._buildId-D0n4QZY6.mjs} +3 -3
  170. package/.output/server/_ssr/native-builds_.devices-D0JJlX8E.mjs +689 -0
  171. package/.output/server/_ssr/native-builds_.devices-DiM2FdcW.mjs +10 -0
  172. package/.output/server/_ssr/{nativeBuildDownloadLink-C0I8eLpS.mjs → nativeBuildDownloadLink-CvvWuhh0.mjs} +3 -3
  173. package/.output/server/_ssr/{nativeBuildInstall-CxG8K8TL.mjs → nativeBuildInstall-BqcVHBaD.mjs} +54 -7
  174. package/.output/server/_ssr/{nativeBuilds-CRLmvFaO.mjs → nativeBuilds-Cub0EUGN.mjs} +135 -13
  175. package/.output/server/_ssr/{publicConsoleBase-DvHYxDaG.mjs → publicConsoleBase-f67NLLXZ.mjs} +11 -3
  176. package/.output/server/_ssr/{release-adoption-C7sUFDwa.mjs → release-adoption-DeICczY7.mjs} +2 -2
  177. package/.output/server/_ssr/{release-adoption-rpc-DcZAYRWJ.mjs → release-adoption-rpc-Dm-5yAJG.mjs} +8 -8
  178. package/.output/server/_ssr/{releaseAdoption-D6ScSu-W.mjs → releaseAdoption-kHZo8P90.mjs} +3 -3
  179. package/.output/server/_ssr/{remote-config-gKqDKMxk.mjs → remote-config-D1BhIBKu.mjs} +3 -3
  180. package/.output/server/_ssr/{remote-config-DOcSXzxG.mjs → remote-config-D7RruPiO.mjs} +2 -2
  181. package/.output/server/_ssr/{remote-config-BZ_vGV97.mjs → remote-config-ZFm-l4Gi.mjs} +20 -20
  182. package/.output/server/_ssr/{remote-config-rpc-CVPd3V69.mjs → remote-config-rpc-C7AZy37o.mjs} +3 -3
  183. package/.output/server/_ssr/{router-Bcyej4cr.mjs → router-BGkGFMsT.mjs} +72 -75
  184. package/.output/server/_ssr/{routes-B10xsCh4.mjs → routes-CJJxz-Ak.mjs} +304 -230
  185. package/.output/server/_ssr/{routes-ddBRVSju.mjs → routes-CiJ2dhL9.mjs} +14 -13
  186. package/.output/server/_ssr/{runtime.server-wcHT2Cop.mjs → runtime.server-CkSbWaZm.mjs} +2 -2
  187. package/.output/server/_ssr/{schema-migration-rpc-iWZzLv70.mjs → schema-migration-rpc-D4YlwvGH.mjs} +3 -3
  188. package/.output/server/_ssr/{select-i4WT0c9r.mjs → select-BB8GE7OZ.mjs} +3 -3
  189. package/.output/server/_ssr/{server-CMgMPrDx.mjs → server-DAHTchcr.mjs} +5 -5
  190. package/.output/server/_ssr/{sidebar-mIQgB0iy.mjs → sidebar-CsKVgZHa.mjs} +3 -3
  191. package/.output/server/_ssr/ssr.mjs +1 -1
  192. package/.output/server/_ssr/{start-By4wHYjG.mjs → start-D3noqqOK.mjs} +1 -1
  193. package/.output/server/_ssr/{switch-DR8EAh5C.mjs → switch-BvvmP7Y3.mjs} +3 -3
  194. package/.output/server/_ssr/{table-DXmK6G7A.mjs → table-WKKzprFn.mjs} +2 -2
  195. package/.output/server/_ssr/{tabs-DAfypcYe.mjs → tabs-BJ-4SgmC.mjs} +4 -4
  196. package/.output/server/_ssr/{updateFailures-DNiv3S_y.mjs → updateFailures-D0bP_Ume.mjs} +3 -3
  197. package/.output/server/_tanstack-start-manifest_v-CSUJeG5D.mjs +219 -0
  198. package/.output/server/index.mjs +436 -366
  199. package/lib/index.d.mts +9 -0
  200. package/package.json +7 -30
  201. package/src/components/DataTable.tsx +21 -2
  202. package/src/components/FoldedRows.tsx +201 -0
  203. package/src/components/RowReason.tsx +56 -0
  204. package/src/components/features/native-builds/InstallCard.tsx +1 -1
  205. package/src/components/features/native-builds/IosDevicesPage.tsx +892 -0
  206. package/src/components/features/native-builds/IosInstall.tsx +292 -62
  207. package/src/components/features/native-builds/IpaDevicesCard.tsx +107 -0
  208. package/src/components/features/native-builds/NativeBuildDetailPage.tsx +7 -0
  209. package/src/components/features/native-builds/NativeBuildsNav.tsx +44 -0
  210. package/src/components/features/native-builds/NativeBuildsPage.tsx +2 -0
  211. package/src/components/features/native-builds/NativeBuildsTable.tsx +214 -30
  212. package/src/components/features/native-builds/OlderBuildLabel.tsx +61 -0
  213. package/src/index.ts +9 -0
  214. package/src/lib/api-rpc.ts +56 -29
  215. package/src/lib/api.ts +65 -2
  216. package/src/lib/ios-devices-api.ts +110 -0
  217. package/src/lib/ios-devices-rpc.ts +174 -0
  218. package/src/lib/native-builds.ts +72 -7
  219. package/src/lib/server/console-runtime.server.ts +9 -2
  220. package/src/lib/server/deviceProfileToken.ts +187 -0
  221. package/src/lib/server/foldedPage.ts +360 -0
  222. package/src/lib/server/iosDeviceProfile.ts +230 -0
  223. package/src/lib/server/iosDevices.ts +223 -0
  224. package/src/lib/server/listReleases.ts +101 -62
  225. package/src/lib/server/nativeBuildInstall.ts +138 -7
  226. package/src/lib/server/nativeBuilds.ts +221 -26
  227. package/src/routeTree.gen.ts +64 -67
  228. package/src/routes/-native-builds-search.ts +20 -0
  229. package/src/routes/[_]hot-updater/devices/device-response.ts +21 -0
  230. package/src/routes/[_]hot-updater/devices/device[.]mobileconfig.ts +17 -0
  231. package/src/routes/index.tsx +444 -299
  232. package/src/routes/native-builds_.devices.tsx +21 -0
  233. package/.output/public/assets/BundleIdDisplay-CP6rsdFO.js +0 -1
  234. package/.output/public/assets/RelativeTime-TCmpOVPg.js +0 -1
  235. package/.output/public/assets/StoreSubmission-CqSg880n.js +0 -1
  236. package/.output/public/assets/TargetDisplay-DwOaMOiI.js +0 -1
  237. package/.output/public/assets/api-LQJH44FU.js +0 -1
  238. package/.output/public/assets/api-keys-4w2-ofii.js +0 -1
  239. package/.output/public/assets/api-keys-uFY8FsN9.js +0 -1
  240. package/.output/public/assets/arrow-left-g9cKqXuC.js +0 -1
  241. package/.output/public/assets/arrow-right-CNII8TYn.js +0 -1
  242. package/.output/public/assets/arrow-up-right-DK8Zdg40.js +0 -1
  243. package/.output/public/assets/card-ulgg5xHn.js +0 -1
  244. package/.output/public/assets/check-CXVR3s3X.js +0 -1
  245. package/.output/public/assets/chevron-right-BoUXo82O.js +0 -1
  246. package/.output/public/assets/dialog-CLIaC82_.js +0 -1
  247. package/.output/public/assets/empty-Bhlj8PEo.js +0 -1
  248. package/.output/public/assets/field-q4sTYzNU.js +0 -1
  249. package/.output/public/assets/history-DakJoeSM.js +0 -1
  250. package/.output/public/assets/index-CJclLsbG.js +0 -10
  251. package/.output/public/assets/insights-0TUItqwh.js +0 -1
  252. package/.output/public/assets/insights-B75txQ_F.js +0 -42
  253. package/.output/public/assets/insights-C17Z0whn.js +0 -2
  254. package/.output/public/assets/insights-api-BVCXJsoV.js +0 -1
  255. package/.output/public/assets/insights-usage-rpc-BbFllvi_.js +0 -1
  256. package/.output/public/assets/insights_.distribution-AZcfvK7x.js +0 -1
  257. package/.output/public/assets/insights_.distribution-gDqNqI5E.js +0 -2
  258. package/.output/public/assets/installations-Ap2G2tDs.js +0 -1
  259. package/.output/public/assets/installations-D0g3xvw8.js +0 -2
  260. package/.output/public/assets/native-builds-Ba6cEZfm.js +0 -2
  261. package/.output/public/assets/native-builds-C3_-21we.js +0 -1
  262. package/.output/public/assets/native-builds_._buildId-BnP31v32.js +0 -1
  263. package/.output/public/assets/native-builds_._buildId-Cp9LJiMP.js +0 -2
  264. package/.output/public/assets/plus-BVhOauU3.js +0 -1
  265. package/.output/public/assets/preload-helper-B44EvKhG.js +0 -1
  266. package/.output/public/assets/remote-config-BRdy8QFR.js +0 -1
  267. package/.output/public/assets/remote-config-C9p5Pcdj.js +0 -6
  268. package/.output/public/assets/remote-config-CIAEArwq.js +0 -1
  269. package/.output/public/assets/routes-BLTF7nwe.js +0 -1
  270. package/.output/public/assets/search-nnvSOTEB.js +0 -1
  271. package/.output/public/assets/select-CBIU0_M1.js +0 -1
  272. package/.output/public/assets/smartphone-r0rRdPas.js +0 -1
  273. package/.output/public/assets/styles-BdlrKlVs.css +0 -2
  274. package/.output/public/assets/switch-CP6GsHmN.js +0 -1
  275. package/.output/public/assets/table-TUtVz-2l.js +0 -1
  276. package/.output/public/assets/tabs-CP3CSmtI.js +0 -1
  277. package/.output/public/assets/useInfiniteQuery-DX4WpBRG.js +0 -1
  278. package/.output/server/_ssr/listReleases-CQEceg8j.mjs +0 -79
  279. package/.output/server/_ssr/nativeBuildDevice-DJUAzAIj.mjs +0 -210
  280. package/.output/server/_tanstack-start-manifest_v-8M7ggCuB.mjs +0 -192
  281. package/src/lib/server/nativeBuildDevice.ts +0 -253
  282. package/src/routes/[_]hot-updater/native-builds/$buildId/device-response.ts +0 -17
  283. package/src/routes/[_]hot-updater/native-builds/$buildId/device.ts +0 -17
  284. package/src/routes/[_]hot-updater/native-builds/$buildId/device[.]mobileconfig.ts +0 -17
  285. /package/.output/public/assets/{uuidv7-cI6C63Fm.js → uuidv7-CVJ09bBG.js} +0 -0
  286. /package/.output/public/assets/{valueToPercent-B6X9rUJM.js → valueToPercent-Db73Kirz.js} +0 -0
@@ -0,0 +1,892 @@
1
+ import {
2
+ extractTimestampFromUUIDv7,
3
+ type IosDeviceRow,
4
+ type IosDeviceStatus,
5
+ } from "@hot-updater/plugin-core";
6
+ import { Link } from "@tanstack/react-router";
7
+ import dayjs from "dayjs";
8
+ import {
9
+ AlertTriangle,
10
+ Check,
11
+ HardDrive,
12
+ Loader2,
13
+ MoreHorizontal,
14
+ Pencil,
15
+ RefreshCw,
16
+ Smartphone,
17
+ Trash2,
18
+ } from "lucide-react";
19
+ import { type FormEvent, useEffect, useState } from "react";
20
+
21
+ import {
22
+ DataCard,
23
+ DataCardSkeletons,
24
+ DataCardsEmpty,
25
+ DataTable,
26
+ DataTableEmpty,
27
+ DataTableFrame,
28
+ DataTableFullRow,
29
+ DataTableSkeletonRows,
30
+ } from "@/components/DataTable";
31
+ import { QrCode } from "@/components/QrCode";
32
+ import { RelativeTime } from "@/components/RelativeTime";
33
+ import {
34
+ Alert,
35
+ AlertAction,
36
+ AlertDescription,
37
+ AlertTitle,
38
+ } from "@/components/ui/alert";
39
+ import {
40
+ AlertDialog,
41
+ AlertDialogAction,
42
+ AlertDialogCancel,
43
+ AlertDialogContent,
44
+ AlertDialogDescription,
45
+ AlertDialogFooter,
46
+ AlertDialogHeader,
47
+ AlertDialogTitle,
48
+ } from "@/components/ui/alert-dialog";
49
+ import { Badge } from "@/components/ui/badge";
50
+ import { Button, buttonVariants } from "@/components/ui/button";
51
+ import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card";
52
+ import {
53
+ Dialog,
54
+ DialogContent,
55
+ DialogDescription,
56
+ DialogFooter,
57
+ DialogHeader,
58
+ DialogTitle,
59
+ } from "@/components/ui/dialog";
60
+ import {
61
+ DropdownMenu,
62
+ DropdownMenuContent,
63
+ DropdownMenuItem,
64
+ DropdownMenuSeparator,
65
+ DropdownMenuTrigger,
66
+ } from "@/components/ui/dropdown-menu";
67
+ import {
68
+ Field,
69
+ FieldDescription,
70
+ FieldError,
71
+ FieldGroup,
72
+ FieldLabel,
73
+ } from "@/components/ui/field";
74
+ import { Input } from "@/components/ui/input";
75
+ import {
76
+ Select,
77
+ SelectContent,
78
+ SelectGroup,
79
+ SelectItem,
80
+ SelectTrigger,
81
+ SelectValue,
82
+ } from "@/components/ui/select";
83
+ import { SidebarTrigger } from "@/components/ui/sidebar";
84
+ import { Skeleton } from "@/components/ui/skeleton";
85
+ import { TableCell, TableHead, TableRow } from "@/components/ui/table";
86
+ import { useIsMobile } from "@/hooks/use-mobile";
87
+ import {
88
+ useApproveIosDeviceMutation,
89
+ useIosDeviceProfileLinkQuery,
90
+ useIosDevicesQuery,
91
+ useRemoveIosDeviceMutation,
92
+ useRenameIosDeviceMutation,
93
+ } from "@/lib/ios-devices-api";
94
+ import type { IosDevicesView } from "@/lib/ios-devices-rpc";
95
+ import {
96
+ consolePathOf,
97
+ IOS_DEVICES_ADD_COMMAND,
98
+ IOS_DEVICES_PATH,
99
+ iosDeviceProfileUrl,
100
+ maskIosUdid,
101
+ } from "@/lib/native-builds";
102
+ import type { IosDevicesSearch } from "@/routes/-native-builds-search";
103
+
104
+ import { CopyableText } from "./CopyableText";
105
+ import { useIosDevice } from "./IosInstall";
106
+ import { NativeBuildsNav } from "./NativeBuildsNav";
107
+
108
+ const STATUS_LABELS: Record<IosDeviceStatus, string> = {
109
+ pending: "Requested",
110
+ approved: "Approved",
111
+ registered: "Registered",
112
+ };
113
+
114
+ /**
115
+ * Only a request waits on someone, so only it takes a status color; the
116
+ * other states are the normal course and stay neutral.
117
+ */
118
+ const STATUS_BADGES: Record<
119
+ IosDeviceStatus,
120
+ "warning" | "secondary" | "muted"
121
+ > = {
122
+ pending: "warning",
123
+ approved: "secondary",
124
+ registered: "muted",
125
+ };
126
+
127
+ const ALL = "all";
128
+ const COLUMNS = 6;
129
+
130
+ type Viewer = IosDevicesView["viewer"];
131
+
132
+ /** The Console's path from this page, so links work under a base path. */
133
+ const consolePath = () =>
134
+ window.location.pathname.endsWith(IOS_DEVICES_PATH)
135
+ ? window.location.pathname.slice(0, -IOS_DEVICES_PATH.length)
136
+ : consolePathOf(window.location, "");
137
+
138
+ /** Who may act on a row, decided again on the server. */
139
+ const actionsFor = (device: IosDeviceRow, viewer: Viewer) => ({
140
+ approve: viewer.canApprove && device.status === "pending",
141
+ rename: viewer.canApprove,
142
+ remove: viewer.canApprove,
143
+ withdraw:
144
+ !viewer.canApprove &&
145
+ device.status === "pending" &&
146
+ device.requested_by === viewer.email,
147
+ });
148
+
149
+ function AppleError({ device }: { readonly device: IosDeviceRow }) {
150
+ return device.apple_error === null ? null : (
151
+ <span className="max-w-64 text-xs whitespace-normal text-muted-foreground">
152
+ {device.apple_error}
153
+ </span>
154
+ );
155
+ }
156
+
157
+ function DeviceStatus({
158
+ device,
159
+ withError = true,
160
+ }: {
161
+ readonly device: IosDeviceRow;
162
+ /** Apple's reason under the badge; a card shows it on its own line. */
163
+ readonly withError?: boolean;
164
+ }) {
165
+ return (
166
+ <div className="flex min-w-0 shrink-0 flex-col items-start gap-1">
167
+ <Badge variant={STATUS_BADGES[device.status]}>
168
+ {STATUS_LABELS[device.status]}
169
+ </Badge>
170
+ {withError ? <AppleError device={device} /> : null}
171
+ </div>
172
+ );
173
+ }
174
+
175
+ function DeviceBuild({ device }: { readonly device: IosDeviceRow }) {
176
+ if (device.build_id === null) {
177
+ return <span className="text-muted-foreground">—</span>;
178
+ }
179
+ let label = "A build";
180
+ try {
181
+ label = `Build of ${dayjs(extractTimestampFromUUIDv7(device.build_id)).format("MMM D")}`;
182
+ } catch {
183
+ // An ID that isn't a UUIDv7 keeps the plain label.
184
+ }
185
+ return (
186
+ <Link
187
+ className="text-xs font-medium underline-offset-4 hover:underline"
188
+ params={{ buildId: device.build_id }}
189
+ to="/native-builds/$buildId"
190
+ >
191
+ {label}
192
+ </Link>
193
+ );
194
+ }
195
+
196
+ type NameTarget = {
197
+ readonly kind: "approve" | "rename";
198
+ readonly device: IosDeviceRow;
199
+ };
200
+ type DialogTarget =
201
+ | NameTarget
202
+ | { readonly kind: "remove"; readonly device: IosDeviceRow }
203
+ | null;
204
+
205
+ function DeviceActions({
206
+ device,
207
+ viewer,
208
+ onOpen,
209
+ }: {
210
+ readonly device: IosDeviceRow;
211
+ readonly viewer: Viewer;
212
+ readonly onOpen: (target: DialogTarget) => void;
213
+ }) {
214
+ const can = actionsFor(device, viewer);
215
+ if (!can.approve && !can.rename && !can.remove && !can.withdraw) return null;
216
+ return (
217
+ <div className="flex items-center justify-end gap-1">
218
+ {can.approve ? (
219
+ <Button
220
+ className="h-11 sm:h-7"
221
+ onClick={() => onOpen({ kind: "approve", device })}
222
+ size="sm"
223
+ >
224
+ <Check data-icon="inline-start" />
225
+ Approve
226
+ </Button>
227
+ ) : null}
228
+ {can.withdraw ? (
229
+ <Button
230
+ className="h-11 sm:h-7"
231
+ onClick={() => onOpen({ kind: "remove", device })}
232
+ size="sm"
233
+ variant="outline"
234
+ >
235
+ Withdraw
236
+ </Button>
237
+ ) : null}
238
+ {can.rename || can.remove ? (
239
+ <DropdownMenu>
240
+ <DropdownMenuTrigger
241
+ render={
242
+ <Button
243
+ aria-label={`More actions for ${device.name}`}
244
+ className="size-11 sm:size-7"
245
+ size="icon-sm"
246
+ variant="ghost"
247
+ />
248
+ }
249
+ >
250
+ <MoreHorizontal aria-hidden="true" />
251
+ </DropdownMenuTrigger>
252
+ <DropdownMenuContent align="end">
253
+ <DropdownMenuItem
254
+ onClick={() => onOpen({ kind: "rename", device })}
255
+ >
256
+ <Pencil aria-hidden="true" />
257
+ Rename
258
+ </DropdownMenuItem>
259
+ <DropdownMenuSeparator />
260
+ <DropdownMenuItem
261
+ onClick={() => onOpen({ kind: "remove", device })}
262
+ variant="destructive"
263
+ >
264
+ <Trash2 aria-hidden="true" />
265
+ {device.status === "pending" ? "Decline" : "Remove"}
266
+ </DropdownMenuItem>
267
+ </DropdownMenuContent>
268
+ </DropdownMenu>
269
+ ) : null}
270
+ </div>
271
+ );
272
+ }
273
+
274
+ function DeviceRow({
275
+ device,
276
+ viewer,
277
+ onOpen,
278
+ }: {
279
+ readonly device: IosDeviceRow;
280
+ readonly viewer: Viewer;
281
+ readonly onOpen: (target: DialogTarget) => void;
282
+ }) {
283
+ return (
284
+ <TableRow>
285
+ <TableCell className="font-medium">{device.name}</TableCell>
286
+ <TableCell>
287
+ <span className="font-mono text-xs" title={device.udid} translate="no">
288
+ {maskIosUdid(device.udid)}
289
+ </span>
290
+ </TableCell>
291
+ <TableCell className="text-xs">
292
+ {device.requested_by ?? (
293
+ <span className="text-muted-foreground">Terminal</span>
294
+ )}
295
+ </TableCell>
296
+ <TableCell>
297
+ <DeviceStatus device={device} />
298
+ </TableCell>
299
+ <TableCell className="text-xs">
300
+ <RelativeTime ms={device.created_at_ms} />
301
+ </TableCell>
302
+ <TableCell>
303
+ <DeviceBuild device={device} />
304
+ </TableCell>
305
+ <TableCell className="text-right">
306
+ <DeviceActions device={device} onOpen={onOpen} viewer={viewer} />
307
+ </TableCell>
308
+ </TableRow>
309
+ );
310
+ }
311
+
312
+ function DeviceCard({
313
+ device,
314
+ viewer,
315
+ onOpen,
316
+ }: {
317
+ readonly device: IosDeviceRow;
318
+ readonly viewer: Viewer;
319
+ readonly onOpen: (target: DialogTarget) => void;
320
+ }) {
321
+ return (
322
+ <DataCard className="cursor-default gap-3">
323
+ <div className="flex min-w-0 items-start justify-between gap-3">
324
+ <div className="flex min-w-0 flex-col gap-0.5">
325
+ <p className="truncate text-sm font-medium">{device.name}</p>
326
+ <p className="font-mono text-xs text-muted-foreground" translate="no">
327
+ {maskIosUdid(device.udid)}
328
+ </p>
329
+ </div>
330
+ <DeviceStatus device={device} withError={false} />
331
+ </div>
332
+ <AppleError device={device} />
333
+ <p className="flex flex-wrap items-center gap-x-1.5 text-xs text-muted-foreground">
334
+ <span>{device.requested_by ?? "Terminal"}</span>
335
+ <span aria-hidden="true">·</span>
336
+ <RelativeTime ms={device.created_at_ms} />
337
+ {device.build_id === null ? null : (
338
+ <>
339
+ <span aria-hidden="true">·</span>
340
+ <DeviceBuild device={device} />
341
+ </>
342
+ )}
343
+ </p>
344
+ <DeviceActions device={device} onOpen={onOpen} viewer={viewer} />
345
+ </DataCard>
346
+ );
347
+ }
348
+
349
+ /** Name a device: approving a request, or renaming any device. */
350
+ function NameDialog({
351
+ target,
352
+ onClose,
353
+ }: {
354
+ readonly target: NameTarget;
355
+ readonly onClose: () => void;
356
+ }) {
357
+ const approve = useApproveIosDeviceMutation();
358
+ const rename = useRenameIosDeviceMutation();
359
+ const mutation = target.kind === "approve" ? approve : rename;
360
+ const [name, setName] = useState(target.device.name);
361
+ const trimmed = name.trim();
362
+ const submit = (event: FormEvent) => {
363
+ event.preventDefault();
364
+ if (trimmed === "") return;
365
+ mutation.mutate(
366
+ { id: target.device.id, name: trimmed },
367
+ { onSuccess: onClose },
368
+ );
369
+ };
370
+ return (
371
+ <Dialog onOpenChange={(open) => (open ? null : onClose())} open>
372
+ <DialogContent>
373
+ <DialogHeader>
374
+ <DialogTitle>
375
+ {target.kind === "approve"
376
+ ? `Approve ${target.device.name}?`
377
+ : `Rename ${target.device.name}`}
378
+ </DialogTitle>
379
+ <DialogDescription>
380
+ {target.kind === "approve"
381
+ ? "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."
382
+ : "The registry shows this name. The next ad hoc build doesn't rename it at Apple."}
383
+ </DialogDescription>
384
+ </DialogHeader>
385
+ <form onSubmit={submit}>
386
+ <FieldGroup>
387
+ {target.kind === "approve" ? (
388
+ <dl className="grid grid-cols-[auto_minmax(0,1fr)] gap-x-4 gap-y-1 text-sm">
389
+ <dt className="text-muted-foreground">Requested by</dt>
390
+ <dd className="truncate">
391
+ {target.device.requested_by ?? "Terminal"}
392
+ </dd>
393
+ <dt className="text-muted-foreground">UDID</dt>
394
+ <dd className="font-mono text-xs" translate="no">
395
+ {maskIosUdid(target.device.udid)}
396
+ </dd>
397
+ </dl>
398
+ ) : null}
399
+ <Field data-invalid={mutation.isError || undefined}>
400
+ <FieldLabel htmlFor="ios-device-dialog-name">Name</FieldLabel>
401
+ <Input
402
+ autoComplete="off"
403
+ id="ios-device-dialog-name"
404
+ maxLength={100}
405
+ onChange={(event) => setName(event.target.value)}
406
+ value={name}
407
+ />
408
+ {target.kind === "approve" ? (
409
+ <FieldDescription>
410
+ The iPhone's ID comes from the person who asked. Approve
411
+ devices you recognize.
412
+ </FieldDescription>
413
+ ) : null}
414
+ <FieldError>
415
+ {mutation.isError
416
+ ? `Couldn't ${target.kind === "approve" ? "approve" : "rename"} ${target.device.name}. Check your connection and try again.`
417
+ : null}
418
+ </FieldError>
419
+ </Field>
420
+ </FieldGroup>
421
+ <DialogFooter className="mt-4">
422
+ <Button
423
+ className="h-11 sm:h-8"
424
+ disabled={trimmed === "" || mutation.isPending}
425
+ type="submit"
426
+ >
427
+ {mutation.isPending ? (
428
+ <Loader2 className="animate-spin" data-icon="inline-start" />
429
+ ) : (
430
+ <Check data-icon="inline-start" />
431
+ )}
432
+ {target.kind === "approve" ? "Approve" : "Rename"}
433
+ </Button>
434
+ </DialogFooter>
435
+ </form>
436
+ </DialogContent>
437
+ </Dialog>
438
+ );
439
+ }
440
+
441
+ function RemoveDialog({
442
+ device,
443
+ viewer,
444
+ onClose,
445
+ }: {
446
+ readonly device: IosDeviceRow;
447
+ readonly viewer: Viewer;
448
+ readonly onClose: () => void;
449
+ }) {
450
+ const remove = useRemoveIosDeviceMutation();
451
+ const withdraw = !viewer.canApprove;
452
+ const decline = device.status === "pending";
453
+ return (
454
+ <AlertDialog onOpenChange={(open) => (open ? null : onClose())} open>
455
+ <AlertDialogContent>
456
+ <AlertDialogHeader>
457
+ <AlertDialogTitle>
458
+ {withdraw
459
+ ? `Withdraw ${device.name}?`
460
+ : decline
461
+ ? `Decline ${device.name}?`
462
+ : `Remove ${device.name}?`}
463
+ </AlertDialogTitle>
464
+ <AlertDialogDescription>
465
+ {decline
466
+ ? "It leaves the list. Its owner can request it again."
467
+ : "It leaves the registry, but it stays in new ad hoc builds while it's enabled in your Apple account: Xcode's automatic ad hoc profile takes every enabled device on the team. A build that is running may already have registered it."}
468
+ </AlertDialogDescription>
469
+ </AlertDialogHeader>
470
+ {decline || !viewer.canApprove ? null : (
471
+ <div className="flex min-w-0 flex-col gap-1.5 text-xs text-muted-foreground [&_code]:break-words [&_code]:whitespace-normal">
472
+ <p>
473
+ To keep it out of new builds, disable it at Apple from a terminal.
474
+ Its slot isn't returned until the membership year renews.
475
+ </p>
476
+ <CopyableText
477
+ label="the command that disables it"
478
+ value={`npx hot-updater native-build devices remove --udid ${device.udid}`}
479
+ wrap
480
+ />
481
+ </div>
482
+ )}
483
+ {remove.isError ? (
484
+ <p className="text-xs text-destructive" role="alert">
485
+ Couldn't {withdraw ? "withdraw" : decline ? "decline" : "remove"}{" "}
486
+ {device.name}. Check your connection and try again.
487
+ </p>
488
+ ) : null}
489
+ <AlertDialogFooter>
490
+ <AlertDialogCancel disabled={remove.isPending}>
491
+ Cancel
492
+ </AlertDialogCancel>
493
+ <AlertDialogAction
494
+ disabled={remove.isPending}
495
+ onClick={(event) => {
496
+ event.preventDefault();
497
+ remove.mutate({ udid: device.udid }, { onSuccess: onClose });
498
+ }}
499
+ variant="destructive"
500
+ >
501
+ {remove.isPending ? (
502
+ <Loader2 className="animate-spin" data-icon="inline-start" />
503
+ ) : null}
504
+ {withdraw ? "Withdraw" : decline ? "Decline" : "Remove"}
505
+ </AlertDialogAction>
506
+ </AlertDialogFooter>
507
+ </AlertDialogContent>
508
+ </AlertDialog>
509
+ );
510
+ }
511
+
512
+ /**
513
+ * Where an iPhone joins the list: on a computer, a QR code of this page; on
514
+ * the iPhone, its name and the profile that reads its UDID, signed for the
515
+ * person who is signed in.
516
+ */
517
+ function RegisterCard({
518
+ view,
519
+ devices,
520
+ }: {
521
+ readonly view: IosDevicesView | undefined;
522
+ readonly devices: readonly IosDeviceRow[] | undefined;
523
+ }) {
524
+ const phone = useIosDevice();
525
+ const [name, setName] = useState<string | null>(null);
526
+ const typed = name ?? view?.defaultName ?? "";
527
+ // The link is signed for the name as typed; a pause before signing again.
528
+ const [signed, setSigned] = useState(typed);
529
+ useEffect(() => {
530
+ const timer = setTimeout(() => setSigned(typed.trim()), 400);
531
+ return () => clearTimeout(timer);
532
+ }, [typed]);
533
+ const onPhone = phone?.ios === true;
534
+ const link = useIosDeviceProfileLinkQuery(
535
+ { mode: "register", name: signed || "iPhone" },
536
+ onPhone && view?.registration === "ready",
537
+ );
538
+ const https = phone === null || window.location.protocol === "https:";
539
+ const back =
540
+ phone?.requested && phone.udid !== null
541
+ ? devices?.find((device) => device.udid === phone.udid?.toLowerCase())
542
+ : undefined;
543
+
544
+ const body = (() => {
545
+ // The server renders this without a browser: where it is and what it is
546
+ // are read once the page mounts.
547
+ if (phone === null) {
548
+ return <Skeleton aria-label="Loading" className="h-36 w-full" />;
549
+ }
550
+ if (back !== undefined) {
551
+ return (
552
+ <p className="text-sm" role="status">
553
+ <span className="font-medium">{back.name}</span> ·{" "}
554
+ {STATUS_LABELS[back.status]}.{" "}
555
+ {back.status === "pending"
556
+ ? "A maintainer approves it next, and it joins the next ad hoc build."
557
+ : "It joins the next ad hoc build."}
558
+ </p>
559
+ );
560
+ }
561
+ if (view?.registration === "local-console") {
562
+ return (
563
+ <p className="text-xs text-muted-foreground" role="status">
564
+ iPhones register through your hosted Console: an iPhone can't reach
565
+ this computer's.
566
+ </p>
567
+ );
568
+ }
569
+ if (view?.registration === "no-secret") {
570
+ return (
571
+ <p className="text-xs text-muted-foreground" role="status">
572
+ Set BETTER_AUTH_SECRET on this Console to register iPhones.
573
+ </p>
574
+ );
575
+ }
576
+ if (!onPhone) {
577
+ return (
578
+ <div className="flex flex-col items-start gap-4 sm:flex-row sm:items-center">
579
+ <QrCode
580
+ className="size-36 shrink-0"
581
+ label="Open this page on an iPhone"
582
+ value={`${window.location.origin}${consolePath()}${IOS_DEVICES_PATH}`}
583
+ />
584
+ <div className="flex min-w-0 flex-col gap-1">
585
+ <p className="text-sm font-medium">
586
+ Open this page on the iPhone, in Safari.
587
+ </p>
588
+ <p className="text-xs text-muted-foreground">
589
+ It installs a profile that reads the iPhone's ID, then lists the
590
+ iPhone here as requested. Nothing stays installed.
591
+ </p>
592
+ </div>
593
+ </div>
594
+ );
595
+ }
596
+ if (!https) {
597
+ return (
598
+ <p className="text-xs text-muted-foreground" role="status">
599
+ iPhones need this Console on HTTPS.
600
+ </p>
601
+ );
602
+ }
603
+ if (link.data?.status === "local-console") {
604
+ return (
605
+ <p className="text-xs text-muted-foreground" role="status">
606
+ iPhones register through your hosted Console: an iPhone can't reach
607
+ this computer's.
608
+ </p>
609
+ );
610
+ }
611
+ if (link.data?.status === "no-secret") {
612
+ return (
613
+ <p className="text-xs text-muted-foreground" role="status">
614
+ Set {link.data.secretName} on this Console to register iPhones.
615
+ </p>
616
+ );
617
+ }
618
+ return (
619
+ <div className="flex min-w-0 flex-col gap-3">
620
+ <Field>
621
+ <FieldLabel htmlFor="ios-device-register-name">
622
+ This iPhone's name
623
+ </FieldLabel>
624
+ <Input
625
+ autoComplete="off"
626
+ className="h-11"
627
+ id="ios-device-register-name"
628
+ maxLength={100}
629
+ onChange={(event) => setName(event.target.value)}
630
+ value={typed}
631
+ />
632
+ </Field>
633
+ {link.data?.status === "issued" && signed === typed.trim() ? (
634
+ <a
635
+ className={buttonVariants({
636
+ className: "h-auto min-h-11 w-full whitespace-normal",
637
+ })}
638
+ href={iosDeviceProfileUrl(consolePath(), link.data.token)}
639
+ >
640
+ <Smartphone data-icon="inline-start" />
641
+ Install profile
642
+ </a>
643
+ ) : (
644
+ <Skeleton
645
+ aria-label="Preparing the profile"
646
+ className="h-11 w-full"
647
+ />
648
+ )}
649
+ <p className="text-xs text-muted-foreground">
650
+ Safari only. Allow the download, then install it in Settings, where
651
+ iOS calls it not signed. Safari comes back here, and nothing stays
652
+ installed.
653
+ </p>
654
+ </div>
655
+ );
656
+ })();
657
+
658
+ return (
659
+ <Card className="shadow-sm">
660
+ <CardHeader className="border-b px-4 py-3">
661
+ <CardTitle className="text-sm">
662
+ <h2>Register an iPhone</h2>
663
+ </CardTitle>
664
+ </CardHeader>
665
+ <CardContent className="p-4 sm:p-6">{body}</CardContent>
666
+ </Card>
667
+ );
668
+ }
669
+
670
+ /**
671
+ * The iOS device registry inside Native builds: the iPhones and iPads a team
672
+ * asked to install ad hoc builds on. Testers register from an iPhone,
673
+ * approvers approve, rename, and remove, and the next ad hoc build registers
674
+ * what was approved with Apple. Android builds need none of this.
675
+ */
676
+ export function IosDevicesPage({
677
+ search,
678
+ onSearchChange,
679
+ }: {
680
+ readonly search: IosDevicesSearch;
681
+ readonly onSearchChange: (search: IosDevicesSearch) => void;
682
+ }) {
683
+ const isMobile = useIsMobile();
684
+ const query = useIosDevicesQuery(search.status);
685
+ const view = query.data;
686
+ const rows = view?.devices;
687
+ const [dialog, setDialog] = useState<DialogTarget>(null);
688
+ const close = () => setDialog(null);
689
+
690
+ const empty = (
691
+ <DataTableEmpty
692
+ icon={Smartphone}
693
+ title={
694
+ search.status === undefined
695
+ ? "No iPhones yet"
696
+ : `No ${STATUS_LABELS[search.status].toLowerCase()} iPhones`
697
+ }
698
+ >
699
+ {search.status === undefined ? (
700
+ <p>Open this page on an iPhone to register it.</p>
701
+ ) : (
702
+ <Button
703
+ className="h-11 sm:h-7"
704
+ onClick={() => onSearchChange({})}
705
+ size="sm"
706
+ variant="outline"
707
+ >
708
+ Show all
709
+ </Button>
710
+ )}
711
+ </DataTableEmpty>
712
+ );
713
+
714
+ return (
715
+ <div className="flex h-svh min-h-0 min-w-0 flex-col">
716
+ <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">
717
+ <SidebarTrigger className="-ml-1 size-11 lg:size-7" />
718
+ <div className="flex items-center gap-1.5">
719
+ <HardDrive
720
+ aria-hidden="true"
721
+ className="size-3.5 text-muted-foreground"
722
+ />
723
+ <h1 className="text-sm font-medium">Native builds</h1>
724
+ </div>
725
+ <p className="basis-full pl-12 text-xs text-muted-foreground sm:basis-auto sm:pl-0">
726
+ The iPhones and iPads ad hoc builds install on. Android needs none.
727
+ </p>
728
+ </header>
729
+
730
+ <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">
731
+ <NativeBuildsNav current="devices" />
732
+ <RegisterCard devices={rows} view={view} />
733
+ {view !== undefined && !view.viewer.approversConfigured ? (
734
+ <div className="flex min-w-0 flex-col gap-1.5 text-xs text-muted-foreground">
735
+ <p>Nobody approves in this Console. Approve from a terminal:</p>
736
+ <CopyableText
737
+ label="the approve command"
738
+ value={IOS_DEVICES_ADD_COMMAND}
739
+ />
740
+ </div>
741
+ ) : null}
742
+ <div className="flex items-center gap-2">
743
+ <Select
744
+ items={[
745
+ { label: "All statuses", value: ALL },
746
+ ...(Object.keys(STATUS_LABELS) as IosDeviceStatus[]).map(
747
+ (status) => ({ label: STATUS_LABELS[status], value: status }),
748
+ ),
749
+ ]}
750
+ onValueChange={(value) =>
751
+ onSearchChange(
752
+ value === null || value === ALL
753
+ ? {}
754
+ : { status: value as IosDeviceStatus },
755
+ )
756
+ }
757
+ value={search.status ?? ALL}
758
+ >
759
+ <SelectTrigger
760
+ aria-label="Status"
761
+ 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"
762
+ >
763
+ <SelectValue />
764
+ </SelectTrigger>
765
+ <SelectContent>
766
+ <SelectGroup>
767
+ <SelectItem value={ALL}>All statuses</SelectItem>
768
+ {(Object.keys(STATUS_LABELS) as IosDeviceStatus[]).map(
769
+ (status) => (
770
+ <SelectItem key={status} value={status}>
771
+ {STATUS_LABELS[status]}
772
+ </SelectItem>
773
+ ),
774
+ )}
775
+ </SelectGroup>
776
+ </SelectContent>
777
+ </Select>
778
+ <Button
779
+ aria-label="Refresh iOS devices"
780
+ className="ml-auto size-11 sm:size-7"
781
+ disabled={query.isFetching}
782
+ onClick={() => void query.refetch()}
783
+ size="icon-sm"
784
+ variant="ghost"
785
+ >
786
+ <RefreshCw aria-hidden="true" />
787
+ </Button>
788
+ </div>
789
+ {query.isError ? (
790
+ <Alert variant="destructive">
791
+ <AlertTriangle />
792
+ <AlertTitle>iOS devices couldn't be loaded</AlertTitle>
793
+ <AlertDescription>
794
+ Check your connection and try again.
795
+ </AlertDescription>
796
+ <AlertAction>
797
+ <Button
798
+ onClick={() => void query.refetch()}
799
+ size="xs"
800
+ variant="outline"
801
+ >
802
+ <RefreshCw data-icon="inline-start" />
803
+ Retry
804
+ </Button>
805
+ </AlertAction>
806
+ </Alert>
807
+ ) : (
808
+ <DataTableFrame>
809
+ {isMobile ? (
810
+ <div
811
+ aria-busy={query.isPlaceholderData}
812
+ aria-label="iOS devices"
813
+ className="aria-busy:opacity-60"
814
+ role="list"
815
+ >
816
+ {query.isLoading ? (
817
+ <DataCardSkeletons label="Loading iOS devices" />
818
+ ) : rows?.length === 0 ? (
819
+ <DataCardsEmpty>{empty}</DataCardsEmpty>
820
+ ) : (
821
+ rows?.map((device) => (
822
+ <div
823
+ className="border-b last:border-b-0"
824
+ key={device.id}
825
+ role="listitem"
826
+ >
827
+ <DeviceCard
828
+ device={device}
829
+ onOpen={setDialog}
830
+ viewer={view!.viewer}
831
+ />
832
+ </div>
833
+ ))
834
+ )}
835
+ </div>
836
+ ) : (
837
+ <DataTable
838
+ aria-busy={query.isPlaceholderData}
839
+ aria-label="iOS devices"
840
+ className="aria-busy:opacity-60"
841
+ header={
842
+ <>
843
+ <TableHead>Name</TableHead>
844
+ <TableHead>UDID</TableHead>
845
+ <TableHead>Requested by</TableHead>
846
+ <TableHead>Status</TableHead>
847
+ <TableHead>Added</TableHead>
848
+ <TableHead>Build</TableHead>
849
+ <TableHead className="text-right">
850
+ <span className="sr-only">Actions</span>
851
+ </TableHead>
852
+ </>
853
+ }
854
+ >
855
+ {query.isLoading ? (
856
+ <DataTableSkeletonRows
857
+ columns={COLUMNS + 1}
858
+ label="Loading iOS devices"
859
+ />
860
+ ) : rows?.length === 0 ? (
861
+ <DataTableFullRow columns={COLUMNS + 1}>
862
+ {empty}
863
+ </DataTableFullRow>
864
+ ) : (
865
+ rows?.map((device) => (
866
+ <DeviceRow
867
+ device={device}
868
+ key={device.id}
869
+ onOpen={setDialog}
870
+ viewer={view!.viewer}
871
+ />
872
+ ))
873
+ )}
874
+ </DataTable>
875
+ )}
876
+ </DataTableFrame>
877
+ )}
878
+ </div>
879
+ {dialog !== null && dialog.kind !== "remove" ? (
880
+ <NameDialog key={dialog.device.id} onClose={close} target={dialog} />
881
+ ) : null}
882
+ {dialog?.kind === "remove" && view !== undefined ? (
883
+ <RemoveDialog
884
+ device={dialog.device}
885
+ key={dialog.device.id}
886
+ onClose={close}
887
+ viewer={view.viewer}
888
+ />
889
+ ) : null}
890
+ </div>
891
+ );
892
+ }