create-expo-updates-server 0.3.0 → 0.6.0

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 (191) hide show
  1. package/README.md +4 -2
  2. package/dist/template/Dockerfile +4 -6
  3. package/dist/template/README.md +5 -10
  4. package/dist/template/app/api/admin/device-favorites/route.test.ts +125 -0
  5. package/dist/template/app/api/admin/device-favorites/route.ts +91 -0
  6. package/dist/template/app/api/admin/distribution-history/restore/route.ts +39 -0
  7. package/dist/template/app/api/admin/distribution-history/route.test.ts +55 -0
  8. package/dist/template/app/api/admin/distribution-history/route.ts +24 -0
  9. package/dist/template/app/api/admin/updates/[encodedKey]/deactivate/route.ts +2 -1
  10. package/dist/template/app/api/admin/updates/[encodedKey]/promote/route.ts +2 -1
  11. package/dist/template/app/api/admin/updates/[encodedKey]/rollback/route.ts +2 -1
  12. package/dist/template/app/api/admin/updates/[encodedKey]/route.ts +2 -1
  13. package/dist/template/app/api/admin/updates/route.test.ts +21 -0
  14. package/dist/template/app/api/admin/updates/route.ts +12 -1
  15. package/dist/template/app/globals.css +65 -68
  16. package/dist/template/app/login/page.tsx +66 -42
  17. package/dist/template/app/updates/[encodedKey]/page.tsx +382 -248
  18. package/dist/template/app/updates/devices/page.tsx +187 -145
  19. package/dist/template/app/updates/embedded/page.tsx +80 -34
  20. package/dist/template/app/updates/emergency-redirects/page.tsx +138 -71
  21. package/dist/template/app/updates/layout.tsx +2 -1
  22. package/dist/template/app/updates/page.tsx +385 -274
  23. package/dist/template/app/updates/releases.test.tsx +156 -0
  24. package/dist/template/components/admin/admin-role.ts +5 -0
  25. package/dist/template/components/admin/admin-shell.tsx +166 -95
  26. package/dist/template/components/admin/confirm-action.tsx +123 -0
  27. package/dist/template/components/admin/language-switcher.tsx +27 -16
  28. package/dist/template/components/admin/release-badges.test.tsx +50 -0
  29. package/dist/template/components/admin/release-badges.tsx +101 -0
  30. package/dist/template/components/ui/alert.tsx +10 -3
  31. package/dist/template/components/ui/avatar.tsx +108 -0
  32. package/dist/template/components/ui/badge.tsx +2 -2
  33. package/dist/template/components/ui/breadcrumb.tsx +108 -0
  34. package/dist/template/components/ui/button.tsx +5 -5
  35. package/dist/template/components/ui/card.tsx +2 -2
  36. package/dist/template/components/ui/chart.tsx +1 -1
  37. package/dist/template/components/ui/collapsible.tsx +7 -0
  38. package/dist/template/components/ui/dialog.tsx +13 -4
  39. package/dist/template/components/ui/empty.tsx +103 -0
  40. package/dist/template/components/ui/field.tsx +248 -0
  41. package/dist/template/components/ui/input-group.tsx +170 -0
  42. package/dist/template/components/ui/input.tsx +1 -1
  43. package/dist/template/components/ui/native-select.tsx +1 -1
  44. package/dist/template/components/ui/radio-group.tsx +41 -0
  45. package/dist/template/components/ui/sheet.tsx +6 -2
  46. package/dist/template/components/ui/sidebar.tsx +62 -17
  47. package/dist/template/components/ui/status-tones.ts +15 -0
  48. package/dist/template/components/ui/table.tsx +1 -1
  49. package/dist/template/components/ui/textarea.tsx +1 -1
  50. package/dist/template/docs/admin-ui.md +22 -24
  51. package/dist/template/docs/device-targeting.md +6 -12
  52. package/dist/template/docs/doctor.md +2 -2
  53. package/dist/template/docs/expo-app-setup.md +9 -27
  54. package/dist/template/docs/getting-started.md +3 -4
  55. package/dist/template/docs/getting-started.ru.md +11 -544
  56. package/dist/template/docs/index.md +1 -1
  57. package/dist/template/docs/installation-telemetry.md +6 -12
  58. package/dist/template/docs/migrations/2026-10-16-manifest-identity.sql +5 -0
  59. package/dist/template/docs/migrations/2026-11-25-device-favorites.sql +53 -0
  60. package/dist/template/docs/migrations/2026-11-25-download-on-postpone.sql +5 -0
  61. package/dist/template/docs/migrations/2026-11-25-public-distribution-history.sql +283 -0
  62. package/dist/template/docs/migrations/schema.sql +349 -0
  63. package/dist/template/docs/npm-installer.md +3 -3
  64. package/dist/template/docs/operations-guide.md +9 -7
  65. package/dist/template/docs/ota-client-lifecycle.md +30 -68
  66. package/dist/template/docs/ota-emergency-recovery.md +34 -57
  67. package/dist/template/docs/ota-update-policy.md +9 -20
  68. package/dist/template/docs/ru/admin-ui.md +33 -0
  69. package/dist/template/docs/ru/device-targeting.md +59 -0
  70. package/dist/template/docs/ru/doctor.md +98 -0
  71. package/dist/template/docs/ru/expo-app-setup.md +497 -0
  72. package/dist/template/docs/ru/getting-started.md +391 -0
  73. package/dist/template/docs/ru/index.md +50 -0
  74. package/dist/template/docs/ru/installation-telemetry.md +125 -0
  75. package/dist/template/docs/ru/npm-installer.md +71 -0
  76. package/dist/template/docs/ru/operations-guide.md +322 -0
  77. package/dist/template/docs/ru/ota-client-lifecycle.md +162 -0
  78. package/dist/template/docs/ru/ota-emergency-recovery.md +108 -0
  79. package/dist/template/docs/ru/ota-update-policy.md +69 -0
  80. package/dist/template/docs/ru/publishing-npm-installer.md +49 -0
  81. package/dist/template/docs/ru/supabase-setup.md +120 -0
  82. package/dist/template/docs/uk/admin-ui.md +33 -0
  83. package/dist/template/docs/uk/device-targeting.md +59 -0
  84. package/dist/template/docs/uk/doctor.md +98 -0
  85. package/dist/template/docs/uk/expo-app-setup.md +497 -0
  86. package/dist/template/docs/uk/getting-started.md +391 -0
  87. package/dist/template/docs/uk/index.md +50 -0
  88. package/dist/template/docs/uk/installation-telemetry.md +125 -0
  89. package/dist/template/docs/uk/npm-installer.md +71 -0
  90. package/dist/template/docs/uk/operations-guide.md +322 -0
  91. package/dist/template/docs/uk/ota-client-lifecycle.md +162 -0
  92. package/dist/template/docs/uk/ota-emergency-recovery.md +108 -0
  93. package/dist/template/docs/uk/ota-update-policy.md +69 -0
  94. package/dist/template/docs/uk/publishing-npm-installer.md +49 -0
  95. package/dist/template/docs/uk/supabase-setup.md +120 -0
  96. package/dist/template/lib/audience-ids.ts +4 -0
  97. package/dist/template/package-lock.json +46 -0
  98. package/dist/template/package.json +4 -1
  99. package/dist/template/scripts/configure-expo-app.mjs +3 -3
  100. package/dist/template/scripts/create-access-token.mjs +1 -1
  101. package/dist/template/scripts/lib/doctor.mjs +10 -7
  102. package/dist/template/scripts/lib/doctor.test.mjs +7 -5
  103. package/dist/template/scripts/lib/embedded-update-registrar.test.ts +22 -7
  104. package/dist/template/scripts/lib/expo-app-configurator.mjs +25 -22
  105. package/dist/template/scripts/lib/expo-app-configurator.test.ts +37 -2
  106. package/dist/template/scripts/lib/ota-client-configurator.mjs +152 -55
  107. package/dist/template/scripts/lib/ota-client-configurator.test.ts +60 -20
  108. package/dist/template/scripts/lib/ota-client-package.mjs +25 -0
  109. package/dist/template/scripts/lib/ota-root-hook-patcher.mjs +90 -32
  110. package/dist/template/scripts/lib/ota-root-hook-patcher.test.ts +49 -6
  111. package/dist/template/scripts/tests/device-analytics-migrations.mjs +12 -1
  112. package/dist/template/scripts/tests/device-targeting-activation.mjs +2 -3
  113. package/dist/template/scripts/tests/e2e/client-lifecycle.mjs +161 -0
  114. package/dist/template/scripts/tests/e2e/client-lifecycle.scenario.jsx +465 -0
  115. package/dist/template/scripts/tests/e2e/client-vitest.mts +18 -0
  116. package/dist/template/scripts/tests/e2e/console.mjs +86 -0
  117. package/dist/template/scripts/tests/e2e/delivery.mjs +296 -0
  118. package/dist/template/scripts/tests/e2e/device-favorites.mjs +309 -0
  119. package/dist/template/scripts/tests/e2e/installations.mjs +132 -0
  120. package/dist/template/scripts/tests/e2e/policy.mjs +253 -0
  121. package/dist/template/scripts/tests/e2e/registrar-token.mjs +59 -0
  122. package/dist/template/scripts/tests/e2e/release-matrix.mjs +307 -0
  123. package/dist/template/scripts/tests/e2e/releases.mjs +162 -0
  124. package/dist/template/scripts/tests/e2e/run.mjs +224 -0
  125. package/dist/template/scripts/tests/manifest-identity.sql +7 -5
  126. package/dist/template/scripts/tests/public-distribution-history.mjs +102 -0
  127. package/dist/template/src/client/admin-api.ts +45 -10
  128. package/dist/template/src/client/admin-types.ts +35 -1
  129. package/dist/template/src/client/devices/analytics.tsx +169 -219
  130. package/dist/template/src/client/devices/cohorts.tsx +181 -0
  131. package/dist/template/src/client/devices/device-name.tsx +37 -21
  132. package/dist/template/src/client/devices/favorite-targets.tsx +381 -0
  133. package/dist/template/src/client/devices/registry.tsx +265 -233
  134. package/dist/template/src/client/devices/use-devices-report.test.tsx +98 -0
  135. package/dist/template/src/client/devices/use-devices-report.ts +53 -82
  136. package/dist/template/src/client/devices/version-adoption-chart.tsx +48 -38
  137. package/dist/template/src/client/distribution-control.tsx +98 -53
  138. package/dist/template/src/client/distribution-history.tsx +353 -0
  139. package/dist/template/src/client/guard-action-catalog.tsx +183 -0
  140. package/dist/template/src/client/guard-action-combobox.test.ts +16 -22
  141. package/dist/template/src/client/guard-action-combobox.tsx +134 -234
  142. package/dist/template/src/client/guard-action-options.ts +4 -6
  143. package/dist/template/src/client/i18n/en.json +335 -2
  144. package/dist/template/src/client/i18n/language-switching.test.tsx +233 -0
  145. package/dist/template/src/client/i18n/messages.test.ts +102 -19
  146. package/dist/template/src/client/i18n/messages.ts +31 -16
  147. package/dist/template/src/client/i18n/provider.tsx +6 -3
  148. package/dist/template/src/client/i18n/ru.json +619 -0
  149. package/dist/template/src/client/i18n/uk.json +619 -0
  150. package/dist/template/src/client/i18n/use-formatters.ts +5 -0
  151. package/dist/template/src/client/logout-button.tsx +3 -3
  152. package/dist/template/src/client/policy-draft.ts +138 -0
  153. package/dist/template/src/client/update-audience-editor.tsx +597 -199
  154. package/dist/template/src/client/update-policy-editor.test.ts +101 -29
  155. package/dist/template/src/client/update-policy-editor.tsx +466 -307
  156. package/dist/template/src/client/use-filtered-results.ts +55 -0
  157. package/dist/template/src/server/controllers/manifest.test.ts +23 -3
  158. package/dist/template/src/server/controllers/manifest.ts +15 -1
  159. package/dist/template/src/server/devices/audience.ts +9 -5
  160. package/dist/template/src/server/lib/admin-audience-activation.test.ts +37 -90
  161. package/dist/template/src/server/lib/admin-release-history.test.ts +138 -0
  162. package/dist/template/src/server/lib/admin-updates.ts +160 -534
  163. package/dist/template/src/server/lib/distribution-history.ts +97 -0
  164. package/dist/template/src/server/lib/supabase.js +24 -0
  165. package/dist/template/src/server/lib/supabase.test.ts +38 -1
  166. package/dist/template/src/server/lib/update-policy.test.ts +20 -0
  167. package/dist/template/src/server/lib/update-policy.ts +23 -10
  168. package/dist/template/src/server/manifest/manifest-repository.ts +11 -3
  169. package/dist/template/src/server/manifest/manifest-values.test.ts +2 -0
  170. package/dist/template/src/server/manifest/manifest-values.ts +21 -13
  171. package/dist/template/templates/expo-app/scripts/ota-publish/api/database-client.mjs +7 -30
  172. package/dist/template/templates/expo-app/scripts/ota-register-embedded/index.mjs +2 -1
  173. package/dist/template/tsconfig.json +2 -2
  174. package/dist/template-manifest.json +571 -271
  175. package/package.json +1 -1
  176. package/dist/template/scripts/lib/device-identity.test.ts +0 -29
  177. package/dist/template/scripts/lib/ota-client.test.ts +0 -55
  178. package/dist/template/scripts/lib/ota-update-controller.test.ts +0 -232
  179. package/dist/template/scripts/lib/ota-updates-ui.test.tsx +0 -154
  180. package/dist/template/scripts/tests/ota-client-types.mjs +0 -69
  181. package/dist/template/templates/expo-app/ota-client/README.md +0 -73
  182. package/dist/template/templates/expo-app/ota-client/controller.ts +0 -107
  183. package/dist/template/templates/expo-app/ota-client/device-identity.ts +0 -48
  184. package/dist/template/templates/expo-app/ota-client/docs/update-lifecycle.md +0 -61
  185. package/dist/template/templates/expo-app/ota-client/index.ts +0 -16
  186. package/dist/template/templates/expo-app/ota-client/model/hooks/useOtaUpdates.ts +0 -97
  187. package/dist/template/templates/expo-app/ota-client/model/update-controller.ts +0 -293
  188. package/dist/template/templates/expo-app/ota-client/runtime.ts +0 -153
  189. package/dist/template/templates/expo-app/ota-client/types.ts +0 -85
  190. package/dist/template/templates/expo-app/ota-client/ui/ota-update-gate.tsx +0 -25
  191. package/dist/template/templates/expo-app/ota-client/ui/ota-updates.tsx +0 -196
@@ -44,7 +44,9 @@ type SidebarContextProps = {
44
44
  triggerRef: React.RefObject<HTMLButtonElement | null>;
45
45
  };
46
46
 
47
- const SidebarContext = React.createContext<SidebarContextProps | null>(null);
47
+ const SidebarContext = React.createContext<SidebarContextProps | null>(
48
+ null,
49
+ );
48
50
 
49
51
  function useSidebar() {
50
52
  const context = React.useContext(SidebarContext);
@@ -93,7 +95,9 @@ function SidebarProvider({
93
95
 
94
96
  // Helper to toggle the sidebar.
95
97
  const toggleSidebar = React.useCallback(() => {
96
- return isMobile ? setOpenMobile((open) => !open) : setOpen((open) => !open);
98
+ return isMobile
99
+ ? setOpenMobile((open) => !open)
100
+ : setOpen((open) => !open);
97
101
  }, [isMobile, setOpen, setOpenMobile]);
98
102
 
99
103
  // Adds a keyboard shortcut to toggle the sidebar.
@@ -127,7 +131,15 @@ function SidebarProvider({
127
131
  toggleSidebar,
128
132
  triggerRef,
129
133
  }),
130
- [state, open, setOpen, isMobile, openMobile, setOpenMobile, toggleSidebar],
134
+ [
135
+ state,
136
+ open,
137
+ setOpen,
138
+ isMobile,
139
+ openMobile,
140
+ setOpenMobile,
141
+ toggleSidebar,
142
+ ],
131
143
  );
132
144
 
133
145
  return (
@@ -270,6 +282,7 @@ function SidebarTrigger({
270
282
  onClick,
271
283
  ...props
272
284
  }: React.ComponentProps<typeof Button>) {
285
+ const { t } = useI18n();
273
286
  const { toggleSidebar, triggerRef } = useSidebar();
274
287
 
275
288
  return (
@@ -287,22 +300,26 @@ function SidebarTrigger({
287
300
  {...props}
288
301
  >
289
302
  <PanelLeftIcon />
290
- <span className="sr-only">Toggle Sidebar</span>
303
+ <span className="sr-only">{t("Toggle Sidebar")}</span>
291
304
  </Button>
292
305
  );
293
306
  }
294
307
 
295
- function SidebarRail({ className, ...props }: React.ComponentProps<"button">) {
308
+ function SidebarRail({
309
+ className,
310
+ ...props
311
+ }: React.ComponentProps<"button">) {
312
+ const { t } = useI18n();
296
313
  const { toggleSidebar } = useSidebar();
297
314
 
298
315
  return (
299
316
  <button
300
317
  data-sidebar="rail"
301
318
  data-slot="sidebar-rail"
302
- aria-label="Toggle Sidebar"
319
+ aria-label={t("Toggle Sidebar")}
303
320
  tabIndex={-1}
304
321
  onClick={toggleSidebar}
305
- title="Toggle Sidebar"
322
+ title={t("Toggle Sidebar")}
306
323
  className={cn(
307
324
  "absolute inset-y-0 z-20 hidden w-4 -translate-x-1/2 transition-all ease-linear group-data-[side=left]:-right-4 group-data-[side=right]:left-0 after:absolute after:inset-y-0 after:left-1/2 after:w-[2px] hover:after:bg-sidebar-border sm:flex",
308
325
  "in-data-[side=left]:cursor-w-resize in-data-[side=right]:cursor-e-resize",
@@ -317,7 +334,10 @@ function SidebarRail({ className, ...props }: React.ComponentProps<"button">) {
317
334
  );
318
335
  }
319
336
 
320
- function SidebarInset({ className, ...props }: React.ComponentProps<"main">) {
337
+ function SidebarInset({
338
+ className,
339
+ ...props
340
+ }: React.ComponentProps<"main">) {
321
341
  return (
322
342
  <main
323
343
  data-slot="sidebar-inset"
@@ -345,7 +365,10 @@ function SidebarInput({
345
365
  );
346
366
  }
347
367
 
348
- function SidebarHeader({ className, ...props }: React.ComponentProps<"div">) {
368
+ function SidebarHeader({
369
+ className,
370
+ ...props
371
+ }: React.ComponentProps<"div">) {
349
372
  return (
350
373
  <div
351
374
  data-slot="sidebar-header"
@@ -356,7 +379,10 @@ function SidebarHeader({ className, ...props }: React.ComponentProps<"div">) {
356
379
  );
357
380
  }
358
381
 
359
- function SidebarFooter({ className, ...props }: React.ComponentProps<"div">) {
382
+ function SidebarFooter({
383
+ className,
384
+ ...props
385
+ }: React.ComponentProps<"div">) {
360
386
  return (
361
387
  <div
362
388
  data-slot="sidebar-footer"
@@ -381,7 +407,10 @@ function SidebarSeparator({
381
407
  );
382
408
  }
383
409
 
384
- function SidebarContent({ className, ...props }: React.ComponentProps<"div">) {
410
+ function SidebarContent({
411
+ className,
412
+ ...props
413
+ }: React.ComponentProps<"div">) {
385
414
  return (
386
415
  <div
387
416
  data-slot="sidebar-content"
@@ -395,7 +424,10 @@ function SidebarContent({ className, ...props }: React.ComponentProps<"div">) {
395
424
  );
396
425
  }
397
426
 
398
- function SidebarGroup({ className, ...props }: React.ComponentProps<"div">) {
427
+ function SidebarGroup({
428
+ className,
429
+ ...props
430
+ }: React.ComponentProps<"div">) {
399
431
  return (
400
432
  <div
401
433
  data-slot="sidebar-group"
@@ -475,7 +507,10 @@ function SidebarMenu({ className, ...props }: React.ComponentProps<"ul">) {
475
507
  );
476
508
  }
477
509
 
478
- function SidebarMenuItem({ className, ...props }: React.ComponentProps<"li">) {
510
+ function SidebarMenuItem({
511
+ className,
512
+ ...props
513
+ }: React.ComponentProps<"li">) {
479
514
  return (
480
515
  <li
481
516
  data-slot="sidebar-menu-item"
@@ -491,7 +526,8 @@ const sidebarMenuButtonVariants = cva(
491
526
  {
492
527
  variants: {
493
528
  variant: {
494
- default: "hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",
529
+ default:
530
+ "hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",
495
531
  outline:
496
532
  "bg-background shadow-[0_0_0_1px_var(--sidebar-border)] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_var(--sidebar-accent)]",
497
533
  },
@@ -530,7 +566,10 @@ function SidebarMenuButton({
530
566
  data-sidebar="menu-button"
531
567
  data-size={size}
532
568
  data-active={isActive}
533
- className={cn(sidebarMenuButtonVariants({ variant, size }), className)}
569
+ className={cn(
570
+ sidebarMenuButtonVariants({ variant, size }),
571
+ className,
572
+ )}
534
573
  {...props}
535
574
  />
536
575
  );
@@ -625,7 +664,10 @@ function SidebarMenuSkeleton({
625
664
  <div
626
665
  data-slot="sidebar-menu-skeleton"
627
666
  data-sidebar="menu-skeleton"
628
- className={cn("flex h-8 items-center gap-2 rounded-md px-2", className)}
667
+ className={cn(
668
+ "flex h-8 items-center gap-2 rounded-md px-2",
669
+ className,
670
+ )}
629
671
  {...props}
630
672
  >
631
673
  {showIcon && (
@@ -647,7 +689,10 @@ function SidebarMenuSkeleton({
647
689
  );
648
690
  }
649
691
 
650
- function SidebarMenuSub({ className, ...props }: React.ComponentProps<"ul">) {
692
+ function SidebarMenuSub({
693
+ className,
694
+ ...props
695
+ }: React.ComponentProps<"ul">) {
651
696
  return (
652
697
  <ul
653
698
  data-slot="sidebar-menu-sub"
@@ -0,0 +1,15 @@
1
+ // Explicit foreground/surface pairs keep small labels legible on both themes.
2
+ export const statusTones = {
3
+ neutral:
4
+ "border-[#cdd5df] bg-[#eef1f5] text-[#3c4b60] dark:border-[#425065] dark:bg-[#28313e] dark:text-[#d0dae7]",
5
+ positive:
6
+ "border-[#a6d9bd] bg-[#e5f6eb] text-[#165837] dark:border-[#31634b] dark:bg-[#18382b] dark:text-[#94e0b1]",
7
+ info: "border-[#b3d1f1] bg-[#e8f2fe] text-[#1c4e82] dark:border-[#345b81] dark:bg-[#20344c] dark:text-[#aad2ff]",
8
+ warning:
9
+ "border-[#e6c38b] bg-[#fff3dc] text-[#754210] dark:border-[#765b34] dark:bg-[#40311e] dark:text-[#f5cd8d]",
10
+ destructive:
11
+ "border-[#e5b3b8] bg-[#fcebed] text-[#942c40] dark:border-[#82404e] dark:bg-[#42232c] dark:text-[#ffb7bf]",
12
+ violet:
13
+ "border-[#ccbdec] bg-[#f2ebfc] text-[#5f3988] dark:border-[#60507a] dark:bg-[#342a44] dark:text-[#dbc3fb]",
14
+ teal: "border-[#a1d6d1] bg-[#e0f4f2] text-[#155957] dark:border-[#396462] dark:bg-[#193a3a] dark:text-[#95ded7]",
15
+ } as const;
@@ -69,7 +69,7 @@ function TableHead({ className, ...props }: React.ComponentProps<"th">) {
69
69
  <th
70
70
  data-slot="table-head"
71
71
  className={cn(
72
- "h-10 px-2 text-left align-middle font-medium whitespace-nowrap text-foreground [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",
72
+ "h-10 px-2 text-left align-middle text-xs font-medium whitespace-nowrap text-muted-foreground [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",
73
73
  className,
74
74
  )}
75
75
  {...props}
@@ -6,7 +6,7 @@ function Textarea({ className, ...props }: React.ComponentProps<"textarea">) {
6
6
  <textarea
7
7
  data-slot="textarea"
8
8
  className={cn(
9
- "flex field-sizing-content min-h-16 w-full rounded-md border border-input bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:aria-invalid:ring-destructive/40",
9
+ "flex field-sizing-content min-h-16 w-full rounded-md border border-input bg-card px-3 py-2 text-base transition-[color,box-shadow] outline-none placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 md:text-sm dark:aria-invalid:ring-destructive/40",
10
10
  className,
11
11
  )}
12
12
  {...props}
@@ -1,35 +1,33 @@
1
- # Панель управления
1
+ # Admin panel {#панель-управления}
2
2
 
3
- Админка использует общий UI kit shadcn/ui (Radix), Tailwind CSS 4, Lucide и Recharts. Исходники компонентов находятся в `components/ui`, тема — в `app/globals.css`, оболочка — в `components/admin`. Светлая и тёмная темы используют одни семантические токены. Новые страницы должны использовать эти компоненты и токены, сохраняя серверную проверку сессии в `app/updates/layout.tsx`.
3
+ The admin panel uses a shared shadcn/ui (Radix) UI kit, Tailwind CSS 4, Lucide and Recharts. Component sources live in `components/ui`, the theme in `app/globals.css`, and the shell in `components/admin`. Light and dark themes share semantic tokens. New pages must use these components and tokens while preserving server-side session validation in `app/updates/layout.tsx`.
4
4
 
5
- ## Навигация и данные
5
+ ## Navigation and data {#навигация-и-данные}
6
6
 
7
- - **Установки** (`/updates/devices`): общие серверные фильтры, KPI, дневная активность, распределение версий, когорты и реестр. Часть Installation ID можно использовать для поиска конкретной установки. Полные идентификаторы и диагностика доступны по нажатию на ID.
8
- - **OTA-обновления** (`/updates`): список публикаций, сортировка, пагинация и переход к редактированию. Аварийная остановка распространения находится в раскрываемой панели «Управление».
9
- - **Embedded-сборки** и **Аварийные маршруты** сохраняют существующие ограничения по ролям и действия управления.
7
+ - **Releases** (`/updates`) opens after sign-in. Search all releases by ID, comment, channel or version. Combine platform, channel, runtime, status and audience filters before paging. Open a release to review its delivery scope, edit the audience and policy, activate, roll back or promote. Metadata has its own tab. The global distribution switch appears above the list.
8
+ - **Installations** (`/updates/devices`) has Overview, Versions, Cohorts and Registry tabs. Shared filters apply across tabs. Daily values distinguish missing history, zero activity and a partial UTC day. Version shares use the installations in each displayed platform and channel.
9
+ - **Embedded builds** and **Emergency redirects** retain the existing role restrictions and management actions.
10
10
 
11
- Фильтры применяются кнопкой «Применить» ко всей выборке. Ошибка запроса оставляет предыдущий результат с явным сообщением. Если последняя страница исчезла при обновлении, реестр переходит на последнюю существующую страницу. Статистика считает установки, а не уникальных людей.
11
+ Changing a selection or resetting filters updates results immediately. Text search updates after a short pause in typing. A failed request keeps the previous result with an explicit message. If the last page disappears after a refresh, the registry moves to the last available page. Analytics count installations, not unique people.
12
12
 
13
- Подробная семантика дневных данных, когорт, возвращаемости и миграция существующей базы: [Телеметрия установок](./installation-telemetry.md). Для существующей базы нужна миграция `2026-10-22-device-analytics.sql`; новая база получает её из канонического `schema.sql`.
13
+ For daily data, cohort and retention semantics and database migration, see [installation telemetry](./installation-telemetry.md). Existing databases require `2026-10-22-device-analytics.sql`; new databases receive it from the canonical `schema.sql`.
14
14
 
15
- ## Проверка интерфейса
15
+ Publication creates an inactive draft. Choose an audience and a delivery policy before manually activating the release. In **Selected devices**, save an installation or device to your personal favorites to reuse it for smoke tests. **Public delivery** shows current and previous public releases for each runtime, channel and platform. Restore requires confirmation. On an existing database, apply `2026-11-25-device-favorites.sql` and `2026-11-25-public-distribution-history.sql` after the device-targeting migrations. Public history starts with the current public release at installation. Older activation dates and predecessors are unknown.
16
16
 
17
- При изменениях проверяйте ширины 1440 и 390 px, обе темы, фильтры с пустым результатом, сброс фильтров, раскрытие и копирование ID, клавиатурное закрытие боковых панелей с возвратом фокуса, повтор пагинации после ошибки и уменьшение числа записей на последней странице. Таблицы могут прокручиваться внутри карточки; горизонтальная прокрутка всей страницы не нужна. Историю до начала сбора нельзя заменять нулями или демонстрационными данными.
17
+ Under **Selected recipients**, choose a device from the registry, add a favorite, or paste IDs. Review the list before saving. A Device ID targets the device across reinstalls. An Installation ID targets one installation.
18
18
 
19
- Команды проверки: `npm run lint`, `npx tsc --noEmit`, `npm test`, `npm run build`, `npm run installer:check`. Новые папки UI включены в шаблон npm-инсталлятора, поэтому панель получает тот же интерфейс при установке из коробки.
19
+ ## Interface verification {#проверка-интерфеиса}
20
20
 
21
- ## Interface language
21
+ When making changes, check 1440px and 390px widths, both themes, empty filter results and reset, expanding and copying IDs, keyboard dismissal of side panels with focus restoration, pagination retry after failure, and a shrinking last page. Tables may scroll within their cards; the whole page should not scroll horizontally. Never replace history before collection with zeroes or demo data.
22
22
 
23
- The admin panel defaults to English, including when the browser prefers another
24
- language. Select **English** or **Русский** on the sign-in screen or in the admin
25
- header. The choice persists in the `ota-locale` cookie for one year and is applied
26
- on the server for the next page load. Unknown locale values fall back to English.
27
- Switching languages preserves filters and unsaved form data; number/date formatting
28
- follows the selected locale. Analytics date boundaries remain UTC.
23
+ Verification commands: `npm run lint`, `npx tsc --noEmit`, `npm test`, `npm run build`, `npm run installer:check`. New UI directories are included in the npm initializer template, so generated installations receive the same interface.
29
24
 
30
- UI translations live in `src/client/i18n/`. Russian source messages are catalog keys
31
- and `en.json` supplies their English equivalents. Use `useI18n().t` for interface
32
- copy and `useFormatters()` for analytics values. Keep interpolation slots intact.
33
- Do not translate API enum values, IDs, JSON, device names or user-written messages.
34
- Adding a language requires an explicit supported locale, catalog and selector option;
35
- browser language detection is deliberately not used for the default.
25
+ ## Interface language {#interface-language}
26
+
27
+ The admin panel defaults to English regardless of browser language. Select **English**, **Русский** or **Українська** on the sign-in screen or in the header. The choice persists in the `ota-locale` cookie for a year and is applied on the server on the next load. Unknown locale values fall back to English.
28
+
29
+ Switching languages preserves filters and unsaved form data, and immediately translates existing notifications. Numbers and dates follow the selected locale. Analytics date boundaries remain UTC. All admin screens, including emergency recovery, delivery policies and the Guard catalog, use the same language.
30
+
31
+ Translations live in `src/client/i18n/`: `en.json`, `ru.json` and `uk.json` must have identical keys and interpolation slots. Existing keys are Russian or English source messages; English equivalents are also accepted for API errors and labels. Use `useI18n().t` for interface text and `useFormatters()` for analytics. Store notifications as a source key or a `TranslationMessage` with interpolation values, and translate when rendering so they follow language changes.
32
+
33
+ Translate enum display labels while preserving their API values. Do not translate IDs, JSON, device or channel names, or user-written messages. Unknown technical errors are displayed verbatim. Catalog and switching tests cover completeness, interpolation, saved preferences, forms and notifications. Adding a language requires an explicit supported value, catalog and selector option; browser language deliberately does not determine the default.
@@ -11,14 +11,13 @@ have to match. A force-update guard does not bypass the audience.
11
11
  is required. Existing generated files can be refreshed with `--force` (review local edits).
12
12
  2. Rebuild the native app after adding `expo-secure-store`; use a new runtime so older
13
13
  binaries cannot download JavaScript importing a missing native module.
14
- 3. Open the app. In **Установки → installation details**, copy its Device ID or name it
15
- **Мой телефон**. Older clients still report Installation ID and can be targeted by it.
14
+ 3. Open the app. In **Installations → installation details**, copy its Device ID or name it
15
+ **My phone**. Older clients still report Installation ID and can be targeted by it.
16
16
  4. Publish with the generated `npm run ota:publish -- --platform android --message "Smoke"`.
17
- Publishing creates a draft. In its detail page select **Аудитория обновления → Только
18
- выбранные устройства / установки**, choose your phone, and **save before activation**.
17
+ Publishing creates a draft. In its detail page select **Update audience → Selected devices / installations only**, choose your phone, and **save before activation**.
19
18
  5. Activate the draft. Your device gets it; other compatible devices get the previous
20
19
  eligible public update, or no update if one does not exist.
21
- 6. After testing, set the audience to **Все совместимые устройства** and save. The same
20
+ 6. After testing, set the audience to **All compatible devices** and save. The same
22
21
  artifact is now eligible for everyone. No second publish is needed.
23
22
 
24
23
  Changing an active audience affects future checks immediately. It does not uninstall or
@@ -81,12 +80,7 @@ repeatable and do not change the audience or active state of existing releases.
81
80
  The targeting migration removes the single-active-release index because a targeted
82
81
  release must coexist with its public fallback. Existing releases have audience `all`.
83
82
 
84
- Activation, rollback and promotion of a targeted release preserve other active releases.
85
- Normal public activation keeps the previous behavior of disabling older releases.
86
- Widening an already-active targeted release leaves the prior public fallback eligible;
87
- the newer release wins selection. Disabling the targeted release restores fallback selection.
88
- Explicit rollback has priority, subject to the same audience and compatibility checks.
89
- Emergency pinned redirects still fail closed when the selected artifact differs.
83
+ Targeted smoke releases can coexist with a public release. Activating a public release, or widening an active smoke release to all devices, retires the previously public release in that runtime, channel and platform. Stopping the public release leaves public delivery stopped. Use **Releases → Public delivery → Restore** to resume the previous eligible public release manually. Drafts and device-only activations do not enter public history.
90
84
 
91
85
  Admin API:
92
86
 
@@ -117,7 +111,7 @@ CAS, global block and reinstall tests. Fixtures are rolled back. Device reinstal
117
111
  behavior additionally requires physical-device testing with the native build.
118
112
 
119
113
  Activation and audience changes are serialized in PostgreSQL. Public activation disables
120
- other active releases in the same scope within the same statement; a failed activation
114
+ the previous public release in the same scope within the same statement; a failed activation
121
115
  cannot partially disable the previous public release. This also covers the existing
122
116
  `update-meta.json` editor. Targeted activation preserves other audiences. During a global
123
117
  stop, deactivation can repair stale pointers to the remaining active fallback; activating,
@@ -75,8 +75,8 @@ mismatch with the selected env file.
75
75
  | PostgreSQL | Connection, read access to core OTA/telemetry/targeting columns, required table/function signatures and enabled audience-activation trigger |
76
76
  | Supabase | Read access to core REST tables/columns and storage bucket; SQL function bodies are not inspected |
77
77
  | Storage | Existing accessible bucket via S3 HEAD or Supabase bucket GET; no writes |
78
- | Expo app | Static config, installed client dependencies, implementation files, URL/channel/runtime, native check mode, identity namespace and telemetry URL |
79
- | Root | Recognized root hook/gate wiring and generated bootstrap metadata; custom roots need manual verification |
78
+ | Expo app | Static config, client package, native dependencies, URL/channel/runtime, native check mode, identity namespace and telemetry URL |
79
+ | Root | Recognized `OtaUpdates` mount and generated bootstrap metadata; custom roots need manual verification |
80
80
  | Publisher/registrar | Presence and basic shape of `.env.ota` credentials, publisher command, channel and registration URL consistency |
81
81
 
82
82
  Without `--app`, app checks are skipped. Without an app certificate or an explicit
@@ -28,20 +28,9 @@ npm run configure-app -- \
28
28
  --runtime-version 1.0.0
29
29
  ```
30
30
 
31
- The command patches `app.json` and `package.json`, copies the public
32
- certificate, installs `expo-updates` and the identity/telemetry dependencies, adds the portable publisher and runs
33
- `expo prebuild`. It supports npm, pnpm, Yarn and Bun lockfiles.
34
-
35
- It also generates `ota-client/` and starts identity/installation telemetry from
36
- `ota-entry.js`, preserving the original application entry. For Expo Router,
37
- the configurator renders `<OtaUpdates />` beside navigation in `src/app/_layout`
38
- (or `app/_layout`). The generated TypeScript component owns the hook internally;
39
- it does not wrap the application or require context. Standard `App`
40
- entry components are supported too, including platform variants. No manual
41
- Installation ID, Device ID, or heartbeat wiring is needed. The component starts with automatic checks and manual download/restart prompts;
42
- customized options are preserved on later configurations. See the generated
43
- [OTA client lifecycle](./ota-client-lifecycle.md) for update modes and the hook API.
44
- If generation is unavailable, follow [manual hook integration](./ota-client-lifecycle.md#manual-integration).
31
+ The configurator runs `expo install` for `expo-updates-server-client@0.1.0` and its native dependencies. It updates `app.json` and `package.json`, copies the public signing certificate, installs the publisher and runs `expo prebuild`. It supports npm, pnpm, Yarn and Bun lockfiles.
32
+
33
+ It writes the public settings to `ota-client/config.json`. The generated `ota-entry.js` calls `initializeOtaClient(config)` and `start()` before loading the original entry. In a supported root, the configurator adds an import from `expo-updates-server-client` and mounts `<OtaUpdates />` beside navigation. It recognizes Expo Router’s `src/app/_layout` or `app/_layout`, and standard `App` components, including platform variants. The component checks automatically and prompts the user to download or restart. You can change its options in the root. See the [client lifecycle guide](./ota-client-lifecycle.md).
45
34
 
46
35
  The source patch uses syntax-tree locations and keeps existing imports, comments,
47
36
  directives, component code and nested callbacks. Unsupported root exports
@@ -51,9 +40,6 @@ function identifier to make the patch possible. A custom entry whose root
51
40
  cannot be identified keeps its existing startup behavior and prints a warning
52
41
  that update orchestration still needs integration in its root component;
53
42
  identity and telemetry remain connected through the generated bootstrap.
54
- An existing `useOtaUpdates` import must use a relative path to `ota-client`.
55
- Unresolved aliases such as `@/ota-client` stop the patch before writing, so a
56
- second hook cannot silently override an existing automation configuration.
57
43
 
58
44
  Options:
59
45
 
@@ -66,7 +52,7 @@ Options:
66
52
  The CLI intentionally refuses dynamic `app.config.*` projects and refuses to
67
53
  replace generated files unless `--force` is provided. The sections below
68
54
  document native configuration; [manual hook integration](./ota-client-lifecycle.md#manual-integration)
69
- covers client files, dependencies, root wiring and controls. `--force` permits generated
55
+ covers the client package, dependencies, root wiring and controls. `--force` permits generated
70
56
  file replacement; it does not bypass unsupported dynamic configs or root shapes.
71
57
  `--server-env` selects the local server environment used to prepare publisher settings.
72
58
  For an isolated test stand, explicitly pass its `.env.ota-test`.
@@ -113,15 +99,11 @@ Inspect the resulting diff before building:
113
99
  | `app.json` | Correct HTTPS URL, certificate, runtime, channel; native automatic checks disabled |
114
100
  | `package.json` | Client dependencies, `main: "ota-entry.js"`, publisher and selected platform build scripts |
115
101
  | `ota-client-entry.json` | Original application entry retained |
116
- | `ota-client/` | Public API, nested model/UI files and public `config.json` |
117
- | Root `_layout` / `App` | One unconditional hook and a gate; existing navigation/providers retained |
102
+ | `ota-client/config.json` | Public channel, heartbeat URL and identity namespace |
103
+ | Root `_layout` / `App` | Import from `expo-updates-server-client` and one `<OtaUpdates />` beside navigation |
118
104
  | `.env.ota` | Local publisher/build credentials; ignored by Git, never imported by app code |
119
105
 
120
- Before building, add the
121
- [manual controls example](./ota-client-lifecycle.md#_3-add-manual-update-controls)
122
- to a test screen, or explicitly enable download/reload automation through the hook
123
- options. The default root only checks; a stock Expo template has no OTA test buttons.
124
- These controls/options must be in the binary you install so it can receive the first OTA.
106
+ The default component offers download and restart controls. To test a custom UI, add the [manual controls example](./ota-client-lifecycle.md#_3-add-manual-update-controls) before building the binary.
125
107
 
126
108
  From the **application directory**, run:
127
109
 
@@ -167,7 +149,7 @@ missing manual setup steps.
167
149
  For manual setup, install Expo-compatible versions of all client dependencies:
168
150
 
169
151
  ```bash
170
- npx expo install expo-updates expo-application expo-crypto expo-secure-store @react-native-async-storage/async-storage
152
+ npx expo install expo-updates-server-client@0.1.0 expo-updates expo-application expo-crypto expo-secure-store @react-native-async-storage/async-storage
171
153
  ```
172
154
 
173
155
  The application does not send an admin access token when checking for an
@@ -452,7 +434,7 @@ expected URL, runtime, channel and certificate.
452
434
 
453
435
  ## 5. Check and install updates in the application
454
436
 
455
- Render the generated `<OtaUpdates />` component beside navigation in the root
437
+ Render `<OtaUpdates />` component beside navigation in the root
456
438
  layout. `configure-app` inserts this integration automatically. If the files or root
457
439
  patch are missing, follow [manual integration](./ota-client-lifecycle.md#manual-integration),
458
440
  including the complete Router example and manual controls.
@@ -13,7 +13,7 @@ SDK or macOS/Xcode. The server's Docker image does not provide the mobile toolch
13
13
  Create the server files, or use an existing source checkout:
14
14
 
15
15
  ```bash
16
- npx create-expo-updates-server@latest my-server
16
+ npx create-expo-updates-server@0.6.0 my-server
17
17
  cd my-server
18
18
  ```
19
19
 
@@ -350,8 +350,7 @@ npm run configure-app
350
350
  ```
351
351
 
352
352
  Select the app directory, certificate, public URL, channel, runtime and platform.
353
- The CLI installs dependencies, configures native updates, generates the identity
354
- and telemetry client, inserts the standalone root component, installs publisher/registration
353
+ The CLI installs `expo-updates-server-client@0.1.0` and the native dependencies with `expo install`, configures native updates, adds the client bootstrap and mounts `<OtaUpdates />` in the root, installs publisher/registration
355
354
  scripts and runs prebuild. Review its summary before applying changes.
356
355
 
357
356
  For flags, supported root components and reruns, see
@@ -384,7 +383,7 @@ a server running directly with npm. See [embedded registration](./expo-app-setup
384
383
 
385
384
  Before building, choose how the app will download and apply updates.
386
385
 
387
- The generated `<OtaUpdates />` component checks automatically and offers download,
386
+ The `<OtaUpdates />` component checks automatically and offers download,
388
387
  restart and Later actions. To download ordinary updates automatically, set
389
388
  `autoUpdate` on the component; use `autoReload` only if automatic restarts suit the app.
390
389
  Custom screen controls are optional. See [hook options](./ota-client-lifecycle.md).