@shipit-ai/cli 1.169.0 → 1.170.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 (385) hide show
  1. package/apis/json-schema/FeatureFlags.yaml +5 -0
  2. package/apis/json-schema/LiteLLMProxyConfig.yaml +14 -0
  3. package/apis/json-schema/Settings.yaml +3 -0
  4. package/dist/packages/core/src/application/ports/output/services/index.d.ts +1 -0
  5. package/dist/packages/core/src/application/ports/output/services/index.d.ts.map +1 -1
  6. package/dist/packages/core/src/application/ports/output/services/plugin-marketplace.interface.d.ts +46 -0
  7. package/dist/packages/core/src/application/ports/output/services/plugin-marketplace.interface.d.ts.map +1 -0
  8. package/dist/packages/core/src/application/ports/output/services/plugin-marketplace.interface.js +12 -0
  9. package/dist/packages/core/src/application/use-cases/plugins/add-marketplace.use-case.d.ts +16 -0
  10. package/dist/packages/core/src/application/use-cases/plugins/add-marketplace.use-case.d.ts.map +1 -0
  11. package/dist/packages/core/src/application/use-cases/plugins/add-marketplace.use-case.js +34 -0
  12. package/dist/packages/core/src/application/use-cases/plugins/fetch-plugin-catalog.use-case.d.ts +24 -0
  13. package/dist/packages/core/src/application/use-cases/plugins/fetch-plugin-catalog.use-case.d.ts.map +1 -0
  14. package/dist/packages/core/src/application/use-cases/plugins/fetch-plugin-catalog.use-case.js +52 -0
  15. package/dist/packages/core/src/application/use-cases/plugins/install-plugin.use-case.d.ts +17 -0
  16. package/dist/packages/core/src/application/use-cases/plugins/install-plugin.use-case.d.ts.map +1 -0
  17. package/dist/packages/core/src/application/use-cases/plugins/install-plugin.use-case.js +33 -0
  18. package/dist/packages/core/src/application/use-cases/plugins/toggle-plugin.use-case.d.ts +17 -0
  19. package/dist/packages/core/src/application/use-cases/plugins/toggle-plugin.use-case.d.ts.map +1 -0
  20. package/dist/packages/core/src/application/use-cases/plugins/toggle-plugin.use-case.js +33 -0
  21. package/dist/packages/core/src/application/use-cases/plugins/uninstall-plugin.use-case.d.ts +16 -0
  22. package/dist/packages/core/src/application/use-cases/plugins/uninstall-plugin.use-case.d.ts.map +1 -0
  23. package/dist/packages/core/src/application/use-cases/plugins/uninstall-plugin.use-case.js +33 -0
  24. package/dist/packages/core/src/domain/factories/settings-defaults.factory.d.ts.map +1 -1
  25. package/dist/packages/core/src/domain/factories/settings-defaults.factory.js +1 -0
  26. package/dist/packages/core/src/domain/generated/output.d.ts +25 -0
  27. package/dist/packages/core/src/domain/generated/output.d.ts.map +1 -1
  28. package/dist/packages/core/src/infrastructure/di/modules/services.module.d.ts.map +1 -1
  29. package/dist/packages/core/src/infrastructure/di/modules/services.module.js +13 -0
  30. package/dist/packages/core/src/infrastructure/di/modules/use-cases.module.d.ts.map +1 -1
  31. package/dist/packages/core/src/infrastructure/di/modules/use-cases.module.js +12 -0
  32. package/dist/packages/core/src/infrastructure/di/modules/web-tokens.module.d.ts.map +1 -1
  33. package/dist/packages/core/src/infrastructure/di/modules/web-tokens.module.js +22 -0
  34. package/dist/packages/core/src/infrastructure/persistence/sqlite/mappers/settings.mapper.d.ts +4 -0
  35. package/dist/packages/core/src/infrastructure/persistence/sqlite/mappers/settings.mapper.d.ts.map +1 -1
  36. package/dist/packages/core/src/infrastructure/persistence/sqlite/mappers/settings.mapper.js +18 -0
  37. package/dist/packages/core/src/infrastructure/persistence/sqlite/migrations/054-add-litellm-proxy.d.ts +14 -0
  38. package/dist/packages/core/src/infrastructure/persistence/sqlite/migrations/054-add-litellm-proxy.d.ts.map +1 -0
  39. package/dist/packages/core/src/infrastructure/persistence/sqlite/migrations/054-add-litellm-proxy.js +28 -0
  40. package/dist/packages/core/src/infrastructure/services/plugin-marketplace/index.d.ts +4 -0
  41. package/dist/packages/core/src/infrastructure/services/plugin-marketplace/index.d.ts.map +1 -0
  42. package/dist/packages/core/src/infrastructure/services/plugin-marketplace/index.js +3 -0
  43. package/dist/packages/core/src/infrastructure/services/plugin-marketplace/plugin-marketplace.schema.d.ts +78 -0
  44. package/dist/packages/core/src/infrastructure/services/plugin-marketplace/plugin-marketplace.schema.d.ts.map +1 -0
  45. package/dist/packages/core/src/infrastructure/services/plugin-marketplace/plugin-marketplace.schema.js +46 -0
  46. package/dist/packages/core/src/infrastructure/services/plugin-marketplace/plugin-marketplace.service.d.ts +29 -0
  47. package/dist/packages/core/src/infrastructure/services/plugin-marketplace/plugin-marketplace.service.d.ts.map +1 -0
  48. package/dist/packages/core/src/infrastructure/services/plugin-marketplace/plugin-marketplace.service.js +147 -0
  49. package/dist/packages/core/src/infrastructure/services/plugin-marketplace/plugin-marketplace.validators.d.ts +11 -0
  50. package/dist/packages/core/src/infrastructure/services/plugin-marketplace/plugin-marketplace.validators.d.ts.map +1 -0
  51. package/dist/packages/core/src/infrastructure/services/plugin-marketplace/plugin-marketplace.validators.js +47 -0
  52. package/dist/src/presentation/web/app/actions/add-marketplace.d.ts +5 -0
  53. package/dist/src/presentation/web/app/actions/add-marketplace.d.ts.map +1 -0
  54. package/dist/src/presentation/web/app/actions/add-marketplace.js +11 -0
  55. package/dist/src/presentation/web/app/actions/fetch-plugin-catalog.d.ts +5 -0
  56. package/dist/src/presentation/web/app/actions/fetch-plugin-catalog.d.ts.map +1 -0
  57. package/dist/src/presentation/web/app/actions/fetch-plugin-catalog.js +11 -0
  58. package/dist/src/presentation/web/app/actions/install-plugin.d.ts +5 -0
  59. package/dist/src/presentation/web/app/actions/install-plugin.d.ts.map +1 -0
  60. package/dist/src/presentation/web/app/actions/install-plugin.js +11 -0
  61. package/dist/src/presentation/web/app/actions/toggle-plugin.d.ts +5 -0
  62. package/dist/src/presentation/web/app/actions/toggle-plugin.d.ts.map +1 -0
  63. package/dist/src/presentation/web/app/actions/toggle-plugin.js +11 -0
  64. package/dist/src/presentation/web/app/actions/uninstall-plugin.d.ts +5 -0
  65. package/dist/src/presentation/web/app/actions/uninstall-plugin.d.ts.map +1 -0
  66. package/dist/src/presentation/web/app/actions/uninstall-plugin.js +11 -0
  67. package/dist/src/presentation/web/app/plugins/page.d.ts +2 -0
  68. package/dist/src/presentation/web/app/plugins/page.d.ts.map +1 -0
  69. package/dist/src/presentation/web/app/plugins/page.js +23 -0
  70. package/dist/src/presentation/web/components/common/repository-node/repository-drawer.stories.d.ts.map +1 -1
  71. package/dist/src/presentation/web/components/common/repository-node/repository-drawer.stories.js +1 -0
  72. package/dist/src/presentation/web/components/features/plugins/plugin-card.d.ts +9 -0
  73. package/dist/src/presentation/web/components/features/plugins/plugin-card.d.ts.map +1 -0
  74. package/dist/src/presentation/web/components/features/plugins/plugin-card.js +15 -0
  75. package/dist/src/presentation/web/components/features/plugins/plugin-card.stories.d.ts +17 -0
  76. package/dist/src/presentation/web/components/features/plugins/plugin-card.stories.d.ts.map +1 -0
  77. package/dist/src/presentation/web/components/features/plugins/plugin-card.stories.js +60 -0
  78. package/dist/src/presentation/web/components/features/plugins/plugin-detail-drawer.d.ts +11 -0
  79. package/dist/src/presentation/web/components/features/plugins/plugin-detail-drawer.d.ts.map +1 -0
  80. package/dist/src/presentation/web/components/features/plugins/plugin-detail-drawer.js +33 -0
  81. package/dist/src/presentation/web/components/features/plugins/plugin-detail-drawer.stories.d.ts +18 -0
  82. package/dist/src/presentation/web/components/features/plugins/plugin-detail-drawer.stories.d.ts.map +1 -0
  83. package/dist/src/presentation/web/components/features/plugins/plugin-detail-drawer.stories.js +51 -0
  84. package/dist/src/presentation/web/components/features/plugins/plugins-page-client.d.ts +6 -0
  85. package/dist/src/presentation/web/components/features/plugins/plugins-page-client.d.ts.map +1 -0
  86. package/dist/src/presentation/web/components/features/plugins/plugins-page-client.js +115 -0
  87. package/dist/src/presentation/web/components/features/plugins/plugins-page-client.stories.d.ts +12 -0
  88. package/dist/src/presentation/web/components/features/plugins/plugins-page-client.stories.d.ts.map +1 -0
  89. package/dist/src/presentation/web/components/features/plugins/plugins-page-client.stories.js +24 -0
  90. package/dist/src/presentation/web/components/features/settings/feature-flags-settings-section.d.ts.map +1 -1
  91. package/dist/src/presentation/web/components/features/settings/feature-flags-settings-section.js +5 -0
  92. package/dist/src/presentation/web/components/features/settings/feature-flags-settings-section.stories.d.ts.map +1 -1
  93. package/dist/src/presentation/web/components/features/settings/feature-flags-settings-section.stories.js +2 -0
  94. package/dist/src/presentation/web/components/features/settings/litellm-proxy-settings-section.d.ts +6 -0
  95. package/dist/src/presentation/web/components/features/settings/litellm-proxy-settings-section.d.ts.map +1 -0
  96. package/dist/src/presentation/web/components/features/settings/litellm-proxy-settings-section.js +76 -0
  97. package/dist/src/presentation/web/components/features/settings/litellm-proxy-settings-section.stories.d.ts +15 -0
  98. package/dist/src/presentation/web/components/features/settings/litellm-proxy-settings-section.stories.d.ts.map +1 -0
  99. package/dist/src/presentation/web/components/features/settings/litellm-proxy-settings-section.stories.js +29 -0
  100. package/dist/src/presentation/web/components/features/settings/settings-page-client.d.ts.map +1 -1
  101. package/dist/src/presentation/web/components/features/settings/settings-page-client.js +4 -2
  102. package/dist/src/presentation/web/components/features/settings/settings-page-client.stories.d.ts.map +1 -1
  103. package/dist/src/presentation/web/components/features/settings/settings-page-client.stories.js +1 -0
  104. package/dist/src/presentation/web/components/layouts/app-sidebar/app-sidebar.d.ts.map +1 -1
  105. package/dist/src/presentation/web/components/layouts/app-sidebar/app-sidebar.js +2 -2
  106. package/dist/src/presentation/web/components/layouts/app-sidebar/app-sidebar.stories.d.ts.map +1 -1
  107. package/dist/src/presentation/web/components/layouts/app-sidebar/app-sidebar.stories.js +1 -0
  108. package/dist/src/presentation/web/hooks/feature-flags-context.d.ts.map +1 -1
  109. package/dist/src/presentation/web/hooks/feature-flags-context.js +1 -0
  110. package/dist/src/presentation/web/lib/feature-flags.d.ts +2 -0
  111. package/dist/src/presentation/web/lib/feature-flags.d.ts.map +1 -1
  112. package/dist/src/presentation/web/lib/feature-flags.js +6 -0
  113. package/dist/translations/ar/web.json +39 -2
  114. package/dist/translations/de/web.json +39 -2
  115. package/dist/translations/en/web.json +39 -2
  116. package/dist/translations/es/web.json +39 -2
  117. package/dist/translations/fr/web.json +39 -2
  118. package/dist/translations/he/web.json +39 -2
  119. package/dist/translations/pt/web.json +39 -2
  120. package/dist/translations/ru/web.json +39 -2
  121. package/dist/tsconfig.build.tsbuildinfo +1 -1
  122. package/package.json +1 -1
  123. package/web/.next/BUILD_ID +1 -1
  124. package/web/.next/app-path-routes-manifest.json +1 -0
  125. package/web/.next/build-manifest.json +3 -3
  126. package/web/.next/fallback-build-manifest.json +3 -3
  127. package/web/.next/prerender-manifest.json +3 -3
  128. package/web/.next/required-server-files.js +2 -2
  129. package/web/.next/required-server-files.json +2 -2
  130. package/web/.next/routes-manifest.json +6 -0
  131. package/web/.next/server/app/(dashboard)/@drawer/adopt/page/server-reference-manifest.json +29 -29
  132. package/web/.next/server/app/(dashboard)/@drawer/adopt/page.js.nft.json +1 -1
  133. package/web/.next/server/app/(dashboard)/@drawer/adopt/page_client-reference-manifest.js +1 -1
  134. package/web/.next/server/app/(dashboard)/@drawer/chat/page/server-reference-manifest.json +27 -27
  135. package/web/.next/server/app/(dashboard)/@drawer/chat/page.js.nft.json +1 -1
  136. package/web/.next/server/app/(dashboard)/@drawer/chat/page_client-reference-manifest.js +1 -1
  137. package/web/.next/server/app/(dashboard)/@drawer/create/page/server-reference-manifest.json +31 -31
  138. package/web/.next/server/app/(dashboard)/@drawer/create/page.js.nft.json +1 -1
  139. package/web/.next/server/app/(dashboard)/@drawer/create/page_client-reference-manifest.js +1 -1
  140. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page/server-reference-manifest.json +37 -37
  141. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page.js.nft.json +1 -1
  142. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page_client-reference-manifest.js +1 -1
  143. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page/server-reference-manifest.json +37 -37
  144. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page.js.nft.json +1 -1
  145. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page_client-reference-manifest.js +1 -1
  146. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/[tab]/page/server-reference-manifest.json +28 -28
  147. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/[tab]/page.js.nft.json +1 -1
  148. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/[tab]/page_client-reference-manifest.js +1 -1
  149. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page/server-reference-manifest.json +28 -28
  150. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page.js.nft.json +1 -1
  151. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page_client-reference-manifest.js +1 -1
  152. package/web/.next/server/app/(dashboard)/chat/page/server-reference-manifest.json +27 -27
  153. package/web/.next/server/app/(dashboard)/chat/page.js.nft.json +1 -1
  154. package/web/.next/server/app/(dashboard)/chat/page_client-reference-manifest.js +1 -1
  155. package/web/.next/server/app/(dashboard)/create/page/server-reference-manifest.json +31 -31
  156. package/web/.next/server/app/(dashboard)/create/page.js.nft.json +1 -1
  157. package/web/.next/server/app/(dashboard)/create/page_client-reference-manifest.js +1 -1
  158. package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page/server-reference-manifest.json +37 -37
  159. package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page.js.nft.json +1 -1
  160. package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page_client-reference-manifest.js +1 -1
  161. package/web/.next/server/app/(dashboard)/feature/[featureId]/page/server-reference-manifest.json +37 -37
  162. package/web/.next/server/app/(dashboard)/feature/[featureId]/page.js.nft.json +1 -1
  163. package/web/.next/server/app/(dashboard)/feature/[featureId]/page_client-reference-manifest.js +1 -1
  164. package/web/.next/server/app/(dashboard)/page/server-reference-manifest.json +27 -27
  165. package/web/.next/server/app/(dashboard)/page.js.nft.json +1 -1
  166. package/web/.next/server/app/(dashboard)/page_client-reference-manifest.js +1 -1
  167. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/[tab]/page/server-reference-manifest.json +28 -28
  168. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/[tab]/page.js.nft.json +1 -1
  169. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/[tab]/page_client-reference-manifest.js +1 -1
  170. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page/server-reference-manifest.json +28 -28
  171. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page.js.nft.json +1 -1
  172. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page_client-reference-manifest.js +1 -1
  173. package/web/.next/server/app/_global-error.html +1 -1
  174. package/web/.next/server/app/_global-error.rsc +1 -1
  175. package/web/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
  176. package/web/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  177. package/web/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  178. package/web/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  179. package/web/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  180. package/web/.next/server/app/_not-found/page/server-reference-manifest.json +6 -6
  181. package/web/.next/server/app/_not-found/page.js.nft.json +1 -1
  182. package/web/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  183. package/web/.next/server/app/api/attachments/preview/route.js.nft.json +1 -1
  184. package/web/.next/server/app/api/dialog/pick-files/route.js.nft.json +1 -1
  185. package/web/.next/server/app/api/evidence/route.js.nft.json +1 -1
  186. package/web/.next/server/app/api/graph-data/route.js +1 -1
  187. package/web/.next/server/app/api/graph-data/route.js.nft.json +1 -1
  188. package/web/.next/server/app/api/interactive/chat/[featureId]/messages/route.js +1 -1
  189. package/web/.next/server/app/api/interactive/chat/[featureId]/messages/route.js.nft.json +1 -1
  190. package/web/.next/server/app/api/sessions-batch/route.js +1 -1
  191. package/web/.next/server/app/api/sessions-batch/route.js.nft.json +1 -1
  192. package/web/.next/server/app/plugins/page/app-paths-manifest.json +3 -0
  193. package/web/.next/server/app/plugins/page/build-manifest.json +18 -0
  194. package/web/.next/server/app/plugins/page/next-font-manifest.json +10 -0
  195. package/web/.next/server/app/plugins/page/react-loadable-manifest.json +8 -0
  196. package/web/.next/server/app/plugins/page/server-reference-manifest.json +185 -0
  197. package/web/.next/server/app/plugins/page.js +17 -0
  198. package/web/.next/server/app/plugins/page.js.map +5 -0
  199. package/web/.next/server/app/plugins/page.js.nft.json +1 -0
  200. package/web/.next/server/app/plugins/page_client-reference-manifest.js +3 -0
  201. package/web/.next/server/app/settings/page/server-reference-manifest.json +34 -22
  202. package/web/.next/server/app/settings/page.js +1 -1
  203. package/web/.next/server/app/settings/page.js.nft.json +1 -1
  204. package/web/.next/server/app/settings/page_client-reference-manifest.js +1 -1
  205. package/web/.next/server/app/skills/page/server-reference-manifest.json +11 -11
  206. package/web/.next/server/app/skills/page.js.nft.json +1 -1
  207. package/web/.next/server/app/skills/page_client-reference-manifest.js +1 -1
  208. package/web/.next/server/app/tools/page/server-reference-manifest.json +11 -11
  209. package/web/.next/server/app/tools/page.js.nft.json +1 -1
  210. package/web/.next/server/app/tools/page_client-reference-manifest.js +1 -1
  211. package/web/.next/server/app/version/page/server-reference-manifest.json +6 -6
  212. package/web/.next/server/app/version/page.js.nft.json +1 -1
  213. package/web/.next/server/app/version/page_client-reference-manifest.js +1 -1
  214. package/web/.next/server/app-paths-manifest.json +1 -0
  215. package/web/.next/server/chunks/11es_next_dist_esm_build_templates_app-route_067cwst.js.map +1 -1
  216. package/web/.next/server/chunks/{[root-of-the-server]__0zu_byw._.js → [root-of-the-server]__07suer1._.js} +2 -2
  217. package/web/.next/server/chunks/{[root-of-the-server]__0u1jyv9._.js → [root-of-the-server]__0sgzo7y._.js} +2 -2
  218. package/web/.next/server/chunks/[root-of-the-server]__0tb~wwk._.js +1 -1
  219. package/web/.next/server/chunks/{[root-of-the-server]__08cpfre._.js → [root-of-the-server]__0uxlr84._.js} +2 -2
  220. package/web/.next/server/chunks/ssr/0j.8_web_components_common_control-center-drawer_create-drawer-client_tsx_0g70fc5._.js +1 -1
  221. package/web/.next/server/chunks/ssr/0j.8_web_components_common_control-center-drawer_create-drawer-client_tsx_0g70fc5._.js.map +1 -1
  222. package/web/.next/server/chunks/ssr/0j.8_web_components_common_control-center-drawer_feature-drawer-client_tsx_104cna.._.js +2 -2
  223. package/web/.next/server/chunks/ssr/0j.8_web_components_common_control-center-drawer_feature-drawer-client_tsx_104cna.._.js.map +1 -1
  224. package/web/.next/server/chunks/ssr/0ukq_presentation_web_components_features_settings_settings-page-client_tsx_0j1uius._.js +1 -1
  225. package/web/.next/server/chunks/ssr/0ukq_presentation_web_components_features_settings_settings-page-client_tsx_0j1uius._.js.map +1 -1
  226. package/web/.next/server/chunks/ssr/11es_next_dist_esm_build_templates_app-page_0y6lfp8.js +4 -0
  227. package/web/.next/server/chunks/ssr/11es_next_dist_esm_build_templates_app-page_0y6lfp8.js.map +1 -0
  228. package/web/.next/server/chunks/ssr/11y9_components_common_control-center-drawer_repository-drawer-client_tsx_09z.znp._.js +1 -1
  229. package/web/.next/server/chunks/ssr/11y9_components_common_control-center-drawer_repository-drawer-client_tsx_09z.znp._.js.map +1 -1
  230. package/web/.next/server/chunks/ssr/{_04s_q5r._.js → 12k._sonner_dist_index_mjs_0-vmpk5._.js} +2 -2
  231. package/web/.next/server/chunks/ssr/12k._sonner_dist_index_mjs_0-vmpk5._.js.map +1 -0
  232. package/web/.next/server/chunks/ssr/{[root-of-the-server]__0rvrr1j._.js → [root-of-the-server]__0.5ojmt._.js} +2 -2
  233. package/web/.next/server/chunks/ssr/[root-of-the-server]__0.5ojmt._.js.map +1 -0
  234. package/web/.next/server/chunks/ssr/[root-of-the-server]__04h~gav._.js +3 -0
  235. package/web/.next/server/chunks/ssr/[root-of-the-server]__04h~gav._.js.map +1 -0
  236. package/web/.next/server/chunks/ssr/[root-of-the-server]__05_qc0n._.js +1 -1
  237. package/web/.next/server/chunks/ssr/[root-of-the-server]__05_qc0n._.js.map +1 -1
  238. package/web/.next/server/chunks/ssr/[root-of-the-server]__0ge~xny._.js +1 -1
  239. package/web/.next/server/chunks/ssr/[root-of-the-server]__0ge~xny._.js.map +1 -1
  240. package/web/.next/server/chunks/ssr/[root-of-the-server]__0qda~yi._.js +1 -1
  241. package/web/.next/server/chunks/ssr/[root-of-the-server]__0qda~yi._.js.map +1 -1
  242. package/web/.next/server/chunks/ssr/[root-of-the-server]__0rv1gci._.js +1 -1
  243. package/web/.next/server/chunks/ssr/[root-of-the-server]__0tq2syh._.js +1 -1
  244. package/web/.next/server/chunks/ssr/[root-of-the-server]__0t~u8sd._.js +1 -1
  245. package/web/.next/server/chunks/ssr/[root-of-the-server]__0t~u8sd._.js.map +1 -1
  246. package/web/.next/server/chunks/ssr/[root-of-the-server]__0~v1~b9._.js +3 -0
  247. package/web/.next/server/chunks/ssr/[root-of-the-server]__0~v1~b9._.js.map +1 -0
  248. package/web/.next/server/chunks/ssr/[root-of-the-server]__10tll_l._.js +1 -1
  249. package/web/.next/server/chunks/ssr/[root-of-the-server]__10tll_l._.js.map +1 -1
  250. package/web/.next/server/chunks/ssr/[root-of-the-server]__12j29w-._.js +1 -1
  251. package/web/.next/server/chunks/ssr/[root-of-the-server]__12j29w-._.js.map +1 -1
  252. package/web/.next/server/chunks/ssr/{_01qdxy2._.js → _0.ra89t._.js} +2 -2
  253. package/web/.next/server/chunks/ssr/{_01qdxy2._.js.map → _0.ra89t._.js.map} +1 -1
  254. package/web/.next/server/chunks/ssr/_01sesw0._.js +1 -1
  255. package/web/.next/server/chunks/ssr/_01sesw0._.js.map +1 -1
  256. package/web/.next/server/chunks/ssr/{_00u~.41._.js → _03x4h9e._.js} +2 -2
  257. package/web/.next/server/chunks/ssr/_03x4h9e._.js.map +1 -0
  258. package/web/.next/server/chunks/ssr/{_0~0jkp_._.js → _05fk0a4._.js} +2 -2
  259. package/web/.next/server/chunks/ssr/_05fk0a4._.js.map +1 -0
  260. package/web/.next/server/chunks/ssr/_069y.js._.js +2 -2
  261. package/web/.next/server/chunks/ssr/_069y.js._.js.map +1 -1
  262. package/web/.next/server/chunks/ssr/{_0wor25i._.js → _069ybyi._.js} +2 -2
  263. package/web/.next/server/chunks/ssr/{_0wor25i._.js.map → _069ybyi._.js.map} +1 -1
  264. package/web/.next/server/chunks/ssr/_083k45~._.js +3 -0
  265. package/web/.next/server/chunks/ssr/_083k45~._.js.map +1 -0
  266. package/web/.next/server/chunks/ssr/_0_17.-n._.js +3 -0
  267. package/web/.next/server/chunks/ssr/_0_17.-n._.js.map +1 -0
  268. package/web/.next/server/chunks/ssr/_0__4si~._.js +1 -1
  269. package/web/.next/server/chunks/ssr/_0__4si~._.js.map +1 -1
  270. package/web/.next/server/chunks/ssr/_0_m17kl._.js +1 -1
  271. package/web/.next/server/chunks/ssr/_0_m17kl._.js.map +1 -1
  272. package/web/.next/server/chunks/ssr/_0d4miu.._.js +1 -1
  273. package/web/.next/server/chunks/ssr/_0d4miu.._.js.map +1 -1
  274. package/web/.next/server/chunks/ssr/_0e8ern9._.js +1 -1
  275. package/web/.next/server/chunks/ssr/_0e8ern9._.js.map +1 -1
  276. package/web/.next/server/chunks/ssr/_0i~-084._.js +3 -0
  277. package/web/.next/server/chunks/ssr/_0i~-084._.js.map +1 -0
  278. package/web/.next/server/chunks/ssr/_0kt18~b._.js +3 -0
  279. package/web/.next/server/chunks/ssr/_0kt18~b._.js.map +1 -0
  280. package/web/.next/server/chunks/ssr/{_0hw~zvl._.js → _0o_oaao._.js} +2 -2
  281. package/web/.next/server/chunks/ssr/_0o_oaao._.js.map +1 -0
  282. package/web/.next/server/chunks/ssr/_0p3~u8u._.js +2 -2
  283. package/web/.next/server/chunks/ssr/_0p3~u8u._.js.map +1 -1
  284. package/web/.next/server/chunks/ssr/_0r.3n~3._.js +1 -1
  285. package/web/.next/server/chunks/ssr/_0r.3n~3._.js.map +1 -1
  286. package/web/.next/server/chunks/ssr/_0rcx2-c._.js +9 -0
  287. package/web/.next/server/chunks/ssr/_0rcx2-c._.js.map +1 -0
  288. package/web/.next/server/chunks/ssr/_0t59q8r._.js +1 -1
  289. package/web/.next/server/chunks/ssr/_0t59q8r._.js.map +1 -1
  290. package/web/.next/server/chunks/ssr/_0tcccbb._.js +1 -1
  291. package/web/.next/server/chunks/ssr/_0tcccbb._.js.map +1 -1
  292. package/web/.next/server/chunks/ssr/{_0pa1dkv._.js → _0u3d8.n._.js} +2 -2
  293. package/web/.next/server/chunks/ssr/_0u3d8.n._.js.map +1 -0
  294. package/web/.next/server/chunks/ssr/_0vyfc4b._.js +1 -1
  295. package/web/.next/server/chunks/ssr/_0vyfc4b._.js.map +1 -1
  296. package/web/.next/server/chunks/ssr/_0w-_hww._.js +1 -1
  297. package/web/.next/server/chunks/ssr/_0w-_hww._.js.map +1 -1
  298. package/web/.next/server/chunks/ssr/{_09r54oy._.js → _0ygafoy._.js} +2 -2
  299. package/web/.next/server/chunks/ssr/{_09r54oy._.js.map → _0ygafoy._.js.map} +1 -1
  300. package/web/.next/server/chunks/ssr/_0zk-h5w._.js +1 -1
  301. package/web/.next/server/chunks/ssr/_0zk-h5w._.js.map +1 -1
  302. package/web/.next/server/chunks/ssr/_0~7lwu_._.js +1 -1
  303. package/web/.next/server/chunks/ssr/_0~7lwu_._.js.map +1 -1
  304. package/web/.next/server/chunks/ssr/_10joy2y._.js +3 -0
  305. package/web/.next/server/chunks/ssr/_10joy2y._.js.map +1 -0
  306. package/web/.next/server/chunks/ssr/_1161g9x._.js +1 -1
  307. package/web/.next/server/chunks/ssr/_1161g9x._.js.map +1 -1
  308. package/web/.next/server/chunks/ssr/_12uy.45._.js +3 -0
  309. package/web/.next/server/chunks/ssr/_12uy.45._.js.map +1 -0
  310. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_plugins_page_actions_0rdndum.js +3 -0
  311. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_plugins_page_actions_0rdndum.js.map +1 -0
  312. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_skills_page_actions_05m2q~u.js +1 -1
  313. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_skills_page_actions_05m2q~u.js.map +1 -1
  314. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_tools_page_actions_0.6zk.t.js +1 -1
  315. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_tools_page_actions_0.6zk.t.js.map +1 -1
  316. package/web/.next/server/chunks/ssr/src_presentation_web_app_actions_approve-feature_ts_0pjb_re._.js +1 -1
  317. package/web/.next/server/chunks/ssr/src_presentation_web_app_actions_open-ide_ts_0w2wqvu._.js +1 -1
  318. package/web/.next/server/chunks/ssr/src_presentation_web_components_features_control-center_0l3oxx9._.js +1 -1
  319. package/web/.next/server/chunks/ssr/src_presentation_web_components_features_control-center_0l3oxx9._.js.map +1 -1
  320. package/web/.next/server/middleware-build-manifest.js +3 -3
  321. package/web/.next/server/next-font-manifest.js +1 -1
  322. package/web/.next/server/next-font-manifest.json +3 -0
  323. package/web/.next/server/pages/500.html +1 -1
  324. package/web/.next/server/server-reference-manifest.js +1 -1
  325. package/web/.next/server/server-reference-manifest.json +187 -61
  326. package/web/.next/static/chunks/{0dq50gtgaj63f.js → 01zrwm.x3kpdo.js} +1 -1
  327. package/web/.next/static/chunks/{12axopx66pocj.js → 024vi1xxw5ccj.js} +1 -1
  328. package/web/.next/static/chunks/{00m_fbc2z1gyi.js → 043zp6fpfaz07.js} +3 -3
  329. package/web/.next/static/chunks/{0fg~vc93spa9c.js → 07gal-~-zwagj.js} +1 -1
  330. package/web/.next/static/chunks/{1874_wt9rit96.js → 09lcrhxslt-u8.js} +1 -1
  331. package/web/.next/static/chunks/0aq9-lg.5r.nk.js +5 -0
  332. package/web/.next/static/chunks/{0in4l8mne5y~_.js → 0b2pi58fg3lt3.js} +1 -1
  333. package/web/.next/static/chunks/0dprl~vdhvhk7.js +1 -0
  334. package/web/.next/static/chunks/{11vbir.u7_zf7.js → 0e.8n42~fpeqa.js} +1 -1
  335. package/web/.next/static/chunks/0jt5jzg88skg5.js +1 -0
  336. package/web/.next/static/chunks/{0v~n9z6b639zm.js → 0jwq.mr-.ltps.js} +1 -1
  337. package/web/.next/static/chunks/0k8m.qcahm63g.js +1 -0
  338. package/web/.next/static/chunks/0lc0x8kcu46ae.js +1 -0
  339. package/web/.next/static/chunks/{121v1_d_dfk2k.js → 0lwuepa24tqxy.js} +1 -1
  340. package/web/.next/static/chunks/0lz-oq74e_ciu.js +1 -0
  341. package/web/.next/static/chunks/0nkujbu62z1jl.js +7 -0
  342. package/web/.next/static/chunks/{0u_27fdqa2jeg.js → 0rb5cx51f5u8h.js} +1 -1
  343. package/web/.next/static/chunks/0tdbctvrma.oi.js +1 -0
  344. package/web/.next/static/chunks/{0yibymrb2j05t.css → 0v7r7y~3e~oo6.css} +1 -1
  345. package/web/.next/static/chunks/{0k0j7anrbg-of.js → 0vq.b40jzhi7r.js} +1 -1
  346. package/web/.next/static/chunks/0wd.i4f822qoa.js +1 -0
  347. package/web/.next/static/chunks/{183ehj-b80a~o.js → 0xo.hi4px83w2.js} +1 -1
  348. package/web/.next/static/chunks/{09f2lesd_dd3~.js → 0xzs6jdtkmbic.js} +1 -1
  349. package/web/.next/static/chunks/{0o33urrd3lk~u.js → 0~4c6tnw7xnnl.js} +1 -1
  350. package/web/.next/static/chunks/16jgc8hqxrp.u.js +1 -0
  351. package/web/.next/server/chunks/ssr/[root-of-the-server]__0qxd563._.js +0 -3
  352. package/web/.next/server/chunks/ssr/[root-of-the-server]__0qxd563._.js.map +0 -1
  353. package/web/.next/server/chunks/ssr/[root-of-the-server]__0rvrr1j._.js.map +0 -1
  354. package/web/.next/server/chunks/ssr/_00u~.41._.js.map +0 -1
  355. package/web/.next/server/chunks/ssr/_04s_q5r._.js.map +0 -1
  356. package/web/.next/server/chunks/ssr/_0a_8rlj._.js +0 -3
  357. package/web/.next/server/chunks/ssr/_0a_8rlj._.js.map +0 -1
  358. package/web/.next/server/chunks/ssr/_0dy8.0k._.js +0 -3
  359. package/web/.next/server/chunks/ssr/_0dy8.0k._.js.map +0 -1
  360. package/web/.next/server/chunks/ssr/_0gdghcr._.js +0 -3
  361. package/web/.next/server/chunks/ssr/_0gdghcr._.js.map +0 -1
  362. package/web/.next/server/chunks/ssr/_0hw~zvl._.js.map +0 -1
  363. package/web/.next/server/chunks/ssr/_0l2~~pi._.js +0 -3
  364. package/web/.next/server/chunks/ssr/_0l2~~pi._.js.map +0 -1
  365. package/web/.next/server/chunks/ssr/_0n.magx._.js +0 -3
  366. package/web/.next/server/chunks/ssr/_0n.magx._.js.map +0 -1
  367. package/web/.next/server/chunks/ssr/_0pa1dkv._.js.map +0 -1
  368. package/web/.next/server/chunks/ssr/_0y8u4.e._.js +0 -9
  369. package/web/.next/server/chunks/ssr/_0y8u4.e._.js.map +0 -1
  370. package/web/.next/server/chunks/ssr/_0~0jkp_._.js.map +0 -1
  371. package/web/.next/static/chunks/0-ud~1jj7chzu.js +0 -7
  372. package/web/.next/static/chunks/0c0dau5pmseko.js +0 -1
  373. package/web/.next/static/chunks/0inayq2zzadja.js +0 -1
  374. package/web/.next/static/chunks/0n3kuj7t_-jzp.js +0 -1
  375. package/web/.next/static/chunks/0pt-d18f7zxvv.js +0 -1
  376. package/web/.next/static/chunks/0xwh.0u-dexsl.js +0 -1
  377. package/web/.next/static/chunks/103xnw203o9k1.js +0 -1
  378. package/web/.next/static/chunks/12pd180jp8zu..js +0 -5
  379. package/web/.next/static/chunks/13fcwhkw7dle2.js +0 -1
  380. /package/web/.next/server/chunks/{[root-of-the-server]__0zu_byw._.js.map → [root-of-the-server]__07suer1._.js.map} +0 -0
  381. /package/web/.next/server/chunks/{[root-of-the-server]__0u1jyv9._.js.map → [root-of-the-server]__0sgzo7y._.js.map} +0 -0
  382. /package/web/.next/server/chunks/{[root-of-the-server]__08cpfre._.js.map → [root-of-the-server]__0uxlr84._.js.map} +0 -0
  383. /package/web/.next/static/{SNdaKJ9fpre8tUMRe1jlA → kDUolP-Zj2jCRleGJJGX0}/_buildManifest.js +0 -0
  384. /package/web/.next/static/{SNdaKJ9fpre8tUMRe1jlA → kDUolP-Zj2jCRleGJJGX0}/_clientMiddlewareManifest.js +0 -0
  385. /package/web/.next/static/{SNdaKJ9fpre8tUMRe1jlA → kDUolP-Zj2jCRleGJJGX0}/_ssgManifest.js +0 -0
@@ -1,3 +1,3 @@
1
- module.exports=[99829,a=>{"use strict";let b=(0,a.i(97624).default)("chevrons-up-down",[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]]);a.s(["ChevronsUpDown",0,b],99829)},85959,a=>{"use strict";var b=a.i(53083),c=a.i(11321),d=a.i(40674),e=a.i(52313),f=a.i(6120);let g=(0,f.createServerReference)("40d5c0f121621395326fd600c6541bc6b843d1eae6",f.callServer,void 0,f.findSourceMapURL,"adoptBranch"),h=(0,f.createServerReference)("40023cdcdad1109302b8a531627b0f86de2a4f6519",f.callServer,void 0,f.findSourceMapURL,"listBranches");var i=a.i(60197),j=a.i(95881),k=a.i(99829),l=a.i(37545),m=a.i(20901);a.i(78454);var n=a.i(24255),o=a.i(2824),p=a.i(18948),q=a.i(90920),r=a.i(58860),s=a.i(50950),t=a.i(85536);let u=c.forwardRef(({className:a,...c},d)=>(0,b.jsx)("div",{ref:d,className:(0,t.cn)("bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md",a),...c}));u.displayName="Command";let v=c.forwardRef(({className:a,...c},d)=>(0,b.jsxs)("div",{className:"flex items-center border-b px-3",children:[(0,b.jsx)(s.Search,{className:"me-2 h-4 w-4 shrink-0 opacity-50"}),(0,b.jsx)("input",{ref:d,className:(0,t.cn)("placeholder:text-muted-foreground flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-none disabled:cursor-not-allowed disabled:opacity-50",a),...c})]}));v.displayName="CommandInput";let w=c.forwardRef(({className:a,...c},d)=>(0,b.jsx)("div",{ref:d,className:(0,t.cn)("max-h-[300px] overflow-x-hidden overflow-y-auto",a),...c}));w.displayName="CommandList";let x=c.forwardRef(({className:a,...c},d)=>(0,b.jsx)("div",{ref:d,className:(0,t.cn)("text-muted-foreground py-6 text-center text-sm",a),...c}));x.displayName="CommandEmpty";let y=c.forwardRef(({className:a,...c},d)=>(0,b.jsx)("div",{ref:d,className:(0,t.cn)("text-foreground overflow-hidden p-1",a),...c}));y.displayName="CommandGroup";let z=c.forwardRef(({className:a,selected:c,...d},e)=>(0,b.jsx)("button",{ref:e,type:"button","data-selected":c,className:(0,t.cn)("relative flex w-full cursor-default items-center rounded-sm px-2 py-1.5 text-sm transition-colors outline-none select-none","hover:bg-accent hover:text-accent-foreground","data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground","disabled:pointer-events-none disabled:opacity-50",a),...d}));z.displayName="CommandItem",c.forwardRef(({className:a,...c},d)=>(0,b.jsx)("div",{ref:d,className:(0,t.cn)("bg-border -mx-1 h-px",a),...c})).displayName="CommandSeparator";var A=a.i(53823);function B({open:a,onClose:d,onSubmit:e,isSubmitting:f=!1,error:g,repositories:h=[],selectedRepositoryPath:s,onRepositoryChange:C,branches:D=[],branchesLoading:E=!1}){let[F,G]=(0,c.useState)(""),[H,I]=(0,c.useState)(!1),[J,K]=(0,c.useState)(""),L=(0,c.useRef)(null),[M,N]=(0,c.useState)(!1),[O,P]=(0,c.useState)(""),Q=(0,c.useRef)(null),R=h.find(a=>a.path===s),S=!!s;(0,c.useEffect)(()=>{a||(G(""),K(""),I(!1),N(!1),P(""))},[a]),(0,c.useEffect)(()=>{G(""),K("")},[s]);let T=(0,c.useCallback)(a=>{a.preventDefault();let b=F.trim();b&&s&&!f&&e(b,s)},[F,s,f,e]),U=(0,c.useCallback)(()=>{G(""),K(""),d()},[d]),V=(0,c.useCallback)(a=>{G(a),K(a),I(!1)},[]),W=(0,c.useCallback)(a=>{K(a.target.value),H||I(!0)},[H]),X=(0,c.useCallback)(a=>{if("Enter"===a.key){a.preventDefault();let b=J.trim();b&&(G(b),I(!1))}"Escape"===a.key&&(I(!1),K(F))},[J,F]),Y=(0,c.useCallback)(a=>{C?.(a),N(!1),P("")},[C]),Z=D.filter(a=>a.toLowerCase().includes(J.toLowerCase())),$=O.trim()?h.filter(a=>a.name.toLowerCase().includes(O.toLowerCase())||a.path.toLowerCase().includes(O.toLowerCase())):h;(0,c.useEffect)(()=>{M?setTimeout(()=>Q.current?.focus(),0):P("")},[M]);let _=!F.trim()||!s||f,aa=(0,b.jsxs)("div",{children:[(0,b.jsxs)(o.DrawerTitle,{className:"flex items-center gap-2",children:[(0,b.jsx)(l.GitBranch,{className:"h-4 w-4"}),"Adopt Branch"]}),(0,b.jsx)(o.DrawerDescription,{className:"text-muted-foreground text-sm",children:"Import an existing git branch into ShipIT's feature tracking"})]});return(0,b.jsx)(n.BaseDrawer,{open:a,onClose:U,size:"sm",modal:!1,header:aa,"data-testid":"adopt-branch-drawer",children:(0,b.jsxs)("form",{onSubmit:T,className:"flex flex-1 flex-col",children:[(0,b.jsx)("div",{className:"flex-1 overflow-y-auto p-4",children:(0,b.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,b.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,b.jsx)(r.Label,{children:"Repository"}),(0,b.jsxs)(A.Popover,{open:M,onOpenChange:N,children:[(0,b.jsx)(A.PopoverTrigger,{asChild:!0,children:(0,b.jsxs)("button",{type:"button",role:"combobox","aria-expanded":M,"aria-label":"Repository",disabled:f,"data-testid":"adopt-repo-combobox",className:(0,t.cn)("border-input bg-background ring-offset-background focus:ring-ring flex h-9 w-full items-center justify-between rounded-md border px-3 py-2 text-sm focus:ring-2 focus:ring-offset-2 focus:outline-none disabled:cursor-not-allowed disabled:opacity-50",!R&&"text-muted-foreground"),children:[(0,b.jsx)("span",{className:"truncate",children:R?R.name:"Select repository..."}),(0,b.jsx)(k.ChevronsUpDown,{className:"ms-2 h-4 w-4 shrink-0 opacity-50"})]})}),(0,b.jsx)(A.PopoverContent,{className:"w-80 p-0",align:"start","data-testid":"adopt-repo-combobox-content",children:(0,b.jsxs)("div",{className:"flex flex-col",children:[(0,b.jsx)("div",{className:"border-b p-2",children:(0,b.jsx)(q.Input,{ref:Q,placeholder:"Search repositories...",value:O,onChange:a=>P(a.target.value),className:"h-8 border-0 p-0 text-sm shadow-none focus-visible:ring-0","data-testid":"adopt-repo-search"})}),(0,b.jsx)("div",{className:"max-h-48 overflow-y-auto py-1",role:"listbox","aria-label":"Repositories",children:0===$.length?(0,b.jsx)("p",{className:"text-muted-foreground px-3 py-2 text-sm",children:"No repositories found."}):$.map(a=>(0,b.jsxs)("button",{type:"button",role:"option","aria-selected":s===a.path,onClick:()=>Y(a.path),className:(0,t.cn)("hover:bg-accent hover:text-accent-foreground flex w-full items-center gap-2 px-3 py-2 text-sm",s===a.path&&"bg-accent/50"),"data-testid":`adopt-repo-option-${a.id}`,children:[(0,b.jsx)(j.CheckIcon,{className:(0,t.cn)("h-4 w-4 shrink-0",s!==a.path&&"invisible")}),(0,b.jsxs)("span",{className:"flex flex-col items-start truncate",children:[(0,b.jsx)("span",{className:"truncate",children:a.name}),(0,b.jsx)("span",{className:"text-muted-foreground truncate text-xs",children:a.path})]})]},a.id))})]})})]}),(0,b.jsx)("p",{className:"text-muted-foreground text-xs",children:"Select the repository that contains the branch you want to adopt."})]}),(0,b.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,b.jsx)(r.Label,{htmlFor:"branch-name",children:"Branch name"}),(0,b.jsxs)(A.Popover,{open:H,onOpenChange:I,children:[(0,b.jsx)(A.PopoverTrigger,{asChild:!0,children:(0,b.jsxs)(p.Button,{variant:"outline",role:"combobox","aria-expanded":H,"aria-invalid":!!g,"aria-describedby":g?"adopt-branch-error-msg":void 0,disabled:f||!S,className:"w-full justify-between font-normal","data-testid":"adopt-branch-input",children:[(0,b.jsx)("span",{className:"truncate",children:S?E?"Loading branches...":F||"Select a branch...":"Select a repository first..."}),(0,b.jsx)(k.ChevronsUpDown,{className:"ms-2 h-4 w-4 shrink-0 opacity-50"})]})}),(0,b.jsx)(A.PopoverContent,{className:"w-[var(--radix-popover-trigger-width)] p-0",align:"start",children:(0,b.jsxs)(u,{children:[(0,b.jsx)(v,{ref:L,placeholder:"Search branches...",value:J,onChange:W,onKeyDown:X,"data-testid":"adopt-branch-search"}),(0,b.jsxs)(w,{children:[!E&&0===Z.length&&(0,b.jsx)(x,{children:0===D.length?"No branches found.":J?"No match — press Enter to use this value.":"No branches available."}),E?(0,b.jsx)(x,{children:(0,b.jsx)(m.LoaderCircle,{className:"mx-auto h-4 w-4 animate-spin"})}):null,Z.length>0&&(0,b.jsx)(y,{children:Z.map(a=>(0,b.jsxs)(z,{selected:a===F,onClick:()=>V(a),children:[(0,b.jsx)(i.Check,{className:(0,t.cn)("me-2 h-4 w-4",a===F?"opacity-100":"opacity-0")}),(0,b.jsx)(l.GitBranch,{className:"me-2 h-3 w-3 opacity-50"}),a]},a))})]})]})})]}),(0,b.jsx)("p",{className:"text-muted-foreground text-xs",children:S?"Select a branch from the dropdown or type to search. Local and remote branches are shown.":"Please select a repository above to see available branches."})]}),g?(0,b.jsx)("p",{id:"adopt-branch-error-msg",className:"text-destructive text-sm",role:"alert","data-testid":"adopt-branch-error",children:g}):null]})}),(0,b.jsx)("div",{className:"border-t p-4",children:(0,b.jsxs)("div",{className:"flex gap-2",children:[(0,b.jsx)(p.Button,{type:"button",variant:"outline",onClick:U,disabled:f,className:"flex-1",children:"Cancel"}),(0,b.jsx)(p.Button,{type:"submit",disabled:_,className:"flex-1","data-testid":"adopt-branch-submit",children:f?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(m.LoaderCircle,{className:"me-2 h-4 w-4 animate-spin"}),"Adopting..."]}):"Adopt Branch"})]})})]})})}a.s(["AdoptDrawerClient",0,function({repositoryPath:a,repositories:f}){let i=(0,d.useRouter)(),j=(0,d.usePathname)(),[k,l]=(0,c.useState)(!1),[m,n]=(0,c.useState)(),[o,p]=(0,c.useState)([]),[q,r]=(0,c.useState)(!1),[s,t]=(0,c.useState)(a),u=j.startsWith("/adopt"),v=!k&&u;(0,c.useEffect)(()=>{!u&&k&&l(!1)},[u,k]),(0,c.useEffect)(()=>{u&&(n(void 0),t(a))},[u,a]),(0,c.useEffect)(()=>{u&&s?(r(!0),p([]),h(s).then(p).catch(()=>p([])).finally(()=>r(!1))):p([])},[u,s]);let w=(0,c.useCallback)(()=>{i.push("/")},[i]),x=(0,c.useCallback)(a=>{t(a)},[]),y=(0,c.useCallback)((a,b)=>{n(void 0),l(!0),i.push("/"),g({branchName:a,repositoryPath:b}).then(a=>{a.error?e.toast.error(a.error):(window.dispatchEvent(new CustomEvent("shipit-ai:feature-created",{detail:{featureId:a.feature.id,name:a.feature.name,description:a.feature.description,repositoryPath:a.feature.repositoryPath}})),e.toast.success(`Branch adopted as "${a.feature.name}"`))}).catch(()=>{e.toast.error("Failed to adopt branch"),l(!1)})},[i]);return(0,b.jsx)(B,{open:v,onClose:w,onSubmit:y,isSubmitting:k,error:m,repositories:f,selectedRepositoryPath:s,onRepositoryChange:x,branches:o,branchesLoading:q})}],85959)}];
1
+ module.exports=[99829,a=>{"use strict";let b=(0,a.i(97624).default)("chevrons-up-down",[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]]);a.s(["ChevronsUpDown",0,b],99829)},85959,a=>{"use strict";var b=a.i(53083),c=a.i(11321),d=a.i(40674),e=a.i(52313),f=a.i(6120);let g=(0,f.createServerReference)("40f234f5261c4924f090aea7c2f8296eba997d4f5e",f.callServer,void 0,f.findSourceMapURL,"adoptBranch"),h=(0,f.createServerReference)("408c4a519e678a8abe9c13677259e91a31cc1a27c4",f.callServer,void 0,f.findSourceMapURL,"listBranches");var i=a.i(60197),j=a.i(95881),k=a.i(99829),l=a.i(37545),m=a.i(20901);a.i(78454);var n=a.i(24255),o=a.i(2824),p=a.i(18948),q=a.i(90920),r=a.i(58860),s=a.i(50950),t=a.i(85536);let u=c.forwardRef(({className:a,...c},d)=>(0,b.jsx)("div",{ref:d,className:(0,t.cn)("bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md",a),...c}));u.displayName="Command";let v=c.forwardRef(({className:a,...c},d)=>(0,b.jsxs)("div",{className:"flex items-center border-b px-3",children:[(0,b.jsx)(s.Search,{className:"me-2 h-4 w-4 shrink-0 opacity-50"}),(0,b.jsx)("input",{ref:d,className:(0,t.cn)("placeholder:text-muted-foreground flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-none disabled:cursor-not-allowed disabled:opacity-50",a),...c})]}));v.displayName="CommandInput";let w=c.forwardRef(({className:a,...c},d)=>(0,b.jsx)("div",{ref:d,className:(0,t.cn)("max-h-[300px] overflow-x-hidden overflow-y-auto",a),...c}));w.displayName="CommandList";let x=c.forwardRef(({className:a,...c},d)=>(0,b.jsx)("div",{ref:d,className:(0,t.cn)("text-muted-foreground py-6 text-center text-sm",a),...c}));x.displayName="CommandEmpty";let y=c.forwardRef(({className:a,...c},d)=>(0,b.jsx)("div",{ref:d,className:(0,t.cn)("text-foreground overflow-hidden p-1",a),...c}));y.displayName="CommandGroup";let z=c.forwardRef(({className:a,selected:c,...d},e)=>(0,b.jsx)("button",{ref:e,type:"button","data-selected":c,className:(0,t.cn)("relative flex w-full cursor-default items-center rounded-sm px-2 py-1.5 text-sm transition-colors outline-none select-none","hover:bg-accent hover:text-accent-foreground","data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground","disabled:pointer-events-none disabled:opacity-50",a),...d}));z.displayName="CommandItem",c.forwardRef(({className:a,...c},d)=>(0,b.jsx)("div",{ref:d,className:(0,t.cn)("bg-border -mx-1 h-px",a),...c})).displayName="CommandSeparator";var A=a.i(53823);function B({open:a,onClose:d,onSubmit:e,isSubmitting:f=!1,error:g,repositories:h=[],selectedRepositoryPath:s,onRepositoryChange:C,branches:D=[],branchesLoading:E=!1}){let[F,G]=(0,c.useState)(""),[H,I]=(0,c.useState)(!1),[J,K]=(0,c.useState)(""),L=(0,c.useRef)(null),[M,N]=(0,c.useState)(!1),[O,P]=(0,c.useState)(""),Q=(0,c.useRef)(null),R=h.find(a=>a.path===s),S=!!s;(0,c.useEffect)(()=>{a||(G(""),K(""),I(!1),N(!1),P(""))},[a]),(0,c.useEffect)(()=>{G(""),K("")},[s]);let T=(0,c.useCallback)(a=>{a.preventDefault();let b=F.trim();b&&s&&!f&&e(b,s)},[F,s,f,e]),U=(0,c.useCallback)(()=>{G(""),K(""),d()},[d]),V=(0,c.useCallback)(a=>{G(a),K(a),I(!1)},[]),W=(0,c.useCallback)(a=>{K(a.target.value),H||I(!0)},[H]),X=(0,c.useCallback)(a=>{if("Enter"===a.key){a.preventDefault();let b=J.trim();b&&(G(b),I(!1))}"Escape"===a.key&&(I(!1),K(F))},[J,F]),Y=(0,c.useCallback)(a=>{C?.(a),N(!1),P("")},[C]),Z=D.filter(a=>a.toLowerCase().includes(J.toLowerCase())),$=O.trim()?h.filter(a=>a.name.toLowerCase().includes(O.toLowerCase())||a.path.toLowerCase().includes(O.toLowerCase())):h;(0,c.useEffect)(()=>{M?setTimeout(()=>Q.current?.focus(),0):P("")},[M]);let _=!F.trim()||!s||f,aa=(0,b.jsxs)("div",{children:[(0,b.jsxs)(o.DrawerTitle,{className:"flex items-center gap-2",children:[(0,b.jsx)(l.GitBranch,{className:"h-4 w-4"}),"Adopt Branch"]}),(0,b.jsx)(o.DrawerDescription,{className:"text-muted-foreground text-sm",children:"Import an existing git branch into ShipIT's feature tracking"})]});return(0,b.jsx)(n.BaseDrawer,{open:a,onClose:U,size:"sm",modal:!1,header:aa,"data-testid":"adopt-branch-drawer",children:(0,b.jsxs)("form",{onSubmit:T,className:"flex flex-1 flex-col",children:[(0,b.jsx)("div",{className:"flex-1 overflow-y-auto p-4",children:(0,b.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,b.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,b.jsx)(r.Label,{children:"Repository"}),(0,b.jsxs)(A.Popover,{open:M,onOpenChange:N,children:[(0,b.jsx)(A.PopoverTrigger,{asChild:!0,children:(0,b.jsxs)("button",{type:"button",role:"combobox","aria-expanded":M,"aria-label":"Repository",disabled:f,"data-testid":"adopt-repo-combobox",className:(0,t.cn)("border-input bg-background ring-offset-background focus:ring-ring flex h-9 w-full items-center justify-between rounded-md border px-3 py-2 text-sm focus:ring-2 focus:ring-offset-2 focus:outline-none disabled:cursor-not-allowed disabled:opacity-50",!R&&"text-muted-foreground"),children:[(0,b.jsx)("span",{className:"truncate",children:R?R.name:"Select repository..."}),(0,b.jsx)(k.ChevronsUpDown,{className:"ms-2 h-4 w-4 shrink-0 opacity-50"})]})}),(0,b.jsx)(A.PopoverContent,{className:"w-80 p-0",align:"start","data-testid":"adopt-repo-combobox-content",children:(0,b.jsxs)("div",{className:"flex flex-col",children:[(0,b.jsx)("div",{className:"border-b p-2",children:(0,b.jsx)(q.Input,{ref:Q,placeholder:"Search repositories...",value:O,onChange:a=>P(a.target.value),className:"h-8 border-0 p-0 text-sm shadow-none focus-visible:ring-0","data-testid":"adopt-repo-search"})}),(0,b.jsx)("div",{className:"max-h-48 overflow-y-auto py-1",role:"listbox","aria-label":"Repositories",children:0===$.length?(0,b.jsx)("p",{className:"text-muted-foreground px-3 py-2 text-sm",children:"No repositories found."}):$.map(a=>(0,b.jsxs)("button",{type:"button",role:"option","aria-selected":s===a.path,onClick:()=>Y(a.path),className:(0,t.cn)("hover:bg-accent hover:text-accent-foreground flex w-full items-center gap-2 px-3 py-2 text-sm",s===a.path&&"bg-accent/50"),"data-testid":`adopt-repo-option-${a.id}`,children:[(0,b.jsx)(j.CheckIcon,{className:(0,t.cn)("h-4 w-4 shrink-0",s!==a.path&&"invisible")}),(0,b.jsxs)("span",{className:"flex flex-col items-start truncate",children:[(0,b.jsx)("span",{className:"truncate",children:a.name}),(0,b.jsx)("span",{className:"text-muted-foreground truncate text-xs",children:a.path})]})]},a.id))})]})})]}),(0,b.jsx)("p",{className:"text-muted-foreground text-xs",children:"Select the repository that contains the branch you want to adopt."})]}),(0,b.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,b.jsx)(r.Label,{htmlFor:"branch-name",children:"Branch name"}),(0,b.jsxs)(A.Popover,{open:H,onOpenChange:I,children:[(0,b.jsx)(A.PopoverTrigger,{asChild:!0,children:(0,b.jsxs)(p.Button,{variant:"outline",role:"combobox","aria-expanded":H,"aria-invalid":!!g,"aria-describedby":g?"adopt-branch-error-msg":void 0,disabled:f||!S,className:"w-full justify-between font-normal","data-testid":"adopt-branch-input",children:[(0,b.jsx)("span",{className:"truncate",children:S?E?"Loading branches...":F||"Select a branch...":"Select a repository first..."}),(0,b.jsx)(k.ChevronsUpDown,{className:"ms-2 h-4 w-4 shrink-0 opacity-50"})]})}),(0,b.jsx)(A.PopoverContent,{className:"w-[var(--radix-popover-trigger-width)] p-0",align:"start",children:(0,b.jsxs)(u,{children:[(0,b.jsx)(v,{ref:L,placeholder:"Search branches...",value:J,onChange:W,onKeyDown:X,"data-testid":"adopt-branch-search"}),(0,b.jsxs)(w,{children:[!E&&0===Z.length&&(0,b.jsx)(x,{children:0===D.length?"No branches found.":J?"No match — press Enter to use this value.":"No branches available."}),E?(0,b.jsx)(x,{children:(0,b.jsx)(m.LoaderCircle,{className:"mx-auto h-4 w-4 animate-spin"})}):null,Z.length>0&&(0,b.jsx)(y,{children:Z.map(a=>(0,b.jsxs)(z,{selected:a===F,onClick:()=>V(a),children:[(0,b.jsx)(i.Check,{className:(0,t.cn)("me-2 h-4 w-4",a===F?"opacity-100":"opacity-0")}),(0,b.jsx)(l.GitBranch,{className:"me-2 h-3 w-3 opacity-50"}),a]},a))})]})]})})]}),(0,b.jsx)("p",{className:"text-muted-foreground text-xs",children:S?"Select a branch from the dropdown or type to search. Local and remote branches are shown.":"Please select a repository above to see available branches."})]}),g?(0,b.jsx)("p",{id:"adopt-branch-error-msg",className:"text-destructive text-sm",role:"alert","data-testid":"adopt-branch-error",children:g}):null]})}),(0,b.jsx)("div",{className:"border-t p-4",children:(0,b.jsxs)("div",{className:"flex gap-2",children:[(0,b.jsx)(p.Button,{type:"button",variant:"outline",onClick:U,disabled:f,className:"flex-1",children:"Cancel"}),(0,b.jsx)(p.Button,{type:"submit",disabled:_,className:"flex-1","data-testid":"adopt-branch-submit",children:f?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(m.LoaderCircle,{className:"me-2 h-4 w-4 animate-spin"}),"Adopting..."]}):"Adopt Branch"})]})})]})})}a.s(["AdoptDrawerClient",0,function({repositoryPath:a,repositories:f}){let i=(0,d.useRouter)(),j=(0,d.usePathname)(),[k,l]=(0,c.useState)(!1),[m,n]=(0,c.useState)(),[o,p]=(0,c.useState)([]),[q,r]=(0,c.useState)(!1),[s,t]=(0,c.useState)(a),u=j.startsWith("/adopt"),v=!k&&u;(0,c.useEffect)(()=>{!u&&k&&l(!1)},[u,k]),(0,c.useEffect)(()=>{u&&(n(void 0),t(a))},[u,a]),(0,c.useEffect)(()=>{u&&s?(r(!0),p([]),h(s).then(p).catch(()=>p([])).finally(()=>r(!1))):p([])},[u,s]);let w=(0,c.useCallback)(()=>{i.push("/")},[i]),x=(0,c.useCallback)(a=>{t(a)},[]),y=(0,c.useCallback)((a,b)=>{n(void 0),l(!0),i.push("/"),g({branchName:a,repositoryPath:b}).then(a=>{a.error?e.toast.error(a.error):(window.dispatchEvent(new CustomEvent("shipit-ai:feature-created",{detail:{featureId:a.feature.id,name:a.feature.name,description:a.feature.description,repositoryPath:a.feature.repositoryPath}})),e.toast.success(`Branch adopted as "${a.feature.name}"`))}).catch(()=>{e.toast.error("Failed to adopt branch"),l(!1)})},[i]);return(0,b.jsx)(B,{open:v,onClose:w,onSubmit:y,isSubmitting:k,error:m,repositories:f,selectedRepositoryPath:s,onRepositoryChange:x,branches:o,branchesLoading:q})}],85959)}];
2
2
 
3
3
  //# sourceMappingURL=_0vyfc4b._.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../../../node_modules/.pnpm/lucide-react%401.7.0_react%4019.2.4/node_modules/lucide-react/src/icons/chevrons-up-down.ts","../../../../../../../src/presentation/web/components/common/control-center-drawer/adopt-drawer-client.tsx","../../../../../../../src/presentation/web/app/actions/data%3A85c885%20%3Ctext/javascript%3E","../../../../../../../src/presentation/web/app/actions/data%3A5df050%20%3Ctext/javascript%3E","../../../../../../../src/presentation/web/components/common/control-center-drawer/adopt-branch-drawer.tsx","../../../../../../../src/presentation/web/components/ui/command.tsx"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\nimport { IconNode } from '../types';\n\nexport const __iconNode: IconNode = [\n ['path', { d: 'm7 15 5 5 5-5', key: '1hf1tw' }],\n ['path', { d: 'm7 9 5-5 5 5', key: 'sgt6xg' }],\n];\n\n/**\n * @component @name ChevronsUpDown\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJtNyAxNSA1IDUgNS01IiAvPgogIDxwYXRoIGQ9Im03IDkgNS01IDUgNSIgLz4KPC9zdmc+Cg==) - https://lucide.dev/icons/chevrons-up-down\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst ChevronsUpDown = createLucideIcon('chevrons-up-down', __iconNode);\n\nexport default ChevronsUpDown;\n","'use client';\n\nimport { useState, useCallback, useEffect } from 'react';\nimport { useRouter, usePathname } from 'next/navigation';\nimport { toast } from 'sonner';\nimport { adoptBranch } from '@/app/actions/adopt-branch';\nimport { listBranches } from '@/app/actions/list-branches';\nimport { AdoptBranchDrawer } from './adopt-branch-drawer';\nimport type { RepositoryOption } from '@/components/common/feature-create-drawer/feature-create-drawer';\n\nexport interface AdoptDrawerClientProps {\n repositoryPath: string;\n repositories: RepositoryOption[];\n}\n\nexport function AdoptDrawerClient({ repositoryPath, repositories }: AdoptDrawerClientProps) {\n const router = useRouter();\n const pathname = usePathname();\n const [isSubmitting, setIsSubmitting] = useState(false);\n const [error, setError] = useState<string>();\n const [branches, setBranches] = useState<string[]>([]);\n const [branchesLoading, setBranchesLoading] = useState(false);\n const [selectedRepoPath, setSelectedRepoPath] = useState(repositoryPath);\n\n const isOnAdoptRoute = pathname.startsWith('/adopt');\n const isOpen = !isSubmitting && isOnAdoptRoute;\n\n // Reset isSubmitting once the route has actually changed away from /adopt\n useEffect(() => {\n if (!isOnAdoptRoute && isSubmitting) {\n setIsSubmitting(false);\n }\n }, [isOnAdoptRoute, isSubmitting]);\n\n // Clear error when drawer reopens and reset selected repo to default\n useEffect(() => {\n if (isOnAdoptRoute) {\n setError(undefined);\n setSelectedRepoPath(repositoryPath);\n }\n }, [isOnAdoptRoute, repositoryPath]);\n\n // Fetch branches when drawer opens AND a repository is selected\n useEffect(() => {\n if (isOnAdoptRoute && selectedRepoPath) {\n setBranchesLoading(true);\n setBranches([]);\n listBranches(selectedRepoPath)\n .then(setBranches)\n .catch(() => setBranches([]))\n .finally(() => setBranchesLoading(false));\n } else {\n setBranches([]);\n }\n }, [isOnAdoptRoute, selectedRepoPath]);\n\n const onClose = useCallback(() => {\n router.push('/');\n }, [router]);\n\n const handleRepositoryChange = useCallback((path: string) => {\n setSelectedRepoPath(path);\n }, []);\n\n const onSubmit = useCallback(\n (branchName: string, repoPath: string) => {\n setError(undefined);\n setIsSubmitting(true);\n router.push('/');\n\n adoptBranch({ branchName, repositoryPath: repoPath })\n .then((result) => {\n if (result.error) {\n toast.error(result.error);\n return;\n }\n window.dispatchEvent(\n new CustomEvent('shipit-ai:feature-created', {\n detail: {\n featureId: result.feature!.id,\n name: result.feature!.name,\n description: result.feature!.description,\n repositoryPath: result.feature!.repositoryPath,\n },\n })\n );\n toast.success(`Branch adopted as \"${result.feature!.name}\"`);\n })\n .catch(() => {\n toast.error('Failed to adopt branch');\n setIsSubmitting(false);\n });\n },\n [router]\n );\n\n return (\n <AdoptBranchDrawer\n open={isOpen}\n onClose={onClose}\n onSubmit={onSubmit}\n isSubmitting={isSubmitting}\n error={error}\n repositories={repositories}\n selectedRepositoryPath={selectedRepoPath}\n onRepositoryChange={handleRepositoryChange}\n branches={branches}\n branchesLoading={branchesLoading}\n />\n );\n}\n","/* __next_internal_action_entry_do_not_use__ [{\"40d5c0f121621395326fd600c6541bc6b843d1eae6\":{\"name\":\"adoptBranch\"}},\"src/presentation/web/app/actions/adopt-branch.ts\",\"\"] */\"use turbopack no side effects\";import{createServerReference,callServer,findSourceMapURL}from\"private-next-rsc-action-client-wrapper\";const $$RSC_SERVER_ACTION_0=/*#__PURE__*/createServerReference(\"40d5c0f121621395326fd600c6541bc6b843d1eae6\",callServer,void 0,findSourceMapURL,\"adoptBranch\");export{$$RSC_SERVER_ACTION_0 as adoptBranch};","/* __next_internal_action_entry_do_not_use__ [{\"40023cdcdad1109302b8a531627b0f86de2a4f6519\":{\"name\":\"listBranches\"}},\"src/presentation/web/app/actions/list-branches.ts\",\"\"] */\"use turbopack no side effects\";import{createServerReference,callServer,findSourceMapURL}from\"private-next-rsc-action-client-wrapper\";const $$RSC_SERVER_ACTION_0=/*#__PURE__*/createServerReference(\"40023cdcdad1109302b8a531627b0f86de2a4f6519\",callServer,void 0,findSourceMapURL,\"listBranches\");export{$$RSC_SERVER_ACTION_0 as listBranches};","'use client';\n\nimport { useState, useCallback, useEffect, useRef } from 'react';\nimport { Check, CheckIcon, ChevronsUpDown, GitBranch, LoaderCircle } from 'lucide-react';\nimport { BaseDrawer } from '@/components/common/base-drawer';\nimport { DrawerTitle, DrawerDescription } from '@/components/ui/drawer';\nimport { Button } from '@/components/ui/button';\nimport { Input } from '@/components/ui/input';\nimport { Label } from '@/components/ui/label';\nimport {\n Command,\n CommandEmpty,\n CommandGroup,\n CommandInput,\n CommandItem,\n CommandList,\n} from '@/components/ui/command';\nimport { Popover, PopoverContent, PopoverTrigger } from '@/components/ui/popover';\nimport { cn } from '@/lib/utils';\nimport type { RepositoryOption } from '@/components/common/feature-create-drawer/feature-create-drawer';\n\nexport interface AdoptBranchDrawerProps {\n open: boolean;\n onClose: () => void;\n onSubmit: (branchName: string, repositoryPath: string) => void;\n isSubmitting?: boolean;\n error?: string;\n /** Available repositories for the repository selector */\n repositories?: RepositoryOption[];\n /** Currently selected repository path */\n selectedRepositoryPath?: string;\n /** Callback when user selects a different repository */\n onRepositoryChange?: (repositoryPath: string) => void;\n /** Available branch names for the combobox dropdown */\n branches?: string[];\n /** Whether branches are still loading */\n branchesLoading?: boolean;\n}\n\nexport function AdoptBranchDrawer({\n open,\n onClose,\n onSubmit,\n isSubmitting = false,\n error,\n repositories = [],\n selectedRepositoryPath,\n onRepositoryChange,\n branches = [],\n branchesLoading = false,\n}: AdoptBranchDrawerProps) {\n const [branchName, setBranchName] = useState('');\n const [comboboxOpen, setComboboxOpen] = useState(false);\n const [inputValue, setInputValue] = useState('');\n const inputRef = useRef<HTMLInputElement>(null);\n const [repoOpen, setRepoOpen] = useState(false);\n const [repoQuery, setRepoQuery] = useState('');\n const repoInputRef = useRef<HTMLInputElement>(null);\n\n const selectedRepo = repositories.find((r) => r.path === selectedRepositoryPath);\n const hasRepo = !!selectedRepositoryPath;\n\n // Reset state when drawer closes\n useEffect(() => {\n if (!open) {\n setBranchName('');\n setInputValue('');\n setComboboxOpen(false);\n setRepoOpen(false);\n setRepoQuery('');\n }\n }, [open]);\n\n // Reset branch selection when repository changes\n useEffect(() => {\n setBranchName('');\n setInputValue('');\n }, [selectedRepositoryPath]);\n\n const handleSubmit = useCallback(\n (e: React.FormEvent) => {\n e.preventDefault();\n const trimmed = branchName.trim();\n if (!trimmed || !selectedRepositoryPath || isSubmitting) return;\n onSubmit(trimmed, selectedRepositoryPath);\n },\n [branchName, selectedRepositoryPath, isSubmitting, onSubmit]\n );\n\n const handleClose = useCallback(() => {\n setBranchName('');\n setInputValue('');\n onClose();\n }, [onClose]);\n\n const handleSelect = useCallback((branch: string) => {\n setBranchName(branch);\n setInputValue(branch);\n setComboboxOpen(false);\n }, []);\n\n const handleInputChange = useCallback(\n (e: React.ChangeEvent<HTMLInputElement>) => {\n setInputValue(e.target.value);\n if (!comboboxOpen) setComboboxOpen(true);\n },\n [comboboxOpen]\n );\n\n const handleInputKeyDown = useCallback(\n (e: React.KeyboardEvent<HTMLInputElement>) => {\n if (e.key === 'Enter') {\n e.preventDefault();\n const trimmed = inputValue.trim();\n if (trimmed) {\n setBranchName(trimmed);\n setComboboxOpen(false);\n }\n }\n if (e.key === 'Escape') {\n setComboboxOpen(false);\n setInputValue(branchName);\n }\n },\n [inputValue, branchName]\n );\n\n const handleRepoSelect = useCallback(\n (path: string) => {\n onRepositoryChange?.(path);\n setRepoOpen(false);\n setRepoQuery('');\n },\n [onRepositoryChange]\n );\n\n const filteredBranches = branches.filter((b) =>\n b.toLowerCase().includes(inputValue.toLowerCase())\n );\n\n const filteredRepos = repoQuery.trim()\n ? repositories.filter(\n (r) =>\n r.name.toLowerCase().includes(repoQuery.toLowerCase()) ||\n r.path.toLowerCase().includes(repoQuery.toLowerCase())\n )\n : repositories;\n\n useEffect(() => {\n if (repoOpen) {\n setTimeout(() => repoInputRef.current?.focus(), 0);\n } else {\n setRepoQuery('');\n }\n }, [repoOpen]);\n\n const isDisabled = !branchName.trim() || !selectedRepositoryPath || isSubmitting;\n\n const header = (\n <div>\n <DrawerTitle className=\"flex items-center gap-2\">\n <GitBranch className=\"h-4 w-4\" />\n Adopt Branch\n </DrawerTitle>\n <DrawerDescription className=\"text-muted-foreground text-sm\">\n Import an existing git branch into ShipIT&apos;s feature tracking\n </DrawerDescription>\n </div>\n );\n\n return (\n <BaseDrawer\n open={open}\n onClose={handleClose}\n size=\"sm\"\n modal={false}\n header={header}\n data-testid=\"adopt-branch-drawer\"\n >\n <form onSubmit={handleSubmit} className=\"flex flex-1 flex-col\">\n <div className=\"flex-1 overflow-y-auto p-4\">\n <div className=\"flex flex-col gap-4\">\n {/* Repository selector */}\n <div className=\"flex flex-col gap-2\">\n <Label>Repository</Label>\n <Popover open={repoOpen} onOpenChange={setRepoOpen}>\n <PopoverTrigger asChild>\n <button\n type=\"button\"\n role=\"combobox\"\n aria-expanded={repoOpen}\n aria-label=\"Repository\"\n disabled={isSubmitting}\n data-testid=\"adopt-repo-combobox\"\n className={cn(\n 'border-input bg-background ring-offset-background focus:ring-ring flex h-9 w-full items-center justify-between rounded-md border px-3 py-2 text-sm focus:ring-2 focus:ring-offset-2 focus:outline-none disabled:cursor-not-allowed disabled:opacity-50',\n !selectedRepo && 'text-muted-foreground'\n )}\n >\n <span className=\"truncate\">\n {selectedRepo ? selectedRepo.name : 'Select repository...'}\n </span>\n <ChevronsUpDown className=\"ms-2 h-4 w-4 shrink-0 opacity-50\" />\n </button>\n </PopoverTrigger>\n <PopoverContent\n className=\"w-80 p-0\"\n align=\"start\"\n data-testid=\"adopt-repo-combobox-content\"\n >\n <div className=\"flex flex-col\">\n <div className=\"border-b p-2\">\n <Input\n ref={repoInputRef}\n placeholder=\"Search repositories...\"\n value={repoQuery}\n onChange={(e) => setRepoQuery(e.target.value)}\n className=\"h-8 border-0 p-0 text-sm shadow-none focus-visible:ring-0\"\n data-testid=\"adopt-repo-search\"\n />\n </div>\n <div\n className=\"max-h-48 overflow-y-auto py-1\"\n role=\"listbox\"\n aria-label=\"Repositories\"\n >\n {filteredRepos.length === 0 ? (\n <p className=\"text-muted-foreground px-3 py-2 text-sm\">\n No repositories found.\n </p>\n ) : (\n filteredRepos.map((r) => (\n <button\n key={r.id}\n type=\"button\"\n role=\"option\"\n aria-selected={selectedRepositoryPath === r.path}\n onClick={() => handleRepoSelect(r.path)}\n className={cn(\n 'hover:bg-accent hover:text-accent-foreground flex w-full items-center gap-2 px-3 py-2 text-sm',\n selectedRepositoryPath === r.path && 'bg-accent/50'\n )}\n data-testid={`adopt-repo-option-${r.id}`}\n >\n <CheckIcon\n className={cn(\n 'h-4 w-4 shrink-0',\n selectedRepositoryPath !== r.path && 'invisible'\n )}\n />\n <span className=\"flex flex-col items-start truncate\">\n <span className=\"truncate\">{r.name}</span>\n <span className=\"text-muted-foreground truncate text-xs\">\n {r.path}\n </span>\n </span>\n </button>\n ))\n )}\n </div>\n </div>\n </PopoverContent>\n </Popover>\n <p className=\"text-muted-foreground text-xs\">\n Select the repository that contains the branch you want to adopt.\n </p>\n </div>\n\n {/* Branch selector */}\n <div className=\"flex flex-col gap-2\">\n <Label htmlFor=\"branch-name\">Branch name</Label>\n <Popover open={comboboxOpen} onOpenChange={setComboboxOpen}>\n <PopoverTrigger asChild>\n <Button\n variant=\"outline\"\n role=\"combobox\"\n aria-expanded={comboboxOpen}\n aria-invalid={!!error}\n aria-describedby={error ? 'adopt-branch-error-msg' : undefined}\n disabled={isSubmitting || !hasRepo}\n className=\"w-full justify-between font-normal\"\n data-testid=\"adopt-branch-input\"\n >\n <span className=\"truncate\">\n {!hasRepo\n ? 'Select a repository first...'\n : branchesLoading\n ? 'Loading branches...'\n : branchName || 'Select a branch...'}\n </span>\n <ChevronsUpDown className=\"ms-2 h-4 w-4 shrink-0 opacity-50\" />\n </Button>\n </PopoverTrigger>\n <PopoverContent\n className=\"w-[var(--radix-popover-trigger-width)] p-0\"\n align=\"start\"\n >\n <Command>\n <CommandInput\n ref={inputRef}\n placeholder=\"Search branches...\"\n value={inputValue}\n onChange={handleInputChange}\n onKeyDown={handleInputKeyDown}\n data-testid=\"adopt-branch-search\"\n />\n <CommandList>\n {!branchesLoading && filteredBranches.length === 0 && (\n <CommandEmpty>\n {branches.length === 0\n ? 'No branches found.'\n : inputValue\n ? 'No match — press Enter to use this value.'\n : 'No branches available.'}\n </CommandEmpty>\n )}\n {branchesLoading ? (\n <CommandEmpty>\n <LoaderCircle className=\"mx-auto h-4 w-4 animate-spin\" />\n </CommandEmpty>\n ) : null}\n {filteredBranches.length > 0 && (\n <CommandGroup>\n {filteredBranches.map((branch) => (\n <CommandItem\n key={branch}\n selected={branch === branchName}\n onClick={() => handleSelect(branch)}\n >\n <Check\n className={cn(\n 'me-2 h-4 w-4',\n branch === branchName ? 'opacity-100' : 'opacity-0'\n )}\n />\n <GitBranch className=\"me-2 h-3 w-3 opacity-50\" />\n {branch}\n </CommandItem>\n ))}\n </CommandGroup>\n )}\n </CommandList>\n </Command>\n </PopoverContent>\n </Popover>\n <p className=\"text-muted-foreground text-xs\">\n {hasRepo\n ? 'Select a branch from the dropdown or type to search. Local and remote branches are shown.'\n : 'Please select a repository above to see available branches.'}\n </p>\n </div>\n\n {error ? (\n <p\n id=\"adopt-branch-error-msg\"\n className=\"text-destructive text-sm\"\n role=\"alert\"\n data-testid=\"adopt-branch-error\"\n >\n {error}\n </p>\n ) : null}\n </div>\n </div>\n\n <div className=\"border-t p-4\">\n <div className=\"flex gap-2\">\n <Button\n type=\"button\"\n variant=\"outline\"\n onClick={handleClose}\n disabled={isSubmitting}\n className=\"flex-1\"\n >\n Cancel\n </Button>\n <Button\n type=\"submit\"\n disabled={isDisabled}\n className=\"flex-1\"\n data-testid=\"adopt-branch-submit\"\n >\n {isSubmitting ? (\n <>\n <LoaderCircle className=\"me-2 h-4 w-4 animate-spin\" />\n Adopting...\n </>\n ) : (\n 'Adopt Branch'\n )}\n </Button>\n </div>\n </div>\n </form>\n </BaseDrawer>\n );\n}\n","'use client';\n\nimport * as React from 'react';\nimport { Search } from 'lucide-react';\n\nimport { cn } from '@/lib/utils';\n\n/**\n * Command — minimal combobox primitives for model/item selection.\n *\n * Intentionally avoids the `cmdk` dependency and builds on native React +\n * Tailwind instead. Filtering logic lives in the consumer component.\n */\n\nconst Command = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement>>(\n ({ className, ...props }, ref) => (\n <div\n ref={ref}\n className={cn(\n 'bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md',\n className\n )}\n {...props}\n />\n )\n);\nCommand.displayName = 'Command';\n\nconst CommandInput = React.forwardRef<\n HTMLInputElement,\n React.InputHTMLAttributes<HTMLInputElement>\n>(({ className, ...props }, ref) => (\n <div className=\"flex items-center border-b px-3\">\n <Search className=\"me-2 h-4 w-4 shrink-0 opacity-50\" />\n <input\n ref={ref}\n className={cn(\n 'placeholder:text-muted-foreground flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-none disabled:cursor-not-allowed disabled:opacity-50',\n className\n )}\n {...props}\n />\n </div>\n));\nCommandInput.displayName = 'CommandInput';\n\nconst CommandList = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement>>(\n ({ className, ...props }, ref) => (\n <div\n ref={ref}\n className={cn('max-h-[300px] overflow-x-hidden overflow-y-auto', className)}\n {...props}\n />\n )\n);\nCommandList.displayName = 'CommandList';\n\nconst CommandEmpty = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement>>(\n ({ className, ...props }, ref) => (\n <div\n ref={ref}\n className={cn('text-muted-foreground py-6 text-center text-sm', className)}\n {...props}\n />\n )\n);\nCommandEmpty.displayName = 'CommandEmpty';\n\nconst CommandGroup = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement>>(\n ({ className, ...props }, ref) => (\n <div ref={ref} className={cn('text-foreground overflow-hidden p-1', className)} {...props} />\n )\n);\nCommandGroup.displayName = 'CommandGroup';\n\ninterface CommandItemProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {\n selected?: boolean;\n}\n\nconst CommandItem = React.forwardRef<HTMLButtonElement, CommandItemProps>(\n ({ className, selected, ...props }, ref) => (\n <button\n ref={ref}\n type=\"button\"\n data-selected={selected}\n className={cn(\n 'relative flex w-full cursor-default items-center rounded-sm px-2 py-1.5 text-sm transition-colors outline-none select-none',\n 'hover:bg-accent hover:text-accent-foreground',\n 'data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground',\n 'disabled:pointer-events-none disabled:opacity-50',\n className\n )}\n {...props}\n />\n )\n);\nCommandItem.displayName = 'CommandItem';\n\nconst CommandSeparator = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement>>(\n ({ className, ...props }, ref) => (\n <div ref={ref} className={cn('bg-border -mx-1 h-px', className)} {...props} />\n )\n);\nCommandSeparator.displayName = 'CommandSeparator';\n\nexport {\n Command,\n CommandEmpty,\n CommandGroup,\n CommandInput,\n CommandItem,\n CommandList,\n CommandSeparator,\n};\n"],"names":["$$RSC_SERVER_ACTION_0"],"mappings":"uCAmBA,CAAA,CAAA,CAAA,CAAA,AAAM,CAAN,CAAM,CAAA,EAAiB,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAjB,AAAiB,CAAjB,AAAiB,CAAjB,AAAiB,CAAA,CAAA,CAAA,CAAA,GAAA,EAAiB,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAhBJ,CAgBwB,AAf1D,CAe0D,AAfzD,CAeyD,AAfzD,CAAA,AAeyD,CAAA,AAfzD,CAAA,AAeyD,CAfzD,AAeyD,CAfzD,AAeyD,CAAA,AAfzD,AAAQ,CAeiD,AAfjD,AAAE,CAeyD,CAftD,AAesD,CAftD,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,AAAiB,CAAA,CAAA,CAAA,CAAA,AAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAU,CAAA,CAC9C,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CA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CAAC,KAEZ,EAAY,YAAE,EAAY,eAAgB,CAAS,GAChD,IAAI,CAAE,AAAD,IACJ,AAAI,EAAO,KAAK,CACd,CADgB,CAChB,KAAK,CAAC,KAAK,CAAC,EAAO,KAAK,GAG1B,OAAO,aAAa,CAClB,IAAI,YAAY,4BAA6B,CAC3C,OAAQ,CACN,UAAW,EAAO,OAAO,CAAE,EAAE,CAC7B,KAAM,EAAO,OAAO,CAAE,IAAI,CAC1B,YAAa,EAAO,OAAO,CAAE,WAAW,CACxC,eAAgB,EAAO,OAAO,CAAE,cAClC,AADgD,CAElD,IAEF,EAAA,KAAK,CAAC,OAAO,CAAC,CAAC,mBAAmB,EAAE,EAAO,OAAO,CAAE,IAAI,CAAC,CAAC,CAAC,EAC7D,GACC,KAAK,CAAC,KACL,EAAA,KAAK,CAAC,KAAK,CAAC,0BACZ,GAAgB,EAClB,EACJ,EACA,CAAC,EAAO,EAGV,MACE,CAAA,EAAA,EAAA,GAAA,EAAC,EAAA,CACC,KAAM,EACN,QAAS,EACT,SAAU,EACV,aAAc,EACd,MAAO,EACP,aAAc,EACd,uBAAwB,EACxB,mBAAoB,EACpB,SAAU,EACV,gBAAiB,GAGvB","ignoreList":[0]}
1
+ {"version":3,"sources":["../../../../../../../node_modules/.pnpm/lucide-react%401.7.0_react%4019.2.4/node_modules/lucide-react/src/icons/chevrons-up-down.ts","../../../../../../../src/presentation/web/components/common/control-center-drawer/adopt-drawer-client.tsx","../../../../../../../src/presentation/web/app/actions/data%3A916392%20%3Ctext/javascript%3E","../../../../../../../src/presentation/web/app/actions/data%3A3bc78a%20%3Ctext/javascript%3E","../../../../../../../src/presentation/web/components/common/control-center-drawer/adopt-branch-drawer.tsx","../../../../../../../src/presentation/web/components/ui/command.tsx"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\nimport { IconNode } from '../types';\n\nexport const __iconNode: IconNode = [\n ['path', { d: 'm7 15 5 5 5-5', key: '1hf1tw' }],\n ['path', { d: 'm7 9 5-5 5 5', key: 'sgt6xg' }],\n];\n\n/**\n * @component @name ChevronsUpDown\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJtNyAxNSA1IDUgNS01IiAvPgogIDxwYXRoIGQ9Im03IDkgNS01IDUgNSIgLz4KPC9zdmc+Cg==) - https://lucide.dev/icons/chevrons-up-down\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst ChevronsUpDown = createLucideIcon('chevrons-up-down', __iconNode);\n\nexport default ChevronsUpDown;\n","'use client';\n\nimport { useState, useCallback, useEffect } from 'react';\nimport { useRouter, usePathname } from 'next/navigation';\nimport { toast } from 'sonner';\nimport { adoptBranch } from '@/app/actions/adopt-branch';\nimport { listBranches } from '@/app/actions/list-branches';\nimport { AdoptBranchDrawer } from './adopt-branch-drawer';\nimport type { RepositoryOption } from '@/components/common/feature-create-drawer/feature-create-drawer';\n\nexport interface AdoptDrawerClientProps {\n repositoryPath: string;\n repositories: RepositoryOption[];\n}\n\nexport function AdoptDrawerClient({ repositoryPath, repositories }: AdoptDrawerClientProps) {\n const router = useRouter();\n const pathname = usePathname();\n const [isSubmitting, setIsSubmitting] = useState(false);\n const [error, setError] = useState<string>();\n const [branches, setBranches] = useState<string[]>([]);\n const [branchesLoading, setBranchesLoading] = useState(false);\n const [selectedRepoPath, setSelectedRepoPath] = useState(repositoryPath);\n\n const isOnAdoptRoute = pathname.startsWith('/adopt');\n const isOpen = !isSubmitting && isOnAdoptRoute;\n\n // Reset isSubmitting once the route has actually changed away from /adopt\n useEffect(() => {\n if (!isOnAdoptRoute && isSubmitting) {\n setIsSubmitting(false);\n }\n }, [isOnAdoptRoute, isSubmitting]);\n\n // Clear error when drawer reopens and reset selected repo to default\n useEffect(() => {\n if (isOnAdoptRoute) {\n setError(undefined);\n setSelectedRepoPath(repositoryPath);\n }\n }, [isOnAdoptRoute, repositoryPath]);\n\n // Fetch branches when drawer opens AND a repository is selected\n useEffect(() => {\n if (isOnAdoptRoute && selectedRepoPath) {\n setBranchesLoading(true);\n setBranches([]);\n listBranches(selectedRepoPath)\n .then(setBranches)\n .catch(() => setBranches([]))\n .finally(() => setBranchesLoading(false));\n } else {\n setBranches([]);\n }\n }, [isOnAdoptRoute, selectedRepoPath]);\n\n const onClose = useCallback(() => {\n router.push('/');\n }, [router]);\n\n const handleRepositoryChange = useCallback((path: string) => {\n setSelectedRepoPath(path);\n }, []);\n\n const onSubmit = useCallback(\n (branchName: string, repoPath: string) => {\n setError(undefined);\n setIsSubmitting(true);\n router.push('/');\n\n adoptBranch({ branchName, repositoryPath: repoPath })\n .then((result) => {\n if (result.error) {\n toast.error(result.error);\n return;\n }\n window.dispatchEvent(\n new CustomEvent('shipit-ai:feature-created', {\n detail: {\n featureId: result.feature!.id,\n name: result.feature!.name,\n description: result.feature!.description,\n repositoryPath: result.feature!.repositoryPath,\n },\n })\n );\n toast.success(`Branch adopted as \"${result.feature!.name}\"`);\n })\n .catch(() => {\n toast.error('Failed to adopt branch');\n setIsSubmitting(false);\n });\n },\n [router]\n );\n\n return (\n <AdoptBranchDrawer\n open={isOpen}\n onClose={onClose}\n onSubmit={onSubmit}\n isSubmitting={isSubmitting}\n error={error}\n repositories={repositories}\n selectedRepositoryPath={selectedRepoPath}\n onRepositoryChange={handleRepositoryChange}\n branches={branches}\n branchesLoading={branchesLoading}\n />\n );\n}\n","/* __next_internal_action_entry_do_not_use__ [{\"40f234f5261c4924f090aea7c2f8296eba997d4f5e\":{\"name\":\"adoptBranch\"}},\"src/presentation/web/app/actions/adopt-branch.ts\",\"\"] */\"use turbopack no side effects\";import{createServerReference,callServer,findSourceMapURL}from\"private-next-rsc-action-client-wrapper\";const $$RSC_SERVER_ACTION_0=/*#__PURE__*/createServerReference(\"40f234f5261c4924f090aea7c2f8296eba997d4f5e\",callServer,void 0,findSourceMapURL,\"adoptBranch\");export{$$RSC_SERVER_ACTION_0 as adoptBranch};","/* __next_internal_action_entry_do_not_use__ [{\"408c4a519e678a8abe9c13677259e91a31cc1a27c4\":{\"name\":\"listBranches\"}},\"src/presentation/web/app/actions/list-branches.ts\",\"\"] */\"use turbopack no side effects\";import{createServerReference,callServer,findSourceMapURL}from\"private-next-rsc-action-client-wrapper\";const $$RSC_SERVER_ACTION_0=/*#__PURE__*/createServerReference(\"408c4a519e678a8abe9c13677259e91a31cc1a27c4\",callServer,void 0,findSourceMapURL,\"listBranches\");export{$$RSC_SERVER_ACTION_0 as listBranches};","'use client';\n\nimport { useState, useCallback, useEffect, useRef } from 'react';\nimport { Check, CheckIcon, ChevronsUpDown, GitBranch, LoaderCircle } from 'lucide-react';\nimport { BaseDrawer } from '@/components/common/base-drawer';\nimport { DrawerTitle, DrawerDescription } from '@/components/ui/drawer';\nimport { Button } from '@/components/ui/button';\nimport { Input } from '@/components/ui/input';\nimport { Label } from '@/components/ui/label';\nimport {\n Command,\n CommandEmpty,\n CommandGroup,\n CommandInput,\n CommandItem,\n CommandList,\n} from '@/components/ui/command';\nimport { Popover, PopoverContent, PopoverTrigger } from '@/components/ui/popover';\nimport { cn } from '@/lib/utils';\nimport type { RepositoryOption } from '@/components/common/feature-create-drawer/feature-create-drawer';\n\nexport interface AdoptBranchDrawerProps {\n open: boolean;\n onClose: () => void;\n onSubmit: (branchName: string, repositoryPath: string) => void;\n isSubmitting?: boolean;\n error?: string;\n /** Available repositories for the repository selector */\n repositories?: RepositoryOption[];\n /** Currently selected repository path */\n selectedRepositoryPath?: string;\n /** Callback when user selects a different repository */\n onRepositoryChange?: (repositoryPath: string) => void;\n /** Available branch names for the combobox dropdown */\n branches?: string[];\n /** Whether branches are still loading */\n branchesLoading?: boolean;\n}\n\nexport function AdoptBranchDrawer({\n open,\n onClose,\n onSubmit,\n isSubmitting = false,\n error,\n repositories = [],\n selectedRepositoryPath,\n onRepositoryChange,\n branches = [],\n branchesLoading = false,\n}: AdoptBranchDrawerProps) {\n const [branchName, setBranchName] = useState('');\n const [comboboxOpen, setComboboxOpen] = useState(false);\n const [inputValue, setInputValue] = useState('');\n const inputRef = useRef<HTMLInputElement>(null);\n const [repoOpen, setRepoOpen] = useState(false);\n const [repoQuery, setRepoQuery] = useState('');\n const repoInputRef = useRef<HTMLInputElement>(null);\n\n const selectedRepo = repositories.find((r) => r.path === selectedRepositoryPath);\n const hasRepo = !!selectedRepositoryPath;\n\n // Reset state when drawer closes\n useEffect(() => {\n if (!open) {\n setBranchName('');\n setInputValue('');\n setComboboxOpen(false);\n setRepoOpen(false);\n setRepoQuery('');\n }\n }, [open]);\n\n // Reset branch selection when repository changes\n useEffect(() => {\n setBranchName('');\n setInputValue('');\n }, [selectedRepositoryPath]);\n\n const handleSubmit = useCallback(\n (e: React.FormEvent) => {\n e.preventDefault();\n const trimmed = branchName.trim();\n if (!trimmed || !selectedRepositoryPath || isSubmitting) return;\n onSubmit(trimmed, selectedRepositoryPath);\n },\n [branchName, selectedRepositoryPath, isSubmitting, onSubmit]\n );\n\n const handleClose = useCallback(() => {\n setBranchName('');\n setInputValue('');\n onClose();\n }, [onClose]);\n\n const handleSelect = useCallback((branch: string) => {\n setBranchName(branch);\n setInputValue(branch);\n setComboboxOpen(false);\n }, []);\n\n const handleInputChange = useCallback(\n (e: React.ChangeEvent<HTMLInputElement>) => {\n setInputValue(e.target.value);\n if (!comboboxOpen) setComboboxOpen(true);\n },\n [comboboxOpen]\n );\n\n const handleInputKeyDown = useCallback(\n (e: React.KeyboardEvent<HTMLInputElement>) => {\n if (e.key === 'Enter') {\n e.preventDefault();\n const trimmed = inputValue.trim();\n if (trimmed) {\n setBranchName(trimmed);\n setComboboxOpen(false);\n }\n }\n if (e.key === 'Escape') {\n setComboboxOpen(false);\n setInputValue(branchName);\n }\n },\n [inputValue, branchName]\n );\n\n const handleRepoSelect = useCallback(\n (path: string) => {\n onRepositoryChange?.(path);\n setRepoOpen(false);\n setRepoQuery('');\n },\n [onRepositoryChange]\n );\n\n const filteredBranches = branches.filter((b) =>\n b.toLowerCase().includes(inputValue.toLowerCase())\n );\n\n const filteredRepos = repoQuery.trim()\n ? repositories.filter(\n (r) =>\n r.name.toLowerCase().includes(repoQuery.toLowerCase()) ||\n r.path.toLowerCase().includes(repoQuery.toLowerCase())\n )\n : repositories;\n\n useEffect(() => {\n if (repoOpen) {\n setTimeout(() => repoInputRef.current?.focus(), 0);\n } else {\n setRepoQuery('');\n }\n }, [repoOpen]);\n\n const isDisabled = !branchName.trim() || !selectedRepositoryPath || isSubmitting;\n\n const header = (\n <div>\n <DrawerTitle className=\"flex items-center gap-2\">\n <GitBranch className=\"h-4 w-4\" />\n Adopt Branch\n </DrawerTitle>\n <DrawerDescription className=\"text-muted-foreground text-sm\">\n Import an existing git branch into ShipIT&apos;s feature tracking\n </DrawerDescription>\n </div>\n );\n\n return (\n <BaseDrawer\n open={open}\n onClose={handleClose}\n size=\"sm\"\n modal={false}\n header={header}\n data-testid=\"adopt-branch-drawer\"\n >\n <form onSubmit={handleSubmit} className=\"flex flex-1 flex-col\">\n <div className=\"flex-1 overflow-y-auto p-4\">\n <div className=\"flex flex-col gap-4\">\n {/* Repository selector */}\n <div className=\"flex flex-col gap-2\">\n <Label>Repository</Label>\n <Popover open={repoOpen} onOpenChange={setRepoOpen}>\n <PopoverTrigger asChild>\n <button\n type=\"button\"\n role=\"combobox\"\n aria-expanded={repoOpen}\n aria-label=\"Repository\"\n disabled={isSubmitting}\n data-testid=\"adopt-repo-combobox\"\n className={cn(\n 'border-input bg-background ring-offset-background focus:ring-ring flex h-9 w-full items-center justify-between rounded-md border px-3 py-2 text-sm focus:ring-2 focus:ring-offset-2 focus:outline-none disabled:cursor-not-allowed disabled:opacity-50',\n !selectedRepo && 'text-muted-foreground'\n )}\n >\n <span className=\"truncate\">\n {selectedRepo ? selectedRepo.name : 'Select repository...'}\n </span>\n <ChevronsUpDown className=\"ms-2 h-4 w-4 shrink-0 opacity-50\" />\n </button>\n </PopoverTrigger>\n <PopoverContent\n className=\"w-80 p-0\"\n align=\"start\"\n data-testid=\"adopt-repo-combobox-content\"\n >\n <div className=\"flex flex-col\">\n <div className=\"border-b p-2\">\n <Input\n ref={repoInputRef}\n placeholder=\"Search repositories...\"\n value={repoQuery}\n onChange={(e) => setRepoQuery(e.target.value)}\n className=\"h-8 border-0 p-0 text-sm shadow-none focus-visible:ring-0\"\n data-testid=\"adopt-repo-search\"\n />\n </div>\n <div\n className=\"max-h-48 overflow-y-auto py-1\"\n role=\"listbox\"\n aria-label=\"Repositories\"\n >\n {filteredRepos.length === 0 ? (\n <p className=\"text-muted-foreground px-3 py-2 text-sm\">\n No repositories found.\n </p>\n ) : (\n filteredRepos.map((r) => (\n <button\n key={r.id}\n type=\"button\"\n role=\"option\"\n aria-selected={selectedRepositoryPath === r.path}\n onClick={() => handleRepoSelect(r.path)}\n className={cn(\n 'hover:bg-accent hover:text-accent-foreground flex w-full items-center gap-2 px-3 py-2 text-sm',\n selectedRepositoryPath === r.path && 'bg-accent/50'\n )}\n data-testid={`adopt-repo-option-${r.id}`}\n >\n <CheckIcon\n className={cn(\n 'h-4 w-4 shrink-0',\n selectedRepositoryPath !== r.path && 'invisible'\n )}\n />\n <span className=\"flex flex-col items-start truncate\">\n <span className=\"truncate\">{r.name}</span>\n <span className=\"text-muted-foreground truncate text-xs\">\n {r.path}\n </span>\n </span>\n </button>\n ))\n )}\n </div>\n </div>\n </PopoverContent>\n </Popover>\n <p className=\"text-muted-foreground text-xs\">\n Select the repository that contains the branch you want to adopt.\n </p>\n </div>\n\n {/* Branch selector */}\n <div className=\"flex flex-col gap-2\">\n <Label htmlFor=\"branch-name\">Branch name</Label>\n <Popover open={comboboxOpen} onOpenChange={setComboboxOpen}>\n <PopoverTrigger asChild>\n <Button\n variant=\"outline\"\n role=\"combobox\"\n aria-expanded={comboboxOpen}\n aria-invalid={!!error}\n aria-describedby={error ? 'adopt-branch-error-msg' : undefined}\n disabled={isSubmitting || !hasRepo}\n className=\"w-full justify-between font-normal\"\n data-testid=\"adopt-branch-input\"\n >\n <span className=\"truncate\">\n {!hasRepo\n ? 'Select a repository first...'\n : branchesLoading\n ? 'Loading branches...'\n : branchName || 'Select a branch...'}\n </span>\n <ChevronsUpDown className=\"ms-2 h-4 w-4 shrink-0 opacity-50\" />\n </Button>\n </PopoverTrigger>\n <PopoverContent\n className=\"w-[var(--radix-popover-trigger-width)] p-0\"\n align=\"start\"\n >\n <Command>\n <CommandInput\n ref={inputRef}\n placeholder=\"Search branches...\"\n value={inputValue}\n onChange={handleInputChange}\n onKeyDown={handleInputKeyDown}\n data-testid=\"adopt-branch-search\"\n />\n <CommandList>\n {!branchesLoading && filteredBranches.length === 0 && (\n <CommandEmpty>\n {branches.length === 0\n ? 'No branches found.'\n : inputValue\n ? 'No match — press Enter to use this value.'\n : 'No branches available.'}\n </CommandEmpty>\n )}\n {branchesLoading ? (\n <CommandEmpty>\n <LoaderCircle className=\"mx-auto h-4 w-4 animate-spin\" />\n </CommandEmpty>\n ) : null}\n {filteredBranches.length > 0 && (\n <CommandGroup>\n {filteredBranches.map((branch) => (\n <CommandItem\n key={branch}\n selected={branch === branchName}\n onClick={() => handleSelect(branch)}\n >\n <Check\n className={cn(\n 'me-2 h-4 w-4',\n branch === branchName ? 'opacity-100' : 'opacity-0'\n )}\n />\n <GitBranch className=\"me-2 h-3 w-3 opacity-50\" />\n {branch}\n </CommandItem>\n ))}\n </CommandGroup>\n )}\n </CommandList>\n </Command>\n </PopoverContent>\n </Popover>\n <p className=\"text-muted-foreground text-xs\">\n {hasRepo\n ? 'Select a branch from the dropdown or type to search. Local and remote branches are shown.'\n : 'Please select a repository above to see available branches.'}\n </p>\n </div>\n\n {error ? (\n <p\n id=\"adopt-branch-error-msg\"\n className=\"text-destructive text-sm\"\n role=\"alert\"\n data-testid=\"adopt-branch-error\"\n >\n {error}\n </p>\n ) : null}\n </div>\n </div>\n\n <div className=\"border-t p-4\">\n <div className=\"flex gap-2\">\n <Button\n type=\"button\"\n variant=\"outline\"\n onClick={handleClose}\n disabled={isSubmitting}\n className=\"flex-1\"\n >\n Cancel\n </Button>\n <Button\n type=\"submit\"\n disabled={isDisabled}\n className=\"flex-1\"\n data-testid=\"adopt-branch-submit\"\n >\n {isSubmitting ? (\n <>\n <LoaderCircle className=\"me-2 h-4 w-4 animate-spin\" />\n Adopting...\n </>\n ) : (\n 'Adopt Branch'\n )}\n </Button>\n </div>\n </div>\n </form>\n </BaseDrawer>\n );\n}\n","'use client';\n\nimport * as React from 'react';\nimport { Search } from 'lucide-react';\n\nimport { cn } from '@/lib/utils';\n\n/**\n * Command — minimal combobox primitives for model/item selection.\n *\n * Intentionally avoids the `cmdk` dependency and builds on native React +\n * Tailwind instead. Filtering logic lives in the consumer component.\n */\n\nconst Command = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement>>(\n ({ className, ...props }, ref) => (\n <div\n ref={ref}\n className={cn(\n 'bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md',\n className\n )}\n {...props}\n />\n )\n);\nCommand.displayName = 'Command';\n\nconst CommandInput = React.forwardRef<\n HTMLInputElement,\n React.InputHTMLAttributes<HTMLInputElement>\n>(({ className, ...props }, ref) => (\n <div className=\"flex items-center border-b px-3\">\n <Search className=\"me-2 h-4 w-4 shrink-0 opacity-50\" />\n <input\n ref={ref}\n className={cn(\n 'placeholder:text-muted-foreground flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-none disabled:cursor-not-allowed disabled:opacity-50',\n className\n )}\n {...props}\n />\n </div>\n));\nCommandInput.displayName = 'CommandInput';\n\nconst CommandList = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement>>(\n ({ className, ...props }, ref) => (\n <div\n ref={ref}\n className={cn('max-h-[300px] overflow-x-hidden overflow-y-auto', className)}\n {...props}\n />\n )\n);\nCommandList.displayName = 'CommandList';\n\nconst CommandEmpty = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement>>(\n ({ className, ...props }, ref) => (\n <div\n ref={ref}\n className={cn('text-muted-foreground py-6 text-center text-sm', className)}\n {...props}\n />\n )\n);\nCommandEmpty.displayName = 'CommandEmpty';\n\nconst CommandGroup = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement>>(\n ({ className, ...props }, ref) => (\n <div ref={ref} className={cn('text-foreground overflow-hidden p-1', className)} {...props} />\n )\n);\nCommandGroup.displayName = 'CommandGroup';\n\ninterface CommandItemProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {\n selected?: boolean;\n}\n\nconst CommandItem = React.forwardRef<HTMLButtonElement, CommandItemProps>(\n ({ className, selected, ...props }, ref) => (\n <button\n ref={ref}\n type=\"button\"\n data-selected={selected}\n className={cn(\n 'relative flex w-full cursor-default items-center rounded-sm px-2 py-1.5 text-sm transition-colors outline-none select-none',\n 'hover:bg-accent hover:text-accent-foreground',\n 'data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground',\n 'disabled:pointer-events-none disabled:opacity-50',\n className\n )}\n {...props}\n />\n )\n);\nCommandItem.displayName = 'CommandItem';\n\nconst CommandSeparator = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement>>(\n ({ className, ...props }, ref) => (\n <div ref={ref} className={cn('bg-border -mx-1 h-px', className)} {...props} />\n )\n);\nCommandSeparator.displayName = 'CommandSeparator';\n\nexport {\n Command,\n CommandEmpty,\n Comm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