@shepai/cli 1.112.0 → 1.112.1-pr359.62b3c56

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 (189) hide show
  1. package/dist/packages/core/src/infrastructure/persistence/sqlite/sqlite-migration-storage.d.ts +13 -0
  2. package/dist/packages/core/src/infrastructure/persistence/sqlite/sqlite-migration-storage.d.ts.map +1 -1
  3. package/dist/packages/core/src/infrastructure/persistence/sqlite/sqlite-migration-storage.js +37 -0
  4. package/dist/src/presentation/web/app/(dashboard)/@drawer/create/page.d.ts.map +1 -1
  5. package/dist/src/presentation/web/app/(dashboard)/@drawer/create/page.js +9 -2
  6. package/dist/src/presentation/web/components/common/control-center-drawer/create-drawer-client.d.ts +3 -1
  7. package/dist/src/presentation/web/components/common/control-center-drawer/create-drawer-client.d.ts.map +1 -1
  8. package/dist/src/presentation/web/components/common/control-center-drawer/create-drawer-client.js +2 -2
  9. package/dist/src/presentation/web/components/common/feature-create-drawer/feature-create-drawer.d.ts +17 -1
  10. package/dist/src/presentation/web/components/common/feature-create-drawer/feature-create-drawer.d.ts.map +1 -1
  11. package/dist/src/presentation/web/components/common/feature-create-drawer/feature-create-drawer.js +96 -5
  12. package/dist/src/presentation/web/components/common/feature-create-drawer/feature-create-drawer.stories.d.ts +11 -0
  13. package/dist/src/presentation/web/components/common/feature-create-drawer/feature-create-drawer.stories.d.ts.map +1 -1
  14. package/dist/src/presentation/web/components/common/feature-create-drawer/feature-create-drawer.stories.js +51 -0
  15. package/dist/src/presentation/web/components/common/feature-create-drawer/index.d.ts +1 -1
  16. package/dist/src/presentation/web/components/common/feature-create-drawer/index.d.ts.map +1 -1
  17. package/dist/src/presentation/web/components/common/feature-create-drawer/index.js +1 -1
  18. package/dist/src/presentation/web/components/common/feature-create-drawer/repository-combobox.stories.d.ts +14 -0
  19. package/dist/src/presentation/web/components/common/feature-create-drawer/repository-combobox.stories.d.ts.map +1 -0
  20. package/dist/src/presentation/web/components/common/feature-create-drawer/repository-combobox.stories.js +42 -0
  21. package/dist/src/presentation/web/components/common/floating-action-button/floating-action-button.d.ts +22 -0
  22. package/dist/src/presentation/web/components/common/floating-action-button/floating-action-button.d.ts.map +1 -0
  23. package/dist/src/presentation/web/components/common/floating-action-button/floating-action-button.js +43 -0
  24. package/dist/src/presentation/web/components/common/floating-action-button/floating-action-button.stories.d.ts +10 -0
  25. package/dist/src/presentation/web/components/common/floating-action-button/floating-action-button.stories.d.ts.map +1 -0
  26. package/dist/src/presentation/web/components/common/floating-action-button/floating-action-button.stories.js +63 -0
  27. package/dist/src/presentation/web/components/common/floating-action-button/index.d.ts +3 -0
  28. package/dist/src/presentation/web/components/common/floating-action-button/index.d.ts.map +1 -0
  29. package/dist/src/presentation/web/components/common/floating-action-button/index.js +1 -0
  30. package/dist/src/presentation/web/components/common/index.d.ts +1 -0
  31. package/dist/src/presentation/web/components/common/index.d.ts.map +1 -1
  32. package/dist/src/presentation/web/components/common/index.js +1 -0
  33. package/dist/src/presentation/web/components/features/control-center/control-center-inner.d.ts.map +1 -1
  34. package/dist/src/presentation/web/components/layouts/app-shell/app-shell.d.ts.map +1 -1
  35. package/dist/src/presentation/web/components/layouts/app-shell/app-shell.js +35 -6
  36. package/dist/src/presentation/web/components/layouts/app-sidebar/app-sidebar.d.ts +1 -4
  37. package/dist/src/presentation/web/components/layouts/app-sidebar/app-sidebar.d.ts.map +1 -1
  38. package/dist/src/presentation/web/components/layouts/app-sidebar/app-sidebar.js +4 -4
  39. package/dist/src/presentation/web/components/layouts/app-sidebar/app-sidebar.stories.d.ts.map +1 -1
  40. package/dist/src/presentation/web/components/layouts/app-sidebar/app-sidebar.stories.js +0 -1
  41. package/dist/tsconfig.build.tsbuildinfo +1 -1
  42. package/package.json +1 -1
  43. package/web/.next/BUILD_ID +1 -1
  44. package/web/.next/build-manifest.json +2 -2
  45. package/web/.next/fallback-build-manifest.json +2 -2
  46. package/web/.next/prerender-manifest.json +3 -3
  47. package/web/.next/required-server-files.js +3 -3
  48. package/web/.next/required-server-files.json +3 -3
  49. package/web/.next/server/app/(dashboard)/@drawer/create/page/server-reference-manifest.json +20 -20
  50. package/web/.next/server/app/(dashboard)/@drawer/create/page.js.nft.json +1 -1
  51. package/web/.next/server/app/(dashboard)/@drawer/create/page_client-reference-manifest.js +1 -1
  52. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page/server-reference-manifest.json +26 -26
  53. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page.js.nft.json +1 -1
  54. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page_client-reference-manifest.js +1 -1
  55. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page/server-reference-manifest.json +26 -26
  56. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page.js.nft.json +1 -1
  57. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page_client-reference-manifest.js +1 -1
  58. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page/server-reference-manifest.json +18 -18
  59. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page.js.nft.json +1 -1
  60. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page_client-reference-manifest.js +1 -1
  61. package/web/.next/server/app/(dashboard)/create/page/server-reference-manifest.json +20 -20
  62. package/web/.next/server/app/(dashboard)/create/page.js.nft.json +1 -1
  63. package/web/.next/server/app/(dashboard)/create/page_client-reference-manifest.js +1 -1
  64. package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page/server-reference-manifest.json +26 -26
  65. package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page.js.nft.json +1 -1
  66. package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page_client-reference-manifest.js +1 -1
  67. package/web/.next/server/app/(dashboard)/feature/[featureId]/page/server-reference-manifest.json +26 -26
  68. package/web/.next/server/app/(dashboard)/feature/[featureId]/page.js.nft.json +1 -1
  69. package/web/.next/server/app/(dashboard)/feature/[featureId]/page_client-reference-manifest.js +1 -1
  70. package/web/.next/server/app/(dashboard)/page/server-reference-manifest.json +18 -18
  71. package/web/.next/server/app/(dashboard)/page.js.nft.json +1 -1
  72. package/web/.next/server/app/(dashboard)/page_client-reference-manifest.js +1 -1
  73. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page/server-reference-manifest.json +18 -18
  74. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page.js.nft.json +1 -1
  75. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page_client-reference-manifest.js +1 -1
  76. package/web/.next/server/app/_global-error.html +2 -2
  77. package/web/.next/server/app/_global-error.rsc +1 -1
  78. package/web/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
  79. package/web/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  80. package/web/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  81. package/web/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  82. package/web/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  83. package/web/.next/server/app/_not-found/page/server-reference-manifest.json +1 -1
  84. package/web/.next/server/app/_not-found/page.js.nft.json +1 -1
  85. package/web/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  86. package/web/.next/server/app/api/attachments/preview/route.js.nft.json +1 -1
  87. package/web/.next/server/app/api/evidence/route.js.nft.json +1 -1
  88. package/web/.next/server/app/settings/page/server-reference-manifest.json +5 -5
  89. package/web/.next/server/app/settings/page.js.nft.json +1 -1
  90. package/web/.next/server/app/settings/page_client-reference-manifest.js +1 -1
  91. package/web/.next/server/app/skills/page/server-reference-manifest.json +6 -6
  92. package/web/.next/server/app/skills/page.js.nft.json +1 -1
  93. package/web/.next/server/app/skills/page_client-reference-manifest.js +1 -1
  94. package/web/.next/server/app/tools/page/server-reference-manifest.json +6 -6
  95. package/web/.next/server/app/tools/page.js.nft.json +1 -1
  96. package/web/.next/server/app/tools/page_client-reference-manifest.js +1 -1
  97. package/web/.next/server/app/version/page/server-reference-manifest.json +1 -1
  98. package/web/.next/server/app/version/page.js.nft.json +1 -1
  99. package/web/.next/server/app/version/page_client-reference-manifest.js +1 -1
  100. package/web/.next/server/chunks/[root-of-the-server]__a402b567._.js +1 -1
  101. package/web/.next/server/chunks/ssr/744ca_web_components_common_control-center-drawer_create-drawer-client_tsx_5e26fc0a._.js +1 -1
  102. package/web/.next/server/chunks/ssr/744ca_web_components_common_control-center-drawer_create-drawer-client_tsx_5e26fc0a._.js.map +1 -1
  103. package/web/.next/server/chunks/ssr/8ba4b_server_app_(dashboard)_@drawer_repository_[repositoryId]_page_actions_a1104008.js +1 -1
  104. package/web/.next/server/chunks/ssr/8ba4b_server_app_(dashboard)_@drawer_repository_[repositoryId]_page_actions_a1104008.js.map +1 -1
  105. package/web/.next/server/chunks/ssr/8ba4b_server_app_(dashboard)_repository_[repositoryId]_page_actions_92642200.js +1 -1
  106. package/web/.next/server/chunks/ssr/8ba4b_server_app_(dashboard)_repository_[repositoryId]_page_actions_92642200.js.map +1 -1
  107. package/web/.next/server/chunks/ssr/[root-of-the-server]__039967e3._.js +1 -1
  108. package/web/.next/server/chunks/ssr/[root-of-the-server]__039967e3._.js.map +1 -1
  109. package/web/.next/server/chunks/ssr/[root-of-the-server]__07a39ff2._.js +1 -1
  110. package/web/.next/server/chunks/ssr/[root-of-the-server]__11033878._.js +1 -1
  111. package/web/.next/server/chunks/ssr/[root-of-the-server]__11033878._.js.map +1 -1
  112. package/web/.next/server/chunks/ssr/[root-of-the-server]__24dd0927._.js +2 -2
  113. package/web/.next/server/chunks/ssr/[root-of-the-server]__2773312c._.js +1 -1
  114. package/web/.next/server/chunks/ssr/[root-of-the-server]__2773312c._.js.map +1 -1
  115. package/web/.next/server/chunks/ssr/[root-of-the-server]__5d87af2e._.js +1 -1
  116. package/web/.next/server/chunks/ssr/{[root-of-the-server]__845a9d2a._.js → [root-of-the-server]__6367aea0._.js} +2 -2
  117. package/web/.next/server/chunks/ssr/[root-of-the-server]__6367aea0._.js.map +1 -0
  118. package/web/.next/server/chunks/ssr/[root-of-the-server]__89e8a5cc._.js +2 -2
  119. package/web/.next/server/chunks/ssr/[root-of-the-server]__aad040c0._.js +2 -2
  120. package/web/.next/server/chunks/ssr/[root-of-the-server]__aad040c0._.js.map +1 -1
  121. package/web/.next/server/chunks/ssr/[root-of-the-server]__c9777776._.js +1 -1
  122. package/web/.next/server/chunks/ssr/[root-of-the-server]__c9777776._.js.map +1 -1
  123. package/web/.next/server/chunks/ssr/[root-of-the-server]__cbd8062c._.js +1 -1
  124. package/web/.next/server/chunks/ssr/[root-of-the-server]__cbd8062c._.js.map +1 -1
  125. package/web/.next/server/chunks/ssr/[root-of-the-server]__e70c5627._.js +1 -1
  126. package/web/.next/server/chunks/ssr/[root-of-the-server]__e70c5627._.js.map +1 -1
  127. package/web/.next/server/chunks/ssr/[root-of-the-server]__fdc75809._.js +1 -1
  128. package/web/.next/server/chunks/ssr/[root-of-the-server]__fdc75809._.js.map +1 -1
  129. package/web/.next/server/chunks/ssr/_0e506641._.js +7 -0
  130. package/web/.next/server/chunks/ssr/{_e6f2da4f._.js.map → _0e506641._.js.map} +1 -1
  131. package/web/.next/server/chunks/ssr/_135edb9c._.js +1 -1
  132. package/web/.next/server/chunks/ssr/_135edb9c._.js.map +1 -1
  133. package/web/.next/server/chunks/ssr/{_5214cc6d._.js → _5322dbd6._.js} +2 -2
  134. package/web/.next/server/chunks/ssr/_5322dbd6._.js.map +1 -0
  135. package/web/.next/server/chunks/ssr/{_688c410c._.js → _73df4960._.js} +2 -2
  136. package/web/.next/server/chunks/ssr/{_688c410c._.js.map → _73df4960._.js.map} +1 -1
  137. package/web/.next/server/chunks/ssr/{_8ef2db1a._.js → _7e593b32._.js} +2 -2
  138. package/web/.next/server/chunks/ssr/{_8ef2db1a._.js.map → _7e593b32._.js.map} +1 -1
  139. package/web/.next/server/chunks/ssr/_8dacd1e7._.js +1 -1
  140. package/web/.next/server/chunks/ssr/_8dacd1e7._.js.map +1 -1
  141. package/web/.next/server/chunks/ssr/_cc77a143._.js +1 -1
  142. package/web/.next/server/chunks/ssr/_cc77a143._.js.map +1 -1
  143. package/web/.next/server/chunks/ssr/b1a17_presentation_web_components_features_settings_settings-page-client_tsx_6ed9d5f8._.js +1 -1
  144. package/web/.next/server/chunks/ssr/b1a17_presentation_web_components_features_settings_settings-page-client_tsx_6ed9d5f8._.js.map +1 -1
  145. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_(dashboard)_page_actions_888633e1.js +1 -1
  146. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_(dashboard)_page_actions_888633e1.js.map +1 -1
  147. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_skills_page_actions_1fa8042e.js +1 -1
  148. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_skills_page_actions_1fa8042e.js.map +1 -1
  149. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_tools_page_actions_24684200.js +1 -1
  150. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_tools_page_actions_24684200.js.map +1 -1
  151. package/web/.next/server/chunks/ssr/src_presentation_web_ce7cbc3c._.js +2 -2
  152. package/web/.next/server/chunks/ssr/src_presentation_web_ce7cbc3c._.js.map +1 -1
  153. package/web/.next/server/chunks/ssr/src_presentation_web_components_bf50c527._.js +1 -1
  154. package/web/.next/server/chunks/ssr/src_presentation_web_components_de814675._.js +1 -1
  155. package/web/.next/server/chunks/ssr/src_presentation_web_components_e599bb8c._.js +1 -1
  156. package/web/.next/server/chunks/ssr/src_presentation_web_components_e599bb8c._.js.map +1 -1
  157. package/web/.next/server/chunks/ssr/src_presentation_web_components_features_control-center_7ac3562e._.js +1 -1
  158. package/web/.next/server/chunks/ssr/src_presentation_web_components_features_control-center_7ac3562e._.js.map +1 -1
  159. package/web/.next/server/chunks/ssr/src_presentation_web_e2604413._.js +2 -2
  160. package/web/.next/server/chunks/ssr/src_presentation_web_e2604413._.js.map +1 -1
  161. package/web/.next/server/pages/500.html +2 -2
  162. package/web/.next/server/server-reference-manifest.js +1 -1
  163. package/web/.next/server/server-reference-manifest.json +31 -31
  164. package/web/.next/static/chunks/0d5c0854d1b91453.js +1 -0
  165. package/web/.next/static/chunks/1e2a078abc85fb33.js +1 -0
  166. package/web/.next/static/chunks/{6a91f6e4059b8e65.js → 385fa46efbd688c1.js} +2 -2
  167. package/web/.next/static/chunks/{979328ec65bd195c.js → 51d2cf20f0c4fe3c.js} +2 -2
  168. package/web/.next/static/chunks/619af41a8d3232e5.js +1 -0
  169. package/web/.next/static/chunks/694fc9a1173043d8.css +1 -0
  170. package/web/.next/static/chunks/{691c8fb9987506c7.js → 7e91b0005c4fc24e.js} +1 -1
  171. package/web/.next/static/chunks/a6545893bb6db329.js +1 -0
  172. package/web/.next/static/chunks/b07d06ef2fe4e2ef.js +1 -0
  173. package/web/.next/static/chunks/c2e22907dd470314.js +11 -0
  174. package/web/.next/static/chunks/d575a1de11856112.js +1 -0
  175. package/web/.next/static/chunks/{2ceb08e50a58ff13.js → ef617a2ccf8f540e.js} +1 -1
  176. package/web/.next/server/chunks/ssr/[root-of-the-server]__845a9d2a._.js.map +0 -1
  177. package/web/.next/server/chunks/ssr/_5214cc6d._.js.map +0 -1
  178. package/web/.next/server/chunks/ssr/_e6f2da4f._.js +0 -7
  179. package/web/.next/static/chunks/3a154a226e936a39.js +0 -11
  180. package/web/.next/static/chunks/5543614d36607aef.js +0 -1
  181. package/web/.next/static/chunks/5558a658fa82a01f.css +0 -1
  182. package/web/.next/static/chunks/6e5ddc3f058e4c15.js +0 -1
  183. package/web/.next/static/chunks/974a4718eae26449.js +0 -1
  184. package/web/.next/static/chunks/a067d472cd7bab74.js +0 -1
  185. package/web/.next/static/chunks/c2c5d4e54fb6693a.js +0 -1
  186. package/web/.next/static/chunks/cf78337357d8447e.js +0 -1
  187. /package/web/.next/static/{m4kJ9xcvKM_tYBQYtX8sa → c7ItIWt5Z2q6uwhRHAtwQ}/_buildManifest.js +0 -0
  188. /package/web/.next/static/{m4kJ9xcvKM_tYBQYtX8sa → c7ItIWt5Z2q6uwhRHAtwQ}/_clientMiddlewareManifest.json +0 -0
  189. /package/web/.next/static/{m4kJ9xcvKM_tYBQYtX8sa → c7ItIWt5Z2q6uwhRHAtwQ}/_ssgManifest.js +0 -0
@@ -27,6 +27,12 @@ export declare class SQLiteMigrationStorage implements UmzugStorage<Database.Dat
27
27
  * PRAGMA user_version tracking and seeds the umzug_migrations table accordingly.
28
28
  */
29
29
  constructor(db: Database.Database, legacyMigrationNames?: string[]);
30
+ /**
31
+ * Mapping of legacy migration names to the tables they create.
32
+ * Used by verifyBootstrappedMigrations to detect migrations that were
33
+ * marked as executed by the bootstrap seeder but never actually ran.
34
+ */
35
+ private static readonly MIGRATION_TABLE_MAP;
30
36
  /**
31
37
  * Returns the names of all executed migrations, sorted lexicographically.
32
38
  */
@@ -55,5 +61,12 @@ export declare class SQLiteMigrationStorage implements UmzugStorage<Database.Dat
55
61
  * user_version using the provided legacy migration names.
56
62
  */
57
63
  private bootstrapLegacyMigrations;
64
+ /**
65
+ * Checks that each bootstrapped migration's expected table actually exists.
66
+ * Only checks migrations that were seeded (present in seededNames).
67
+ * If a table is missing, removes the migration record from umzug_migrations
68
+ * so that umzug will re-run it on the next up() call.
69
+ */
70
+ private verifyBootstrappedMigrations;
58
71
  }
59
72
  //# sourceMappingURL=sqlite-migration-storage.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"sqlite-migration-storage.d.ts","sourceRoot":"","sources":["../../../../../../../packages/core/src/infrastructure/persistence/sqlite/sqlite-migration-storage.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,KAAK,QAAQ,MAAM,gBAAgB,CAAC;AAC3C,OAAO,KAAK,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,OAAO,CAAC;AAE3D;;;;;GAKG;AACH,qBAAa,sBAAuB,YAAW,YAAY,CAAC,QAAQ,CAAC,QAAQ,CAAC;IAC5E,OAAO,CAAC,QAAQ,CAAC,EAAE,CAAoB;IAEvC;;;;;;OAMG;gBACS,EAAE,EAAE,QAAQ,CAAC,QAAQ,EAAE,oBAAoB,CAAC,EAAE,MAAM,EAAE;IAQlE;;OAEG;IACG,QAAQ,CAAC,KAAK,EAAE,IAAI,CAAC,eAAe,CAAC,QAAQ,CAAC,QAAQ,CAAC,EAAE,SAAS,CAAC,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC;IAO7F;;OAEG;IACG,YAAY,CAAC,MAAM,EAAE,eAAe,CAAC,QAAQ,CAAC,QAAQ,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC;IAM7E;;OAEG;IACG,cAAc,CAAC,MAAM,EAAE,eAAe,CAAC,QAAQ,CAAC,QAAQ,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC;IAI/E;;OAEG;IACH,OAAO,CAAC,WAAW;IASnB;;;;;;;;;;OAUG;IACH,OAAO,CAAC,yBAAyB;CA+BlC"}
1
+ {"version":3,"file":"sqlite-migration-storage.d.ts","sourceRoot":"","sources":["../../../../../../../packages/core/src/infrastructure/persistence/sqlite/sqlite-migration-storage.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,KAAK,QAAQ,MAAM,gBAAgB,CAAC;AAC3C,OAAO,KAAK,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,OAAO,CAAC;AAE3D;;;;;GAKG;AACH,qBAAa,sBAAuB,YAAW,YAAY,CAAC,QAAQ,CAAC,QAAQ,CAAC;IAC5E,OAAO,CAAC,QAAQ,CAAC,EAAE,CAAoB;IAEvC;;;;;;OAMG;gBACS,EAAE,EAAE,QAAQ,CAAC,QAAQ,EAAE,oBAAoB,CAAC,EAAE,MAAM,EAAE;IAQlE;;;;OAIG;IACH,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,mBAAmB,CAOzC;IAEF;;OAEG;IACG,QAAQ,CAAC,KAAK,EAAE,IAAI,CAAC,eAAe,CAAC,QAAQ,CAAC,QAAQ,CAAC,EAAE,SAAS,CAAC,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC;IAO7F;;OAEG;IACG,YAAY,CAAC,MAAM,EAAE,eAAe,CAAC,QAAQ,CAAC,QAAQ,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC;IAM7E;;OAEG;IACG,cAAc,CAAC,MAAM,EAAE,eAAe,CAAC,QAAQ,CAAC,QAAQ,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC;IAI/E;;OAEG;IACH,OAAO,CAAC,WAAW;IASnB;;;;;;;;;;OAUG;IACH,OAAO,CAAC,yBAAyB;IAuCjC;;;;;OAKG;IACH,OAAO,CAAC,4BAA4B;CAiBrC"}
@@ -31,6 +31,19 @@ export class SQLiteMigrationStorage {
31
31
  this.bootstrapLegacyMigrations(legacyMigrationNames);
32
32
  }
33
33
  }
34
+ /**
35
+ * Mapping of legacy migration names to the tables they create.
36
+ * Used by verifyBootstrappedMigrations to detect migrations that were
37
+ * marked as executed by the bootstrap seeder but never actually ran.
38
+ */
39
+ static MIGRATION_TABLE_MAP = {
40
+ '001-create-settings-table': 'settings',
41
+ '003-create-agent-runs': 'agent_runs',
42
+ '004-create-features': 'features',
43
+ '008-add-approval-gates-and-phase-timings': 'phase_timings',
44
+ '015-create-repositories-and-backfill': 'repositories',
45
+ '033-create-pr-sync-lock': 'pr_sync_lock',
46
+ };
34
47
  /**
35
48
  * Returns the names of all executed migrations, sorted lexicographically.
36
49
  */
@@ -94,5 +107,29 @@ export class SQLiteMigrationStorage {
94
107
  }
95
108
  });
96
109
  seedAll();
110
+ // After seeding, verify that expected schema artifacts actually exist.
111
+ // If a migration was inserted into the legacy list after the DB was already
112
+ // at a higher user_version, its DDL never ran but the seeder marked it done.
113
+ const seededCount = Math.min(userVersion, legacyMigrationNames.length);
114
+ const seededNames = legacyMigrationNames.slice(0, seededCount);
115
+ this.verifyBootstrappedMigrations(seededNames);
116
+ }
117
+ /**
118
+ * Checks that each bootstrapped migration's expected table actually exists.
119
+ * Only checks migrations that were seeded (present in seededNames).
120
+ * If a table is missing, removes the migration record from umzug_migrations
121
+ * so that umzug will re-run it on the next up() call.
122
+ */
123
+ verifyBootstrappedMigrations(seededNames) {
124
+ const seededSet = new Set(seededNames);
125
+ const tableCheck = this.db.prepare("SELECT COUNT(*) as count FROM sqlite_master WHERE type='table' AND name=?");
126
+ for (const [migrationName, tableName] of Object.entries(SQLiteMigrationStorage.MIGRATION_TABLE_MAP)) {
127
+ if (!seededSet.has(migrationName))
128
+ continue;
129
+ const result = tableCheck.get(tableName);
130
+ if (result.count === 0) {
131
+ this.db.prepare('DELETE FROM umzug_migrations WHERE name = ?').run(migrationName);
132
+ }
133
+ }
97
134
  }
98
135
  }
@@ -1 +1 @@
1
- {"version":3,"file":"page.d.ts","sourceRoot":"","sources":["../../../../../../../../src/presentation/web/app/(dashboard)/@drawer/create/page.tsx"],"names":[],"mappings":"AAMA,oEAAoE;AACpE,eAAO,MAAM,OAAO,kBAAkB,CAAC;AAEvC,UAAU,qBAAqB;IAC7B,YAAY,EAAE,OAAO,CAAC;QAAE,IAAI,CAAC,EAAE,MAAM,CAAC;QAAC,MAAM,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CAC3D;AAED,wBAA8B,gBAAgB,CAAC,EAAE,YAAY,EAAE,EAAE,qBAAqB,oDAyBrF"}
1
+ {"version":3,"file":"page.d.ts","sourceRoot":"","sources":["../../../../../../../../src/presentation/web/app/(dashboard)/@drawer/create/page.tsx"],"names":[],"mappings":"AAOA,oEAAoE;AACpE,eAAO,MAAM,OAAO,kBAAkB,CAAC;AAEvC,UAAU,qBAAqB;IAC7B,YAAY,EAAE,OAAO,CAAC;QAAE,IAAI,CAAC,EAAE,MAAM,CAAC;QAAC,MAAM,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CAC3D;AAED,wBAA8B,gBAAgB,CAAC,EAAE,YAAY,EAAE,EAAE,qBAAqB,oDAkCrF"}
@@ -8,13 +8,20 @@ export const dynamic = 'force-dynamic';
8
8
  export default async function CreateDrawerPage({ searchParams }) {
9
9
  const { repo, parent } = await searchParams;
10
10
  const listFeatures = resolve('ListFeaturesUseCase');
11
+ const listRepos = resolve('ListRepositoriesUseCase');
11
12
  const settings = getSettings();
12
- const [features, workflowDefaults] = await Promise.all([
13
+ const [features, repositories, workflowDefaults] = await Promise.all([
13
14
  listFeatures.execute(),
15
+ listRepos.execute().catch(() => []),
14
16
  getWorkflowDefaults().catch(() => undefined),
15
17
  ]);
16
18
  const featureOptions = features
17
19
  .map((f) => ({ id: f.id, name: f.name }))
18
20
  .filter((f) => f.id && !f.id.startsWith('#'));
19
- return (_jsx(CreateDrawerClient, { repositoryPath: repo ?? '', initialParentId: parent, features: featureOptions, workflowDefaults: workflowDefaults, currentAgentType: settings.agent.type, currentModel: settings.models.default }));
21
+ const repositoryOptions = repositories.map((r) => ({
22
+ id: r.id,
23
+ name: r.name,
24
+ path: r.path,
25
+ }));
26
+ return (_jsx(CreateDrawerClient, { repositoryPath: repo ?? '', initialParentId: parent, features: featureOptions, repositories: repositoryOptions, workflowDefaults: workflowDefaults, currentAgentType: settings.agent.type, currentModel: settings.models.default }));
20
27
  }
@@ -1,12 +1,14 @@
1
1
  import type { ParentFeatureOption } from '../../common/feature-create-drawer/feature-create-drawer.js';
2
+ import type { RepositoryOption } from '../../common/feature-create-drawer/feature-create-drawer.js';
2
3
  import type { WorkflowDefaults } from '../../../app/actions/get-workflow-defaults.js';
3
4
  export interface CreateDrawerClientProps {
4
5
  repositoryPath: string;
5
6
  initialParentId?: string;
6
7
  features: ParentFeatureOption[];
8
+ repositories?: RepositoryOption[];
7
9
  workflowDefaults?: WorkflowDefaults;
8
10
  currentAgentType?: string;
9
11
  currentModel?: string;
10
12
  }
11
- export declare function CreateDrawerClient({ repositoryPath, initialParentId, features, workflowDefaults, currentAgentType, currentModel, }: CreateDrawerClientProps): import("react/jsx-runtime").JSX.Element;
13
+ export declare function CreateDrawerClient({ repositoryPath, initialParentId, features, repositories, workflowDefaults, currentAgentType, currentModel, }: CreateDrawerClientProps): import("react/jsx-runtime").JSX.Element;
12
14
  //# sourceMappingURL=create-drawer-client.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"create-drawer-client.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/web/components/common/control-center-drawer/create-drawer-client.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,iEAAiE,CAAC;AAC3G,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,qCAAqC,CAAC;AAE5E,MAAM,WAAW,uBAAuB;IACtC,cAAc,EAAE,MAAM,CAAC;IACvB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,QAAQ,EAAE,mBAAmB,EAAE,CAAC;IAChC,gBAAgB,CAAC,EAAE,gBAAgB,CAAC;IACpC,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,wBAAgB,kBAAkB,CAAC,EACjC,cAAc,EACd,eAAe,EACf,QAAQ,EACR,gBAAgB,EAChB,gBAAgB,EAChB,YAAY,GACb,EAAE,uBAAuB,2CA6EzB"}
1
+ {"version":3,"file":"create-drawer-client.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/web/components/common/control-center-drawer/create-drawer-client.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,iEAAiE,CAAC;AAC3G,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iEAAiE,CAAC;AACxG,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,qCAAqC,CAAC;AAE5E,MAAM,WAAW,uBAAuB;IACtC,cAAc,EAAE,MAAM,CAAC;IACvB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,QAAQ,EAAE,mBAAmB,EAAE,CAAC;IAChC,YAAY,CAAC,EAAE,gBAAgB,EAAE,CAAC;IAClC,gBAAgB,CAAC,EAAE,gBAAgB,CAAC;IACpC,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,wBAAgB,kBAAkB,CAAC,EACjC,cAAc,EACd,eAAe,EACf,QAAQ,EACR,YAAY,EACZ,gBAAgB,EAChB,gBAAgB,EAChB,YAAY,GACb,EAAE,uBAAuB,2CA8EzB"}
@@ -5,7 +5,7 @@ import { useRouter, usePathname } from 'next/navigation';
5
5
  import { toast } from 'sonner';
6
6
  import { createFeature } from '../../../app/actions/create-feature.js';
7
7
  import { FeatureCreateDrawer } from '../../common/feature-create-drawer/index.js';
8
- export function CreateDrawerClient({ repositoryPath, initialParentId, features, workflowDefaults, currentAgentType, currentModel, }) {
8
+ export function CreateDrawerClient({ repositoryPath, initialParentId, features, repositories, workflowDefaults, currentAgentType, currentModel, }) {
9
9
  const router = useRouter();
10
10
  const [isSubmitting, setIsSubmitting] = useState(false);
11
11
  // Derive open state from the URL. Next.js parallel routes preserve slot
@@ -56,5 +56,5 @@ export function CreateDrawerClient({ repositoryPath, initialParentId, features,
56
56
  setIsSubmitting(false);
57
57
  });
58
58
  }, [router]);
59
- return (_jsx(FeatureCreateDrawer, { open: isOpen, onClose: onClose, onSubmit: onSubmit, repositoryPath: repositoryPath, features: features, workflowDefaults: workflowDefaults, initialParentId: initialParentId, isSubmitting: isSubmitting, currentAgentType: currentAgentType, currentModel: currentModel }));
59
+ return (_jsx(FeatureCreateDrawer, { open: isOpen, onClose: onClose, onSubmit: onSubmit, repositoryPath: repositoryPath, features: features, repositories: repositories, workflowDefaults: workflowDefaults, initialParentId: initialParentId, isSubmitting: isSubmitting, currentAgentType: currentAgentType, currentModel: currentModel }));
60
60
  }
@@ -14,6 +14,12 @@ export interface ParentFeatureOption {
14
14
  id: string;
15
15
  name: string;
16
16
  }
17
+ /** Minimal repository descriptor for the repository selector. */
18
+ export interface RepositoryOption {
19
+ id: string;
20
+ name: string;
21
+ path: string;
22
+ }
17
23
  export interface FeatureCreatePayload {
18
24
  description: string;
19
25
  attachments: FormAttachment[];
@@ -45,6 +51,8 @@ export interface FeatureCreateDrawerProps {
45
51
  workflowDefaults?: WorkflowDefaults;
46
52
  /** List of existing features available for selection as a parent. */
47
53
  features?: ParentFeatureOption[];
54
+ /** List of tracked repositories for selection when repo context is missing. */
55
+ repositories?: RepositoryOption[];
48
56
  /** Pre-select a parent feature when the drawer opens (e.g. from (+) button on a feature node). */
49
57
  initialParentId?: string;
50
58
  /** Current global agent type from settings */
@@ -52,5 +60,13 @@ export interface FeatureCreateDrawerProps {
52
60
  /** Current global model from settings */
53
61
  currentModel?: string;
54
62
  }
55
- export declare function FeatureCreateDrawer({ open, onClose, onSubmit, repositoryPath, isSubmitting, workflowDefaults, features, initialParentId, currentAgentType, currentModel, }: FeatureCreateDrawerProps): import("react/jsx-runtime").JSX.Element;
63
+ export declare function FeatureCreateDrawer({ open, onClose, onSubmit, repositoryPath, isSubmitting, workflowDefaults, features, repositories, initialParentId, currentAgentType, currentModel, }: FeatureCreateDrawerProps): import("react/jsx-runtime").JSX.Element;
64
+ export interface RepositoryComboboxProps {
65
+ repositories: RepositoryOption[];
66
+ value: string | undefined;
67
+ onChange: (path: string | undefined) => void;
68
+ onAddRepository?: (repo: RepositoryOption) => void;
69
+ disabled?: boolean;
70
+ }
71
+ export declare function RepositoryCombobox({ repositories, value, onChange, onAddRepository, disabled, }: RepositoryComboboxProps): import("react/jsx-runtime").JSX.Element;
56
72
  //# sourceMappingURL=feature-create-drawer.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"feature-create-drawer.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/web/components/common/feature-create-drawer/feature-create-drawer.tsx"],"names":[],"mappings":"AAkBA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,qCAAqC,CAAC;AAI5E,YAAY,EAAE,cAAc,EAAE,MAAM,0DAA0D,CAAC;AAE/F,uFAAuF;AACvF,MAAM,WAAW,cAAc;IAC7B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,0DAA0D;AAC1D,MAAM,WAAW,mBAAmB;IAClC,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,oBAAoB;IACnC,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,cAAc,EAAE,CAAC;IAC9B,cAAc,EAAE,MAAM,CAAC;IACvB,aAAa,EAAE;QACb,QAAQ,EAAE,OAAO,CAAC;QAClB,SAAS,EAAE,OAAO,CAAC;QACnB,UAAU,EAAE,OAAO,CAAC;KACrB,CAAC;IACF,IAAI,EAAE,OAAO,CAAC;IACd,MAAM,EAAE,OAAO,CAAC;IAChB,cAAc,EAAE,OAAO,CAAC;IACxB,cAAc,EAAE,OAAO,CAAC;IACxB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,0EAA0E;IAC1E,IAAI,EAAE,OAAO,CAAC;IACd,wDAAwD;IACxD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,mDAAmD;IACnD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AA+ED,MAAM,WAAW,wBAAwB;IACvC,IAAI,EAAE,OAAO,CAAC;IACd,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,QAAQ,EAAE,CAAC,IAAI,EAAE,oBAAoB,KAAK,IAAI,CAAC;IAC/C,cAAc,EAAE,MAAM,CAAC;IACvB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,gBAAgB,CAAC,EAAE,gBAAgB,CAAC;IACpC,qEAAqE;IACrE,QAAQ,CAAC,EAAE,mBAAmB,EAAE,CAAC;IACjC,kGAAkG;IAClG,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,8CAA8C;IAC9C,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,yCAAyC;IACzC,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,wBAAgB,mBAAmB,CAAC,EAClC,IAAI,EACJ,OAAO,EACP,QAAQ,EACR,cAAc,EACd,YAAoB,EACpB,gBAAgB,EAChB,QAAQ,EACR,eAAe,EACf,gBAAgB,EAChB,YAAY,GACb,EAAE,wBAAwB,2CA8rB1B"}
1
+ {"version":3,"file":"feature-create-drawer.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/web/components/common/feature-create-drawer/feature-create-drawer.tsx"],"names":[],"mappings":"AAkBA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,qCAAqC,CAAC;AAO5E,YAAY,EAAE,cAAc,EAAE,MAAM,0DAA0D,CAAC;AAE/F,uFAAuF;AACvF,MAAM,WAAW,cAAc;IAC7B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,0DAA0D;AAC1D,MAAM,WAAW,mBAAmB;IAClC,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;CACd;AAED,iEAAiE;AACjE,MAAM,WAAW,gBAAgB;IAC/B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,oBAAoB;IACnC,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,cAAc,EAAE,CAAC;IAC9B,cAAc,EAAE,MAAM,CAAC;IACvB,aAAa,EAAE;QACb,QAAQ,EAAE,OAAO,CAAC;QAClB,SAAS,EAAE,OAAO,CAAC;QACnB,UAAU,EAAE,OAAO,CAAC;KACrB,CAAC;IACF,IAAI,EAAE,OAAO,CAAC;IACd,MAAM,EAAE,OAAO,CAAC;IAChB,cAAc,EAAE,OAAO,CAAC;IACxB,cAAc,EAAE,OAAO,CAAC;IACxB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,0EAA0E;IAC1E,IAAI,EAAE,OAAO,CAAC;IACd,wDAAwD;IACxD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,mDAAmD;IACnD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AA+ED,MAAM,WAAW,wBAAwB;IACvC,IAAI,EAAE,OAAO,CAAC;IACd,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,QAAQ,EAAE,CAAC,IAAI,EAAE,oBAAoB,KAAK,IAAI,CAAC;IAC/C,cAAc,EAAE,MAAM,CAAC;IACvB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,gBAAgB,CAAC,EAAE,gBAAgB,CAAC;IACpC,qEAAqE;IACrE,QAAQ,CAAC,EAAE,mBAAmB,EAAE,CAAC;IACjC,+EAA+E;IAC/E,YAAY,CAAC,EAAE,gBAAgB,EAAE,CAAC;IAClC,kGAAkG;IAClG,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,8CAA8C;IAC9C,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,yCAAyC;IACzC,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,wBAAgB,mBAAmB,CAAC,EAClC,IAAI,EACJ,OAAO,EACP,QAAQ,EACR,cAAc,EACd,YAAoB,EACpB,gBAAgB,EAChB,QAAQ,EACR,YAAY,EACZ,eAAe,EACf,gBAAgB,EAChB,YAAY,GACb,EAAE,wBAAwB,2CAmvB1B;AAmJD,MAAM,WAAW,uBAAuB;IACtC,YAAY,EAAE,gBAAgB,EAAE,CAAC;IACjC,KAAK,EAAE,MAAM,GAAG,SAAS,CAAC;IAC1B,QAAQ,EAAE,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,KAAK,IAAI,CAAC;IAC7C,eAAe,CAAC,EAAE,CAAC,IAAI,EAAE,gBAAgB,KAAK,IAAI,CAAC;IACnD,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,wBAAgB,kBAAkB,CAAC,EACjC,YAAY,EACZ,KAAK,EACL,QAAQ,EACR,eAAe,EACf,QAAQ,GACT,EAAE,uBAAuB,2CA8JzB"}
@@ -1,7 +1,7 @@
1
1
  'use client';
2
2
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
3
3
  import { useState, useCallback, useEffect, useRef } from 'react';
4
- import { PaperclipIcon, ChevronsUpDown, CheckIcon, Zap } from 'lucide-react';
4
+ import { PaperclipIcon, ChevronsUpDown, CheckIcon, Zap, FolderPlus, Loader2 } from 'lucide-react';
5
5
  import { cn } from '../../../lib/utils.js';
6
6
  import { useSoundAction } from '../../../hooks/use-sound-action.js';
7
7
  import { BaseDrawer } from '../../common/base-drawer/index.js';
@@ -17,6 +17,9 @@ import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from '../../
17
17
  import { useGuardedDrawerClose } from '../../../hooks/drawer-close-guard.js';
18
18
  import { AttachmentChip } from '../../common/attachment-chip/index.js';
19
19
  import { AgentModelPicker } from '../../features/settings/AgentModelPicker/index.js';
20
+ import { Separator } from '../../ui/separator.js';
21
+ import { pickFolder } from '../../common/add-repository-button/pick-folder.js';
22
+ import { addRepository } from '../../../app/actions/add-repository.js';
20
23
  import { pickFiles } from './pick-files.js';
21
24
  const MAX_FILE_SIZE = 10 * 1024 * 1024; // 10 MB
22
25
  const ALLOWED_EXTENSIONS = new Set([
@@ -90,7 +93,7 @@ const EMPTY_GATES = {
90
93
  allowPlan: false,
91
94
  allowMerge: false,
92
95
  };
93
- export function FeatureCreateDrawer({ open, onClose, onSubmit, repositoryPath, isSubmitting = false, workflowDefaults, features, initialParentId, currentAgentType, currentModel, }) {
96
+ export function FeatureCreateDrawer({ open, onClose, onSubmit, repositoryPath, isSubmitting = false, workflowDefaults, features, repositories, initialParentId, currentAgentType, currentModel, }) {
94
97
  const createSound = useSoundAction('create');
95
98
  const defaultGates = workflowDefaults?.approvalGates ?? EMPTY_GATES;
96
99
  const defaultPush = workflowDefaults?.push ?? false;
@@ -108,6 +111,8 @@ export function FeatureCreateDrawer({ open, onClose, onSubmit, repositoryPath, i
108
111
  const [fast, setFast] = useState(false);
109
112
  const [overrideAgent, setOverrideAgent] = useState(undefined);
110
113
  const [overrideModel, setOverrideModel] = useState(undefined);
114
+ const [selectedRepoPath, setSelectedRepoPath] = useState(repositoryPath || undefined);
115
+ const [localRepos, setLocalRepos] = useState(repositories ?? []);
111
116
  const [isDragOver, setIsDragOver] = useState(false);
112
117
  const [uploadError, setUploadError] = useState(null);
113
118
  const [isPromptFocused, setIsPromptFocused] = useState(false);
@@ -125,6 +130,10 @@ export function FeatureCreateDrawer({ open, onClose, onSubmit, repositoryPath, i
125
130
  setCommitEvidence(workflowDefaults.commitEvidence);
126
131
  }
127
132
  }, [workflowDefaults]);
133
+ // Sync localRepos when repositories prop changes
134
+ useEffect(() => {
135
+ setLocalRepos(repositories ?? []);
136
+ }, [repositories]);
128
137
  // Pre-select parent when initialParentId changes (e.g. (+) button on feature node)
129
138
  useEffect(() => {
130
139
  if (open && initialParentId) {
@@ -140,13 +149,23 @@ export function FeatureCreateDrawer({ open, onClose, onSubmit, repositoryPath, i
140
149
  setEnableEvidence(defaultEnableEvidence);
141
150
  setCommitEvidence(defaultCommitEvidence);
142
151
  setParentId(undefined);
152
+ setSelectedRepoPath(repositoryPath || undefined);
153
+ setLocalRepos(repositories ?? []);
143
154
  setFast(false);
144
155
  setOverrideAgent(undefined);
145
156
  setOverrideModel(undefined);
146
157
  setUploadError(null);
147
158
  dragCounterRef.current = 0;
148
159
  setIsDragOver(false);
149
- }, [defaultGates, defaultPush, defaultOpenPr, defaultEnableEvidence, defaultCommitEvidence]);
160
+ }, [
161
+ defaultGates,
162
+ defaultPush,
163
+ defaultOpenPr,
164
+ defaultEnableEvidence,
165
+ defaultCommitEvidence,
166
+ repositoryPath,
167
+ repositories,
168
+ ]);
150
169
  // Track whether the form has unsaved data
151
170
  const isDirty = description.trim() !== '' || attachments.length > 0;
152
171
  // Shared close guard — shows confirmation when dirty, prevents navigation
@@ -262,11 +281,14 @@ export function FeatureCreateDrawer({ open, onClose, onSubmit, repositoryPath, i
262
281
  e.preventDefault();
263
282
  if (!description.trim())
264
283
  return;
284
+ const effectiveRepoPath = selectedRepoPath ?? repositoryPath;
285
+ if (!effectiveRepoPath)
286
+ return;
265
287
  createSound.play();
266
288
  onSubmit({
267
289
  description: description.trim(),
268
290
  attachments: attachments.filter((a) => !a.loading),
269
- repositoryPath,
291
+ repositoryPath: effectiveRepoPath,
270
292
  approvalGates: {
271
293
  allowPrd: approvalGates.allowPrd ?? false,
272
294
  allowPlan: approvalGates.allowPlan ?? false,
@@ -287,6 +309,7 @@ export function FeatureCreateDrawer({ open, onClose, onSubmit, repositoryPath, i
287
309
  description,
288
310
  attachments,
289
311
  approvalGates,
312
+ selectedRepoPath,
290
313
  repositoryPath,
291
314
  onSubmit,
292
315
  push,
@@ -374,7 +397,13 @@ export function FeatureCreateDrawer({ open, onClose, onSubmit, repositoryPath, i
374
397
  }, 0);
375
398
  }, []);
376
399
  const hasFeatures = features && features.length > 0;
377
- return (_jsx(BaseDrawer, { open: open, onClose: attemptClose, size: "md", modal: false, dismissOnOutsideClick: true, "data-testid": "feature-create-drawer", header: _jsxs(_Fragment, { children: [_jsxs("div", { className: "flex items-center gap-2", children: [_jsx("div", { className: "h-2.5 w-2.5 shrink-0 rounded-full bg-blue-500" }), _jsx(DrawerTitle, { children: "NEW FEATURE" })] }), isSubmitting ? (_jsx(DrawerDescription, { asChild: true, children: _jsx("div", { children: _jsx(Badge, { variant: "secondary", children: "Creating..." }) }) })) : null] }), footer: _jsxs("div", { className: "flex flex-row justify-end gap-2", children: [_jsx(Button, { variant: "outline", onClick: attemptClose, disabled: isSubmitting, children: "Cancel" }), _jsx(Button, { type: "submit", form: "create-feature-form", disabled: !description.trim() || isSubmitting, children: isSubmitting ? 'Creating...' : '+ Create Feature' })] }), children: _jsx("div", { className: "overflow-y-auto p-4", children: _jsx(TooltipProvider, { delayDuration: 400, children: _jsxs("form", { ref: formRef, id: "create-feature-form", onSubmit: handleSubmit, onKeyDown: handleKeyDown, className: "flex flex-col gap-4", children: [_jsxs("div", { role: "region", "aria-label": "File drop zone", "data-drag-over": isDragOver ? 'true' : 'false', onDragEnter: handleDragEnter, onDragLeave: handleDragLeave, onDragOver: handleDragOver, onDrop: handleDrop, className: cn('flex flex-col gap-1.5 rounded-md border-2 border-transparent p-1 transition-colors', isDragOver && 'border-primary/50 bg-primary/5'), children: [_jsx(Label, { htmlFor: "feature-description", className: "text-muted-foreground text-xs font-semibold tracking-wider", children: "DESCRIBE YOUR FEATURE" }), _jsxs("div", { ref: promptContainerRef, onFocus: handlePromptFocus, onBlur: handlePromptBlur, className: cn('border-input flex h-56 flex-col overflow-hidden rounded-md border shadow-xs transition-[color,box-shadow]', isPromptFocused && 'ring-ring/50 border-ring ring-[3px]'), children: [_jsx(Textarea, { id: "feature-description", placeholder: "e.g. Add GitHub OAuth login with callback handling and token refresh...", value: description, onChange: (e) => setDescription(e.target.value), onPaste: handlePaste, required: true, disabled: isSubmitting, className: "min-h-0 flex-1 resize-none rounded-none border-0 shadow-none focus-visible:ring-0" }), attachments.length > 0 && (_jsx("div", { className: "flex flex-wrap items-center gap-1.5 px-3 py-2", children: attachments.map((file) => (_jsx(AttachmentChip, { name: file.name, size: file.size, mimeType: file.mimeType, path: file.path, onRemove: () => handleRemoveFile(file.id), disabled: isSubmitting, loading: file.loading }, file.id))) })), uploadError ? (_jsx("p", { className: "text-destructive px-3 pb-2 text-xs", children: uploadError })) : null, _jsxs("div", { className: "border-input flex items-center gap-3 border-t px-3 py-1.5", children: [_jsx(AgentModelPicker, { initialAgentType: overrideAgent ?? currentAgentType ?? 'claude-code', initialModel: overrideModel ?? currentModel ?? 'claude-sonnet-4-6', mode: "override", onAgentModelChange: (agent, model) => {
400
+ const needsRepo = !repositoryPath && !selectedRepoPath;
401
+ const showRepoSelector = !repositoryPath && repositories !== undefined;
402
+ return (_jsx(BaseDrawer, { open: open, onClose: attemptClose, size: "md", modal: false, dismissOnOutsideClick: true, "data-testid": "feature-create-drawer", header: _jsxs(_Fragment, { children: [_jsxs("div", { className: "flex items-center gap-2", children: [_jsx("div", { className: "h-2.5 w-2.5 shrink-0 rounded-full bg-blue-500" }), _jsx(DrawerTitle, { children: "NEW FEATURE" })] }), isSubmitting ? (_jsx(DrawerDescription, { asChild: true, children: _jsx("div", { children: _jsx(Badge, { variant: "secondary", children: "Creating..." }) }) })) : null] }), footer: _jsxs("div", { className: "flex flex-row justify-end gap-2", children: [_jsx(Button, { variant: "outline", onClick: attemptClose, disabled: isSubmitting, children: "Cancel" }), _jsx(Button, { type: "submit", form: "create-feature-form", disabled: !description.trim() || isSubmitting || needsRepo, children: isSubmitting ? 'Creating...' : '+ Create Feature' })] }), children: _jsx("div", { className: "overflow-y-auto p-4", children: _jsx(TooltipProvider, { delayDuration: 400, children: _jsxs("form", { ref: formRef, id: "create-feature-form", onSubmit: handleSubmit, onKeyDown: handleKeyDown, className: "flex flex-col gap-4", children: [showRepoSelector ? (_jsxs("div", { className: "flex flex-col gap-1.5", "data-testid": "repo-selector-section", children: [_jsx(Label, { className: "text-muted-foreground text-xs font-semibold tracking-wider", children: "REPOSITORY" }), _jsx(RepositoryCombobox, { repositories: localRepos, value: selectedRepoPath, onChange: setSelectedRepoPath, onAddRepository: (repo) => {
403
+ setLocalRepos((prev) => [...prev, repo]);
404
+ setSelectedRepoPath(repo.path);
405
+ }, disabled: isSubmitting })] })) : repositoryPath ? (_jsxs("div", { className: "flex flex-col gap-1.5", "data-testid": "repo-readonly-section", children: [_jsx(Label, { className: "text-muted-foreground text-xs font-semibold tracking-wider", children: "REPOSITORY" }), _jsx("p", { className: "text-sm", "data-testid": "repo-readonly-label", children: repositories?.find((r) => r.path === repositoryPath)?.name ??
406
+ repositoryPath.split('/').pop() })] })) : null, _jsxs("div", { role: "region", "aria-label": "File drop zone", "data-drag-over": isDragOver ? 'true' : 'false', onDragEnter: handleDragEnter, onDragLeave: handleDragLeave, onDragOver: handleDragOver, onDrop: handleDrop, className: cn('flex flex-col gap-1.5 rounded-md border-2 border-transparent p-1 transition-colors', isDragOver && 'border-primary/50 bg-primary/5'), children: [_jsx(Label, { htmlFor: "feature-description", className: "text-muted-foreground text-xs font-semibold tracking-wider", children: "DESCRIBE YOUR FEATURE" }), _jsxs("div", { ref: promptContainerRef, onFocus: handlePromptFocus, onBlur: handlePromptBlur, className: cn('border-input flex h-56 flex-col overflow-hidden rounded-md border shadow-xs transition-[color,box-shadow]', isPromptFocused && 'ring-ring/50 border-ring ring-[3px]'), children: [_jsx(Textarea, { id: "feature-description", placeholder: "e.g. Add GitHub OAuth login with callback handling and token refresh...", value: description, onChange: (e) => setDescription(e.target.value), onPaste: handlePaste, required: true, disabled: isSubmitting, className: "min-h-0 flex-1 resize-none rounded-none border-0 shadow-none focus-visible:ring-0" }), attachments.length > 0 && (_jsx("div", { className: "flex flex-wrap items-center gap-1.5 px-3 py-2", children: attachments.map((file) => (_jsx(AttachmentChip, { name: file.name, size: file.size, mimeType: file.mimeType, path: file.path, onRemove: () => handleRemoveFile(file.id), disabled: isSubmitting, loading: file.loading }, file.id))) })), uploadError ? (_jsx("p", { className: "text-destructive px-3 pb-2 text-xs", children: uploadError })) : null, _jsxs("div", { className: "border-input flex items-center gap-3 border-t px-3 py-1.5", children: [_jsx(AgentModelPicker, { initialAgentType: overrideAgent ?? currentAgentType ?? 'claude-code', initialModel: overrideModel ?? currentModel ?? 'claude-sonnet-4-6', mode: "override", onAgentModelChange: (agent, model) => {
378
407
  setOverrideAgent(agent);
379
408
  setOverrideModel(model);
380
409
  }, disabled: isSubmitting, className: "w-55" }), _jsxs(Tooltip, { children: [_jsx(TooltipTrigger, { asChild: true, children: _jsxs("div", { className: "ml-auto flex cursor-pointer items-center gap-2", children: [_jsx(Switch, { id: "fast-mode", checked: fast, onCheckedChange: setFast, disabled: isSubmitting }), _jsxs(Label, { htmlFor: "fast-mode", className: "flex cursor-pointer items-center gap-1 text-sm font-medium", children: [_jsx(Zap, { className: "h-3.5 w-3.5" }), "Fast Mode"] })] }) }), _jsx(TooltipContent, { side: "bottom", children: "Skip SDLC phases and implement directly from your prompt." })] }), _jsxs(Tooltip, { children: [_jsx(TooltipTrigger, { asChild: true, children: _jsx("button", { type: "button", onClick: handleAddFiles, disabled: isSubmitting, "aria-label": "Attach files", className: "text-muted-foreground hover:text-foreground cursor-pointer rounded p-1 transition-colors", children: _jsx(PaperclipIcon, { className: "h-4 w-4" }) }) }), _jsx(TooltipContent, { side: "bottom", children: "Attach files" })] })] })] })] }), hasFeatures && initialParentId !== undefined ? (_jsxs("div", { className: "flex flex-col gap-1.5", children: [_jsx(Label, { htmlFor: "parent-feature", className: "text-muted-foreground text-xs font-semibold tracking-wider", children: "PARENT FEATURE" }), _jsx(ParentFeatureCombobox, { features: features, value: parentId, onChange: setParentId, disabled: isSubmitting })] })) : null, _jsxs("div", { className: "flex flex-col gap-2", children: [_jsxs("div", { className: "border-input flex items-center gap-4 rounded-md border px-3 py-2.5", children: [_jsxs(Tooltip, { children: [_jsx(TooltipTrigger, { asChild: true, children: _jsx("span", { className: "text-muted-foreground w-16 shrink-0 cursor-default text-xs font-semibold tracking-wider", children: "APPROVE" }) }), _jsx(TooltipContent, { side: "bottom", children: "Auto-approve phase transitions without manual review." })] }), _jsx("div", { className: "flex flex-1 items-center gap-4", children: AUTO_APPROVE_OPTIONS.map((opt) => (_jsxs(Tooltip, { children: [_jsx(TooltipTrigger, { asChild: true, children: _jsxs("div", { className: "flex cursor-pointer items-center gap-1.5", children: [_jsx(Switch, { id: `approve-${opt.id}`, size: "sm", checked: approvalGates[opt.id] ?? false, onCheckedChange: (v) => setApprovalGates((prev) => ({ ...prev, [opt.id]: v })), disabled: isSubmitting ||
@@ -430,3 +459,65 @@ function ParentFeatureCombobox({ features, value, onChange, disabled, }) {
430
459
  ? `${selectedFeature.name} (${selectedFeature.id.slice(0, 8)})`
431
460
  : 'Select parent feature...' }), _jsx(ChevronsUpDown, { className: "ml-2 h-4 w-4 shrink-0 opacity-50" })] }) }), _jsx(PopoverContent, { className: "w-80 p-0", align: "start", "data-testid": "parent-feature-combobox-content", children: _jsxs("div", { className: "flex flex-col", children: [_jsx("div", { className: "border-b p-2", children: _jsx(Input, { ref: inputRef, placeholder: "Search features...", value: query, onChange: (e) => setQuery(e.target.value), className: "h-8 border-0 p-0 text-sm shadow-none focus-visible:ring-0", "data-testid": "parent-feature-search" }) }), _jsxs("div", { className: "max-h-48 overflow-y-auto py-1", role: "listbox", "aria-label": "Features", children: [_jsxs("button", { type: "button", role: "option", "aria-selected": value === undefined, onClick: () => handleSelect(undefined), className: cn('hover:bg-accent hover:text-accent-foreground flex w-full items-center gap-2 px-3 py-2 text-sm', value === undefined && 'bg-accent/50'), "data-testid": "parent-feature-option-none", children: [_jsx(CheckIcon, { className: cn('h-4 w-4 shrink-0', value !== undefined && 'invisible') }), _jsx("span", { className: "text-muted-foreground italic", children: "No parent" })] }), filtered.length === 0 && query ? (_jsx("p", { className: "text-muted-foreground px-3 py-2 text-sm", children: "No features found." })) : (filtered.map((f) => (_jsxs("button", { type: "button", role: "option", "aria-selected": value === f.id, onClick: () => handleSelect(f.id), className: cn('hover:bg-accent hover:text-accent-foreground flex w-full items-center gap-2 px-3 py-2 text-sm', value === f.id && 'bg-accent/50'), "data-testid": `parent-feature-option-${f.id}`, children: [_jsx(CheckIcon, { className: cn('h-4 w-4 shrink-0', value !== f.id && 'invisible') }), _jsxs("span", { className: "truncate", children: [f.name, ' ', _jsxs("span", { className: "text-muted-foreground font-mono text-xs", children: ["(", f.id.slice(0, 8), ")"] })] })] }, f.id))))] })] }) })] }));
432
461
  }
462
+ export function RepositoryCombobox({ repositories, value, onChange, onAddRepository, disabled, }) {
463
+ const [open, setOpen] = useState(false);
464
+ const [query, setQuery] = useState('');
465
+ const [isAdding, setIsAdding] = useState(false);
466
+ const [addError, setAddError] = useState(null);
467
+ const inputRef = useRef(null);
468
+ const selectedRepo = repositories.find((r) => r.path === value);
469
+ const filtered = query.trim()
470
+ ? repositories.filter((r) => r.name.toLowerCase().includes(query.toLowerCase()) ||
471
+ r.path.toLowerCase().includes(query.toLowerCase()))
472
+ : repositories;
473
+ const handleSelect = useCallback((path) => {
474
+ onChange(path);
475
+ setOpen(false);
476
+ setQuery('');
477
+ }, [onChange]);
478
+ const handleAddRepository = useCallback(async () => {
479
+ if (isAdding)
480
+ return;
481
+ setIsAdding(true);
482
+ setAddError(null);
483
+ try {
484
+ const folderPath = await pickFolder();
485
+ if (!folderPath) {
486
+ setIsAdding(false);
487
+ return;
488
+ }
489
+ const result = await addRepository({ path: folderPath });
490
+ if (result.error) {
491
+ setAddError(result.error);
492
+ setIsAdding(false);
493
+ return;
494
+ }
495
+ if (result.repository) {
496
+ const newRepo = {
497
+ id: result.repository.id,
498
+ name: result.repository.name,
499
+ path: result.repository.path,
500
+ };
501
+ onAddRepository?.(newRepo);
502
+ onChange(newRepo.path);
503
+ setOpen(false);
504
+ setQuery('');
505
+ }
506
+ }
507
+ catch (err) {
508
+ setAddError(err instanceof Error ? err.message : 'Failed to add repository');
509
+ }
510
+ finally {
511
+ setIsAdding(false);
512
+ }
513
+ }, [isAdding, onAddRepository, onChange]);
514
+ useEffect(() => {
515
+ if (open) {
516
+ setTimeout(() => inputRef.current?.focus(), 0);
517
+ }
518
+ else {
519
+ setQuery('');
520
+ }
521
+ }, [open]);
522
+ return (_jsxs(Popover, { open: open, onOpenChange: setOpen, children: [_jsx(PopoverTrigger, { asChild: true, children: _jsxs("button", { type: "button", role: "combobox", "aria-expanded": open, "aria-label": "Repository", disabled: disabled, "data-testid": "repository-combobox", className: 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', !selectedRepo && 'text-muted-foreground'), children: [_jsx("span", { className: "truncate", children: selectedRepo ? selectedRepo.name : 'Select repository...' }), _jsx(ChevronsUpDown, { className: "ml-2 h-4 w-4 shrink-0 opacity-50" })] }) }), _jsx(PopoverContent, { className: "w-80 p-0", align: "start", "data-testid": "repository-combobox-content", children: _jsxs("div", { className: "flex flex-col", children: [_jsx("div", { className: "border-b p-2", children: _jsx(Input, { ref: inputRef, placeholder: "Search repositories...", value: query, onChange: (e) => setQuery(e.target.value), className: "h-8 border-0 p-0 text-sm shadow-none focus-visible:ring-0", "data-testid": "repository-search" }) }), _jsx("div", { className: "max-h-48 overflow-y-auto py-1", role: "listbox", "aria-label": "Repositories", children: filtered.length === 0 ? (_jsx("p", { className: "text-muted-foreground px-3 py-2 text-sm", "data-testid": "repository-empty", children: "No repositories found." })) : (filtered.map((r) => (_jsxs("button", { type: "button", role: "option", "aria-selected": value === r.path, onClick: () => handleSelect(r.path), className: cn('hover:bg-accent hover:text-accent-foreground flex w-full items-center gap-2 px-3 py-2 text-sm', value === r.path && 'bg-accent/50'), "data-testid": `repository-option-${r.id}`, children: [_jsx(CheckIcon, { className: cn('h-4 w-4 shrink-0', value !== r.path && 'invisible') }), _jsxs("span", { className: "flex flex-col items-start truncate", children: [_jsx("span", { className: "truncate", children: r.name }), _jsx("span", { className: "text-muted-foreground truncate text-xs", children: r.path })] })] }, r.id)))) }), _jsx(Separator, {}), _jsxs("button", { type: "button", onClick: handleAddRepository, disabled: isAdding, className: "hover:bg-accent hover:text-accent-foreground flex w-full items-center gap-2 px-3 py-2 text-sm", "data-testid": "add-repository-item", children: [isAdding ? (_jsx(Loader2, { className: "h-4 w-4 shrink-0 animate-spin" })) : (_jsx(FolderPlus, { className: "h-4 w-4 shrink-0" })), _jsx("span", { children: "Add new repository..." })] }), addError ? (_jsx("p", { className: "px-3 pb-2 text-xs text-red-500", "data-testid": "add-repository-error", children: addError })) : null] }) })] }));
523
+ }
@@ -120,4 +120,15 @@ export declare const DiscardConfirmation: Story;
120
120
  */
121
121
  export declare const DragDropReady: Story;
122
122
  export declare const Interactive: Story;
123
+ /**
124
+ * With repository selector — opened from sidebar without repo context.
125
+ * Shows the searchable repository combobox at the top of the form.
126
+ */
127
+ export declare const WithRepoSelector: Story;
128
+ /**
129
+ * With empty repo selector — opened from sidebar but no repositories are tracked.
130
+ * Shows the combobox with only the "Add new repository..." option.
131
+ * The submit button remains disabled until a repository is added.
132
+ */
133
+ export declare const WithRepoSelectorEmpty: Story;
123
134
  //# sourceMappingURL=feature-create-drawer.stories.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"feature-create-drawer.stories.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/web/components/common/feature-create-drawer/feature-create-drawer.stories.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAEvD,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAU9D;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,mBAAmB,CAgC1C,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAmDlD,uFAAuF;AACvF,eAAO,MAAM,OAAO,EAAE,KAErB,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,SAAS,EAAE,KAiBvB,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,kBAAkB,EAAE,KAMhC,CAAC;AAEF,4DAA4D;AAC5D,eAAO,MAAM,SAAS,EAAE,KAMvB,CAAC;AAMF;;;GAGG;AACH,eAAO,MAAM,YAAY,EAAE,KAM1B,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,UAAU,EAAE,KAUxB,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,OAAO,EAAE,KAUrB,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,SAAS,EAAE,KAUvB,CAAC;AAMF;;;GAGG;AACH,eAAO,MAAM,QAAQ,EAAE,KAUtB,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,SAAS,EAAE,KAUvB,CAAC;AAMF;;;;GAIG;AACH,eAAO,MAAM,WAAW,EAAE,KAMzB,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,UAAU,EAAE,KAUxB,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,mBAAmB,EAAE,KAgBjC,CAAC;AAcF;;;;GAIG;AACH,eAAO,MAAM,oBAAoB,EAAE,KAWlC,CAAC;AAkDF,+EAA+E;AAC/E,eAAO,MAAM,QAAQ,EAAE,KAEtB,CAAC;AAwCF;;;GAGG;AACH,eAAO,MAAM,iBAAiB,EAAE,KAM/B,CAAC;AAMF;;;GAGG;AACH,eAAO,MAAM,mBAAmB,EAAE,KAgBjC,CAAC;AAMF;;;;GAIG;AACH,eAAO,MAAM,aAAa,EAAE,KAY3B,CAAC;AAMF,eAAO,MAAM,WAAW,EAAE,KAwCzB,CAAC"}
1
+ {"version":3,"file":"feature-create-drawer.stories.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/web/components/common/feature-create-drawer/feature-create-drawer.stories.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAEvD,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAU9D;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,mBAAmB,CAgC1C,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAmDlD,uFAAuF;AACvF,eAAO,MAAM,OAAO,EAAE,KAErB,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,SAAS,EAAE,KAiBvB,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,kBAAkB,EAAE,KAMhC,CAAC;AAEF,4DAA4D;AAC5D,eAAO,MAAM,SAAS,EAAE,KAMvB,CAAC;AAMF;;;GAGG;AACH,eAAO,MAAM,YAAY,EAAE,KAM1B,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,UAAU,EAAE,KAUxB,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,OAAO,EAAE,KAUrB,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,SAAS,EAAE,KAUvB,CAAC;AAMF;;;GAGG;AACH,eAAO,MAAM,QAAQ,EAAE,KAUtB,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,SAAS,EAAE,KAUvB,CAAC;AAMF;;;;GAIG;AACH,eAAO,MAAM,WAAW,EAAE,KAMzB,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,UAAU,EAAE,KAUxB,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,mBAAmB,EAAE,KAgBjC,CAAC;AAcF;;;;GAIG;AACH,eAAO,MAAM,oBAAoB,EAAE,KAWlC,CAAC;AAkDF,+EAA+E;AAC/E,eAAO,MAAM,QAAQ,EAAE,KAEtB,CAAC;AAwCF;;;GAGG;AACH,eAAO,MAAM,iBAAiB,EAAE,KAM/B,CAAC;AAMF;;;GAGG;AACH,eAAO,MAAM,mBAAmB,EAAE,KAgBjC,CAAC;AAMF;;;;GAIG;AACH,eAAO,MAAM,aAAa,EAAE,KAY3B,CAAC;AAMF,eAAO,MAAM,WAAW,EAAE,KAwCzB,CAAC;AAuCF;;;GAGG;AACH,eAAO,MAAM,gBAAgB,EAAE,KAM9B,CAAC;AA6BF;;;;GAIG;AACH,eAAO,MAAM,qBAAqB,EAAE,KAMnC,CAAC"}
@@ -397,3 +397,54 @@ export const Interactive = {
397
397
  }, repositoryPath: "/Users/dev/my-repo", currentAgentType: "claude-code", currentModel: "claude-sonnet-4-6" })] }));
398
398
  },
399
399
  };
400
+ /* ---------------------------------------------------------------------------
401
+ * Repository selector stories
402
+ * ------------------------------------------------------------------------- */
403
+ const SAMPLE_REPOSITORIES = [
404
+ { id: 'repo-001', name: 'my-app', path: '/Users/dev/projects/my-app' },
405
+ { id: 'repo-002', name: 'api-service', path: '/Users/dev/projects/api-service' },
406
+ { id: 'repo-003', name: 'shared-lib', path: '/Users/dev/libs/shared-lib' },
407
+ ];
408
+ function CreateDrawerWithRepoSelector() {
409
+ const [open, setOpen] = useState(false);
410
+ return (_jsxs("div", { className: "flex h-screen items-start p-4", children: [_jsx(Button, { variant: "outline", onClick: () => setOpen(true), children: "Open (With Repo Selector)" }), _jsx(FeatureCreateDrawer, { open: open, onClose: () => {
411
+ setOpen(false);
412
+ logClose();
413
+ }, onSubmit: (data) => {
414
+ logSubmit(data);
415
+ setOpen(false);
416
+ }, repositoryPath: "", repositories: SAMPLE_REPOSITORIES, currentAgentType: "claude-code", currentModel: "claude-sonnet-4-6" })] }));
417
+ }
418
+ /**
419
+ * With repository selector — opened from sidebar without repo context.
420
+ * Shows the searchable repository combobox at the top of the form.
421
+ */
422
+ export const WithRepoSelector = {
423
+ render: () => _jsx(CreateDrawerWithRepoSelector, {}),
424
+ play: async ({ canvasElement }) => {
425
+ const canvas = within(canvasElement);
426
+ await userEvent.click(canvas.getByRole('button', { name: 'Open (With Repo Selector)' }));
427
+ },
428
+ };
429
+ function CreateDrawerWithRepoSelectorEmpty() {
430
+ const [open, setOpen] = useState(false);
431
+ return (_jsxs("div", { className: "flex h-screen items-start p-4", children: [_jsx(Button, { variant: "outline", onClick: () => setOpen(true), children: "Open (No Repos)" }), _jsx(FeatureCreateDrawer, { open: open, onClose: () => {
432
+ setOpen(false);
433
+ logClose();
434
+ }, onSubmit: (data) => {
435
+ logSubmit(data);
436
+ setOpen(false);
437
+ }, repositoryPath: "", repositories: [], currentAgentType: "claude-code", currentModel: "claude-sonnet-4-6" })] }));
438
+ }
439
+ /**
440
+ * With empty repo selector — opened from sidebar but no repositories are tracked.
441
+ * Shows the combobox with only the "Add new repository..." option.
442
+ * The submit button remains disabled until a repository is added.
443
+ */
444
+ export const WithRepoSelectorEmpty = {
445
+ render: () => _jsx(CreateDrawerWithRepoSelectorEmpty, {}),
446
+ play: async ({ canvasElement }) => {
447
+ const canvas = within(canvasElement);
448
+ await userEvent.click(canvas.getByRole('button', { name: 'Open (No Repos)' }));
449
+ },
450
+ };
@@ -1,2 +1,2 @@
1
- export { FeatureCreateDrawer, type FeatureCreateDrawerProps, type FeatureCreatePayload, type FileAttachment, type ParentFeatureOption, } from './feature-create-drawer.js';
1
+ export { FeatureCreateDrawer, RepositoryCombobox, type RepositoryComboboxProps, type FeatureCreateDrawerProps, type FeatureCreatePayload, type FileAttachment, type ParentFeatureOption, type RepositoryOption, } from './feature-create-drawer.js';
2
2
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/web/components/common/feature-create-drawer/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,mBAAmB,EACnB,KAAK,wBAAwB,EAC7B,KAAK,oBAAoB,EACzB,KAAK,cAAc,EACnB,KAAK,mBAAmB,GACzB,MAAM,yBAAyB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/web/components/common/feature-create-drawer/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,mBAAmB,EACnB,kBAAkB,EAClB,KAAK,uBAAuB,EAC5B,KAAK,wBAAwB,EAC7B,KAAK,oBAAoB,EACzB,KAAK,cAAc,EACnB,KAAK,mBAAmB,EACxB,KAAK,gBAAgB,GACtB,MAAM,yBAAyB,CAAC"}
@@ -1 +1 @@
1
- export { FeatureCreateDrawer, } from './feature-create-drawer.js';
1
+ export { FeatureCreateDrawer, RepositoryCombobox, } from './feature-create-drawer.js';
@@ -0,0 +1,14 @@
1
+ import type { Meta, StoryObj } from '@storybook/react';
2
+ import { RepositoryCombobox } from './feature-create-drawer.js';
3
+ declare const meta: Meta<typeof RepositoryCombobox>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof RepositoryCombobox>;
6
+ /** Default state with multiple repositories available for selection. */
7
+ export declare const WithRepositories: Story;
8
+ /** Empty list — shows "No repositories found." message and "Add new repository..." option. */
9
+ export declare const EmptyList: Story;
10
+ /** Pre-selected repository — trigger button shows the selected repo name. */
11
+ export declare const PreSelected: Story;
12
+ /** Disabled state — combobox trigger button is non-interactive. */
13
+ export declare const Disabled: Story;
14
+ //# sourceMappingURL=repository-combobox.stories.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"repository-combobox.stories.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/web/components/common/feature-create-drawer/repository-combobox.stories.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAU7D,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,kBAAkB,CAOzC,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,kBAAkB,CAAC,CAAC;AA+BjD,wEAAwE;AACxE,eAAO,MAAM,gBAAgB,EAAE,KAE9B,CAAC;AAEF,8FAA8F;AAC9F,eAAO,MAAM,SAAS,EAAE,KAEvB,CAAC;AAEF,6EAA6E;AAC7E,eAAO,MAAM,WAAW,EAAE,KAOzB,CAAC;AAEF,mEAAmE;AACnE,eAAO,MAAM,QAAQ,EAAE,KAEtB,CAAC"}
@@ -0,0 +1,42 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { useState } from 'react';
3
+ import { RepositoryCombobox } from './feature-create-drawer.js';
4
+ const SAMPLE_REPOSITORIES = [
5
+ { id: 'repo-001', name: 'my-app', path: '/Users/dev/projects/my-app' },
6
+ { id: 'repo-002', name: 'api-service', path: '/Users/dev/projects/api-service' },
7
+ { id: 'repo-003', name: 'shared-lib', path: '/Users/dev/libs/shared-lib' },
8
+ { id: 'repo-004', name: 'docs-site', path: '/Users/dev/projects/docs-site' },
9
+ ];
10
+ const meta = {
11
+ title: 'Drawers/Feature/RepositoryCombobox',
12
+ component: RepositoryCombobox,
13
+ tags: ['autodocs'],
14
+ parameters: {
15
+ layout: 'centered',
16
+ },
17
+ };
18
+ export default meta;
19
+ function RepositoryComboboxWrapper({ repositories: initialRepos, initialValue, disabled, }) {
20
+ const [repos, setRepos] = useState(initialRepos);
21
+ const [value, setValue] = useState(initialValue);
22
+ return (_jsxs("div", { className: "w-80", children: [_jsx(RepositoryCombobox, { repositories: repos, value: value, onChange: setValue, onAddRepository: (repo) => {
23
+ setRepos((prev) => [...prev, repo]);
24
+ setValue(repo.path);
25
+ }, disabled: disabled }), value ? _jsxs("p", { className: "text-muted-foreground mt-2 text-xs", children: ["Selected: ", value] }) : null] }));
26
+ }
27
+ /** Default state with multiple repositories available for selection. */
28
+ export const WithRepositories = {
29
+ render: () => _jsx(RepositoryComboboxWrapper, { repositories: SAMPLE_REPOSITORIES }),
30
+ };
31
+ /** Empty list — shows "No repositories found." message and "Add new repository..." option. */
32
+ export const EmptyList = {
33
+ render: () => _jsx(RepositoryComboboxWrapper, { repositories: [] }),
34
+ };
35
+ /** Pre-selected repository — trigger button shows the selected repo name. */
36
+ export const PreSelected = {
37
+ render: () => (_jsx(RepositoryComboboxWrapper, { repositories: SAMPLE_REPOSITORIES, initialValue: "/Users/dev/projects/api-service" })),
38
+ };
39
+ /** Disabled state — combobox trigger button is non-interactive. */
40
+ export const Disabled = {
41
+ render: () => _jsx(RepositoryComboboxWrapper, { repositories: SAMPLE_REPOSITORIES, disabled: true }),
42
+ };
@@ -0,0 +1,22 @@
1
+ export interface FloatingActionButtonAction {
2
+ /** Unique key for the action. */
3
+ id: string;
4
+ /** Accessible label shown next to the icon. */
5
+ label: string;
6
+ /** Lucide icon component. */
7
+ icon: React.ReactNode;
8
+ /** Called when the action is clicked. */
9
+ onClick: () => void;
10
+ /** Whether the action is currently loading. */
11
+ loading?: boolean;
12
+ /** Whether the action is disabled. */
13
+ disabled?: boolean;
14
+ }
15
+ export interface FloatingActionButtonProps {
16
+ /** Action items shown when the FAB is expanded. */
17
+ actions: FloatingActionButtonAction[];
18
+ /** Additional CSS classes for the container. */
19
+ className?: string;
20
+ }
21
+ export declare function FloatingActionButton({ actions, className }: FloatingActionButtonProps): import("react/jsx-runtime").JSX.Element;
22
+ //# sourceMappingURL=floating-action-button.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"floating-action-button.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/web/components/common/floating-action-button/floating-action-button.tsx"],"names":[],"mappings":"AAOA,MAAM,WAAW,0BAA0B;IACzC,iCAAiC;IACjC,EAAE,EAAE,MAAM,CAAC;IACX,+CAA+C;IAC/C,KAAK,EAAE,MAAM,CAAC;IACd,6BAA6B;IAC7B,IAAI,EAAE,KAAK,CAAC,SAAS,CAAC;IACtB,yCAAyC;IACzC,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,+CAA+C;IAC/C,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,sCAAsC;IACtC,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,MAAM,WAAW,yBAAyB;IACxC,mDAAmD;IACnD,OAAO,EAAE,0BAA0B,EAAE,CAAC;IACtC,gDAAgD;IAChD,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAQD,wBAAgB,oBAAoB,CAAC,EAAE,OAAO,EAAE,SAAS,EAAE,EAAE,yBAAyB,2CAiHrF"}