fleetlens 0.13.2 → 0.15.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 (230) hide show
  1. package/app/apps/web/.next/BUILD_ID +1 -1
  2. package/app/apps/web/.next/app-path-routes-manifest.json +4 -1
  3. package/app/apps/web/.next/build-manifest.json +3 -3
  4. package/app/apps/web/.next/prerender-manifest.json +3 -3
  5. package/app/apps/web/.next/routes-manifest.json +21 -3
  6. package/app/apps/web/.next/server/app/_global-error.html +1 -1
  7. package/app/apps/web/.next/server/app/_global-error.rsc +1 -1
  8. package/app/apps/web/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
  9. package/app/apps/web/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  10. package/app/apps/web/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  11. package/app/apps/web/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  12. package/app/apps/web/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  13. package/app/apps/web/.next/server/app/_not-found/page.js +1 -1
  14. package/app/apps/web/.next/server/app/_not-found/page.js.nft.json +1 -1
  15. package/app/apps/web/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  16. package/app/apps/web/.next/server/app/api/ask/route.js +3 -3
  17. package/app/apps/web/.next/server/app/api/ask/route.js.nft.json +1 -1
  18. package/app/apps/web/.next/server/app/api/digest/day/[date]/route.js +4 -4
  19. package/app/apps/web/.next/server/app/api/digest/day/[date]/route.js.nft.json +1 -1
  20. package/app/apps/web/.next/server/app/api/digest/month/[yearMonth]/route.js +4 -4
  21. package/app/apps/web/.next/server/app/api/digest/month/[yearMonth]/route.js.nft.json +1 -1
  22. package/app/apps/web/.next/server/app/api/digest/month-index/route.js +2 -2
  23. package/app/apps/web/.next/server/app/api/digest/month-index/route.js.nft.json +1 -1
  24. package/app/apps/web/.next/server/app/api/digest/week/[startDate]/route.js +4 -4
  25. package/app/apps/web/.next/server/app/api/digest/week/[startDate]/route.js.nft.json +1 -1
  26. package/app/apps/web/.next/server/app/api/digest/week-index/route.js +2 -2
  27. package/app/apps/web/.next/server/app/api/digest/week-index/route.js.nft.json +1 -1
  28. package/app/apps/web/.next/server/app/api/pdf/[key]/route.js +4 -4
  29. package/app/apps/web/.next/server/app/api/pdf/[key]/route.js.nft.json +1 -1
  30. package/app/apps/web/.next/server/app/api/runs/[runId]/route.js.nft.json +1 -1
  31. package/app/apps/web/.next/server/app/api/runs/[runId]/stream/route.js.nft.json +1 -1
  32. package/app/apps/web/.next/server/app/api/settings/route.js +4 -3
  33. package/app/apps/web/.next/server/app/api/settings/route.js.nft.json +1 -1
  34. package/app/apps/web/.next/server/app/api/team/autostart/route/app-paths-manifest.json +3 -0
  35. package/app/apps/web/.next/server/app/api/team/autostart/route.js +7 -0
  36. package/app/apps/web/.next/server/app/api/team/autostart/route.js.nft.json +1 -0
  37. package/app/apps/web/.next/server/app/api/team/autostart/route_client-reference-manifest.js +3 -0
  38. package/app/apps/web/.next/server/app/api/team/onboarding/start/route/app-paths-manifest.json +3 -0
  39. package/app/apps/web/.next/server/app/api/team/onboarding/start/route/build-manifest.json +9 -0
  40. package/app/apps/web/.next/server/app/api/team/onboarding/start/route/server-reference-manifest.json +4 -0
  41. package/app/apps/web/.next/server/app/api/team/onboarding/start/route.js +8 -0
  42. package/app/apps/web/.next/server/app/api/team/onboarding/start/route.js.map +5 -0
  43. package/app/apps/web/.next/server/app/api/team/onboarding/start/route.js.nft.json +1 -0
  44. package/app/apps/web/.next/server/app/api/team/onboarding/start/route_client-reference-manifest.js +3 -0
  45. package/app/apps/web/.next/server/app/api/team/sync-projects/route/app-paths-manifest.json +3 -0
  46. package/app/apps/web/.next/server/app/api/team/sync-projects/route/build-manifest.json +9 -0
  47. package/app/apps/web/.next/server/app/api/team/sync-projects/route/server-reference-manifest.json +4 -0
  48. package/app/apps/web/.next/server/app/api/team/sync-projects/route.js +8 -0
  49. package/app/apps/web/.next/server/app/api/team/sync-projects/route.js.map +5 -0
  50. package/app/apps/web/.next/server/app/api/team/sync-projects/route.js.nft.json +1 -0
  51. package/app/apps/web/.next/server/app/api/team/sync-projects/route_client-reference-manifest.js +3 -0
  52. package/app/apps/web/.next/server/app/changelog/page.js +1 -1
  53. package/app/apps/web/.next/server/app/changelog/page.js.nft.json +1 -1
  54. package/app/apps/web/.next/server/app/changelog/page_client-reference-manifest.js +1 -1
  55. package/app/apps/web/.next/server/app/day/[date]/page.js +1 -1
  56. package/app/apps/web/.next/server/app/day/[date]/page.js.nft.json +1 -1
  57. package/app/apps/web/.next/server/app/day/[date]/page_client-reference-manifest.js +1 -1
  58. package/app/apps/web/.next/server/app/day/page.js +1 -1
  59. package/app/apps/web/.next/server/app/day/page.js.nft.json +1 -1
  60. package/app/apps/web/.next/server/app/day/page_client-reference-manifest.js +1 -1
  61. package/app/apps/web/.next/server/app/digest/[date]/page.js +1 -1
  62. package/app/apps/web/.next/server/app/digest/[date]/page.js.nft.json +1 -1
  63. package/app/apps/web/.next/server/app/digest/[date]/page_client-reference-manifest.js +1 -1
  64. package/app/apps/web/.next/server/app/digest/page.js +1 -1
  65. package/app/apps/web/.next/server/app/digest/page.js.nft.json +1 -1
  66. package/app/apps/web/.next/server/app/digest/page_client-reference-manifest.js +1 -1
  67. package/app/apps/web/.next/server/app/insights/[key]/page.js +1 -1
  68. package/app/apps/web/.next/server/app/insights/[key]/page.js.nft.json +1 -1
  69. package/app/apps/web/.next/server/app/insights/[key]/page_client-reference-manifest.js +1 -1
  70. package/app/apps/web/.next/server/app/insights/page.js +1 -1
  71. package/app/apps/web/.next/server/app/insights/page.js.nft.json +1 -1
  72. package/app/apps/web/.next/server/app/insights/page_client-reference-manifest.js +1 -1
  73. package/app/apps/web/.next/server/app/page.js +2 -2
  74. package/app/apps/web/.next/server/app/page.js.nft.json +1 -1
  75. package/app/apps/web/.next/server/app/page_client-reference-manifest.js +1 -1
  76. package/app/apps/web/.next/server/app/parallelism/page.js +1 -1
  77. package/app/apps/web/.next/server/app/parallelism/page.js.nft.json +1 -1
  78. package/app/apps/web/.next/server/app/parallelism/page_client-reference-manifest.js +1 -1
  79. package/app/apps/web/.next/server/app/print/[key]/page.js +1 -1
  80. package/app/apps/web/.next/server/app/print/[key]/page.js.nft.json +1 -1
  81. package/app/apps/web/.next/server/app/print/[key]/page_client-reference-manifest.js +1 -1
  82. package/app/apps/web/.next/server/app/projects/[slug]/page.js +2 -2
  83. package/app/apps/web/.next/server/app/projects/[slug]/page.js.nft.json +1 -1
  84. package/app/apps/web/.next/server/app/projects/[slug]/page_client-reference-manifest.js +1 -1
  85. package/app/apps/web/.next/server/app/projects/page.js +1 -1
  86. package/app/apps/web/.next/server/app/projects/page.js.nft.json +1 -1
  87. package/app/apps/web/.next/server/app/projects/page_client-reference-manifest.js +1 -1
  88. package/app/apps/web/.next/server/app/runs/page.js +1 -1
  89. package/app/apps/web/.next/server/app/runs/page.js.nft.json +1 -1
  90. package/app/apps/web/.next/server/app/runs/page_client-reference-manifest.js +1 -1
  91. package/app/apps/web/.next/server/app/sessions/[id]/page.js +3 -3
  92. package/app/apps/web/.next/server/app/sessions/[id]/page.js.nft.json +1 -1
  93. package/app/apps/web/.next/server/app/sessions/[id]/page_client-reference-manifest.js +1 -1
  94. package/app/apps/web/.next/server/app/sessions/page.js +1 -1
  95. package/app/apps/web/.next/server/app/sessions/page.js.nft.json +1 -1
  96. package/app/apps/web/.next/server/app/sessions/page_client-reference-manifest.js +1 -1
  97. package/app/apps/web/.next/server/app/settings/page.js +2 -2
  98. package/app/apps/web/.next/server/app/settings/page.js.nft.json +1 -1
  99. package/app/apps/web/.next/server/app/settings/page_client-reference-manifest.js +1 -1
  100. package/app/apps/web/.next/server/app/team/onboarding/page/app-paths-manifest.json +3 -0
  101. package/app/apps/web/.next/server/app/team/onboarding/page/build-manifest.json +17 -0
  102. package/app/apps/web/.next/server/app/team/onboarding/page/next-font-manifest.json +6 -0
  103. package/app/apps/web/.next/server/app/team/onboarding/page/react-loadable-manifest.json +1 -0
  104. package/app/apps/web/.next/server/app/team/onboarding/page/server-reference-manifest.json +4 -0
  105. package/app/apps/web/.next/server/app/team/onboarding/page.js +19 -0
  106. package/app/apps/web/.next/server/app/team/onboarding/page.js.map +5 -0
  107. package/app/apps/web/.next/server/app/team/onboarding/page.js.nft.json +1 -0
  108. package/app/apps/web/.next/server/app/team/onboarding/page_client-reference-manifest.js +3 -0
  109. package/app/apps/web/.next/server/app/team/page.js +3 -2
  110. package/app/apps/web/.next/server/app/team/page.js.nft.json +1 -1
  111. package/app/apps/web/.next/server/app/team/page_client-reference-manifest.js +1 -1
  112. package/app/apps/web/.next/server/app/usage/page.js +1 -1
  113. package/app/apps/web/.next/server/app/usage/page.js.nft.json +1 -1
  114. package/app/apps/web/.next/server/app/usage/page_client-reference-manifest.js +1 -1
  115. package/app/apps/web/.next/server/app-paths-manifest.json +4 -1
  116. package/app/apps/web/.next/server/chunks/02dz_web__next-internal_server_app_api_team_onboarding_start_route_actions_0zeptl_.js +3 -0
  117. package/app/apps/web/.next/server/chunks/0fuv_zod_v4_classic_external_0.z.vap.js +39 -0
  118. package/app/apps/web/.next/server/chunks/[root-of-the-server]__038-.1r._.js +6 -0
  119. package/app/apps/web/.next/server/chunks/{[root-of-the-server]__0~utv~v._.js → [root-of-the-server]__03ewxxu._.js} +2 -2
  120. package/app/apps/web/.next/server/chunks/[root-of-the-server]__03rmbz6._.js +3 -0
  121. package/app/apps/web/.next/server/chunks/[root-of-the-server]__065lib8._.js +3 -0
  122. package/app/apps/web/.next/server/chunks/{[root-of-the-server]__0e.f-t.._.js → [root-of-the-server]__0a0~7d6._.js} +2 -2
  123. package/app/apps/web/.next/server/chunks/{[root-of-the-server]__0gril0u._.js → [root-of-the-server]__0acikq.._.js} +2 -2
  124. package/app/apps/web/.next/server/chunks/[root-of-the-server]__0et2sqb._.js +3 -0
  125. package/app/apps/web/.next/server/chunks/{[externals]__09v47rg._.js → [root-of-the-server]__0jbc7tz._.js} +2 -2
  126. package/app/apps/web/.next/server/chunks/[root-of-the-server]__0mq0or2._.js +3 -0
  127. package/app/apps/web/.next/server/chunks/[root-of-the-server]__0mvl0qn._.js +3 -0
  128. package/app/apps/web/.next/server/chunks/{[root-of-the-server]__0n79hpm._.js → [root-of-the-server]__0ow1kn1._.js} +4 -4
  129. package/app/apps/web/.next/server/chunks/[root-of-the-server]__0~xt99s._.js +3 -0
  130. package/app/apps/web/.next/server/chunks/apps_web__next-internal_server_app_api_team_autostart_route_actions_10-4s71.js +3 -0
  131. package/app/apps/web/.next/server/chunks/apps_web__next-internal_server_app_api_team_sync-projects_route_actions_0r_2f5n.js +3 -0
  132. package/app/apps/web/.next/server/chunks/node_modules_next_036my~r._.js +13 -0
  133. package/app/apps/web/.next/server/chunks/packages_09wmnv.._.js +3 -0
  134. package/app/apps/web/.next/server/chunks/packages_0o6.gpk._.js +3 -0
  135. package/app/apps/web/.next/server/chunks/packages_parser_dist_06d9se1._.js +1 -1
  136. package/app/apps/web/.next/server/chunks/packages_parser_dist_10ihc3~._.js +1 -1
  137. package/app/apps/web/.next/server/chunks/ssr/{[root-of-the-server]__0z7mg0b._.js → [root-of-the-server]__08l86e-._.js} +2 -2
  138. package/app/apps/web/.next/server/chunks/ssr/[root-of-the-server]__0a7n44-._.js +3 -0
  139. package/app/apps/web/.next/server/chunks/ssr/[root-of-the-server]__0c00i76._.js +3 -0
  140. package/app/apps/web/.next/server/chunks/ssr/[root-of-the-server]__0i.q-1h._.js +3 -0
  141. package/app/apps/web/.next/server/chunks/ssr/[root-of-the-server]__0r4tks8._.js +1 -1
  142. package/app/apps/web/.next/server/chunks/ssr/[root-of-the-server]__0stu~~r._.js +3 -0
  143. package/app/apps/web/.next/server/chunks/ssr/[root-of-the-server]__0ufi3.w._.js +3 -0
  144. package/app/apps/web/.next/server/chunks/ssr/{[root-of-the-server]__0o03ymy._.js → [root-of-the-server]__10~b4bf._.js} +2 -2
  145. package/app/apps/web/.next/server/chunks/ssr/_0xu2pvc._.js +1 -1
  146. package/app/apps/web/.next/server/chunks/ssr/apps_web_0.97l5.._.js +3 -0
  147. package/app/apps/web/.next/server/chunks/ssr/{apps_web_app_settings_0u6z6rj._.js → apps_web_0q2x4a~._.js} +2 -2
  148. package/app/apps/web/.next/server/chunks/ssr/apps_web_114yo0v._.js +3 -0
  149. package/app/apps/web/.next/server/chunks/ssr/apps_web__next-internal_server_app_team_onboarding_page_actions_0pss~.k.js +3 -0
  150. package/app/apps/web/.next/server/chunks/ssr/apps_web_components_0c-tpft._.js +1 -1
  151. package/app/apps/web/.next/server/chunks/ssr/apps_web_components_0txtsv5._.js +1 -1
  152. package/app/apps/web/.next/server/chunks/ssr/apps_web_lib_changelog_ts_0n7_p1d._.js +1 -1
  153. package/app/apps/web/.next/server/chunks/ssr/apps_web_lib_changelog_ts_0nb5_-s._.js +1 -1
  154. package/app/apps/web/.next/server/chunks/ssr/apps_web_lib_team-config_ts_10egg08._.js +39 -0
  155. package/app/apps/web/.next/server/chunks/ssr/{node_modules_next_dist_0t-hj0x._.js → node_modules_0yrkyef._.js} +2 -2
  156. package/app/apps/web/.next/server/chunks/ssr/node_modules_next_0w2y7fz._.js +2 -2
  157. package/app/apps/web/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_0jxvcfi.js +2 -2
  158. package/app/apps/web/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_0s5yhs4.js +4 -0
  159. package/app/apps/web/.next/server/chunks/ssr/packages_entries_dist_node_0_271yr.js +1 -1
  160. package/app/apps/web/.next/server/chunks/ssr/packages_parser_dist_0mx_509._.js +1 -1
  161. package/app/apps/web/.next/server/functions-config-manifest.json +3 -1
  162. package/app/apps/web/.next/server/middleware-build-manifest.js +3 -3
  163. package/app/apps/web/.next/server/middleware-manifest.json +5 -5
  164. package/app/apps/web/.next/server/pages/500.html +1 -1
  165. package/app/apps/web/.next/server/server-reference-manifest.js +1 -1
  166. package/app/apps/web/.next/server/server-reference-manifest.json +1 -1
  167. package/app/apps/web/.next/static/chunks/{0wwcx42ng8i2e.js → 0-3_u.90d79wi.js} +1 -1
  168. package/app/apps/web/.next/static/chunks/00a9oyw~h5i1p.js +1 -0
  169. package/app/apps/web/.next/static/chunks/040s42ypidk7s.css +1 -0
  170. package/app/apps/web/.next/static/chunks/06eiwghjkkbnh.js +1 -0
  171. package/app/apps/web/.next/static/chunks/06qeg4pt5jdqs.js +1 -0
  172. package/app/apps/web/.next/static/chunks/{0e_fzy0n8ij-o.js → 0u6gxpqhl0gc7.js} +1 -1
  173. package/app/apps/web/.next/static/chunks/18cj08-la37o-.js +1 -0
  174. package/app/apps/web/app/api/team/autostart/route.ts +41 -0
  175. package/app/apps/web/app/api/team/onboarding/start/route.ts +96 -0
  176. package/app/apps/web/app/api/team/sync-projects/route.ts +39 -0
  177. package/app/apps/web/app/globals.css +82 -0
  178. package/app/apps/web/app/settings/ai-features-form.tsx +1 -1
  179. package/app/apps/web/app/settings/page.tsx +21 -7
  180. package/app/apps/web/app/{settings → team}/force-sync-button.tsx +2 -4
  181. package/app/apps/web/app/team/onboarding/onboarding-wizard.tsx +503 -0
  182. package/app/apps/web/app/team/onboarding/page.tsx +28 -0
  183. package/app/apps/web/app/team/page.tsx +60 -81
  184. package/app/apps/web/app/{settings/team-connection-section.tsx → team/sync-activity-section.tsx} +6 -23
  185. package/app/apps/web/app/team/synced-projects-form.tsx +201 -0
  186. package/app/apps/web/app/team/synced-projects-section.tsx +37 -0
  187. package/app/apps/web/components/autostart-toggle.tsx +59 -0
  188. package/app/apps/web/components/previous-cycles-trend.tsx +4 -1
  189. package/app/apps/web/components/project-sync-picker.tsx +109 -0
  190. package/app/apps/web/components/team-chip.tsx +1 -1
  191. package/app/apps/web/components/team-welcome-banner.tsx +1 -1
  192. package/app/apps/web/lib/autostart-data.ts +31 -0
  193. package/app/apps/web/lib/changelog-data.generated.ts +1 -1
  194. package/app/apps/web/lib/sync-projects-data.ts +36 -0
  195. package/app/apps/web/lib/team-config.ts +21 -4
  196. package/app/apps/web/package.json +1 -1
  197. package/app/apps/web/tsconfig.tsbuildinfo +1 -1
  198. package/dist/daemon-worker.js +2089 -1622
  199. package/dist/index.js +1462 -230
  200. package/package.json +1 -1
  201. package/app/apps/web/.next/server/app/api/team-config/route/app-paths-manifest.json +0 -3
  202. package/app/apps/web/.next/server/app/api/team-config/route.js +0 -8
  203. package/app/apps/web/.next/server/app/api/team-config/route.js.nft.json +0 -1
  204. package/app/apps/web/.next/server/app/api/team-config/route_client-reference-manifest.js +0 -3
  205. package/app/apps/web/.next/server/chunks/[root-of-the-server]__08agijy._.js +0 -3
  206. package/app/apps/web/.next/server/chunks/[root-of-the-server]__0atn.dt._.js +0 -3
  207. package/app/apps/web/.next/server/chunks/[root-of-the-server]__0b.b7~1._.js +0 -3
  208. package/app/apps/web/.next/server/chunks/[root-of-the-server]__0i06ito._.js +0 -3
  209. package/app/apps/web/.next/server/chunks/[root-of-the-server]__0y5p73y._.js +0 -3
  210. package/app/apps/web/.next/server/chunks/_0euqdko._.js +0 -49
  211. package/app/apps/web/.next/server/chunks/apps_web__next-internal_server_app_api_team-config_route_actions_0ad2gak.js +0 -3
  212. package/app/apps/web/.next/server/chunks/packages_0c-sz9n._.js +0 -3
  213. package/app/apps/web/.next/server/chunks/packages_0wywuu.._.js +0 -3
  214. package/app/apps/web/.next/server/chunks/ssr/[root-of-the-server]__09yxy53._.js +0 -3
  215. package/app/apps/web/.next/server/chunks/ssr/[root-of-the-server]__0exckd4._.js +0 -3
  216. package/app/apps/web/.next/server/chunks/ssr/[root-of-the-server]__0n-ax-5._.js +0 -3
  217. package/app/apps/web/.next/server/chunks/ssr/[root-of-the-server]__0q9qy0z._.js +0 -3
  218. package/app/apps/web/.next/server/chunks/ssr/apps_web_app_team_team-sync-form_tsx_0choz0h._.js +0 -3
  219. package/app/apps/web/.next/static/chunks/083~hzkv577.5.css +0 -1
  220. package/app/apps/web/.next/static/chunks/0h.ua.-myj.6z.js +0 -1
  221. package/app/apps/web/.next/static/chunks/0uyctl-m8iydb.js +0 -1
  222. package/app/apps/web/.next/static/chunks/14joqbsr9ihhu.js +0 -1
  223. package/app/apps/web/app/api/team-config/route.ts +0 -39
  224. package/app/apps/web/app/team/team-sync-form.tsx +0 -144
  225. /package/app/apps/web/.next/server/app/api/{team-config → team/autostart}/route/build-manifest.json +0 -0
  226. /package/app/apps/web/.next/server/app/api/{team-config → team/autostart}/route/server-reference-manifest.json +0 -0
  227. /package/app/apps/web/.next/server/app/api/{team-config → team/autostart}/route.js.map +0 -0
  228. /package/app/apps/web/.next/static/{bZs5UyzsYBqC6MFY5n-M_ → C4y6rare_ZCcXXQLc8ysA}/_buildManifest.js +0 -0
  229. /package/app/apps/web/.next/static/{bZs5UyzsYBqC6MFY5n-M_ → C4y6rare_ZCcXXQLc8ysA}/_clientMiddlewareManifest.js +0 -0
  230. /package/app/apps/web/.next/static/{bZs5UyzsYBqC6MFY5n-M_ → C4y6rare_ZCcXXQLc8ysA}/_ssgManifest.js +0 -0
@@ -1,144 +0,0 @@
1
- "use client";
2
-
3
- import { useMemo, useState } from "react";
4
-
5
- type ProjectChoice = {
6
- name: string; // canonical name — matches privateProjects[] entries
7
- pretty: string; // display label
8
- sessions: number; // last 30d
9
- worktreeCount: number;
10
- };
11
-
12
- export function TeamSyncForm({
13
- initial,
14
- projects,
15
- }: {
16
- initial: { enrichmentOptIn: boolean; privateProjects: string[] };
17
- projects: ProjectChoice[];
18
- }) {
19
- const [enrichmentOptIn, setEnrichmentOptIn] = useState(initial.enrichmentOptIn);
20
- const [privateProjects, setPrivateProjects] = useState<Set<string>>(
21
- new Set(initial.privateProjects),
22
- );
23
- const [filter, setFilter] = useState("");
24
- const [saving, setSaving] = useState(false);
25
- const [savedMsg, setSavedMsg] = useState<string | null>(null);
26
-
27
- const filtered = useMemo(() => {
28
- if (!filter.trim()) return projects;
29
- const q = filter.toLowerCase();
30
- return projects.filter(
31
- (p) => p.pretty.toLowerCase().includes(q) || p.name.toLowerCase().includes(q),
32
- );
33
- }, [projects, filter]);
34
-
35
- function toggleProject(name: string) {
36
- setPrivateProjects((prev) => {
37
- const next = new Set(prev);
38
- if (next.has(name)) next.delete(name);
39
- else next.add(name);
40
- return next;
41
- });
42
- }
43
-
44
- async function save() {
45
- setSaving(true);
46
- setSavedMsg(null);
47
- const res = await fetch("/api/team-config", {
48
- method: "PUT",
49
- headers: { "content-type": "application/json" },
50
- body: JSON.stringify({
51
- enrichmentOptIn,
52
- privateProjects: Array.from(privateProjects),
53
- }),
54
- });
55
- setSaving(false);
56
- setSavedMsg(res.ok ? "Saved. Daemon will pick up changes on next sync." : `Error: ${res.status}`);
57
- }
58
-
59
- const sharedCount = projects.length - privateProjects.size;
60
-
61
- return (
62
- <div className="space-y-6">
63
- <label className="flex items-start gap-3 cursor-pointer">
64
- <input
65
- type="checkbox"
66
- checked={enrichmentOptIn}
67
- onChange={(e) => setEnrichmentOptIn(e.target.checked)}
68
- className="mt-1"
69
- />
70
- <div>
71
- <div className="font-medium">Share LLM-enriched fields</div>
72
- <p className="text-xs text-gray-500 mt-0.5">
73
- Sends per-day outcome / helpfulness / goal-minute distributions
74
- derived by your local AI features pipeline. No new model calls
75
- are made — fields already cached on disk ride along with the
76
- daily rollup.
77
- </p>
78
- </div>
79
- </label>
80
-
81
- <div className="space-y-2">
82
- <div className="font-medium text-sm">Private projects ({privateProjects.size} hidden, {sharedCount} shared)</div>
83
- <p className="text-xs text-gray-500">
84
- Projects you mark private stay local. Their session counts and
85
- working-shape distributions are stripped before the daemon pushes.
86
- </p>
87
- <input
88
- type="text"
89
- placeholder="Filter projects"
90
- value={filter}
91
- onChange={(e) => setFilter(e.target.value)}
92
- className="w-full border rounded px-2 py-1 text-sm bg-transparent"
93
- />
94
- <div className="border rounded max-h-64 overflow-y-auto divide-y divide-gray-200 dark:divide-gray-800">
95
- {filtered.length === 0 ? (
96
- <div className="text-xs text-gray-500 p-3">
97
- No projects match.
98
- </div>
99
- ) : (
100
- filtered.map((p) => {
101
- const hidden = privateProjects.has(p.name);
102
- return (
103
- <label
104
- key={p.name}
105
- className="flex items-center gap-3 px-3 py-2 cursor-pointer hover:bg-gray-50 dark:hover:bg-gray-900"
106
- >
107
- <input
108
- type="checkbox"
109
- checked={hidden}
110
- onChange={() => toggleProject(p.name)}
111
- />
112
- <div className="flex-1 min-w-0">
113
- <div className="text-sm font-mono truncate" title={p.name}>
114
- {p.pretty}
115
- </div>
116
- <div className="text-xs text-gray-500">
117
- {p.sessions} sessions (30d)
118
- {p.worktreeCount > 0 ? ` · ${p.worktreeCount} worktrees` : ""}
119
- </div>
120
- </div>
121
- <span className={`text-xs ${hidden ? "text-orange-600" : "text-gray-400"}`}>
122
- {hidden ? "Hidden" : "Shared"}
123
- </span>
124
- </label>
125
- );
126
- })
127
- )}
128
- </div>
129
- </div>
130
-
131
- <div className="flex items-center gap-3">
132
- <button
133
- type="button"
134
- onClick={save}
135
- disabled={saving}
136
- className="px-4 py-1.5 border rounded bg-black text-white text-sm disabled:opacity-60"
137
- >
138
- {saving ? "Saving…" : "Save"}
139
- </button>
140
- {savedMsg && <span className="text-xs text-gray-600">{savedMsg}</span>}
141
- </div>
142
- </div>
143
- );
144
- }