@shepai/cli 1.122.2-pr394.daae4c9 → 1.122.2-pr395.d35739a

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 (347) hide show
  1. package/dist/packages/core/src/application/ports/output/repositories/feature-repository.interface.d.ts +0 -11
  2. package/dist/packages/core/src/application/ports/output/repositories/feature-repository.interface.d.ts.map +1 -1
  3. package/dist/packages/core/src/application/ports/output/services/git-pr-service.interface.d.ts +55 -1
  4. package/dist/packages/core/src/application/ports/output/services/git-pr-service.interface.d.ts.map +1 -1
  5. package/dist/packages/core/src/application/ports/output/services/git-pr-service.interface.js +2 -0
  6. package/dist/packages/core/src/application/ports/output/services/worktree-service.interface.d.ts +0 -15
  7. package/dist/packages/core/src/application/ports/output/services/worktree-service.interface.d.ts.map +1 -1
  8. package/dist/packages/core/src/application/use-cases/features/rebase-feature.use-case.d.ts +21 -0
  9. package/dist/packages/core/src/application/use-cases/features/rebase-feature.use-case.d.ts.map +1 -0
  10. package/dist/packages/core/src/application/use-cases/features/rebase-feature.use-case.js +58 -0
  11. package/dist/packages/core/src/application/use-cases/sync-fork-main.use-case.d.ts +18 -0
  12. package/dist/packages/core/src/application/use-cases/sync-fork-main.use-case.d.ts.map +1 -0
  13. package/dist/packages/core/src/application/use-cases/sync-fork-main.use-case.js +40 -0
  14. package/dist/packages/core/src/infrastructure/di/container.d.ts.map +1 -1
  15. package/dist/packages/core/src/infrastructure/di/container.js +10 -5
  16. package/dist/packages/core/src/infrastructure/repositories/sqlite-feature.repository.d.ts +0 -1
  17. package/dist/packages/core/src/infrastructure/repositories/sqlite-feature.repository.d.ts.map +1 -1
  18. package/dist/packages/core/src/infrastructure/repositories/sqlite-feature.repository.js +0 -8
  19. package/dist/packages/core/src/infrastructure/services/git/git-pr.service.d.ts +9 -0
  20. package/dist/packages/core/src/infrastructure/services/git/git-pr.service.d.ts.map +1 -1
  21. package/dist/packages/core/src/infrastructure/services/git/git-pr.service.js +93 -0
  22. package/dist/packages/core/src/infrastructure/services/git/worktree.service.d.ts +0 -1
  23. package/dist/packages/core/src/infrastructure/services/git/worktree.service.d.ts.map +1 -1
  24. package/dist/packages/core/src/infrastructure/services/git/worktree.service.js +0 -15
  25. package/dist/src/presentation/cli/commands/feat/index.js +2 -2
  26. package/dist/src/presentation/cli/commands/feat/rebase.command.d.ts +13 -0
  27. package/dist/src/presentation/cli/commands/feat/rebase.command.d.ts.map +1 -0
  28. package/dist/src/presentation/cli/commands/feat/rebase.command.js +45 -0
  29. package/dist/src/presentation/cli/commands/repo/index.d.ts.map +1 -1
  30. package/dist/src/presentation/cli/commands/repo/index.js +3 -1
  31. package/dist/src/presentation/cli/commands/repo/sync.command.d.ts +12 -0
  32. package/dist/src/presentation/cli/commands/repo/sync.command.d.ts.map +1 -0
  33. package/dist/src/presentation/cli/commands/repo/sync.command.js +38 -0
  34. package/dist/src/presentation/web/app/(dashboard)/get-graph-data.d.ts +6 -0
  35. package/dist/src/presentation/web/app/(dashboard)/get-graph-data.d.ts.map +1 -1
  36. package/dist/src/presentation/web/app/(dashboard)/get-graph-data.js +60 -0
  37. package/dist/src/presentation/web/app/actions/get-feature-phase-timings.d.ts +2 -0
  38. package/dist/src/presentation/web/app/actions/get-feature-phase-timings.d.ts.map +1 -1
  39. package/dist/src/presentation/web/app/actions/get-feature-phase-timings.js +2 -0
  40. package/dist/src/presentation/web/app/build-graph-nodes.d.ts +7 -0
  41. package/dist/src/presentation/web/app/build-graph-nodes.d.ts.map +1 -1
  42. package/dist/src/presentation/web/app/build-graph-nodes.js +7 -0
  43. package/dist/src/presentation/web/components/common/feature-create-drawer/feature-create-drawer.d.ts.map +1 -1
  44. package/dist/src/presentation/web/components/common/feature-create-drawer/feature-create-drawer.js +20 -9
  45. package/dist/src/presentation/web/components/common/feature-drawer-tabs/activity-tab.d.ts.map +1 -1
  46. package/dist/src/presentation/web/components/common/feature-drawer-tabs/activity-tab.js +130 -31
  47. package/dist/src/presentation/web/components/common/feature-drawer-tabs/feature-drawer-tabs.d.ts.map +1 -1
  48. package/dist/src/presentation/web/components/common/feature-drawer-tabs/feature-drawer-tabs.js +13 -0
  49. package/dist/src/presentation/web/components/common/feature-drawer-tabs/use-tab-data-fetch.d.ts.map +1 -1
  50. package/dist/src/presentation/web/components/common/feature-drawer-tabs/use-tab-data-fetch.js +18 -9
  51. package/dist/src/presentation/web/components/common/repository-node/repository-node-config.d.ts +8 -0
  52. package/dist/src/presentation/web/components/common/repository-node/repository-node-config.d.ts.map +1 -1
  53. package/dist/src/presentation/web/components/common/repository-node/repository-node.d.ts.map +1 -1
  54. package/dist/src/presentation/web/components/common/repository-node/repository-node.js +6 -6
  55. package/dist/src/presentation/web/components/common/repository-node/repository-node.stories.d.ts +2 -0
  56. package/dist/src/presentation/web/components/common/repository-node/repository-node.stories.d.ts.map +1 -1
  57. package/dist/src/presentation/web/components/common/repository-node/repository-node.stories.js +107 -17
  58. package/dist/src/presentation/web/components/features/control-center/control-center-empty-state.d.ts.map +1 -1
  59. package/dist/src/presentation/web/components/features/control-center/control-center-empty-state.js +18 -18
  60. package/dist/src/presentation/web/components/features/control-center/control-center-inner.d.ts.map +1 -1
  61. package/dist/src/presentation/web/components/features/control-center/control-center-inner.js +31 -17
  62. package/dist/src/presentation/web/components/features/control-center/welcome-agent-setup.d.ts.map +1 -1
  63. package/dist/src/presentation/web/components/features/control-center/welcome-agent-setup.js +29 -22
  64. package/dist/src/presentation/web/components/features/features-canvas/features-canvas.js +1 -1
  65. package/dist/src/presentation/web/components/layouts/app-shell/app-shell.d.ts.map +1 -1
  66. package/dist/src/presentation/web/components/layouts/app-shell/app-shell.js +5 -14
  67. package/dist/src/presentation/web/hooks/sidebar-features-context.d.ts +2 -0
  68. package/dist/src/presentation/web/hooks/sidebar-features-context.d.ts.map +1 -1
  69. package/dist/src/presentation/web/hooks/sidebar-features-context.js +2 -1
  70. package/dist/src/presentation/web/lib/layout-with-dagre.js +1 -1
  71. package/dist/tsconfig.build.tsbuildinfo +1 -1
  72. package/package.json +1 -1
  73. package/web/.next/BUILD_ID +1 -1
  74. package/web/.next/app-path-routes-manifest.json +0 -1
  75. package/web/.next/build-manifest.json +4 -4
  76. package/web/.next/fallback-build-manifest.json +2 -2
  77. package/web/.next/prerender-manifest.json +3 -3
  78. package/web/.next/required-server-files.js +1 -1
  79. package/web/.next/required-server-files.json +1 -1
  80. package/web/.next/routes-manifest.json +0 -6
  81. package/web/.next/server/app/(dashboard)/@drawer/create/page/build-manifest.json +2 -2
  82. package/web/.next/server/app/(dashboard)/@drawer/create/page/server-reference-manifest.json +22 -22
  83. package/web/.next/server/app/(dashboard)/@drawer/create/page.js +2 -2
  84. package/web/.next/server/app/(dashboard)/@drawer/create/page.js.nft.json +1 -1
  85. package/web/.next/server/app/(dashboard)/@drawer/create/page_client-reference-manifest.js +1 -1
  86. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page/build-manifest.json +2 -2
  87. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page/server-reference-manifest.json +28 -28
  88. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page.js +3 -3
  89. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page.js.nft.json +1 -1
  90. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page_client-reference-manifest.js +1 -1
  91. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page/build-manifest.json +2 -2
  92. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page/server-reference-manifest.json +28 -28
  93. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page.js +3 -3
  94. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page.js.nft.json +1 -1
  95. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page_client-reference-manifest.js +1 -1
  96. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page/build-manifest.json +2 -2
  97. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page/server-reference-manifest.json +20 -20
  98. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page.js +2 -2
  99. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page.js.nft.json +1 -1
  100. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page_client-reference-manifest.js +1 -1
  101. package/web/.next/server/app/(dashboard)/create/page/build-manifest.json +2 -2
  102. package/web/.next/server/app/(dashboard)/create/page/server-reference-manifest.json +22 -22
  103. package/web/.next/server/app/(dashboard)/create/page.js +2 -2
  104. package/web/.next/server/app/(dashboard)/create/page.js.nft.json +1 -1
  105. package/web/.next/server/app/(dashboard)/create/page_client-reference-manifest.js +1 -1
  106. package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page/build-manifest.json +2 -2
  107. package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page/server-reference-manifest.json +28 -28
  108. package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page.js +3 -3
  109. package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page.js.nft.json +1 -1
  110. package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page_client-reference-manifest.js +1 -1
  111. package/web/.next/server/app/(dashboard)/feature/[featureId]/page/build-manifest.json +2 -2
  112. package/web/.next/server/app/(dashboard)/feature/[featureId]/page/server-reference-manifest.json +28 -28
  113. package/web/.next/server/app/(dashboard)/feature/[featureId]/page.js +3 -3
  114. package/web/.next/server/app/(dashboard)/feature/[featureId]/page.js.nft.json +1 -1
  115. package/web/.next/server/app/(dashboard)/feature/[featureId]/page_client-reference-manifest.js +1 -1
  116. package/web/.next/server/app/(dashboard)/page/build-manifest.json +2 -2
  117. package/web/.next/server/app/(dashboard)/page/server-reference-manifest.json +20 -20
  118. package/web/.next/server/app/(dashboard)/page.js +2 -2
  119. package/web/.next/server/app/(dashboard)/page.js.nft.json +1 -1
  120. package/web/.next/server/app/(dashboard)/page_client-reference-manifest.js +1 -1
  121. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page/build-manifest.json +2 -2
  122. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page/server-reference-manifest.json +20 -20
  123. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page.js +2 -2
  124. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page.js.nft.json +1 -1
  125. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page_client-reference-manifest.js +1 -1
  126. package/web/.next/server/app/_global-error/page/build-manifest.json +2 -2
  127. package/web/.next/server/app/_global-error.html +2 -2
  128. package/web/.next/server/app/_global-error.rsc +1 -1
  129. package/web/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
  130. package/web/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  131. package/web/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  132. package/web/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  133. package/web/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  134. package/web/.next/server/app/_not-found/page/build-manifest.json +2 -2
  135. package/web/.next/server/app/_not-found/page/server-reference-manifest.json +1 -1
  136. package/web/.next/server/app/_not-found/page.js.nft.json +1 -1
  137. package/web/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  138. package/web/.next/server/app/api/attachments/preview/route.js.nft.json +1 -1
  139. package/web/.next/server/app/api/evidence/route.js.nft.json +1 -1
  140. package/web/.next/server/app/api/graph-data/route.js +1 -1
  141. package/web/.next/server/app/api/graph-data/route.js.nft.json +1 -1
  142. package/web/.next/server/app/settings/page/build-manifest.json +2 -2
  143. package/web/.next/server/app/settings/page/server-reference-manifest.json +6 -6
  144. package/web/.next/server/app/settings/page.js.nft.json +1 -1
  145. package/web/.next/server/app/settings/page_client-reference-manifest.js +1 -1
  146. package/web/.next/server/app/skills/page/build-manifest.json +2 -2
  147. package/web/.next/server/app/skills/page/server-reference-manifest.json +6 -6
  148. package/web/.next/server/app/skills/page.js +4 -4
  149. package/web/.next/server/app/skills/page.js.nft.json +1 -1
  150. package/web/.next/server/app/skills/page_client-reference-manifest.js +1 -1
  151. package/web/.next/server/app/tools/page/build-manifest.json +2 -2
  152. package/web/.next/server/app/tools/page/server-reference-manifest.json +6 -6
  153. package/web/.next/server/app/tools/page.js.nft.json +1 -1
  154. package/web/.next/server/app/tools/page_client-reference-manifest.js +1 -1
  155. package/web/.next/server/app/version/page/build-manifest.json +2 -2
  156. package/web/.next/server/app/version/page/server-reference-manifest.json +1 -1
  157. package/web/.next/server/app/version/page.js.nft.json +1 -1
  158. package/web/.next/server/app/version/page_client-reference-manifest.js +1 -1
  159. package/web/.next/server/app-paths-manifest.json +0 -1
  160. package/web/.next/server/chunks/403f9_next_dist_esm_build_templates_app-route_370c43b1.js +1 -1
  161. package/web/.next/server/chunks/403f9_next_dist_esm_build_templates_app-route_370c43b1.js.map +1 -1
  162. package/web/.next/server/chunks/[root-of-the-server]__a402b567._.js +1 -1
  163. package/web/.next/server/chunks/[root-of-the-server]__dcd4f847._.js +3 -0
  164. package/web/.next/server/chunks/{[root-of-the-server]__42b7ab55._.js.map → [root-of-the-server]__dcd4f847._.js.map} +1 -1
  165. package/web/.next/server/chunks/ssr/403f9_next_dist_31ea46d3._.js +1 -1
  166. package/web/.next/server/chunks/ssr/403f9_next_dist_c9d9b4d7._.js +1 -1
  167. package/web/.next/server/chunks/ssr/744ca_web_components_common_control-center-drawer_create-drawer-client_tsx_5e26fc0a._.js +1 -1
  168. package/web/.next/server/chunks/ssr/744ca_web_components_common_control-center-drawer_create-drawer-client_tsx_5e26fc0a._.js.map +1 -1
  169. package/web/.next/server/chunks/ssr/8ba4b_server_app_(dashboard)_@drawer_repository_[repositoryId]_page_actions_f30d0343.js +1 -1
  170. package/web/.next/server/chunks/ssr/8ba4b_server_app_(dashboard)_@drawer_repository_[repositoryId]_page_actions_f30d0343.js.map +1 -1
  171. package/web/.next/server/chunks/ssr/8ba4b_server_app_(dashboard)_repository_[repositoryId]_page_actions_9f1775bb.js +1 -1
  172. package/web/.next/server/chunks/ssr/8ba4b_server_app_(dashboard)_repository_[repositoryId]_page_actions_9f1775bb.js.map +1 -1
  173. package/web/.next/server/chunks/ssr/[root-of-the-server]__06fef644._.js +1 -1
  174. package/web/.next/server/chunks/ssr/{[root-of-the-server]__a022445f._.js → [root-of-the-server]__14664e9b._.js} +3 -3
  175. package/web/.next/server/chunks/ssr/{[root-of-the-server]__a022445f._.js.map → [root-of-the-server]__14664e9b._.js.map} +1 -1
  176. package/web/.next/server/chunks/ssr/[root-of-the-server]__4993a47c._.js +3 -0
  177. package/web/.next/server/chunks/ssr/[root-of-the-server]__4993a47c._.js.map +1 -0
  178. package/web/.next/server/chunks/ssr/[root-of-the-server]__52485955._.js +3 -0
  179. package/web/.next/server/chunks/ssr/[root-of-the-server]__52485955._.js.map +1 -0
  180. package/web/.next/server/chunks/ssr/[root-of-the-server]__545792ab._.js +3 -0
  181. package/web/.next/server/chunks/ssr/[root-of-the-server]__545792ab._.js.map +1 -0
  182. package/web/.next/server/chunks/ssr/[root-of-the-server]__6677a82c._.js +3 -0
  183. package/web/.next/server/chunks/ssr/{[root-of-the-server]__b724df9e._.js.map → [root-of-the-server]__6677a82c._.js.map} +1 -1
  184. package/web/.next/server/chunks/ssr/[root-of-the-server]__6b17a22d._.js +1 -1
  185. package/web/.next/server/chunks/ssr/[root-of-the-server]__6b17a22d._.js.map +1 -1
  186. package/web/.next/server/chunks/ssr/[root-of-the-server]__6bb00d90._.js +2 -2
  187. package/web/.next/server/chunks/ssr/[root-of-the-server]__6bb00d90._.js.map +1 -1
  188. package/web/.next/server/chunks/ssr/{[root-of-the-server]__8e3bf5d7._.js → [root-of-the-server]__7cbda1ea._.js} +2 -2
  189. package/web/.next/server/chunks/ssr/[root-of-the-server]__7cbda1ea._.js.map +1 -0
  190. package/web/.next/server/chunks/ssr/[root-of-the-server]__804c006d._.js +1 -1
  191. package/web/.next/server/chunks/ssr/[root-of-the-server]__804c006d._.js.map +1 -1
  192. package/web/.next/server/chunks/ssr/[root-of-the-server]__8c553503._.js +2 -2
  193. package/web/.next/server/chunks/ssr/{[root-of-the-server]__2698e9f4._.js → [root-of-the-server]__9e8b25ad._.js} +2 -2
  194. package/web/.next/server/chunks/ssr/[root-of-the-server]__9e8b25ad._.js.map +1 -0
  195. package/web/.next/server/chunks/ssr/[root-of-the-server]__a7de2711._.js +2 -2
  196. package/web/.next/server/chunks/ssr/{[root-of-the-server]__c07f9f79._.js → [root-of-the-server]__aed1d6f8._.js} +2 -2
  197. package/web/.next/server/chunks/ssr/[root-of-the-server]__aed1d6f8._.js.map +1 -0
  198. package/web/.next/server/chunks/ssr/{[root-of-the-server]__c605a375._.js → [root-of-the-server]__ce6057f6._.js} +2 -2
  199. package/web/.next/server/chunks/ssr/[root-of-the-server]__ce6057f6._.js.map +1 -0
  200. package/web/.next/server/chunks/ssr/_135edb9c._.js +1 -1
  201. package/web/.next/server/chunks/ssr/_135edb9c._.js.map +1 -1
  202. package/web/.next/server/chunks/ssr/_2f6f48b8._.js +1 -1
  203. package/web/.next/server/chunks/ssr/_2f6f48b8._.js.map +1 -1
  204. package/web/.next/server/chunks/ssr/_3a4c94e3._.js +3 -0
  205. package/web/.next/server/chunks/ssr/_3a4c94e3._.js.map +1 -0
  206. package/web/.next/server/chunks/ssr/{_5317c57e._.js → _59905c6b._.js} +2 -2
  207. package/web/.next/server/chunks/ssr/_59905c6b._.js.map +1 -0
  208. package/web/.next/server/chunks/ssr/_8042b250._.js +3 -0
  209. package/web/.next/server/chunks/ssr/_8042b250._.js.map +1 -0
  210. package/web/.next/server/chunks/ssr/_9ac70f88._.js +5 -0
  211. package/web/.next/server/chunks/ssr/_9ac70f88._.js.map +1 -0
  212. package/web/.next/server/chunks/ssr/_cc77a143._.js +1 -1
  213. package/web/.next/server/chunks/ssr/_cc77a143._.js.map +1 -1
  214. package/web/.next/server/chunks/ssr/_e9703421._.js +3 -0
  215. package/web/.next/server/chunks/ssr/_e9703421._.js.map +1 -0
  216. package/web/.next/server/chunks/ssr/b1a17_presentation_web_components_features_settings_settings-page-client_tsx_6ed9d5f8._.js +1 -1
  217. package/web/.next/server/chunks/ssr/b1a17_presentation_web_components_features_settings_settings-page-client_tsx_6ed9d5f8._.js.map +1 -1
  218. package/web/.next/server/chunks/ssr/node_modules__pnpm_bc66dcc6._.js +3 -0
  219. package/web/.next/server/chunks/ssr/node_modules__pnpm_bc66dcc6._.js.map +1 -0
  220. package/web/.next/server/chunks/ssr/src_presentation_web_5f039db1._.js +2 -2
  221. package/web/.next/server/chunks/ssr/src_presentation_web_5f039db1._.js.map +1 -1
  222. package/web/.next/server/chunks/ssr/src_presentation_web_7df6451f._.js +3 -0
  223. package/web/.next/server/chunks/ssr/src_presentation_web_7df6451f._.js.map +1 -0
  224. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_(dashboard)_page_actions_2a52b697.js +1 -1
  225. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_(dashboard)_page_actions_2a52b697.js.map +1 -1
  226. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_skills_page_actions_1fa8042e.js +1 -1
  227. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_skills_page_actions_1fa8042e.js.map +1 -1
  228. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_tools_page_actions_24684200.js +1 -1
  229. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_tools_page_actions_24684200.js.map +1 -1
  230. package/web/.next/server/chunks/ssr/src_presentation_web_c4337169._.js +2 -2
  231. package/web/.next/server/chunks/ssr/src_presentation_web_c4337169._.js.map +1 -1
  232. package/web/.next/server/chunks/ssr/src_presentation_web_ca99d62d._.js +1 -1
  233. package/web/.next/server/chunks/ssr/src_presentation_web_ca99d62d._.js.map +1 -1
  234. package/web/.next/server/chunks/ssr/src_presentation_web_components_bf50c527._.js +1 -1
  235. package/web/.next/server/chunks/ssr/src_presentation_web_components_de814675._.js +1 -1
  236. package/web/.next/server/chunks/ssr/src_presentation_web_components_e599bb8c._.js +1 -1
  237. package/web/.next/server/chunks/ssr/src_presentation_web_components_e599bb8c._.js.map +1 -1
  238. package/web/.next/server/chunks/ssr/src_presentation_web_components_features_control-center_7ac3562e._.js +1 -1
  239. package/web/.next/server/chunks/ssr/src_presentation_web_components_features_control-center_7ac3562e._.js.map +1 -1
  240. package/web/.next/server/middleware-build-manifest.js +2 -2
  241. package/web/.next/server/pages/500.html +2 -2
  242. package/web/.next/server/server-reference-manifest.js +1 -1
  243. package/web/.next/server/server-reference-manifest.json +34 -189
  244. package/web/.next/static/chunks/0b7e384fe33dc5d4.js +1 -0
  245. package/web/.next/static/chunks/16c125d4054dae40.js +11 -0
  246. package/web/.next/static/chunks/28882fc716f51419.js +2 -0
  247. package/web/.next/static/chunks/2d718a04eb97fa9c.js +1 -0
  248. package/web/.next/static/chunks/3925626b99dcd57a.css +1 -0
  249. package/web/.next/static/chunks/{9f4eb9f1618c8bd9.js → 3c8f903477aacd29.js} +1 -1
  250. package/web/.next/static/chunks/4443ee9c7733399b.js +1 -0
  251. package/web/.next/static/chunks/{7f0206527c67e121.js → 44ec09b4f33c494d.js} +1 -1
  252. package/web/.next/static/chunks/{b14644925c7af7f5.js → 47030173ef438c4c.js} +2 -2
  253. package/web/.next/static/chunks/4aadcf496c0c45da.js +1 -0
  254. package/web/.next/static/chunks/52b56677c842e45f.js +3 -0
  255. package/web/.next/static/chunks/5738cc053b378225.js +1 -0
  256. package/web/.next/static/chunks/6bc9ac207dab5ad3.js +1 -0
  257. package/web/.next/static/chunks/ac7251026c1e2cdf.js +1 -0
  258. package/web/.next/static/chunks/dbbb446493f21874.js +1 -0
  259. package/web/.next/static/chunks/{89aac43287d73b02.js → ed3a602003bcb31b.js} +1 -1
  260. package/web/.next/static/chunks/{turbopack-080e470ea902d0ba.js → turbopack-426d9bc2450816ba.js} +1 -1
  261. package/dist/packages/core/src/application/use-cases/features/adopt-branch.use-case.d.ts +0 -40
  262. package/dist/packages/core/src/application/use-cases/features/adopt-branch.use-case.d.ts.map +0 -1
  263. package/dist/packages/core/src/application/use-cases/features/adopt-branch.use-case.js +0 -146
  264. package/dist/packages/core/src/application/use-cases/features/branch-name-utils.d.ts +0 -33
  265. package/dist/packages/core/src/application/use-cases/features/branch-name-utils.d.ts.map +0 -1
  266. package/dist/packages/core/src/application/use-cases/features/branch-name-utils.js +0 -77
  267. package/dist/src/presentation/cli/commands/feat/adopt.command.d.ts +0 -14
  268. package/dist/src/presentation/cli/commands/feat/adopt.command.d.ts.map +0 -1
  269. package/dist/src/presentation/cli/commands/feat/adopt.command.js +0 -43
  270. package/dist/src/presentation/web/app/(dashboard)/@drawer/adopt/page.d.ts +0 -10
  271. package/dist/src/presentation/web/app/(dashboard)/@drawer/adopt/page.d.ts.map +0 -1
  272. package/dist/src/presentation/web/app/(dashboard)/@drawer/adopt/page.js +0 -22
  273. package/dist/src/presentation/web/app/actions/adopt-branch.d.ts +0 -11
  274. package/dist/src/presentation/web/app/actions/adopt-branch.d.ts.map +0 -1
  275. package/dist/src/presentation/web/app/actions/adopt-branch.js +0 -20
  276. package/dist/src/presentation/web/components/common/control-center-drawer/adopt-branch-drawer.d.ts +0 -9
  277. package/dist/src/presentation/web/components/common/control-center-drawer/adopt-branch-drawer.d.ts.map +0 -1
  278. package/dist/src/presentation/web/components/common/control-center-drawer/adopt-branch-drawer.js +0 -27
  279. package/dist/src/presentation/web/components/common/control-center-drawer/adopt-branch-drawer.stories.d.ts +0 -32
  280. package/dist/src/presentation/web/components/common/control-center-drawer/adopt-branch-drawer.stories.d.ts.map +0 -1
  281. package/dist/src/presentation/web/components/common/control-center-drawer/adopt-branch-drawer.stories.js +0 -115
  282. package/dist/src/presentation/web/components/common/control-center-drawer/adopt-drawer-client.d.ts +0 -5
  283. package/dist/src/presentation/web/components/common/control-center-drawer/adopt-drawer-client.d.ts.map +0 -1
  284. package/dist/src/presentation/web/components/common/control-center-drawer/adopt-drawer-client.js +0 -56
  285. package/web/.next/server/app/(dashboard)/@drawer/adopt/page/app-paths-manifest.json +0 -3
  286. package/web/.next/server/app/(dashboard)/@drawer/adopt/page/build-manifest.json +0 -18
  287. package/web/.next/server/app/(dashboard)/@drawer/adopt/page/next-font-manifest.json +0 -6
  288. package/web/.next/server/app/(dashboard)/@drawer/adopt/page/react-loadable-manifest.json +0 -1
  289. package/web/.next/server/app/(dashboard)/@drawer/adopt/page/server-reference-manifest.json +0 -320
  290. package/web/.next/server/app/(dashboard)/@drawer/adopt/page.js +0 -20
  291. package/web/.next/server/app/(dashboard)/@drawer/adopt/page.js.map +0 -5
  292. package/web/.next/server/app/(dashboard)/@drawer/adopt/page.js.nft.json +0 -1
  293. package/web/.next/server/app/(dashboard)/@drawer/adopt/page_client-reference-manifest.js +0 -2
  294. package/web/.next/server/chunks/[root-of-the-server]__42b7ab55._.js +0 -3
  295. package/web/.next/server/chunks/ssr/403f9_next_dist_client_components_94d75bc3._.js +0 -3
  296. package/web/.next/server/chunks/ssr/403f9_next_dist_client_components_94d75bc3._.js.map +0 -1
  297. package/web/.next/server/chunks/ssr/744ca_web__next-internal_server_app_(dashboard)_@drawer_adopt_page_actions_0b3f4f0d.js +0 -3
  298. package/web/.next/server/chunks/ssr/744ca_web__next-internal_server_app_(dashboard)_@drawer_adopt_page_actions_0b3f4f0d.js.map +0 -1
  299. package/web/.next/server/chunks/ssr/744ca_web_components_common_control-center-drawer_adopt-drawer-client_tsx_6c5e4bbb._.js +0 -3
  300. package/web/.next/server/chunks/ssr/744ca_web_components_common_control-center-drawer_adopt-drawer-client_tsx_6c5e4bbb._.js.map +0 -1
  301. package/web/.next/server/chunks/ssr/[root-of-the-server]__2698e9f4._.js.map +0 -1
  302. package/web/.next/server/chunks/ssr/[root-of-the-server]__8e3bf5d7._.js.map +0 -1
  303. package/web/.next/server/chunks/ssr/[root-of-the-server]__b724df9e._.js +0 -3
  304. package/web/.next/server/chunks/ssr/[root-of-the-server]__c07f9f79._.js.map +0 -1
  305. package/web/.next/server/chunks/ssr/[root-of-the-server]__c605a375._.js.map +0 -1
  306. package/web/.next/server/chunks/ssr/[root-of-the-server]__e2227c0f._.js +0 -3
  307. package/web/.next/server/chunks/ssr/[root-of-the-server]__e2227c0f._.js.map +0 -1
  308. package/web/.next/server/chunks/ssr/[root-of-the-server]__e7258841._.js +0 -3
  309. package/web/.next/server/chunks/ssr/[root-of-the-server]__e7258841._.js.map +0 -1
  310. package/web/.next/server/chunks/ssr/[root-of-the-server]__ec26e818._.js +0 -3
  311. package/web/.next/server/chunks/ssr/[root-of-the-server]__ec26e818._.js.map +0 -1
  312. package/web/.next/server/chunks/ssr/[root-of-the-server]__f0589cc3._.js +0 -3
  313. package/web/.next/server/chunks/ssr/[root-of-the-server]__f0589cc3._.js.map +0 -1
  314. package/web/.next/server/chunks/ssr/_19a2fb35._.js +0 -3
  315. package/web/.next/server/chunks/ssr/_19a2fb35._.js.map +0 -1
  316. package/web/.next/server/chunks/ssr/_1e1b2639._.js +0 -3
  317. package/web/.next/server/chunks/ssr/_1e1b2639._.js.map +0 -1
  318. package/web/.next/server/chunks/ssr/_4093a637._.js +0 -5
  319. package/web/.next/server/chunks/ssr/_4093a637._.js.map +0 -1
  320. package/web/.next/server/chunks/ssr/_5317c57e._.js.map +0 -1
  321. package/web/.next/server/chunks/ssr/_a4a44cc0._.js +0 -3
  322. package/web/.next/server/chunks/ssr/_a4a44cc0._.js.map +0 -1
  323. package/web/.next/server/chunks/ssr/_d5206f22._.js +0 -4
  324. package/web/.next/server/chunks/ssr/_d5206f22._.js.map +0 -1
  325. package/web/.next/server/chunks/ssr/f7870_sonner_dist_index_mjs_dbf63824._.js +0 -3
  326. package/web/.next/server/chunks/ssr/f7870_sonner_dist_index_mjs_dbf63824._.js.map +0 -1
  327. package/web/.next/server/chunks/ssr/node_modules__pnpm_026172d1._.js +0 -3
  328. package/web/.next/server/chunks/ssr/node_modules__pnpm_026172d1._.js.map +0 -1
  329. package/web/.next/server/chunks/ssr/node_modules__pnpm_b59e4b16._.js +0 -3
  330. package/web/.next/server/chunks/ssr/node_modules__pnpm_b59e4b16._.js.map +0 -1
  331. package/web/.next/static/chunks/0d2af96e64960ef5.css +0 -1
  332. package/web/.next/static/chunks/430ef376bd249b14.js +0 -1
  333. package/web/.next/static/chunks/4796c6e7d84294d7.js +0 -1
  334. package/web/.next/static/chunks/52c0456129cb8a10.js +0 -1
  335. package/web/.next/static/chunks/767cf20dbde41522.js +0 -1
  336. package/web/.next/static/chunks/78e2f79d08767e8d.js +0 -9
  337. package/web/.next/static/chunks/a8d65187623d628b.js +0 -5
  338. package/web/.next/static/chunks/b4a6061718adb25e.js +0 -2
  339. package/web/.next/static/chunks/bf108ed551e585e6.js +0 -1
  340. package/web/.next/static/chunks/c6356369a45d19d6.js +0 -1
  341. package/web/.next/static/chunks/ca946dcbfbb2df74.js +0 -1
  342. package/web/.next/static/chunks/cafcbd67d82d65db.js +0 -1
  343. package/web/.next/static/chunks/d6d6af31b7ef545b.js +0 -1
  344. package/web/.next/static/chunks/f83551c20dcda199.js +0 -1
  345. /package/web/.next/static/{eu15XGqVtBSCUjVy2GmoQ → 8e_LzmibF0x2F_XwXUjHz}/_buildManifest.js +0 -0
  346. /package/web/.next/static/{eu15XGqVtBSCUjVy2GmoQ → 8e_LzmibF0x2F_XwXUjHz}/_clientMiddlewareManifest.json +0 -0
  347. /package/web/.next/static/{eu15XGqVtBSCUjVy2GmoQ → 8e_LzmibF0x2F_XwXUjHz}/_ssgManifest.js +0 -0
@@ -1,77 +0,0 @@
1
- /**
2
- * Pure utility functions for deriving feature metadata from git branch names.
3
- *
4
- * Used by the AdoptBranchUseCase to generate a human-readable feature name
5
- * and a URL-safe slug from any git branch name.
6
- */
7
- /**
8
- * Common branch name prefixes that are stripped when deriving a feature name.
9
- * These are conventional prefixes from gitflow, conventional commits, etc.
10
- */
11
- const KNOWN_PREFIXES = [
12
- 'feat/',
13
- 'fix/',
14
- 'chore/',
15
- 'refactor/',
16
- 'docs/',
17
- 'test/',
18
- 'ci/',
19
- 'build/',
20
- 'perf/',
21
- 'style/',
22
- 'revert/',
23
- 'hotfix/',
24
- 'release/',
25
- ];
26
- /**
27
- * Derive a human-readable feature name from a git branch name.
28
- *
29
- * Strips known prefixes (feat/, fix/, etc.), replaces hyphens and underscores
30
- * with spaces, and title-cases each word.
31
- *
32
- * @example deriveName('fix/login-bug') → "Login Bug"
33
- * @example deriveName('feat/user-auth') → "User Auth"
34
- * @example deriveName('my-cool-feature') → "My Cool Feature"
35
- * @example deriveName('feat/auth/login-bug') → "Auth Login Bug"
36
- * @example deriveName('release/v1.0.0') → "V1.0.0"
37
- */
38
- export function deriveName(branch) {
39
- let remaining = branch;
40
- // Strip known prefix (only the first matching one)
41
- for (const prefix of KNOWN_PREFIXES) {
42
- if (remaining.startsWith(prefix)) {
43
- remaining = remaining.slice(prefix.length);
44
- break;
45
- }
46
- }
47
- // Replace slashes, hyphens, and underscores with spaces
48
- const words = remaining
49
- .replace(/[/_-]+/g, ' ')
50
- .trim()
51
- .split(/\s+/)
52
- .filter((w) => w.length > 0);
53
- if (words.length === 0) {
54
- return branch;
55
- }
56
- // Title-case each word
57
- return words.map((w) => w.charAt(0).toUpperCase() + w.slice(1)).join(' ');
58
- }
59
- /**
60
- * Derive a URL-safe slug from a git branch name.
61
- *
62
- * Lowercases the full branch name, converts slashes and special characters
63
- * to hyphens, collapses consecutive hyphens, and trims leading/trailing hyphens.
64
- *
65
- * @example deriveSlug('fix/login-bug') → "fix-login-bug"
66
- * @example deriveSlug('feat/user-auth') → "feat-user-auth"
67
- * @example deriveSlug('my-cool-feature') → "my-cool-feature"
68
- * @example deriveSlug('release/v1.0.0') → "release-v1-0-0"
69
- * @example deriveSlug('feat/auth/login-bug') → "feat-auth-login-bug"
70
- */
71
- export function deriveSlug(branch) {
72
- return branch
73
- .toLowerCase()
74
- .replace(/[^a-z0-9-]/g, '-') // Replace non-alphanumeric chars (except hyphens) with hyphens
75
- .replace(/-+/g, '-') // Collapse consecutive hyphens
76
- .replace(/^-+|-+$/g, ''); // Trim leading/trailing hyphens
77
- }
@@ -1,14 +0,0 @@
1
- /**
2
- * Feature Adopt Command
3
- *
4
- * Adopts an existing git branch into Shep's feature tracking system.
5
- * Creates a worktree (if needed), derives metadata from the branch name,
6
- * and persists a Feature with lifecycle=Maintain (agent inactive).
7
- *
8
- * Usage:
9
- * shep feat adopt <branch>
10
- * shep feat adopt <branch> -r /path/to/repo
11
- */
12
- import { Command } from 'commander';
13
- export declare function createAdoptCommand(): Command;
14
- //# sourceMappingURL=adopt.command.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"adopt.command.d.ts","sourceRoot":"","sources":["../../../../../../src/presentation/cli/commands/feat/adopt.command.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAKpC,wBAAgB,kBAAkB,IAAI,OAAO,CA6B5C"}
@@ -1,43 +0,0 @@
1
- /**
2
- * Feature Adopt Command
3
- *
4
- * Adopts an existing git branch into Shep's feature tracking system.
5
- * Creates a worktree (if needed), derives metadata from the branch name,
6
- * and persists a Feature with lifecycle=Maintain (agent inactive).
7
- *
8
- * Usage:
9
- * shep feat adopt <branch>
10
- * shep feat adopt <branch> -r /path/to/repo
11
- */
12
- import { Command } from 'commander';
13
- import { container } from '../../../../../packages/core/src/infrastructure/di/container.js';
14
- import { AdoptBranchUseCase } from '../../../../../packages/core/src/application/use-cases/features/adopt-branch.use-case.js';
15
- import { colors, messages, spinner } from '../../ui/index.js';
16
- export function createAdoptCommand() {
17
- return new Command('adopt')
18
- .description('Adopt an existing branch as a tracked feature')
19
- .argument('<branch>', 'Branch name to adopt')
20
- .option('-r, --repo <path>', 'Repository path (defaults to cwd)')
21
- .action(async (branch, options) => {
22
- try {
23
- const useCase = container.resolve(AdoptBranchUseCase);
24
- const { feature } = await spinner('Adopting branch', () => useCase.execute({
25
- branchName: branch,
26
- repositoryPath: options.repo ?? process.cwd(),
27
- }));
28
- messages.newline();
29
- messages.success('Branch adopted');
30
- console.log(` ${colors.muted('ID:')} ${colors.accent(feature.id.slice(0, 8))}`);
31
- console.log(` ${colors.muted('Name:')} ${feature.name}`);
32
- console.log(` ${colors.muted('Branch:')} ${colors.accent(feature.branch)}`);
33
- console.log(` ${colors.muted('Status:')} ${feature.lifecycle}`);
34
- console.log(` ${colors.muted('Worktree:')} ${colors.accent(feature.worktreePath ?? '')}`);
35
- messages.newline();
36
- }
37
- catch (error) {
38
- const err = error instanceof Error ? error : new Error(String(error));
39
- messages.error('Failed to adopt branch', err);
40
- process.exitCode = 1;
41
- }
42
- });
43
- }
@@ -1,10 +0,0 @@
1
- /** Skip static pre-rendering since we need runtime DI container. */
2
- export declare const dynamic = "force-dynamic";
3
- interface AdoptDrawerPageProps {
4
- searchParams: Promise<{
5
- repo?: string;
6
- }>;
7
- }
8
- export default function AdoptDrawerPage({ searchParams }: AdoptDrawerPageProps): Promise<import("react/jsx-runtime").JSX.Element>;
9
- export {};
10
- //# sourceMappingURL=page.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"page.d.ts","sourceRoot":"","sources":["../../../../../../../../src/presentation/web/app/(dashboard)/@drawer/adopt/page.tsx"],"names":[],"mappings":"AAIA,oEAAoE;AACpE,eAAO,MAAM,OAAO,kBAAkB,CAAC;AAEvC,UAAU,oBAAoB;IAC5B,YAAY,EAAE,OAAO,CAAC;QAAE,IAAI,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CAC1C;AAED,wBAA8B,eAAe,CAAC,EAAE,YAAY,EAAE,EAAE,oBAAoB,oDAkBnF"}
@@ -1,22 +0,0 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import { resolve } from '../../../../lib/server-container.js';
3
- import { AdoptDrawerClient } from '../../../../components/common/control-center-drawer/adopt-drawer-client.js';
4
- /** Skip static pre-rendering since we need runtime DI container. */
5
- export const dynamic = 'force-dynamic';
6
- export default async function AdoptDrawerPage({ searchParams }) {
7
- const { repo } = await searchParams;
8
- let repositoryPath = repo ?? '';
9
- if (!repositoryPath) {
10
- try {
11
- const listRepos = resolve('ListRepositoriesUseCase');
12
- const repositories = await listRepos.execute();
13
- if (repositories.length > 0) {
14
- repositoryPath = repositories[0].path;
15
- }
16
- }
17
- catch {
18
- // Fall through with empty path — server action will validate
19
- }
20
- }
21
- return _jsx(AdoptDrawerClient, { repositoryPath: repositoryPath });
22
- }
@@ -1,11 +0,0 @@
1
- import type { Feature } from '../../../../../packages/core/src/domain/generated/output.js';
2
- interface AdoptBranchInput {
3
- branchName: string;
4
- repositoryPath: string;
5
- }
6
- export declare function adoptBranch(input: AdoptBranchInput): Promise<{
7
- feature?: Feature;
8
- error?: string;
9
- }>;
10
- export {};
11
- //# sourceMappingURL=adopt-branch.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"adopt-branch.d.ts","sourceRoot":"","sources":["../../../../../../src/presentation/web/app/actions/adopt-branch.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,sCAAsC,CAAC;AAEpE,UAAU,gBAAgB;IACxB,UAAU,EAAE,MAAM,CAAC;IACnB,cAAc,EAAE,MAAM,CAAC;CACxB;AAED,wBAAsB,WAAW,CAC/B,KAAK,EAAE,gBAAgB,GACtB,OAAO,CAAC;IAAE,OAAO,CAAC,EAAE,OAAO,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC,CAkBhD"}
@@ -1,20 +0,0 @@
1
- 'use server';
2
- import { resolve } from '../../lib/server-container.js';
3
- export async function adoptBranch(input) {
4
- const { branchName, repositoryPath } = input;
5
- if (!branchName?.trim()) {
6
- return { error: 'Branch name is required' };
7
- }
8
- if (!repositoryPath?.trim()) {
9
- return { error: 'Repository path is required' };
10
- }
11
- try {
12
- const useCase = resolve('AdoptBranchUseCase');
13
- const result = await useCase.execute({ branchName, repositoryPath });
14
- return { feature: result.feature };
15
- }
16
- catch (error) {
17
- const message = error instanceof Error ? error.message : 'Failed to adopt branch';
18
- return { error: message };
19
- }
20
- }
@@ -1,9 +0,0 @@
1
- export interface AdoptBranchDrawerProps {
2
- open: boolean;
3
- onClose: () => void;
4
- onSubmit: (branchName: string) => void;
5
- isSubmitting?: boolean;
6
- error?: string;
7
- }
8
- export declare function AdoptBranchDrawer({ open, onClose, onSubmit, isSubmitting, error, }: AdoptBranchDrawerProps): import("react/jsx-runtime").JSX.Element;
9
- //# sourceMappingURL=adopt-branch-drawer.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"adopt-branch-drawer.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/web/components/common/control-center-drawer/adopt-branch-drawer.tsx"],"names":[],"mappings":"AAUA,MAAM,WAAW,sBAAsB;IACrC,IAAI,EAAE,OAAO,CAAC;IACd,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,QAAQ,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,IAAI,CAAC;IACvC,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,wBAAgB,iBAAiB,CAAC,EAChC,IAAI,EACJ,OAAO,EACP,QAAQ,EACR,YAAoB,EACpB,KAAK,GACN,EAAE,sBAAsB,2CAoGxB"}
@@ -1,27 +0,0 @@
1
- 'use client';
2
- import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
3
- import { useState, useCallback } from 'react';
4
- import { GitBranch, Loader2 } from 'lucide-react';
5
- import { BaseDrawer } from '../../common/base-drawer/index.js';
6
- import { DrawerTitle, DrawerDescription } from '../../ui/drawer.js';
7
- import { Button } from '../../ui/button.js';
8
- import { Input } from '../../ui/input.js';
9
- import { Label } from '../../ui/label.js';
10
- export function AdoptBranchDrawer({ open, onClose, onSubmit, isSubmitting = false, error, }) {
11
- const [branchName, setBranchName] = useState('');
12
- const handleSubmit = useCallback((e) => {
13
- e.preventDefault();
14
- const trimmed = branchName.trim();
15
- if (!trimmed || isSubmitting)
16
- return;
17
- onSubmit(trimmed);
18
- }, [branchName, isSubmitting, onSubmit]);
19
- const handleClose = useCallback(() => {
20
- setBranchName('');
21
- onClose();
22
- }, [onClose]);
23
- // Reset form when drawer closes
24
- const isDisabled = !branchName.trim() || isSubmitting;
25
- const header = (_jsxs("div", { children: [_jsxs(DrawerTitle, { className: "flex items-center gap-2", children: [_jsx(GitBranch, { className: "h-4 w-4" }), "Adopt Branch"] }), _jsx(DrawerDescription, { className: "text-muted-foreground text-sm", children: "Import an existing git branch into Shep's feature tracking" })] }));
26
- return (_jsx(BaseDrawer, { open: open, onClose: handleClose, size: "sm", modal: false, header: header, "data-testid": "adopt-branch-drawer", children: _jsxs("form", { onSubmit: handleSubmit, className: "flex flex-1 flex-col", children: [_jsx("div", { className: "flex-1 overflow-y-auto p-4", children: _jsxs("div", { className: "flex flex-col gap-4", children: [_jsxs("div", { className: "flex flex-col gap-2", children: [_jsx(Label, { htmlFor: "branch-name", children: "Branch name" }), _jsx(Input, { id: "branch-name", placeholder: "e.g. fix/login-bug or feat/user-auth", value: branchName, onChange: (e) => setBranchName(e.target.value), disabled: isSubmitting, autoFocus: true, "data-testid": "adopt-branch-input" }), _jsx("p", { className: "text-muted-foreground text-xs", children: "Enter the name of a local or remote branch to adopt as a tracked feature." })] }), error ? (_jsx("p", { className: "text-destructive text-sm", "data-testid": "adopt-branch-error", children: error })) : null] }) }), _jsx("div", { className: "border-t p-4", children: _jsxs("div", { className: "flex gap-2", children: [_jsx(Button, { type: "button", variant: "outline", onClick: handleClose, disabled: isSubmitting, className: "flex-1", children: "Cancel" }), _jsx(Button, { type: "submit", disabled: isDisabled, className: "flex-1", "data-testid": "adopt-branch-submit", children: isSubmitting ? (_jsxs(_Fragment, { children: [_jsx(Loader2, { className: "mr-2 h-4 w-4 animate-spin" }), "Adopting..."] })) : ('Adopt Branch') })] }) })] }) }));
27
- }
@@ -1,32 +0,0 @@
1
- import type { Meta, StoryObj } from '@storybook/react';
2
- import { AdoptBranchDrawer } from './adopt-branch-drawer.js';
3
- /**
4
- * **AdoptBranchDrawer** is a right-side sliding drawer for importing an
5
- * existing git branch into Shep's feature tracking system.
6
- *
7
- * ### Form
8
- * - **Branch name** (required) — text input for the branch name
9
- * - **Adopt Branch** button — disabled when input is empty or submitting
10
- * - **Cancel** button — closes the drawer
11
- *
12
- * ### States
13
- * - Default: empty input, submit disabled
14
- * - Loading: input disabled, button shows spinner
15
- * - Error: error message shown below input
16
- */
17
- declare const meta: Meta<typeof AdoptBranchDrawer>;
18
- export default meta;
19
- type Story = StoryObj<typeof AdoptBranchDrawer>;
20
- /** Default empty form — click the trigger button to open the adopt branch drawer. */
21
- export declare const Default: Story;
22
- /** Pre-opened drawer for quick visual inspection. */
23
- export declare const PreOpened: Story;
24
- /** Drawer with branch name typed in — ready to submit. */
25
- export declare const WithBranchName: Story;
26
- /** Loading state — input disabled, button shows spinner. */
27
- export declare const Loading: Story;
28
- /** Error state — error message visible below input. */
29
- export declare const WithError: Story;
30
- /** Adopt branch drawer rendered inside a full-page context — starts open. */
31
- export declare const InDrawer: Story;
32
- //# sourceMappingURL=adopt-branch-drawer.stories.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"adopt-branch-drawer.stories.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/web/components/common/control-center-drawer/adopt-branch-drawer.stories.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAEvD,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAO1D;;;;;;;;;;;;;GAaG;AACH,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,iBAAiB,CAcxC,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAkDhD,qFAAqF;AACrF,eAAO,MAAM,OAAO,EAAE,KAErB,CAAC;AAEF,qDAAqD;AACrD,eAAO,MAAM,SAAS,EAAE,KAMvB,CAAC;AAEF,0DAA0D;AAC1D,eAAO,MAAM,cAAc,EAAE,KAU5B,CAAC;AAEF,4DAA4D;AAC5D,eAAO,MAAM,OAAO,EAAE,KAMrB,CAAC;AAEF,uDAAuD;AACvD,eAAO,MAAM,SAAS,EAAE,KAWvB,CAAC;AAiCF,6EAA6E;AAC7E,eAAO,MAAM,QAAQ,EAAE,KAEtB,CAAC"}
@@ -1,115 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { useState } from 'react';
3
- import { within, userEvent, fn } from '@storybook/test';
4
- import { AdoptBranchDrawer } from './adopt-branch-drawer.js';
5
- import { Button } from '../../ui/button.js';
6
- /* ---------------------------------------------------------------------------
7
- * Meta
8
- * ------------------------------------------------------------------------- */
9
- /**
10
- * **AdoptBranchDrawer** is a right-side sliding drawer for importing an
11
- * existing git branch into Shep's feature tracking system.
12
- *
13
- * ### Form
14
- * - **Branch name** (required) — text input for the branch name
15
- * - **Adopt Branch** button — disabled when input is empty or submitting
16
- * - **Cancel** button — closes the drawer
17
- *
18
- * ### States
19
- * - Default: empty input, submit disabled
20
- * - Loading: input disabled, button shows spinner
21
- * - Error: error message shown below input
22
- */
23
- const meta = {
24
- title: 'Drawers/Feature/AdoptBranchDrawer',
25
- component: AdoptBranchDrawer,
26
- tags: ['autodocs'],
27
- parameters: {
28
- layout: 'fullscreen',
29
- },
30
- argTypes: {
31
- open: { control: 'boolean', description: 'Controls drawer visibility' },
32
- onClose: { description: 'Called when the drawer is dismissed' },
33
- onSubmit: { description: 'Called with the branch name when the form is submitted' },
34
- isSubmitting: { control: 'boolean', description: 'Shows loading state' },
35
- error: { control: 'text', description: 'Error message to display' },
36
- },
37
- };
38
- export default meta;
39
- /* ---------------------------------------------------------------------------
40
- * Shared action loggers
41
- * ------------------------------------------------------------------------- */
42
- const logSubmit = fn().mockName('onSubmit');
43
- const logClose = fn().mockName('onClose');
44
- /* ---------------------------------------------------------------------------
45
- * Trigger wrapper
46
- * ------------------------------------------------------------------------- */
47
- function AdoptDrawerTrigger({ label = 'Open Adopt Branch', isSubmitting = false, error, }) {
48
- const [open, setOpen] = useState(false);
49
- return (_jsxs("div", { className: "flex h-screen items-start p-4", children: [_jsx(Button, { variant: "outline", onClick: () => setOpen(true), children: label }), _jsx(AdoptBranchDrawer, { open: open, onClose: () => {
50
- setOpen(false);
51
- logClose();
52
- }, onSubmit: (branchName) => {
53
- logSubmit(branchName);
54
- setOpen(false);
55
- }, isSubmitting: isSubmitting, error: error })] }));
56
- }
57
- /* ---------------------------------------------------------------------------
58
- * Stories
59
- * ------------------------------------------------------------------------- */
60
- /** Default empty form — click the trigger button to open the adopt branch drawer. */
61
- export const Default = {
62
- render: () => _jsx(AdoptDrawerTrigger, {}),
63
- };
64
- /** Pre-opened drawer for quick visual inspection. */
65
- export const PreOpened = {
66
- render: () => _jsx(AdoptDrawerTrigger, { label: "Open Drawer" }),
67
- play: async ({ canvasElement }) => {
68
- const canvas = within(canvasElement);
69
- await userEvent.click(canvas.getByRole('button', { name: 'Open Drawer' }));
70
- },
71
- };
72
- /** Drawer with branch name typed in — ready to submit. */
73
- export const WithBranchName = {
74
- render: () => _jsx(AdoptDrawerTrigger, { label: "Open (With Branch)" }),
75
- play: async ({ canvasElement }) => {
76
- const canvas = within(canvasElement);
77
- await userEvent.click(canvas.getByRole('button', { name: 'Open (With Branch)' }));
78
- const body = within(canvasElement.ownerDocument.body);
79
- const input = await body.findByPlaceholderText('e.g. fix/login-bug or feat/user-auth');
80
- await userEvent.type(input, 'fix/login-bug');
81
- },
82
- };
83
- /** Loading state — input disabled, button shows spinner. */
84
- export const Loading = {
85
- render: () => _jsx(AdoptDrawerTrigger, { label: "Open (Loading)", isSubmitting: true }),
86
- play: async ({ canvasElement }) => {
87
- const canvas = within(canvasElement);
88
- await userEvent.click(canvas.getByRole('button', { name: 'Open (Loading)' }));
89
- },
90
- };
91
- /** Error state — error message visible below input. */
92
- export const WithError = {
93
- render: () => (_jsx(AdoptDrawerTrigger, { label: "Open (Error)", error: 'Branch "main" cannot be adopted. The main branch should not be tracked as a feature.' })),
94
- play: async ({ canvasElement }) => {
95
- const canvas = within(canvasElement);
96
- await userEvent.click(canvas.getByRole('button', { name: 'Open (Error)' }));
97
- },
98
- };
99
- /* ---------------------------------------------------------------------------
100
- * Shell template — starts open in full-page context
101
- * ------------------------------------------------------------------------- */
102
- function AdoptDrawerShellTemplate() {
103
- const [open, setOpen] = useState(true);
104
- return (_jsxs("div", { style: { height: '100vh', background: '#f8fafc', padding: '2rem' }, children: [_jsx("button", { type: "button", onClick: () => setOpen(true), style: { padding: '8px 16px', border: '1px solid #ccc', borderRadius: '6px' }, children: "Open Drawer" }), _jsx(AdoptBranchDrawer, { open: open, onClose: () => {
105
- setOpen(false);
106
- logClose();
107
- }, onSubmit: (branchName) => {
108
- logSubmit(branchName);
109
- setOpen(false);
110
- } })] }));
111
- }
112
- /** Adopt branch drawer rendered inside a full-page context — starts open. */
113
- export const InDrawer = {
114
- render: () => _jsx(AdoptDrawerShellTemplate, {}),
115
- };
@@ -1,5 +0,0 @@
1
- export interface AdoptDrawerClientProps {
2
- repositoryPath: string;
3
- }
4
- export declare function AdoptDrawerClient({ repositoryPath }: AdoptDrawerClientProps): import("react/jsx-runtime").JSX.Element;
5
- //# sourceMappingURL=adopt-drawer-client.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"adopt-drawer-client.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/web/components/common/control-center-drawer/adopt-drawer-client.tsx"],"names":[],"mappings":"AAQA,MAAM,WAAW,sBAAsB;IACrC,cAAc,EAAE,MAAM,CAAC;CACxB;AAED,wBAAgB,iBAAiB,CAAC,EAAE,cAAc,EAAE,EAAE,sBAAsB,2CAoE3E"}
@@ -1,56 +0,0 @@
1
- 'use client';
2
- import { jsx as _jsx } from "react/jsx-runtime";
3
- import { useState, useCallback, useEffect } from 'react';
4
- import { useRouter, usePathname } from 'next/navigation';
5
- import { toast } from 'sonner';
6
- import { adoptBranch } from '../../../app/actions/adopt-branch.js';
7
- import { AdoptBranchDrawer } from './adopt-branch-drawer.js';
8
- export function AdoptDrawerClient({ repositoryPath }) {
9
- const router = useRouter();
10
- const pathname = usePathname();
11
- const [isSubmitting, setIsSubmitting] = useState(false);
12
- const [error, setError] = useState();
13
- const isOnAdoptRoute = pathname.startsWith('/adopt');
14
- const isOpen = !isSubmitting && isOnAdoptRoute;
15
- // Reset isSubmitting once the route has actually changed away from /adopt
16
- useEffect(() => {
17
- if (!isOnAdoptRoute && isSubmitting) {
18
- setIsSubmitting(false);
19
- }
20
- }, [isOnAdoptRoute, isSubmitting]);
21
- // Clear error when drawer reopens
22
- useEffect(() => {
23
- if (isOnAdoptRoute) {
24
- setError(undefined);
25
- }
26
- }, [isOnAdoptRoute]);
27
- const onClose = useCallback(() => {
28
- router.push('/');
29
- }, [router]);
30
- const onSubmit = useCallback((branchName) => {
31
- setError(undefined);
32
- setIsSubmitting(true);
33
- router.push('/');
34
- adoptBranch({ branchName, repositoryPath })
35
- .then((result) => {
36
- if (result.error) {
37
- toast.error(result.error);
38
- return;
39
- }
40
- window.dispatchEvent(new CustomEvent('shep:feature-created', {
41
- detail: {
42
- featureId: result.feature.id,
43
- name: result.feature.name,
44
- description: result.feature.description,
45
- repositoryPath: result.feature.repositoryPath,
46
- },
47
- }));
48
- toast.success(`Branch adopted as "${result.feature.name}"`);
49
- })
50
- .catch(() => {
51
- toast.error('Failed to adopt branch');
52
- setIsSubmitting(false);
53
- });
54
- }, [router, repositoryPath]);
55
- return (_jsx(AdoptBranchDrawer, { open: isOpen, onClose: onClose, onSubmit: onSubmit, isSubmitting: isSubmitting, error: error }));
56
- }
@@ -1,3 +0,0 @@
1
- {
2
- "/(dashboard)/@drawer/adopt/page": "app/(dashboard)/@drawer/adopt/page.js"
3
- }
@@ -1,18 +0,0 @@
1
- {
2
- "devFiles": [],
3
- "ampDevFiles": [],
4
- "polyfillFiles": [
5
- "static/chunks/a6dad97d9634a72d.js"
6
- ],
7
- "lowPriorityFiles": [],
8
- "rootMainFiles": [
9
- "static/chunks/89aac43287d73b02.js",
10
- "static/chunks/84a181ff3270fd9f.js",
11
- "static/chunks/cfe4dc9904fcfddb.js",
12
- "static/chunks/4b6cc9f65260f2bd.js",
13
- "static/chunks/d4d8f0a137bd2eb4.js",
14
- "static/chunks/turbopack-080e470ea902d0ba.js"
15
- ],
16
- "pages": {},
17
- "ampFirstPages": []
18
- }
@@ -1,6 +0,0 @@
1
- {
2
- "pages": {},
3
- "app": {},
4
- "appUsingSizeAdjust": false,
5
- "pagesUsingSizeAdjust": false
6
- }