@shepai/cli 1.72.3 → 1.72.5

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 (268) hide show
  1. package/dist/src/presentation/web/components/common/base-drawer/base-drawer.d.ts.map +1 -1
  2. package/dist/src/presentation/web/components/common/base-drawer/base-drawer.js +1 -1
  3. package/dist/src/presentation/web/components/common/control-center-drawer/control-center-drawer.stories.d.ts.map +1 -1
  4. package/dist/src/presentation/web/components/common/control-center-drawer/control-center-drawer.stories.js +4 -0
  5. package/dist/src/presentation/web/components/common/control-center-drawer/feature-drawer-client.d.ts.map +1 -1
  6. package/dist/src/presentation/web/components/common/control-center-drawer/feature-drawer-client.js +36 -6
  7. package/dist/src/presentation/web/components/common/drawer-action-bar/drawer-action-bar-config.d.ts +4 -0
  8. package/dist/src/presentation/web/components/common/drawer-action-bar/drawer-action-bar-config.d.ts.map +1 -1
  9. package/dist/src/presentation/web/components/common/drawer-action-bar/drawer-action-bar.d.ts +1 -1
  10. package/dist/src/presentation/web/components/common/drawer-action-bar/drawer-action-bar.d.ts.map +1 -1
  11. package/dist/src/presentation/web/components/common/drawer-action-bar/drawer-action-bar.js +4 -2
  12. package/dist/src/presentation/web/components/common/feature-create-drawer/feature-create-drawer.d.ts.map +1 -1
  13. package/dist/src/presentation/web/components/common/feature-create-drawer/feature-create-drawer.js +6 -5
  14. package/dist/src/presentation/web/components/common/feature-create-drawer/feature-create-drawer.stories.d.ts +5 -0
  15. package/dist/src/presentation/web/components/common/feature-create-drawer/feature-create-drawer.stories.d.ts.map +1 -1
  16. package/dist/src/presentation/web/components/common/feature-create-drawer/feature-create-drawer.stories.js +24 -0
  17. package/dist/src/presentation/web/components/common/merge-review/merge-review-config.d.ts +4 -0
  18. package/dist/src/presentation/web/components/common/merge-review/merge-review-config.d.ts.map +1 -1
  19. package/dist/src/presentation/web/components/common/merge-review/merge-review.d.ts +1 -1
  20. package/dist/src/presentation/web/components/common/merge-review/merge-review.d.ts.map +1 -1
  21. package/dist/src/presentation/web/components/common/merge-review/merge-review.js +2 -2
  22. package/dist/src/presentation/web/components/common/prd-questionnaire/prd-questionnaire-config.d.ts +4 -0
  23. package/dist/src/presentation/web/components/common/prd-questionnaire/prd-questionnaire-config.d.ts.map +1 -1
  24. package/dist/src/presentation/web/components/common/prd-questionnaire/prd-questionnaire.d.ts +1 -1
  25. package/dist/src/presentation/web/components/common/prd-questionnaire/prd-questionnaire.d.ts.map +1 -1
  26. package/dist/src/presentation/web/components/common/prd-questionnaire/prd-questionnaire.js +2 -2
  27. package/dist/src/presentation/web/components/common/tech-review-tabs/tech-review-tabs-config.d.ts +4 -0
  28. package/dist/src/presentation/web/components/common/tech-review-tabs/tech-review-tabs-config.d.ts.map +1 -1
  29. package/dist/src/presentation/web/components/common/tech-review-tabs/tech-review-tabs.d.ts +1 -1
  30. package/dist/src/presentation/web/components/common/tech-review-tabs/tech-review-tabs.d.ts.map +1 -1
  31. package/dist/src/presentation/web/components/common/tech-review-tabs/tech-review-tabs.js +2 -2
  32. package/dist/src/presentation/web/components/features/control-center/control-center-inner.d.ts.map +1 -1
  33. package/dist/src/presentation/web/components/features/control-center/control-center-inner.js +12 -8
  34. package/dist/src/presentation/web/components/features/control-center/control-center.stories.d.ts.map +1 -1
  35. package/dist/src/presentation/web/components/features/control-center/control-center.stories.js +2 -1
  36. package/dist/src/presentation/web/components/features/control-center/use-control-center-state.d.ts +3 -1
  37. package/dist/src/presentation/web/components/features/control-center/use-control-center-state.d.ts.map +1 -1
  38. package/dist/src/presentation/web/components/features/control-center/use-control-center-state.js +13 -5
  39. package/dist/src/presentation/web/components/layouts/app-shell/app-shell.d.ts.map +1 -1
  40. package/dist/src/presentation/web/components/layouts/app-shell/app-shell.js +7 -5
  41. package/dist/src/presentation/web/components/layouts/app-sidebar/app-sidebar.js +1 -1
  42. package/dist/src/presentation/web/components/ui/alert-dialog.stories.js +1 -1
  43. package/dist/src/presentation/web/hooks/drawer-close-guard.d.ts +26 -0
  44. package/dist/src/presentation/web/hooks/drawer-close-guard.d.ts.map +1 -0
  45. package/dist/src/presentation/web/hooks/drawer-close-guard.js +74 -0
  46. package/dist/tsconfig.build.tsbuildinfo +1 -1
  47. package/package.json +1 -1
  48. package/web/.next/BUILD_ID +1 -1
  49. package/web/.next/build-manifest.json +2 -2
  50. package/web/.next/cache/.previewinfo +1 -1
  51. package/web/.next/cache/.rscinfo +1 -1
  52. package/web/.next/cache/.tsbuildinfo +1 -1
  53. package/web/.next/cache/config.json +3 -3
  54. package/web/.next/fallback-build-manifest.json +2 -2
  55. package/web/.next/prerender-manifest.json +3 -3
  56. package/web/.next/required-server-files.js +1 -1
  57. package/web/.next/required-server-files.json +1 -1
  58. package/web/.next/server/app/(dashboard)/@drawer/create/page/server-reference-manifest.json +14 -14
  59. package/web/.next/server/app/(dashboard)/@drawer/create/page.js.nft.json +1 -1
  60. package/web/.next/server/app/(dashboard)/@drawer/create/page_client-reference-manifest.js +1 -1
  61. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page/server-reference-manifest.json +17 -17
  62. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page.js.nft.json +1 -1
  63. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page_client-reference-manifest.js +1 -1
  64. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page/server-reference-manifest.json +12 -12
  65. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page.js.nft.json +1 -1
  66. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page_client-reference-manifest.js +1 -1
  67. package/web/.next/server/app/(dashboard)/create/page/server-reference-manifest.json +14 -14
  68. package/web/.next/server/app/(dashboard)/create/page.js.nft.json +1 -1
  69. package/web/.next/server/app/(dashboard)/create/page_client-reference-manifest.js +1 -1
  70. package/web/.next/server/app/(dashboard)/feature/[featureId]/page/server-reference-manifest.json +17 -17
  71. package/web/.next/server/app/(dashboard)/feature/[featureId]/page.js.nft.json +1 -1
  72. package/web/.next/server/app/(dashboard)/feature/[featureId]/page_client-reference-manifest.js +1 -1
  73. package/web/.next/server/app/(dashboard)/page/server-reference-manifest.json +12 -12
  74. package/web/.next/server/app/(dashboard)/page.js.nft.json +1 -1
  75. package/web/.next/server/app/(dashboard)/page_client-reference-manifest.js +1 -1
  76. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page/server-reference-manifest.json +12 -12
  77. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page.js.nft.json +1 -1
  78. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page_client-reference-manifest.js +1 -1
  79. package/web/.next/server/app/_global-error.html +2 -2
  80. package/web/.next/server/app/_global-error.rsc +1 -1
  81. package/web/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
  82. package/web/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  83. package/web/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  84. package/web/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  85. package/web/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  86. package/web/.next/server/app/_not-found/page/server-reference-manifest.json +1 -1
  87. package/web/.next/server/app/_not-found/page.js.nft.json +1 -1
  88. package/web/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  89. package/web/.next/server/app/skills/page/server-reference-manifest.json +6 -6
  90. package/web/.next/server/app/skills/page.js.nft.json +1 -1
  91. package/web/.next/server/app/skills/page_client-reference-manifest.js +1 -1
  92. package/web/.next/server/app/tools/page/server-reference-manifest.json +1 -1
  93. package/web/.next/server/app/tools/page.js.nft.json +1 -1
  94. package/web/.next/server/app/tools/page_client-reference-manifest.js +1 -1
  95. package/web/.next/server/app/version/page/server-reference-manifest.json +1 -1
  96. package/web/.next/server/app/version/page.js.nft.json +1 -1
  97. package/web/.next/server/app/version/page_client-reference-manifest.js +1 -1
  98. package/web/.next/server/chunks/ssr/744ca_web_components_common_control-center-drawer_create-drawer-client_tsx_5e26fc0a._.js +1 -1
  99. package/web/.next/server/chunks/ssr/744ca_web_components_common_control-center-drawer_create-drawer-client_tsx_5e26fc0a._.js.map +1 -1
  100. package/web/.next/server/chunks/ssr/8ba4b_server_app_(dashboard)_@drawer_repository_[repositoryId]_page_actions_2b7834f6.js +1 -1
  101. package/web/.next/server/chunks/ssr/8ba4b_server_app_(dashboard)_@drawer_repository_[repositoryId]_page_actions_2b7834f6.js.map +1 -1
  102. package/web/.next/server/chunks/ssr/8ba4b_server_app_(dashboard)_repository_[repositoryId]_page_actions_6923c575.js +1 -1
  103. package/web/.next/server/chunks/ssr/8ba4b_server_app_(dashboard)_repository_[repositoryId]_page_actions_6923c575.js.map +1 -1
  104. package/web/.next/server/chunks/ssr/[root-of-the-server]__07385073._.js +2 -2
  105. package/web/.next/server/chunks/ssr/[root-of-the-server]__07385073._.js.map +1 -1
  106. package/web/.next/server/chunks/ssr/[root-of-the-server]__08ba9bd3._.js +1 -1
  107. package/web/.next/server/chunks/ssr/[root-of-the-server]__08ba9bd3._.js.map +1 -1
  108. package/web/.next/server/chunks/ssr/[root-of-the-server]__249c74f6._.js +1 -1
  109. package/web/.next/server/chunks/ssr/[root-of-the-server]__6b17a22d._.js +1 -1
  110. package/web/.next/server/chunks/ssr/[root-of-the-server]__6b17a22d._.js.map +1 -1
  111. package/web/.next/server/chunks/ssr/[root-of-the-server]__6bb00d90._.js +1 -1
  112. package/web/.next/server/chunks/ssr/[root-of-the-server]__6bb00d90._.js.map +1 -1
  113. package/web/.next/server/chunks/ssr/[root-of-the-server]__6db85a66._.js +2 -2
  114. package/web/.next/server/chunks/ssr/[root-of-the-server]__804c006d._.js +1 -1
  115. package/web/.next/server/chunks/ssr/[root-of-the-server]__804c006d._.js.map +1 -1
  116. package/web/.next/server/chunks/ssr/[root-of-the-server]__8fcb9132._.js +2 -2
  117. package/web/.next/server/chunks/ssr/_00e6c698._.js +1 -1
  118. package/web/.next/server/chunks/ssr/_00e6c698._.js.map +1 -1
  119. package/web/.next/server/chunks/ssr/_07c2a32a._.js +9 -0
  120. package/web/.next/server/chunks/ssr/_07c2a32a._.js.map +1 -0
  121. package/web/.next/server/chunks/ssr/_26129e04._.js +3 -0
  122. package/web/.next/server/chunks/ssr/_26129e04._.js.map +1 -0
  123. package/web/.next/server/chunks/ssr/_37259405._.js +1 -1
  124. package/web/.next/server/chunks/ssr/_37259405._.js.map +1 -1
  125. package/web/.next/server/chunks/ssr/_85d0351b._.js +1 -1
  126. package/web/.next/server/chunks/ssr/_85d0351b._.js.map +1 -1
  127. package/web/.next/{standalone/src/presentation/web/.next/server/chunks/ssr/_9f5276de._.js → server/chunks/ssr/_8fcb97eb._.js} +3 -9
  128. package/web/.next/server/chunks/ssr/_8fcb97eb._.js.map +1 -0
  129. package/web/.next/server/chunks/ssr/_fc3a6895._.js +1 -1
  130. package/web/.next/server/chunks/ssr/_fc3a6895._.js.map +1 -1
  131. package/web/.next/server/chunks/ssr/src_presentation_web_1a32dbcb._.js +2 -2
  132. package/web/.next/server/chunks/ssr/src_presentation_web_1a32dbcb._.js.map +1 -1
  133. package/web/.next/server/chunks/ssr/src_presentation_web_398553b0._.js +1 -1
  134. package/web/.next/server/chunks/ssr/src_presentation_web_398553b0._.js.map +1 -1
  135. package/web/.next/server/chunks/ssr/src_presentation_web_5c87e8e4._.js +1 -1
  136. package/web/.next/server/chunks/ssr/src_presentation_web_5c87e8e4._.js.map +1 -1
  137. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_(dashboard)_page_actions_f4952172.js +1 -1
  138. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_(dashboard)_page_actions_f4952172.js.map +1 -1
  139. package/web/.next/server/chunks/ssr/src_presentation_web_c1bc6240._.js +2 -2
  140. package/web/.next/server/chunks/ssr/src_presentation_web_c1bc6240._.js.map +1 -1
  141. package/web/.next/server/chunks/ssr/src_presentation_web_components_e599bb8c._.js +1 -1
  142. package/web/.next/server/chunks/ssr/src_presentation_web_components_e599bb8c._.js.map +1 -1
  143. package/web/.next/server/chunks/ssr/src_presentation_web_components_features_control-center_7ac3562e._.js +1 -1
  144. package/web/.next/server/chunks/ssr/src_presentation_web_components_features_control-center_7ac3562e._.js.map +1 -1
  145. package/web/.next/server/pages/500.html +2 -2
  146. package/web/.next/server/server-reference-manifest.js +1 -1
  147. package/web/.next/server/server-reference-manifest.json +20 -20
  148. package/web/.next/standalone/src/presentation/web/.next/BUILD_ID +1 -1
  149. package/web/.next/standalone/src/presentation/web/.next/build-manifest.json +2 -2
  150. package/web/.next/standalone/src/presentation/web/.next/prerender-manifest.json +3 -3
  151. package/web/.next/standalone/src/presentation/web/.next/required-server-files.json +1 -1
  152. package/web/.next/standalone/src/presentation/web/.next/server/app/(dashboard)/@drawer/create/page/server-reference-manifest.json +14 -14
  153. package/web/.next/standalone/src/presentation/web/.next/server/app/(dashboard)/@drawer/create/page.js.nft.json +1 -1
  154. package/web/.next/standalone/src/presentation/web/.next/server/app/(dashboard)/@drawer/create/page_client-reference-manifest.js +1 -1
  155. package/web/.next/standalone/src/presentation/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page/server-reference-manifest.json +17 -17
  156. package/web/.next/standalone/src/presentation/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page.js.nft.json +1 -1
  157. package/web/.next/standalone/src/presentation/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page_client-reference-manifest.js +1 -1
  158. package/web/.next/standalone/src/presentation/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page/server-reference-manifest.json +12 -12
  159. package/web/.next/standalone/src/presentation/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page.js.nft.json +1 -1
  160. package/web/.next/standalone/src/presentation/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page_client-reference-manifest.js +1 -1
  161. package/web/.next/standalone/src/presentation/web/.next/server/app/(dashboard)/create/page/server-reference-manifest.json +14 -14
  162. package/web/.next/standalone/src/presentation/web/.next/server/app/(dashboard)/create/page.js.nft.json +1 -1
  163. package/web/.next/standalone/src/presentation/web/.next/server/app/(dashboard)/create/page_client-reference-manifest.js +1 -1
  164. package/web/.next/standalone/src/presentation/web/.next/server/app/(dashboard)/feature/[featureId]/page/server-reference-manifest.json +17 -17
  165. package/web/.next/standalone/src/presentation/web/.next/server/app/(dashboard)/feature/[featureId]/page.js.nft.json +1 -1
  166. package/web/.next/standalone/src/presentation/web/.next/server/app/(dashboard)/feature/[featureId]/page_client-reference-manifest.js +1 -1
  167. package/web/.next/standalone/src/presentation/web/.next/server/app/(dashboard)/page/server-reference-manifest.json +12 -12
  168. package/web/.next/standalone/src/presentation/web/.next/server/app/(dashboard)/page.js.nft.json +1 -1
  169. package/web/.next/standalone/src/presentation/web/.next/server/app/(dashboard)/page_client-reference-manifest.js +1 -1
  170. package/web/.next/standalone/src/presentation/web/.next/server/app/(dashboard)/repository/[repositoryId]/page/server-reference-manifest.json +12 -12
  171. package/web/.next/standalone/src/presentation/web/.next/server/app/(dashboard)/repository/[repositoryId]/page.js.nft.json +1 -1
  172. package/web/.next/standalone/src/presentation/web/.next/server/app/(dashboard)/repository/[repositoryId]/page_client-reference-manifest.js +1 -1
  173. package/web/.next/standalone/src/presentation/web/.next/server/app/_global-error.html +2 -2
  174. package/web/.next/standalone/src/presentation/web/.next/server/app/_global-error.rsc +1 -1
  175. package/web/.next/standalone/src/presentation/web/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
  176. package/web/.next/standalone/src/presentation/web/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  177. package/web/.next/standalone/src/presentation/web/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  178. package/web/.next/standalone/src/presentation/web/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  179. package/web/.next/standalone/src/presentation/web/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  180. package/web/.next/standalone/src/presentation/web/.next/server/app/_not-found/page/server-reference-manifest.json +1 -1
  181. package/web/.next/standalone/src/presentation/web/.next/server/app/_not-found/page.js.nft.json +1 -1
  182. package/web/.next/standalone/src/presentation/web/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  183. package/web/.next/standalone/src/presentation/web/.next/server/app/skills/page/server-reference-manifest.json +6 -6
  184. package/web/.next/standalone/src/presentation/web/.next/server/app/skills/page.js.nft.json +1 -1
  185. package/web/.next/standalone/src/presentation/web/.next/server/app/skills/page_client-reference-manifest.js +1 -1
  186. package/web/.next/standalone/src/presentation/web/.next/server/app/tools/page/server-reference-manifest.json +1 -1
  187. package/web/.next/standalone/src/presentation/web/.next/server/app/tools/page.js.nft.json +1 -1
  188. package/web/.next/standalone/src/presentation/web/.next/server/app/tools/page_client-reference-manifest.js +1 -1
  189. package/web/.next/standalone/src/presentation/web/.next/server/app/version/page/server-reference-manifest.json +1 -1
  190. package/web/.next/standalone/src/presentation/web/.next/server/app/version/page.js.nft.json +1 -1
  191. package/web/.next/standalone/src/presentation/web/.next/server/app/version/page_client-reference-manifest.js +1 -1
  192. package/web/.next/standalone/src/presentation/web/.next/server/chunks/ssr/744ca_web_components_common_control-center-drawer_create-drawer-client_tsx_5e26fc0a._.js +1 -1
  193. package/web/.next/standalone/src/presentation/web/.next/server/chunks/ssr/8ba4b_server_app_(dashboard)_@drawer_repository_[repositoryId]_page_actions_2b7834f6.js +1 -1
  194. package/web/.next/standalone/src/presentation/web/.next/server/chunks/ssr/8ba4b_server_app_(dashboard)_repository_[repositoryId]_page_actions_6923c575.js +1 -1
  195. package/web/.next/standalone/src/presentation/web/.next/server/chunks/ssr/[root-of-the-server]__07385073._.js +2 -2
  196. package/web/.next/standalone/src/presentation/web/.next/server/chunks/ssr/[root-of-the-server]__08ba9bd3._.js +1 -1
  197. package/web/.next/standalone/src/presentation/web/.next/server/chunks/ssr/[root-of-the-server]__249c74f6._.js +1 -1
  198. package/web/.next/standalone/src/presentation/web/.next/server/chunks/ssr/[root-of-the-server]__6b17a22d._.js +1 -1
  199. package/web/.next/standalone/src/presentation/web/.next/server/chunks/ssr/[root-of-the-server]__6bb00d90._.js +1 -1
  200. package/web/.next/standalone/src/presentation/web/.next/server/chunks/ssr/[root-of-the-server]__6db85a66._.js +2 -2
  201. package/web/.next/standalone/src/presentation/web/.next/server/chunks/ssr/[root-of-the-server]__804c006d._.js +1 -1
  202. package/web/.next/standalone/src/presentation/web/.next/server/chunks/ssr/[root-of-the-server]__8fcb9132._.js +2 -2
  203. package/web/.next/standalone/src/presentation/web/.next/server/chunks/ssr/_00e6c698._.js +1 -1
  204. package/web/.next/standalone/src/presentation/web/.next/server/chunks/ssr/_07c2a32a._.js +9 -0
  205. package/web/.next/standalone/src/presentation/web/.next/server/chunks/ssr/_26129e04._.js +3 -0
  206. package/web/.next/standalone/src/presentation/web/.next/server/chunks/ssr/_37259405._.js +1 -1
  207. package/web/.next/standalone/src/presentation/web/.next/server/chunks/ssr/_85d0351b._.js +1 -1
  208. package/web/.next/{server/chunks/ssr/_9f5276de._.js → standalone/src/presentation/web/.next/server/chunks/ssr/_8fcb97eb._.js} +3 -9
  209. package/web/.next/standalone/src/presentation/web/.next/server/chunks/ssr/_fc3a6895._.js +1 -1
  210. package/web/.next/standalone/src/presentation/web/.next/server/chunks/ssr/src_presentation_web_1a32dbcb._.js +2 -2
  211. package/web/.next/standalone/src/presentation/web/.next/server/chunks/ssr/src_presentation_web_398553b0._.js +1 -1
  212. package/web/.next/standalone/src/presentation/web/.next/server/chunks/ssr/src_presentation_web_5c87e8e4._.js +1 -1
  213. package/web/.next/standalone/src/presentation/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_(dashboard)_page_actions_f4952172.js +1 -1
  214. package/web/.next/standalone/src/presentation/web/.next/server/chunks/ssr/src_presentation_web_c1bc6240._.js +2 -2
  215. package/web/.next/standalone/src/presentation/web/.next/server/chunks/ssr/src_presentation_web_components_e599bb8c._.js +1 -1
  216. package/web/.next/standalone/src/presentation/web/.next/server/chunks/ssr/src_presentation_web_components_features_control-center_7ac3562e._.js +1 -1
  217. package/web/.next/standalone/src/presentation/web/.next/server/pages/500.html +2 -2
  218. package/web/.next/standalone/src/presentation/web/.next/server/server-reference-manifest.js +1 -1
  219. package/web/.next/standalone/src/presentation/web/.next/server/server-reference-manifest.json +20 -20
  220. package/web/.next/standalone/src/presentation/web/components/common/base-drawer/base-drawer.tsx +1 -0
  221. package/web/.next/standalone/src/presentation/web/components/common/control-center-drawer/control-center-drawer.stories.tsx +8 -0
  222. package/web/.next/standalone/src/presentation/web/components/common/control-center-drawer/feature-drawer-client.tsx +45 -3
  223. package/web/.next/standalone/src/presentation/web/components/common/drawer-action-bar/drawer-action-bar-config.ts +4 -0
  224. package/web/.next/standalone/src/presentation/web/components/common/drawer-action-bar/drawer-action-bar.tsx +5 -1
  225. package/web/.next/standalone/src/presentation/web/components/common/feature-create-drawer/feature-create-drawer.stories.tsx +32 -0
  226. package/web/.next/standalone/src/presentation/web/components/common/feature-create-drawer/feature-create-drawer.tsx +8 -6
  227. package/web/.next/standalone/src/presentation/web/components/common/merge-review/merge-review-config.ts +4 -0
  228. package/web/.next/standalone/src/presentation/web/components/common/merge-review/merge-review.tsx +4 -0
  229. package/web/.next/standalone/src/presentation/web/components/common/prd-questionnaire/prd-questionnaire-config.ts +4 -0
  230. package/web/.next/standalone/src/presentation/web/components/common/prd-questionnaire/prd-questionnaire.tsx +4 -0
  231. package/web/.next/standalone/src/presentation/web/components/common/tech-review-tabs/tech-review-tabs-config.ts +4 -0
  232. package/web/.next/standalone/src/presentation/web/components/common/tech-review-tabs/tech-review-tabs.tsx +4 -0
  233. package/web/.next/standalone/src/presentation/web/components/features/control-center/control-center-inner.tsx +12 -8
  234. package/web/.next/standalone/src/presentation/web/components/features/control-center/control-center.stories.tsx +6 -3
  235. package/web/.next/standalone/src/presentation/web/components/features/control-center/use-control-center-state.ts +11 -5
  236. package/web/.next/standalone/src/presentation/web/components/layouts/app-shell/app-shell.tsx +11 -7
  237. package/web/.next/standalone/src/presentation/web/components/layouts/app-sidebar/app-sidebar.tsx +1 -1
  238. package/web/.next/standalone/src/presentation/web/components/ui/alert-dialog.stories.tsx +1 -1
  239. package/web/.next/standalone/src/presentation/web/hooks/drawer-close-guard.tsx +149 -0
  240. package/web/.next/standalone/src/presentation/web/server.js +1 -1
  241. package/web/.next/static/chunks/00adfce42dbbd5ef.js +1 -0
  242. package/web/.next/static/chunks/06dfd668334ffb4e.js +7 -0
  243. package/web/.next/static/chunks/{311b817783b3ebd7.js → 0f3e1ea42efba7e8.js} +1 -1
  244. package/web/.next/static/chunks/{47435830535491e8.js → 3c79bca4d3f18f66.js} +1 -1
  245. package/web/.next/static/chunks/{e44849eb58a3335f.js → 515d5b157a7620b9.js} +1 -1
  246. package/web/.next/static/chunks/{7183f9b53504c911.js → 5a962b5baf7c4d1d.js} +1 -1
  247. package/web/.next/static/chunks/{6310c6efd3e3ff8c.js → 87db91411a520cea.js} +1 -1
  248. package/web/.next/static/chunks/{0274480f2b09f92e.js → 9261e2adb145d388.js} +1 -1
  249. package/web/.next/static/chunks/{c6a53b653c68f935.js → 92ebb1cad6f24333.js} +4 -10
  250. package/web/.next/static/chunks/952c8aa7247dcb3f.js +1 -0
  251. package/web/.next/static/chunks/d2e6361bdd7a02a5.js +1 -0
  252. package/web/.next/static/chunks/{8d3e12279b2aa76b.js → ebfd2ed5b143b5b6.js} +1 -1
  253. package/web/.next/trace +1 -1
  254. package/web/.next/trace-build +1 -1
  255. package/web/.next/server/chunks/ssr/_45715073._.js +0 -3
  256. package/web/.next/server/chunks/ssr/_45715073._.js.map +0 -1
  257. package/web/.next/server/chunks/ssr/_9f5276de._.js.map +0 -1
  258. package/web/.next/server/chunks/ssr/node_modules__pnpm_11589942._.js +0 -3
  259. package/web/.next/server/chunks/ssr/node_modules__pnpm_11589942._.js.map +0 -1
  260. package/web/.next/standalone/src/presentation/web/.next/server/chunks/ssr/_45715073._.js +0 -3
  261. package/web/.next/standalone/src/presentation/web/.next/server/chunks/ssr/node_modules__pnpm_11589942._.js +0 -3
  262. package/web/.next/static/chunks/0b99eb9664d47ca7.js +0 -1
  263. package/web/.next/static/chunks/3e46df89d84cae41.js +0 -1
  264. package/web/.next/static/chunks/c279e0294d864963.js +0 -1
  265. package/web/.next/static/chunks/c4b35853f5a100b6.js +0 -1
  266. /package/web/.next/static/{he5MpZ65Zlh6SbVlx_mbE → KbyvoLS1Q62iF5F25ZKYW}/_buildManifest.js +0 -0
  267. /package/web/.next/static/{he5MpZ65Zlh6SbVlx_mbE → KbyvoLS1Q62iF5F25ZKYW}/_clientMiddlewareManifest.json +0 -0
  268. /package/web/.next/static/{he5MpZ65Zlh6SbVlx_mbE → KbyvoLS1Q62iF5F25ZKYW}/_ssgManifest.js +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"base-drawer.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/web/components/common/base-drawer/base-drawer.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAalE,OAAO,EAAmB,KAAK,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAGpF,QAAA,MAAM,cAAc;;8EAUlB,CAAC;AAEH,MAAM,WAAW,eAAgB,SAAQ,YAAY,CAAC,OAAO,cAAc,CAAC;IAC1E,IAAI,EAAE,OAAO,CAAC;IACd,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACzB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACzB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,YAAY,CAAC,EAAE,iBAAiB,CAAC;CAClC;AAED,wBAAgB,UAAU,CAAC,EACzB,IAAI,EACJ,OAAO,EACP,KAAa,EACb,IAAI,EACJ,MAAM,EACN,QAAQ,EACR,MAAM,EACN,SAAS,EACT,aAAa,EAAE,MAAM,EACrB,YAAY,GACb,EAAE,eAAe,2CA6EjB"}
1
+ {"version":3,"file":"base-drawer.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/web/components/common/base-drawer/base-drawer.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAalE,OAAO,EAAmB,KAAK,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAGpF,QAAA,MAAM,cAAc;;8EAUlB,CAAC;AAEH,MAAM,WAAW,eAAgB,SAAQ,YAAY,CAAC,OAAO,cAAc,CAAC;IAC1E,IAAI,EAAE,OAAO,CAAC;IACd,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACzB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACzB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,YAAY,CAAC,EAAE,iBAAiB,CAAC;CAClC;AAED,wBAAgB,UAAU,CAAC,EACzB,IAAI,EACJ,OAAO,EACP,KAAa,EACb,IAAI,EACJ,MAAM,EACN,QAAQ,EACR,MAAM,EACN,SAAS,EACT,aAAa,EAAE,MAAM,EACrB,YAAY,GACb,EAAE,eAAe,2CA8EjB"}
@@ -49,7 +49,7 @@ export function BaseDrawer({ open, onClose, modal = false, size, header, childre
49
49
  return (_jsxs(Drawer, { direction: "right", modal: modal, handleOnly: true, open: open, onOpenChange: (isOpen) => {
50
50
  if (!isOpen)
51
51
  onClose();
52
- }, children: [modal ? _jsx(DrawerOverlay, {}) : null, _jsxs(DrawerContent, { ref: contentRef, direction: "right", showCloseButton: false, className: cn(drawerVariants({ size }), className), "data-testid": testId, children: [_jsxs("button", { type: "button", "aria-label": "Close", onClick: onClose, className: "ring-offset-background focus:ring-ring absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden", "data-testid": testId ? `${testId}-close-button` : undefined, children: [_jsx(XIcon, { className: "size-4" }), _jsx("span", { className: "sr-only", children: "Close" })] }), header ? _jsx(DrawerHeader, { className: "shrink-0", children: header }) : null, header ? _jsx(Separator, {}) : null, featureFlags.envDeploy && deployTarget ? _jsx(DeployBar, { deployTarget: deployTarget }) : null, _jsx("div", { className: "flex min-h-0 flex-1 flex-col overflow-hidden", children: children }), footer ? _jsx(DrawerFooter, { className: "shrink-0", children: footer }) : null] })] }));
52
+ }, children: [modal ? _jsx(DrawerOverlay, {}) : null, _jsxs(DrawerContent, { ref: contentRef, direction: "right", showCloseButton: false, className: cn(drawerVariants({ size }), className), "data-testid": testId, onInteractOutside: (e) => e.preventDefault(), children: [_jsxs("button", { type: "button", "aria-label": "Close", onClick: onClose, className: "ring-offset-background focus:ring-ring absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden", "data-testid": testId ? `${testId}-close-button` : undefined, children: [_jsx(XIcon, { className: "size-4" }), _jsx("span", { className: "sr-only", children: "Close" })] }), header ? _jsx(DrawerHeader, { className: "shrink-0", children: header }) : null, header ? _jsx(Separator, {}) : null, featureFlags.envDeploy && deployTarget ? _jsx(DeployBar, { deployTarget: deployTarget }) : null, _jsx("div", { className: "flex min-h-0 flex-1 flex-col overflow-hidden", children: children }), footer ? _jsx(DrawerFooter, { className: "shrink-0", children: footer }) : null] })] }));
53
53
  }
54
54
  function DeployBar({ deployTarget }) {
55
55
  const deployAction = useDeployAction(deployTarget);
@@ -1 +1 @@
1
- {"version":3,"file":"control-center-drawer.stories.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/web/components/common/control-center-drawer/control-center-drawer.stories.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAGvD,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAG9D,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,mBAAmB,CAO1C,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,mBAAmB,CAAC,CAAC;AA+JlD,sEAAsE;AACtE,eAAO,MAAM,OAAO,EAAE,KAErB,CAAC;AAEF,iFAAiF;AACjF,eAAO,MAAM,WAAW,EAAE,KAEzB,CAAC;AAEF,uCAAuC;AACvC,eAAO,MAAM,YAAY,EAAE,KAE1B,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,SAAS,EAAE,KAEvB,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,UAAU,EAAE,KAExB,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,WAAW,EAAE,KAEzB,CAAC;AAEF,2BAA2B;AAC3B,eAAO,MAAM,aAAa,EAAE,KAE3B,CAAC;AAEF,+BAA+B;AAC/B,eAAO,MAAM,UAAU,EAAE,KAExB,CAAC;AA0DF,mEAAmE;AACnE,eAAO,MAAM,QAAQ,EAAE,KAEtB,CAAC"}
1
+ {"version":3,"file":"control-center-drawer.stories.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/web/components/common/control-center-drawer/control-center-drawer.stories.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAIvD,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAG9D,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,mBAAmB,CAc1C,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,mBAAmB,CAAC,CAAC;AA+JlD,sEAAsE;AACtE,eAAO,MAAM,OAAO,EAAE,KAErB,CAAC;AAEF,iFAAiF;AACjF,eAAO,MAAM,WAAW,EAAE,KAEzB,CAAC;AAEF,uCAAuC;AACvC,eAAO,MAAM,YAAY,EAAE,KAE1B,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,SAAS,EAAE,KAEvB,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,UAAU,EAAE,KAExB,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,WAAW,EAAE,KAEzB,CAAC;AAEF,2BAA2B;AAC3B,eAAO,MAAM,aAAa,EAAE,KAE3B,CAAC;AAEF,+BAA+B;AAC/B,eAAO,MAAM,UAAU,EAAE,KAExB,CAAC;AA0DF,mEAAmE;AACnE,eAAO,MAAM,QAAQ,EAAE,KAEtB,CAAC"}
@@ -2,11 +2,15 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { useState } from 'react';
3
3
  import { PrStatus, CiStatus } from '../../../../../../packages/core/src/domain/generated/output.js';
4
4
  import { Button } from '../../ui/button.js';
5
+ import { DrawerCloseGuardProvider } from '../../../hooks/drawer-close-guard.js';
5
6
  import { ControlCenterDrawer } from './control-center-drawer.js';
6
7
  const meta = {
7
8
  title: 'Drawers/ControlCenterDrawer',
8
9
  component: ControlCenterDrawer,
9
10
  tags: ['autodocs'],
11
+ decorators: [
12
+ (Story) => (_jsx(DrawerCloseGuardProvider, { children: _jsx(Story, {}) })),
13
+ ],
10
14
  parameters: {
11
15
  layout: 'fullscreen',
12
16
  },
@@ -1 +1 @@
1
- {"version":3,"file":"feature-drawer-client.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/web/components/common/control-center-drawer/feature-drawer-client.tsx"],"names":[],"mappings":"AA0DA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAEhD,MAAM,WAAW,wBAAwB;IACvC,IAAI,EAAE,UAAU,CAAC;CAClB;AAED,wBAAgB,mBAAmB,CAAC,EAAE,IAAI,EAAE,WAAW,EAAE,EAAE,wBAAwB,2CAojBlF"}
1
+ {"version":3,"file":"feature-drawer-client.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/web/components/common/control-center-drawer/feature-drawer-client.tsx"],"names":[],"mappings":"AA2DA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAEhD,MAAM,WAAW,wBAAwB;IACvC,IAAI,EAAE,UAAU,CAAC;CAClB;AAED,wBAAgB,mBAAmB,CAAC,EAAE,IAAI,EAAE,WAAW,EAAE,EAAE,wBAAwB,2CA6lBlF"}
@@ -14,6 +14,7 @@ import { deleteFeature } from '../../../app/actions/delete-feature.js';
14
14
  import { cn } from '../../../lib/utils.js';
15
15
  import { featureFlags } from '../../../lib/feature-flags.js';
16
16
  import { useSoundAction } from '../../../hooks/use-sound-action.js';
17
+ import { useGuardedDrawerClose } from '../../../hooks/drawer-close-guard.js';
17
18
  import { useDeployAction } from '../../../hooks/use-deploy-action.js';
18
19
  import { useAgentEventsContext } from '../../../hooks/agent-events-provider.js';
19
20
  import { BaseDrawer } from '../../common/base-drawer/index.js';
@@ -63,8 +64,10 @@ export function FeatureDrawerClient({ view: initialView }) {
63
64
  continue;
64
65
  const newState = mapEventTypeToState(event.eventType);
65
66
  const newLifecycle = mapPhaseNameToLifecycle(event.phaseName);
66
- // Trigger a server refresh to get the latest drawer view
67
- router.refresh();
67
+ // Trigger a server refresh to get the latest drawer view,
68
+ // but skip when the user has unsaved changes to avoid losing form state.
69
+ if (!isDirtyRef.current)
70
+ router.refresh();
68
71
  // Optimistically update the node data for immediate UI feedback
69
72
  setView((prev) => {
70
73
  if (prev.type !== 'feature' &&
@@ -92,9 +95,12 @@ export function FeatureDrawerClient({ view: initialView }) {
92
95
  const onClose = useCallback(() => {
93
96
  router.push('/');
94
97
  }, [router]);
98
+ // ── Chat input state (shared across all review views) ────────────────
99
+ const [chatInput, setChatInput] = useState('');
95
100
  // ── PRD state ──────────────────────────────────────────────────────────
96
101
  const [prdData, setPrdData] = useState(null);
97
102
  const [prdSelections, setPrdSelections] = useState({});
103
+ const [prdDefaultSelections, setPrdDefaultSelections] = useState({});
98
104
  const [isLoadingPrd, setIsLoadingPrd] = useState(false);
99
105
  // ── Tech state ─────────────────────────────────────────────────────────
100
106
  const [techData, setTechData] = useState(null);
@@ -109,10 +115,16 @@ export function FeatureDrawerClient({ view: initialView }) {
109
115
  const [isDeleting, setIsDeleting] = useState(false);
110
116
  // ── Shared reject state ────────────────────────────────────────────────
111
117
  const [isRejecting, setIsRejecting] = useState(false);
118
+ // Reset chat input whenever the view type changes
119
+ const viewType = view.type;
120
+ useEffect(() => {
121
+ setChatInput('');
122
+ }, [viewType]);
112
123
  // ── Data fetching ─────────────────────────────────────────────────────
113
124
  const prdFeatureId = view.type === 'prd-review' ? view.node.featureId : null;
114
125
  useEffect(() => {
115
126
  setPrdSelections({});
127
+ setPrdDefaultSelections({});
116
128
  setPrdData(null);
117
129
  if (!prdFeatureId)
118
130
  return;
@@ -135,6 +147,7 @@ export function FeatureDrawerClient({ view: initialView }) {
135
147
  defaults[q.id] = recommended.id;
136
148
  }
137
149
  setPrdSelections(defaults);
150
+ setPrdDefaultSelections(defaults);
138
151
  }
139
152
  })
140
153
  .catch(() => {
@@ -233,6 +246,20 @@ export function FeatureDrawerClient({ view: initialView }) {
233
246
  cancelled = true;
234
247
  };
235
248
  }, [mergeFeatureId]);
249
+ // ── Close guard ──────────────────────────────────────────────────────
250
+ const isChatDirty = chatInput.trim().length > 0;
251
+ const isPrdDirty = view.type === 'prd-review' &&
252
+ Object.keys(prdDefaultSelections).some((k) => prdDefaultSelections[k] !== prdSelections[k]);
253
+ const isDirty = isChatDirty || isPrdDirty;
254
+ // Keep dirty state in a ref so the SSE handler can read the latest value
255
+ // without re-running the effect on every keystroke.
256
+ const isDirtyRef = useRef(isDirty);
257
+ isDirtyRef.current = isDirty;
258
+ const onReset = useCallback(() => {
259
+ setChatInput('');
260
+ setPrdSelections({ ...prdDefaultSelections });
261
+ }, [prdDefaultSelections]);
262
+ const { attemptClose } = useGuardedDrawerClose({ open: isOpen, isDirty, onClose, onReset });
236
263
  // ── Approve / reject handlers ─────────────────────────────────────────
237
264
  const reviewNode = view.type === 'prd-review' || view.type === 'tech-review' || view.type === 'merge-review'
238
265
  ? view.node
@@ -248,6 +275,7 @@ export function FeatureDrawerClient({ view: initialView }) {
248
275
  return;
249
276
  }
250
277
  rejectSound.play();
278
+ setChatInput('');
251
279
  toast.success(`${label} rejected — agent re-iterating (iteration ${result.iteration})`);
252
280
  if (result.iterationWarning) {
253
281
  toast.warning(`Iteration ${result.iteration} — consider approving or adjusting feedback to avoid excessive iterations`);
@@ -270,6 +298,7 @@ export function FeatureDrawerClient({ view: initialView }) {
270
298
  toast.error(result.error ?? `Failed to approve ${label.toLowerCase()}`);
271
299
  return;
272
300
  }
301
+ setChatInput('');
273
302
  toast.success(`${label} approved — agent resuming`);
274
303
  onClose();
275
304
  }, [reviewNode, onClose]);
@@ -293,6 +322,7 @@ export function FeatureDrawerClient({ view: initialView }) {
293
322
  toast.error(result.error ?? 'Failed to approve requirements');
294
323
  return;
295
324
  }
325
+ setChatInput('');
296
326
  toast.success('Requirements approved — agent resuming');
297
327
  setPrdSelections({});
298
328
  onClose();
@@ -349,15 +379,15 @@ export function FeatureDrawerClient({ view: initialView }) {
349
379
  body = (_jsxs("div", { className: "flex-1 overflow-y-auto", children: [_jsxs("div", { "data-testid": "feature-drawer-status", className: "flex flex-col gap-3 p-4", children: [_jsx("div", { className: "text-muted-foreground text-xs font-semibold tracking-wider", children: lifecycleDisplayLabels[featureNode.lifecycle] }), _jsx(FeatureStateBadge, { data: featureNode }), featureNode.progress > 0 ? (_jsxs("div", { "data-testid": "feature-drawer-progress", className: "flex flex-col gap-1", children: [_jsxs("div", { className: "text-muted-foreground flex items-center justify-between text-xs", children: [_jsx("span", { children: "Progress" }), _jsxs("span", { children: [featureNode.progress, "%"] })] }), _jsx("div", { className: "bg-muted h-2 w-full overflow-hidden rounded-full", children: _jsx("div", { className: cn('h-full rounded-full transition-all', featureNodeStateConfig[featureNode.state].progressClass), style: { width: `${featureNode.progress}%` } }) })] })) : null] }), featureNode.pr ? (_jsxs(_Fragment, { children: [_jsx(Separator, {}), _jsx(FeaturePrInfo, { pr: featureNode.pr })] })) : null, _jsx(FeatureDetails, { data: featureNode })] }));
350
380
  }
351
381
  else if (view.type === 'prd-review') {
352
- body = prdData ? (_jsx(PrdQuestionnaire, { data: prdData, selections: prdSelections, onSelect: (qId, oId) => setPrdSelections((prev) => ({ ...prev, [qId]: oId })), onApprove: handlePrdApprove, onReject: handlePrdReject, isProcessing: isLoadingPrd, isRejecting: isRejecting })) : (_jsx("div", { className: "flex items-center justify-center p-8", children: _jsx(Loader2, { className: "text-muted-foreground h-6 w-6 animate-spin" }) }));
382
+ body = prdData ? (_jsx(PrdQuestionnaire, { data: prdData, selections: prdSelections, onSelect: (qId, oId) => setPrdSelections((prev) => ({ ...prev, [qId]: oId })), onApprove: handlePrdApprove, onReject: handlePrdReject, isProcessing: isLoadingPrd, isRejecting: isRejecting, chatInput: chatInput, onChatInputChange: setChatInput })) : (_jsx("div", { className: "flex items-center justify-center p-8", children: _jsx(Loader2, { className: "text-muted-foreground h-6 w-6 animate-spin" }) }));
353
383
  }
354
384
  else if (view.type === 'tech-review') {
355
- body = techData ? (_jsx(TechReviewTabs, { techData: techData, productData: isLoadingTechProduct ? null : techProductData, onApprove: handleTechApprove, onReject: handleTechReject, isProcessing: isLoadingTech, isRejecting: isRejecting })) : (_jsx("div", { className: "flex items-center justify-center p-8", children: _jsx(Loader2, { className: "text-muted-foreground h-6 w-6 animate-spin" }) }));
385
+ body = techData ? (_jsx(TechReviewTabs, { techData: techData, productData: isLoadingTechProduct ? null : techProductData, onApprove: handleTechApprove, onReject: handleTechReject, isProcessing: isLoadingTech, isRejecting: isRejecting, chatInput: chatInput, onChatInputChange: setChatInput })) : (_jsx("div", { className: "flex items-center justify-center p-8", children: _jsx(Loader2, { className: "text-muted-foreground h-6 w-6 animate-spin" }) }));
356
386
  }
357
387
  else if (view.type === 'merge-review') {
358
- body = mergeData ? (_jsx(MergeReview, { data: mergeData, onApprove: handleMergeApprove, onReject: handleMergeReject, isProcessing: isLoadingMerge, isRejecting: isRejecting })) : (_jsx("div", { className: "flex items-center justify-center p-8", children: _jsx(Loader2, { className: "text-muted-foreground h-6 w-6 animate-spin" }) }));
388
+ body = mergeData ? (_jsx(MergeReview, { data: mergeData, onApprove: handleMergeApprove, onReject: handleMergeReject, isProcessing: isLoadingMerge, isRejecting: isRejecting, chatInput: chatInput, onChatInputChange: setChatInput })) : (_jsx("div", { className: "flex items-center justify-center p-8", children: _jsx(Loader2, { className: "text-muted-foreground h-6 w-6 animate-spin" }) }));
359
389
  }
360
- return (_jsx(BaseDrawer, { open: isOpen, onClose: onClose, size: "md", modal: false, header: header, "data-testid": view.type === 'feature'
390
+ return (_jsx(BaseDrawer, { open: isOpen, onClose: attemptClose, size: "md", modal: false, header: header, "data-testid": view.type === 'feature'
361
391
  ? 'feature-drawer'
362
392
  : view.type === 'repository'
363
393
  ? 'repository-drawer'
@@ -16,5 +16,9 @@ export interface DrawerActionBarProps {
16
16
  isRejecting?: boolean;
17
17
  /** Content rendered between revision input and action buttons (e.g. progress bar) */
18
18
  children?: ReactNode;
19
+ /** Controlled chat input value. When provided, component uses this instead of internal state. */
20
+ chatInput?: string;
21
+ /** Controlled chat input change handler. Required when chatInput is provided. */
22
+ onChatInputChange?: (value: string) => void;
19
23
  }
20
24
  //# sourceMappingURL=drawer-action-bar-config.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"drawer-action-bar-config.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/web/components/common/drawer-action-bar/drawer-action-bar-config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,MAAM,WAAW,oBAAoB;IACnC,wEAAwE;IACxE,QAAQ,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;IACtC,kCAAkC;IAClC,SAAS,EAAE,MAAM,IAAI,CAAC;IACtB,mCAAmC;IACnC,YAAY,EAAE,MAAM,CAAC;IACrB,0CAA0C;IAC1C,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB,gDAAgD;IAChD,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,4DAA4D;IAC5D,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,8CAA8C;IAC9C,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,qFAAqF;IACrF,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB"}
1
+ {"version":3,"file":"drawer-action-bar-config.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/web/components/common/drawer-action-bar/drawer-action-bar-config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,MAAM,WAAW,oBAAoB;IACnC,wEAAwE;IACxE,QAAQ,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;IACtC,kCAAkC;IAClC,SAAS,EAAE,MAAM,IAAI,CAAC;IACtB,mCAAmC;IACnC,YAAY,EAAE,MAAM,CAAC;IACrB,0CAA0C;IAC1C,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB,gDAAgD;IAChD,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,4DAA4D;IAC5D,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,8CAA8C;IAC9C,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,qFAAqF;IACrF,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,iGAAiG;IACjG,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,iFAAiF;IACjF,iBAAiB,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CAC7C"}
@@ -1,3 +1,3 @@
1
1
  import type { DrawerActionBarProps } from './drawer-action-bar-config.js';
2
- export declare function DrawerActionBar({ onReject, onApprove, approveLabel, approveIcon, revisionPlaceholder, isProcessing, isRejecting, children, }: DrawerActionBarProps): import("react/jsx-runtime").JSX.Element;
2
+ export declare function DrawerActionBar({ onReject, onApprove, approveLabel, approveIcon, revisionPlaceholder, isProcessing, isRejecting, children, chatInput: controlledChatInput, onChatInputChange, }: DrawerActionBarProps): import("react/jsx-runtime").JSX.Element;
3
3
  //# sourceMappingURL=drawer-action-bar.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"drawer-action-bar.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/web/components/common/drawer-action-bar/drawer-action-bar.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AAEvE,wBAAgB,eAAe,CAAC,EAC9B,QAAQ,EACR,SAAS,EACT,YAAY,EACZ,WAAW,EACX,mBAAmB,EACnB,YAAoB,EACpB,WAAmB,EACnB,QAAQ,GACT,EAAE,oBAAoB,2CAkEtB"}
1
+ {"version":3,"file":"drawer-action-bar.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/web/components/common/drawer-action-bar/drawer-action-bar.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AAEvE,wBAAgB,eAAe,CAAC,EAC9B,QAAQ,EACR,SAAS,EACT,YAAY,EACZ,WAAW,EACX,mBAAmB,EACnB,YAAoB,EACpB,WAAmB,EACnB,QAAQ,EACR,SAAS,EAAE,mBAAmB,EAC9B,iBAAiB,GAClB,EAAE,oBAAoB,2CAoEtB"}
@@ -5,8 +5,10 @@ import { Send } from 'lucide-react';
5
5
  import { Button } from '../../ui/button.js';
6
6
  import { Input } from '../../ui/input.js';
7
7
  import { useSoundAction } from '../../../hooks/use-sound-action.js';
8
- export function DrawerActionBar({ onReject, onApprove, approveLabel, approveIcon, revisionPlaceholder, isProcessing = false, isRejecting = false, children, }) {
9
- const [chatInput, setChatInput] = useState('');
8
+ export function DrawerActionBar({ onReject, onApprove, approveLabel, approveIcon, revisionPlaceholder, isProcessing = false, isRejecting = false, children, chatInput: controlledChatInput, onChatInputChange, }) {
9
+ const [internalChatInput, setInternalChatInput] = useState('');
10
+ const chatInput = controlledChatInput ?? internalChatInput;
11
+ const setChatInput = onChatInputChange ?? setInternalChatInput;
10
12
  const approveSound = useSoundAction('approve');
11
13
  const disabled = isProcessing || isRejecting;
12
14
  function handleRevisionSubmit(e) {
@@ -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":"AA0BA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,0DAA0D,CAAC;AAC/F,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,qCAAqC,CAAC;AAG5E,YAAY,EAAE,cAAc,EAAE,MAAM,0DAA0D,CAAC;AAE/F,0DAA0D;AAC1D,MAAM,WAAW,mBAAmB;IAClC,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,oBAAoB;IACnC,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,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,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAcD,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;CAC1B;AAED,wBAAgB,mBAAmB,CAAC,EAClC,IAAI,EACJ,OAAO,EACP,QAAQ,EACR,cAAc,EACd,YAAoB,EACpB,gBAAgB,EAChB,QAAQ,EACR,eAAe,GAChB,EAAE,wBAAwB,2CA0Q1B"}
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":"AA2BA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,0DAA0D,CAAC;AAC/F,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,qCAAqC,CAAC;AAG5E,YAAY,EAAE,cAAc,EAAE,MAAM,0DAA0D,CAAC;AAE/F,0DAA0D;AAC1D,MAAM,WAAW,mBAAmB;IAClC,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,oBAAoB;IACnC,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,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,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAcD,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;CAC1B;AAED,wBAAgB,mBAAmB,CAAC,EAClC,IAAI,EACJ,OAAO,EACP,QAAQ,EACR,cAAc,EACd,YAAoB,EACpB,gBAAgB,EAChB,QAAQ,EACR,eAAe,GAChB,EAAE,wBAAwB,2CA2Q1B"}
@@ -14,6 +14,7 @@ import { CheckboxGroup } from '../../ui/checkbox-group.js';
14
14
  import { CheckboxGroupItem } from '../../ui/checkbox-group-item.js';
15
15
  import { Badge } from '../../ui/badge.js';
16
16
  import { Popover, PopoverContent, PopoverTrigger } from '../../ui/popover.js';
17
+ import { useGuardedDrawerClose } from '../../../hooks/drawer-close-guard.js';
17
18
  import { pickFiles } from './pick-files.js';
18
19
  const AUTO_APPROVE_OPTIONS = [
19
20
  { id: 'allowPrd', label: 'PRD', description: 'Auto-approve requirements move to planning.' },
@@ -60,10 +61,10 @@ export function FeatureCreateDrawer({ open, onClose, onSubmit, repositoryPath, i
60
61
  setOpenPr(defaultOpenPr);
61
62
  setParentId(undefined);
62
63
  }, [defaultGates, defaultPush, defaultOpenPr]);
63
- const handleClose = useCallback(() => {
64
- resetForm();
65
- onClose();
66
- }, [onClose, resetForm]);
64
+ // Track whether the form has unsaved data
65
+ const isDirty = name.trim() !== '' || description.trim() !== '' || attachments.length > 0;
66
+ // Shared close guard — shows confirmation when dirty, prevents navigation
67
+ const { attemptClose } = useGuardedDrawerClose({ open, isDirty, onClose, onReset: resetForm });
67
68
  const handleSubmit = useCallback((e) => {
68
69
  e.preventDefault();
69
70
  if (!name.trim())
@@ -113,7 +114,7 @@ export function FeatureCreateDrawer({ open, onClose, onSubmit, repositoryPath, i
113
114
  setAttachments((prev) => prev.filter((f) => f.path !== path));
114
115
  }, []);
115
116
  const hasFeatures = features && features.length > 0;
116
- return (_jsx(BaseDrawer, { open: open, onClose: handleClose, size: "md", modal: false, "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" })] }), _jsx(DrawerDescription, { asChild: true, children: _jsx("div", { children: _jsx(Badge, { variant: "secondary", children: "Creating..." }) }) })] }), footer: _jsxs("div", { className: "flex flex-row justify-end gap-2", children: [_jsx(Button, { variant: "outline", onClick: handleClose, disabled: isSubmitting, children: "Cancel" }), _jsx(Button, { type: "submit", form: "create-feature-form", disabled: !name.trim() || isSubmitting, children: isSubmitting ? 'Creating...' : '+ Create Feature' })] }), children: _jsx("div", { className: "overflow-y-auto p-4", children: _jsxs("form", { id: "create-feature-form", onSubmit: handleSubmit, className: "flex flex-col gap-4", children: [_jsxs("div", { className: "flex flex-col gap-1.5", children: [_jsx(Label, { htmlFor: "feature-name", className: "text-muted-foreground text-xs font-semibold tracking-wider", children: "FEATURE NAME" }), _jsx(Input, { id: "feature-name", placeholder: "e.g. GitHub OAuth Login", value: name, onChange: (e) => setName(e.target.value), required: true, disabled: isSubmitting })] }), _jsxs("div", { className: "flex flex-col gap-1.5", children: [_jsx(Label, { htmlFor: "feature-description", className: "text-muted-foreground text-xs font-semibold tracking-wider", children: "DESCRIPTION" }), _jsx(Textarea, { id: "feature-description", placeholder: "Describe what this feature does...", value: description, onChange: (e) => setDescription(e.target.value), rows: 4, disabled: isSubmitting })] }), hasFeatures ? (_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-1.5", children: [_jsx(Label, { className: "text-muted-foreground text-xs font-semibold tracking-wider", children: "APPROVE" }), _jsx(CheckboxGroup, { label: "Autonomous Mode", description: "YOLO!", parentAriaLabel: "Auto approve all", options: AUTO_APPROVE_OPTIONS, value: approvalGates, onValueChange: setApprovalGates, disabled: isSubmitting })] }), _jsxs("div", { className: "flex flex-col gap-1.5", children: [_jsx(Label, { className: "text-muted-foreground text-xs font-semibold tracking-wider", children: "GIT" }), _jsxs("div", { className: "flex flex-col gap-2", children: [_jsx(CheckboxGroupItem, { id: "push", label: "Push", description: "Push branch to remote after implementation.", checked: push || openPr, onCheckedChange: setPush, disabled: openPr || isSubmitting }), _jsx(CheckboxGroupItem, { id: "open-pr", label: "Create PR", description: "Open a pull request after pushing.", checked: openPr, onCheckedChange: setOpenPr, disabled: isSubmitting })] })] }), _jsxs("div", { className: "flex flex-col gap-2", children: [_jsxs("div", { className: "flex items-center justify-between", children: [_jsxs(Label, { className: "text-muted-foreground text-xs font-semibold tracking-wider", children: ["ATTACHMENTS", attachments.length > 0 && (_jsxs("span", { className: "text-muted-foreground/60 ml-1.5", children: ["(", attachments.length, ")"] }))] }), _jsxs(Button, { type: "button", variant: "outline", size: "xs", onClick: handleAddFiles, disabled: isSubmitting, children: [_jsx(PlusIcon, { className: "size-3" }), "Add Files"] })] }), attachments.length > 0 && (_jsx("div", { className: "flex flex-col gap-2", children: attachments.map((file) => (_jsx(AttachmentCard, { file: file, onRemove: () => handleRemoveFile(file.path), disabled: isSubmitting }, file.path))) }))] })] }) }) }));
117
+ return (_jsx(BaseDrawer, { open: open, onClose: attemptClose, size: "md", modal: false, "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" })] }), _jsx(DrawerDescription, { asChild: true, children: _jsx("div", { children: _jsx(Badge, { variant: "secondary", children: "Creating..." }) }) })] }), 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: !name.trim() || isSubmitting, children: isSubmitting ? 'Creating...' : '+ Create Feature' })] }), children: _jsx("div", { className: "overflow-y-auto p-4", children: _jsxs("form", { id: "create-feature-form", onSubmit: handleSubmit, className: "flex flex-col gap-4", children: [_jsxs("div", { className: "flex flex-col gap-1.5", children: [_jsx(Label, { htmlFor: "feature-name", className: "text-muted-foreground text-xs font-semibold tracking-wider", children: "FEATURE NAME" }), _jsx(Input, { id: "feature-name", placeholder: "e.g. GitHub OAuth Login", value: name, onChange: (e) => setName(e.target.value), required: true, disabled: isSubmitting })] }), _jsxs("div", { className: "flex flex-col gap-1.5", children: [_jsx(Label, { htmlFor: "feature-description", className: "text-muted-foreground text-xs font-semibold tracking-wider", children: "DESCRIPTION" }), _jsx(Textarea, { id: "feature-description", placeholder: "Describe what this feature does...", value: description, onChange: (e) => setDescription(e.target.value), rows: 4, disabled: isSubmitting })] }), hasFeatures ? (_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-1.5", children: [_jsx(Label, { className: "text-muted-foreground text-xs font-semibold tracking-wider", children: "APPROVE" }), _jsx(CheckboxGroup, { label: "Autonomous Mode", description: "YOLO!", parentAriaLabel: "Auto approve all", options: AUTO_APPROVE_OPTIONS, value: approvalGates, onValueChange: setApprovalGates, disabled: isSubmitting })] }), _jsxs("div", { className: "flex flex-col gap-1.5", children: [_jsx(Label, { className: "text-muted-foreground text-xs font-semibold tracking-wider", children: "GIT" }), _jsxs("div", { className: "flex flex-col gap-2", children: [_jsx(CheckboxGroupItem, { id: "push", label: "Push", description: "Push branch to remote after implementation.", checked: push || openPr, onCheckedChange: setPush, disabled: openPr || isSubmitting }), _jsx(CheckboxGroupItem, { id: "open-pr", label: "Create PR", description: "Open a pull request after pushing.", checked: openPr, onCheckedChange: setOpenPr, disabled: isSubmitting })] })] }), _jsxs("div", { className: "flex flex-col gap-2", children: [_jsxs("div", { className: "flex items-center justify-between", children: [_jsxs(Label, { className: "text-muted-foreground text-xs font-semibold tracking-wider", children: ["ATTACHMENTS", attachments.length > 0 && (_jsxs("span", { className: "text-muted-foreground/60 ml-1.5", children: ["(", attachments.length, ")"] }))] }), _jsxs(Button, { type: "button", variant: "outline", size: "xs", onClick: handleAddFiles, disabled: isSubmitting, children: [_jsx(PlusIcon, { className: "size-3" }), "Add Files"] })] }), attachments.length > 0 && (_jsx("div", { className: "flex flex-col gap-2", children: attachments.map((file) => (_jsx(AttachmentCard, { file: file, onRemove: () => handleRemoveFile(file.path), disabled: isSubmitting }, file.path))) }))] })] }) }) }));
117
118
  }
118
119
  function ParentFeatureCombobox({ features, value, onChange, disabled, }) {
119
120
  const [open, setOpen] = useState(false);
@@ -86,5 +86,10 @@ export declare const PrChecked: Story;
86
86
  export declare const WithWorkflowDefaults: Story;
87
87
  /** Feature create drawer rendered inside a full-page context — starts open. */
88
88
  export declare const InDrawer: Story;
89
+ /**
90
+ * Discard confirmation — type text, then click Cancel to trigger the
91
+ * "Discard unsaved changes?" dialog. Demonstrates the dirty-form guard.
92
+ */
93
+ export declare const DiscardConfirmation: Story;
89
94
  export declare const Interactive: Story;
90
95
  //# 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;AAS9D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,mBAAmB,CAyB1C,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAiDlD,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;AAYF;;;;GAIG;AACH,eAAO,MAAM,oBAAoB,EAAE,KAWlC,CAAC;AAgDF,+EAA+E;AAC/E,eAAO,MAAM,QAAQ,EAAE,KAEtB,CAAC;AAMF,eAAO,MAAM,WAAW,EAAE,KAsCzB,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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;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;AAiDlD,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;AAYF;;;;GAIG;AACH,eAAO,MAAM,oBAAoB,EAAE,KAWlC,CAAC;AAgDF,+EAA+E;AAC/E,eAAO,MAAM,QAAQ,EAAE,KAEtB,CAAC;AAMF;;;GAGG;AACH,eAAO,MAAM,mBAAmB,EAAE,KAcjC,CAAC;AAMF,eAAO,MAAM,WAAW,EAAE,KAsCzB,CAAC"}
@@ -3,6 +3,7 @@ import { useState } from 'react';
3
3
  import { within, userEvent, fn } from '@storybook/test';
4
4
  import { FeatureCreateDrawer } from './feature-create-drawer.js';
5
5
  import { Button } from '../../ui/button.js';
6
+ import { DrawerCloseGuardProvider } from '../../../hooks/drawer-close-guard.js';
6
7
  /* ---------------------------------------------------------------------------
7
8
  * Meta — component-level docs + interactive controls
8
9
  * ------------------------------------------------------------------------- */
@@ -40,6 +41,9 @@ const meta = {
40
41
  title: 'Drawers/Feature/FeatureCreateDrawer',
41
42
  component: FeatureCreateDrawer,
42
43
  tags: ['autodocs'],
44
+ decorators: [
45
+ (Story) => (_jsx(DrawerCloseGuardProvider, { children: _jsx(Story, {}) })),
46
+ ],
43
47
  parameters: {
44
48
  layout: 'fullscreen',
45
49
  },
@@ -261,6 +265,26 @@ function CreateDrawerShellTemplate() {
261
265
  export const InDrawer = {
262
266
  render: () => _jsx(CreateDrawerShellTemplate, {}),
263
267
  };
268
+ /* ---------------------------------------------------------------------------
269
+ * Discard confirmation stories
270
+ * ------------------------------------------------------------------------- */
271
+ /**
272
+ * Discard confirmation — type text, then click Cancel to trigger the
273
+ * "Discard unsaved changes?" dialog. Demonstrates the dirty-form guard.
274
+ */
275
+ export const DiscardConfirmation = {
276
+ render: () => _jsx(CreateDrawerTrigger, { label: "Open (Discard Confirmation)" }),
277
+ play: async ({ canvasElement }) => {
278
+ const canvas = within(canvasElement);
279
+ await userEvent.click(canvas.getByRole('button', { name: 'Open (Discard Confirmation)' }));
280
+ const body = within(canvasElement.ownerDocument.body);
281
+ const nameInput = await body.findByPlaceholderText('e.g. GitHub OAuth Login');
282
+ await userEvent.type(nameInput, 'My Feature');
283
+ // Click Cancel — should show the discard confirmation dialog
284
+ const cancelButton = body.getByRole('button', { name: 'Cancel' });
285
+ await userEvent.click(cancelButton);
286
+ },
287
+ };
264
288
  /* ---------------------------------------------------------------------------
265
289
  * Interactive story — full paths shown in submitted data panel
266
290
  * ------------------------------------------------------------------------- */
@@ -52,6 +52,10 @@ export interface MergeReviewProps {
52
52
  isProcessing?: boolean;
53
53
  /** Whether a reject operation is in flight */
54
54
  isRejecting?: boolean;
55
+ /** Controlled chat input for the revision input. */
56
+ chatInput?: string;
57
+ /** Handler for chat input changes. */
58
+ onChatInputChange?: (value: string) => void;
55
59
  }
56
60
  /** Props for the merge review drawer (shell wrapper) */
57
61
  export interface MergeReviewDrawerProps extends Omit<MergeReviewProps, 'data'> {
@@ -1 +1 @@
1
- {"version":3,"file":"merge-review-config.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/web/components/common/merge-review/merge-review-config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,sCAAsC,CAAC;AAE/E,yCAAyC;AACzC,MAAM,WAAW,sBAAsB;IACrC,YAAY,EAAE,MAAM,CAAC;IACrB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,4CAA4C;AAC5C,MAAM,WAAW,aAAa;IAC5B,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,QAAQ,CAAC;IACjB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,QAAQ,CAAC;CACrB;AAED,2CAA2C;AAC3C,MAAM,WAAW,gBAAgB;IAC/B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,kCAAkC;AAClC,MAAM,WAAW,iBAAiB;IAChC,0BAA0B;IAC1B,MAAM,EAAE,MAAM,CAAC;IACf,uCAAuC;IACvC,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,4DAA4D;AAC5D,MAAM,WAAW,eAAe;IAC9B,uDAAuD;IACvD,EAAE,CAAC,EAAE,aAAa,CAAC;IACnB,uEAAuE;IACvE,WAAW,CAAC,EAAE,sBAAsB,CAAC;IACrC,2CAA2C;IAC3C,MAAM,CAAC,EAAE,gBAAgB,EAAE,CAAC;IAC5B,6BAA6B;IAC7B,MAAM,CAAC,EAAE,iBAAiB,CAAC;IAC3B,+DAA+D;IAC/D,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,mDAAmD;AACnD,MAAM,WAAW,gBAAgB;IAC/B,+CAA+C;IAC/C,IAAI,EAAE,eAAe,CAAC;IACtB,6BAA6B;IAC7B,SAAS,EAAE,MAAM,IAAI,CAAC;IACtB,uGAAuG;IACvG,QAAQ,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;IACtC,8CAA8C;IAC9C,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,8CAA8C;IAC9C,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB;AAED,wDAAwD;AACxD,MAAM,WAAW,sBAAuB,SAAQ,IAAI,CAAC,gBAAgB,EAAE,MAAM,CAAC;IAC5E,6CAA6C;IAC7C,IAAI,EAAE,eAAe,GAAG,IAAI,CAAC;IAC7B,iCAAiC;IACjC,IAAI,EAAE,OAAO,CAAC;IACd,wCAAwC;IACxC,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,0CAA0C;IAC1C,WAAW,EAAE,MAAM,CAAC;IACpB,sCAAsC;IACtC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,8CAA8C;IAC9C,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,gEAAgE;IAChE,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,gDAAgD;IAChD,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,yEAAyE;IACzE,QAAQ,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,IAAI,CAAC;IACvC,gDAAgD;IAChD,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB"}
1
+ {"version":3,"file":"merge-review-config.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/web/components/common/merge-review/merge-review-config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,sCAAsC,CAAC;AAE/E,yCAAyC;AACzC,MAAM,WAAW,sBAAsB;IACrC,YAAY,EAAE,MAAM,CAAC;IACrB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,4CAA4C;AAC5C,MAAM,WAAW,aAAa;IAC5B,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,QAAQ,CAAC;IACjB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,QAAQ,CAAC;CACrB;AAED,2CAA2C;AAC3C,MAAM,WAAW,gBAAgB;IAC/B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,kCAAkC;AAClC,MAAM,WAAW,iBAAiB;IAChC,0BAA0B;IAC1B,MAAM,EAAE,MAAM,CAAC;IACf,uCAAuC;IACvC,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,4DAA4D;AAC5D,MAAM,WAAW,eAAe;IAC9B,uDAAuD;IACvD,EAAE,CAAC,EAAE,aAAa,CAAC;IACnB,uEAAuE;IACvE,WAAW,CAAC,EAAE,sBAAsB,CAAC;IACrC,2CAA2C;IAC3C,MAAM,CAAC,EAAE,gBAAgB,EAAE,CAAC;IAC5B,6BAA6B;IAC7B,MAAM,CAAC,EAAE,iBAAiB,CAAC;IAC3B,+DAA+D;IAC/D,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,mDAAmD;AACnD,MAAM,WAAW,gBAAgB;IAC/B,+CAA+C;IAC/C,IAAI,EAAE,eAAe,CAAC;IACtB,6BAA6B;IAC7B,SAAS,EAAE,MAAM,IAAI,CAAC;IACtB,uGAAuG;IACvG,QAAQ,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;IACtC,8CAA8C;IAC9C,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,8CAA8C;IAC9C,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,oDAAoD;IACpD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,sCAAsC;IACtC,iBAAiB,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CAC7C;AAED,wDAAwD;AACxD,MAAM,WAAW,sBAAuB,SAAQ,IAAI,CAAC,gBAAgB,EAAE,MAAM,CAAC;IAC5E,6CAA6C;IAC7C,IAAI,EAAE,eAAe,GAAG,IAAI,CAAC;IAC7B,iCAAiC;IACjC,IAAI,EAAE,OAAO,CAAC;IACd,wCAAwC;IACxC,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,0CAA0C;IAC1C,WAAW,EAAE,MAAM,CAAC;IACpB,sCAAsC;IACtC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,8CAA8C;IAC9C,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,gEAAgE;IAChE,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,gDAAgD;IAChD,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,yEAAyE;IACzE,QAAQ,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,IAAI,CAAC;IACvC,gDAAgD;IAChD,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB"}
@@ -1,3 +1,3 @@
1
1
  import type { MergeReviewProps } from './merge-review-config.js';
2
- export declare function MergeReview({ data, onApprove, onReject, isProcessing, isRejecting, }: MergeReviewProps): import("react/jsx-runtime").JSX.Element;
2
+ export declare function MergeReview({ data, onApprove, onReject, isProcessing, isRejecting, chatInput, onChatInputChange, }: MergeReviewProps): import("react/jsx-runtime").JSX.Element;
3
3
  //# sourceMappingURL=merge-review.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"merge-review.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/web/components/common/merge-review/merge-review.tsx"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAAE,gBAAgB,EAAoB,MAAM,uBAAuB,CAAC;AAgChF,wBAAgB,WAAW,CAAC,EAC1B,IAAI,EACJ,SAAS,EACT,QAAQ,EACR,YAAoB,EACpB,WAAmB,GACpB,EAAE,gBAAgB,2CA2IlB"}
1
+ {"version":3,"file":"merge-review.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/web/components/common/merge-review/merge-review.tsx"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAAE,gBAAgB,EAAoB,MAAM,uBAAuB,CAAC;AAgChF,wBAAgB,WAAW,CAAC,EAC1B,IAAI,EACJ,SAAS,EACT,QAAQ,EACR,YAAoB,EACpB,WAAmB,EACnB,SAAS,EACT,iBAAiB,GAClB,EAAE,gBAAgB,2CA6IlB"}
@@ -7,9 +7,9 @@ import { DrawerActionBar } from '../../common/drawer-action-bar/index.js';
7
7
  function PhaseList({ phases }) {
8
8
  return (_jsx("div", { className: "border-border rounded-lg border", children: _jsxs("div", { className: "px-4 py-3", children: [_jsxs("div", { className: "mb-3 flex items-center gap-2", children: [_jsx(Layers, { className: "text-muted-foreground h-4 w-4" }), _jsx("span", { className: "text-foreground text-xs font-semibold", children: "Implementation Phases" })] }), _jsx("ol", { className: "space-y-2", children: phases.map((phase, i) => (_jsxs("li", { className: "flex items-start gap-2.5", children: [_jsx("span", { className: "flex h-5 w-5 shrink-0 items-center justify-center rounded-full bg-emerald-100 text-[10px] font-bold text-emerald-700", children: i + 1 }), _jsxs("div", { className: "min-w-0", children: [_jsx("span", { className: "text-foreground text-xs font-medium", children: phase.name }), phase.description ? (_jsx("p", { className: "text-muted-foreground mt-0.5 text-[11px] leading-relaxed", children: phase.description })) : null] })] }, phase.id))) })] }) }));
9
9
  }
10
- export function MergeReview({ data, onApprove, onReject, isProcessing = false, isRejecting = false, }) {
10
+ export function MergeReview({ data, onApprove, onReject, isProcessing = false, isRejecting = false, chatInput, onChatInputChange, }) {
11
11
  const { pr, diffSummary, phases, branch, warning } = data;
12
12
  return (_jsxs("div", { className: "flex min-h-0 flex-1 flex-col", children: [_jsxs("div", { className: "flex-1 space-y-4 overflow-y-auto p-4", children: [_jsxs("div", { className: "flex items-start gap-3", children: [_jsx("div", { className: "mt-1.5 h-2.5 w-2.5 shrink-0 rounded-full bg-emerald-500" }), _jsxs("div", { className: "flex-1", children: [_jsx("h2", { className: "text-foreground text-sm font-bold", children: "Merge Review" }), _jsx("p", { className: "text-muted-foreground mt-1 text-xs leading-relaxed", children: pr
13
13
  ? 'Review the pull request details and approve to merge.'
14
- : 'Review the changes and approve to merge.' })] })] }), branch ? (_jsx("div", { className: "border-border rounded-lg border", children: _jsxs("div", { className: "flex items-center gap-2 px-4 py-3", children: [_jsx(GitBranch, { className: "text-muted-foreground h-4 w-4 shrink-0" }), _jsx(Badge, { variant: "secondary", className: "font-mono text-[11px]", children: branch.source }), _jsx(ArrowRight, { className: "text-muted-foreground h-3.5 w-3.5 shrink-0" }), _jsx(Badge, { variant: "outline", className: "font-mono text-[11px]", children: branch.target })] }) })) : null, pr ? (_jsx("div", { className: "border-border rounded-lg border", children: _jsxs("div", { className: "space-y-3 px-4 py-3", children: [_jsxs("div", { className: "flex items-center justify-between", children: [_jsxs("a", { href: pr.url, target: "_blank", rel: "noopener noreferrer", className: "text-primary flex items-center gap-1.5 text-sm font-semibold underline underline-offset-2", children: ["PR #", pr.number, _jsx(ExternalLink, { className: "h-3.5 w-3.5" })] }), _jsx(Badge, { variant: "outline", className: "text-xs", children: pr.status })] }), pr.ciStatus ? (_jsxs("div", { className: "flex items-center justify-between", children: [_jsx("span", { className: "text-muted-foreground text-xs font-medium", children: "CI Status" }), _jsx(CiStatusBadge, { status: pr.ciStatus })] })) : null, pr.commitHash ? (_jsxs("div", { className: "flex items-center justify-between", children: [_jsx("span", { className: "text-muted-foreground text-xs font-medium", children: "Commit" }), _jsxs("div", { className: "flex items-center gap-1.5", children: [_jsx(GitCommitHorizontal, { className: "text-muted-foreground h-3.5 w-3.5" }), _jsx("code", { className: "bg-muted text-foreground rounded-md px-1.5 py-0.5 font-mono text-[11px]", children: pr.commitHash.slice(0, 7) })] })] })) : null] }) })) : null, diffSummary ? (_jsx("div", { className: "border-border rounded-lg border", children: _jsxs("div", { className: "px-4 py-3", children: [_jsxs("div", { className: "mb-3 flex items-center gap-2", children: [_jsx(FileDiff, { className: "text-muted-foreground h-4 w-4" }), _jsx("span", { className: "text-foreground text-xs font-semibold", children: "Changes" })] }), _jsxs("div", { className: "grid grid-cols-4 gap-3", children: [_jsxs("div", { className: "text-center", children: [_jsx("div", { className: "text-foreground text-sm font-bold", children: diffSummary.filesChanged }), _jsx("div", { className: "text-muted-foreground text-[10px]", children: "files" })] }), _jsxs("div", { className: "text-center", children: [_jsxs("div", { className: "text-sm font-bold text-green-600", children: ["+", diffSummary.additions] }), _jsx("div", { className: "text-muted-foreground text-[10px]", children: "additions" })] }), _jsxs("div", { className: "text-center", children: [_jsxs("div", { className: "text-sm font-bold text-red-600", children: ["-", diffSummary.deletions] }), _jsx("div", { className: "text-muted-foreground text-[10px]", children: "deletions" })] }), _jsxs("div", { className: "text-center", children: [_jsx("div", { className: "text-foreground text-sm font-bold", children: diffSummary.commitCount }), _jsx("div", { className: "text-muted-foreground text-[10px]", children: "commits" })] })] })] }) })) : warning ? (_jsx("div", { className: "border-border rounded-lg border", children: _jsxs("div", { className: "flex items-center gap-2 px-4 py-3", children: [_jsx(AlertTriangle, { className: "text-muted-foreground h-4 w-4 shrink-0" }), _jsx("span", { className: "text-muted-foreground text-xs", children: warning })] }) })) : null, phases && phases.length > 0 ? _jsx(PhaseList, { phases: phases }) : null] }), _jsx(DrawerActionBar, { onReject: onReject, onApprove: onApprove, approveLabel: "Approve Merge", approveIcon: isProcessing ? (_jsx(Loader2, { className: "mr-1.5 h-4 w-4 animate-spin" })) : (_jsx(GitMerge, { className: "mr-1.5 h-4 w-4" })), revisionPlaceholder: "Ask AI to revise before merging...", isProcessing: isProcessing, isRejecting: isRejecting })] }));
14
+ : 'Review the changes and approve to merge.' })] })] }), branch ? (_jsx("div", { className: "border-border rounded-lg border", children: _jsxs("div", { className: "flex items-center gap-2 px-4 py-3", children: [_jsx(GitBranch, { className: "text-muted-foreground h-4 w-4 shrink-0" }), _jsx(Badge, { variant: "secondary", className: "font-mono text-[11px]", children: branch.source }), _jsx(ArrowRight, { className: "text-muted-foreground h-3.5 w-3.5 shrink-0" }), _jsx(Badge, { variant: "outline", className: "font-mono text-[11px]", children: branch.target })] }) })) : null, pr ? (_jsx("div", { className: "border-border rounded-lg border", children: _jsxs("div", { className: "space-y-3 px-4 py-3", children: [_jsxs("div", { className: "flex items-center justify-between", children: [_jsxs("a", { href: pr.url, target: "_blank", rel: "noopener noreferrer", className: "text-primary flex items-center gap-1.5 text-sm font-semibold underline underline-offset-2", children: ["PR #", pr.number, _jsx(ExternalLink, { className: "h-3.5 w-3.5" })] }), _jsx(Badge, { variant: "outline", className: "text-xs", children: pr.status })] }), pr.ciStatus ? (_jsxs("div", { className: "flex items-center justify-between", children: [_jsx("span", { className: "text-muted-foreground text-xs font-medium", children: "CI Status" }), _jsx(CiStatusBadge, { status: pr.ciStatus })] })) : null, pr.commitHash ? (_jsxs("div", { className: "flex items-center justify-between", children: [_jsx("span", { className: "text-muted-foreground text-xs font-medium", children: "Commit" }), _jsxs("div", { className: "flex items-center gap-1.5", children: [_jsx(GitCommitHorizontal, { className: "text-muted-foreground h-3.5 w-3.5" }), _jsx("code", { className: "bg-muted text-foreground rounded-md px-1.5 py-0.5 font-mono text-[11px]", children: pr.commitHash.slice(0, 7) })] })] })) : null] }) })) : null, diffSummary ? (_jsx("div", { className: "border-border rounded-lg border", children: _jsxs("div", { className: "px-4 py-3", children: [_jsxs("div", { className: "mb-3 flex items-center gap-2", children: [_jsx(FileDiff, { className: "text-muted-foreground h-4 w-4" }), _jsx("span", { className: "text-foreground text-xs font-semibold", children: "Changes" })] }), _jsxs("div", { className: "grid grid-cols-4 gap-3", children: [_jsxs("div", { className: "text-center", children: [_jsx("div", { className: "text-foreground text-sm font-bold", children: diffSummary.filesChanged }), _jsx("div", { className: "text-muted-foreground text-[10px]", children: "files" })] }), _jsxs("div", { className: "text-center", children: [_jsxs("div", { className: "text-sm font-bold text-green-600", children: ["+", diffSummary.additions] }), _jsx("div", { className: "text-muted-foreground text-[10px]", children: "additions" })] }), _jsxs("div", { className: "text-center", children: [_jsxs("div", { className: "text-sm font-bold text-red-600", children: ["-", diffSummary.deletions] }), _jsx("div", { className: "text-muted-foreground text-[10px]", children: "deletions" })] }), _jsxs("div", { className: "text-center", children: [_jsx("div", { className: "text-foreground text-sm font-bold", children: diffSummary.commitCount }), _jsx("div", { className: "text-muted-foreground text-[10px]", children: "commits" })] })] })] }) })) : warning ? (_jsx("div", { className: "border-border rounded-lg border", children: _jsxs("div", { className: "flex items-center gap-2 px-4 py-3", children: [_jsx(AlertTriangle, { className: "text-muted-foreground h-4 w-4 shrink-0" }), _jsx("span", { className: "text-muted-foreground text-xs", children: warning })] }) })) : null, phases && phases.length > 0 ? _jsx(PhaseList, { phases: phases }) : null] }), _jsx(DrawerActionBar, { onReject: onReject, onApprove: onApprove, approveLabel: "Approve Merge", approveIcon: isProcessing ? (_jsx(Loader2, { className: "mr-1.5 h-4 w-4 animate-spin" })) : (_jsx(GitMerge, { className: "mr-1.5 h-4 w-4" })), revisionPlaceholder: "Ask AI to revise before merging...", isProcessing: isProcessing, isRejecting: isRejecting, chatInput: chatInput, onChatInputChange: onChatInputChange })] }));
15
15
  }
@@ -17,6 +17,10 @@ export interface PrdQuestionnaireProps {
17
17
  isRejecting?: boolean;
18
18
  /** Show the goal/context header (default: false) */
19
19
  showHeader?: boolean;
20
+ /** Controlled chat input for the revision input. */
21
+ chatInput?: string;
22
+ /** Handler for chat input changes. */
23
+ onChatInputChange?: (value: string) => void;
20
24
  }
21
25
  export interface PrdQuestionnaireDrawerProps extends Omit<PrdQuestionnaireProps, 'data'> {
22
26
  /** Questionnaire data — null while loading */
@@ -1 +1 @@
1
- {"version":3,"file":"prd-questionnaire-config.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/web/components/common/prd-questionnaire/prd-questionnaire-config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,SAAS,EACT,WAAW,EACX,cAAc,EACd,oBAAoB,EACrB,MAAM,sCAAsC,CAAC;AAE9C,YAAY,EAAE,SAAS,EAAE,WAAW,EAAE,cAAc,EAAE,oBAAoB,EAAE,CAAC;AAE7E,MAAM,WAAW,qBAAqB;IACpC,2EAA2E;IAC3E,IAAI,EAAE,oBAAoB,CAAC;IAC3B,gEAAgE;IAChE,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACnC,gCAAgC;IAChC,QAAQ,EAAE,CAAC,UAAU,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;IACzD,qCAAqC;IACrC,SAAS,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;IACtC,8GAA8G;IAC9G,QAAQ,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;IACtC,yDAAyD;IACzD,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,8CAA8C;IAC9C,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,oDAAoD;IACpD,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED,MAAM,WAAW,2BAA4B,SAAQ,IAAI,CAAC,qBAAqB,EAAE,MAAM,CAAC;IACtF,8CAA8C;IAC9C,IAAI,EAAE,oBAAoB,GAAG,IAAI,CAAC;IAClC,iCAAiC;IACjC,IAAI,EAAE,OAAO,CAAC;IACd,wCAAwC;IACxC,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,0CAA0C;IAC1C,WAAW,EAAE,MAAM,CAAC;IACpB,qDAAqD;IACrD,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,sCAAsC;IACtC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,oCAAoC;IACpC,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,8CAA8C;IAC9C,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,uCAAuC;IACvC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,gDAAgD;IAChD,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,yEAAyE;IACzE,QAAQ,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,IAAI,CAAC;IACvC,gDAAgD;IAChD,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB"}
1
+ {"version":3,"file":"prd-questionnaire-config.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/web/components/common/prd-questionnaire/prd-questionnaire-config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,SAAS,EACT,WAAW,EACX,cAAc,EACd,oBAAoB,EACrB,MAAM,sCAAsC,CAAC;AAE9C,YAAY,EAAE,SAAS,EAAE,WAAW,EAAE,cAAc,EAAE,oBAAoB,EAAE,CAAC;AAE7E,MAAM,WAAW,qBAAqB;IACpC,2EAA2E;IAC3E,IAAI,EAAE,oBAAoB,CAAC;IAC3B,gEAAgE;IAChE,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACnC,gCAAgC;IAChC,QAAQ,EAAE,CAAC,UAAU,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;IACzD,qCAAqC;IACrC,SAAS,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;IACtC,8GAA8G;IAC9G,QAAQ,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;IACtC,yDAAyD;IACzD,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,8CAA8C;IAC9C,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,oDAAoD;IACpD,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,oDAAoD;IACpD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,sCAAsC;IACtC,iBAAiB,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CAC7C;AAED,MAAM,WAAW,2BAA4B,SAAQ,IAAI,CAAC,qBAAqB,EAAE,MAAM,CAAC;IACtF,8CAA8C;IAC9C,IAAI,EAAE,oBAAoB,GAAG,IAAI,CAAC;IAClC,iCAAiC;IACjC,IAAI,EAAE,OAAO,CAAC;IACd,wCAAwC;IACxC,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,0CAA0C;IAC1C,WAAW,EAAE,MAAM,CAAC;IACpB,qDAAqD;IACrD,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,sCAAsC;IACtC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,oCAAoC;IACpC,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,8CAA8C;IAC9C,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,uCAAuC;IACvC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,gDAAgD;IAChD,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,yEAAyE;IACzE,QAAQ,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,IAAI,CAAC;IACvC,gDAAgD;IAChD,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB"}
@@ -1,3 +1,3 @@
1
1
  import type { PrdQuestionnaireProps } from './prd-questionnaire-config.js';
2
- export declare function PrdQuestionnaire({ data, selections, onSelect, onApprove, onReject, isProcessing, isRejecting, showHeader, }: PrdQuestionnaireProps): import("react/jsx-runtime").JSX.Element | null;
2
+ export declare function PrdQuestionnaire({ data, selections, onSelect, onApprove, onReject, isProcessing, isRejecting, showHeader, chatInput, onChatInputChange, }: PrdQuestionnaireProps): import("react/jsx-runtime").JSX.Element | null;
3
3
  //# sourceMappingURL=prd-questionnaire.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"prd-questionnaire.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/web/components/common/prd-questionnaire/prd-questionnaire.tsx"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AAExE,wBAAgB,gBAAgB,CAAC,EAC/B,IAAI,EACJ,UAAU,EACV,QAAQ,EACR,SAAS,EACT,QAAQ,EACR,YAAoB,EACpB,WAAmB,EACnB,UAAkB,GACnB,EAAE,qBAAqB,kDAiLvB"}
1
+ {"version":3,"file":"prd-questionnaire.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/web/components/common/prd-questionnaire/prd-questionnaire.tsx"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AAExE,wBAAgB,gBAAgB,CAAC,EAC/B,IAAI,EACJ,UAAU,EACV,QAAQ,EACR,SAAS,EACT,QAAQ,EACR,YAAoB,EACpB,WAAmB,EACnB,UAAkB,EAClB,SAAS,EACT,iBAAiB,GAClB,EAAE,qBAAqB,kDAmLvB"}
@@ -7,7 +7,7 @@ import { Button } from '../../ui/button.js';
7
7
  import { Badge } from '../../ui/badge.js';
8
8
  import { DrawerActionBar } from '../../common/drawer-action-bar/index.js';
9
9
  import { useSoundAction } from '../../../hooks/use-sound-action.js';
10
- export function PrdQuestionnaire({ data, selections, onSelect, onApprove, onReject, isProcessing = false, isRejecting = false, showHeader = false, }) {
10
+ export function PrdQuestionnaire({ data, selections, onSelect, onApprove, onReject, isProcessing = false, isRejecting = false, showHeader = false, chatInput, onChatInputChange, }) {
11
11
  const { question, context, questions, finalAction } = data;
12
12
  const [currentStep, setCurrentStep] = useState(0);
13
13
  const selectSound = useSoundAction('select');
@@ -40,7 +40,7 @@ export function PrdQuestionnaire({ data, selections, onSelect, onApprove, onReje
40
40
  }, children: [_jsx(ChevronLeft, { className: "mr-1 h-4 w-4" }), "Previous"] }), !isLastStep ? (_jsxs(Button, { type: "button", variant: "ghost", size: "sm", disabled: isProcessing, onClick: () => {
41
41
  navigateSound.play();
42
42
  setCurrentStep((s) => s + 1);
43
- }, children: [selections[currentQuestion.id] ? 'Next' : 'Skip', _jsx(ChevronRight, { className: "ml-1 h-4 w-4" })] })) : null] })] }), _jsx(DrawerActionBar, { onReject: onReject, onApprove: () => onApprove(finalAction.id), approveLabel: finalAction.label, approveIcon: _jsx(Check, { className: "mr-1.5 h-4 w-4" }), revisionPlaceholder: "Ask AI to refine requirements...", isProcessing: isProcessing, isRejecting: isRejecting, children: _jsx("div", { className: cn('bg-muted h-1.5 overflow-hidden', (answeredCount > 0 && answeredCount < total) || isProcessing
43
+ }, children: [selections[currentQuestion.id] ? 'Next' : 'Skip', _jsx(ChevronRight, { className: "ml-1 h-4 w-4" })] })) : null] })] }), _jsx(DrawerActionBar, { onReject: onReject, onApprove: () => onApprove(finalAction.id), approveLabel: finalAction.label, approveIcon: _jsx(Check, { className: "mr-1.5 h-4 w-4" }), revisionPlaceholder: "Ask AI to refine requirements...", isProcessing: isProcessing, isRejecting: isRejecting, chatInput: chatInput, onChatInputChange: onChatInputChange, children: _jsx("div", { className: cn('bg-muted h-1.5 overflow-hidden', (answeredCount > 0 && answeredCount < total) || isProcessing
44
44
  ? 'opacity-100'
45
45
  : 'opacity-0', 'transition-opacity duration-200'), "data-testid": "progress-bar-container", children: isProcessing ? (_jsx("div", { className: "bg-primary animate-indeterminate-progress h-full w-1/3" })) : (_jsx("div", { className: "bg-primary h-full transition-all duration-300", style: { width: `${total > 0 ? (answeredCount / total) * 100 : 0}%` }, "data-testid": "progress-bar" })) }) })] }));
46
46
  }
@@ -13,5 +13,9 @@ export interface TechReviewTabsProps {
13
13
  isProcessing?: boolean;
14
14
  /** Whether a reject operation is in flight */
15
15
  isRejecting?: boolean;
16
+ /** Controlled chat input for the revision input. */
17
+ chatInput?: string;
18
+ /** Handler for chat input changes. */
19
+ onChatInputChange?: (value: string) => void;
16
20
  }
17
21
  //# sourceMappingURL=tech-review-tabs-config.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"tech-review-tabs-config.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/web/components/common/tech-review-tabs/tech-review-tabs-config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,2CAA2C,CAAC;AACzF,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,+CAA+C,CAAC;AAEjG,MAAM,WAAW,mBAAmB;IAClC,qDAAqD;IACrD,QAAQ,EAAE,uBAAuB,CAAC;IAClC,4EAA4E;IAC5E,WAAW,CAAC,EAAE,2BAA2B,GAAG,IAAI,CAAC;IACjD,4BAA4B;IAC5B,SAAS,EAAE,MAAM,IAAI,CAAC;IACtB,2BAA2B;IAC3B,QAAQ,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;IACtC,6CAA6C;IAC7C,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,8CAA8C;IAC9C,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB"}
1
+ {"version":3,"file":"tech-review-tabs-config.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/web/components/common/tech-review-tabs/tech-review-tabs-config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,2CAA2C,CAAC;AACzF,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,+CAA+C,CAAC;AAEjG,MAAM,WAAW,mBAAmB;IAClC,qDAAqD;IACrD,QAAQ,EAAE,uBAAuB,CAAC;IAClC,4EAA4E;IAC5E,WAAW,CAAC,EAAE,2BAA2B,GAAG,IAAI,CAAC;IACjD,4BAA4B;IAC5B,SAAS,EAAE,MAAM,IAAI,CAAC;IACtB,2BAA2B;IAC3B,QAAQ,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;IACtC,6CAA6C;IAC7C,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,8CAA8C;IAC9C,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,oDAAoD;IACpD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,sCAAsC;IACtC,iBAAiB,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CAC7C"}
@@ -1,3 +1,3 @@
1
1
  import type { TechReviewTabsProps } from './tech-review-tabs-config.js';
2
- export declare function TechReviewTabs({ techData, productData, onApprove, onReject, isProcessing, isRejecting, }: TechReviewTabsProps): import("react/jsx-runtime").JSX.Element | null;
2
+ export declare function TechReviewTabs({ techData, productData, onApprove, onReject, isProcessing, isRejecting, chatInput, onChatInputChange, }: TechReviewTabsProps): import("react/jsx-runtime").JSX.Element | null;
3
3
  //# sourceMappingURL=tech-review-tabs.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"tech-review-tabs.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/web/components/common/tech-review-tabs/tech-review-tabs.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAErE,wBAAgB,cAAc,CAAC,EAC7B,QAAQ,EACR,WAAW,EACX,SAAS,EACT,QAAQ,EACR,YAAoB,EACpB,WAAmB,GACpB,EAAE,mBAAmB,kDA2CrB"}
1
+ {"version":3,"file":"tech-review-tabs.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/web/components/common/tech-review-tabs/tech-review-tabs.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAErE,wBAAgB,cAAc,CAAC,EAC7B,QAAQ,EACR,WAAW,EACX,SAAS,EACT,QAAQ,EACR,YAAoB,EACpB,WAAmB,EACnB,SAAS,EACT,iBAAiB,GAClB,EAAE,mBAAmB,kDA6CrB"}
@@ -5,8 +5,8 @@ import { Tabs, TabsContent, TabsList, TabsTrigger } from '../../ui/tabs.js';
5
5
  import { DrawerActionBar } from '../../common/drawer-action-bar/index.js';
6
6
  import { TechDecisionsContent } from '../../common/tech-decisions-review/index.js';
7
7
  import { ProductDecisionsSummary } from '../../common/product-decisions-summary/index.js';
8
- export function TechReviewTabs({ techData, productData, onApprove, onReject, isProcessing = false, isRejecting = false, }) {
8
+ export function TechReviewTabs({ techData, productData, onApprove, onReject, isProcessing = false, isRejecting = false, chatInput, onChatInputChange, }) {
9
9
  if (techData.decisions.length === 0)
10
10
  return null;
11
- return (_jsxs("div", { className: "flex min-h-0 flex-1 flex-col", children: [_jsxs(Tabs, { defaultValue: "technical", className: "flex min-h-0 flex-1 flex-col", children: [_jsx("div", { className: "shrink-0 px-4 pt-4", children: _jsxs(TabsList, { className: "grid w-full grid-cols-2", children: [_jsx(TabsTrigger, { value: "product", children: "Product" }), _jsx(TabsTrigger, { value: "technical", children: "Technical" })] }) }), _jsx(TabsContent, { value: "product", className: "mt-0 flex-1 overflow-y-auto", children: productData === null ? (_jsx("div", { className: "flex items-center justify-center p-8", "data-testid": "product-loading", children: _jsx(Loader2, { className: "text-muted-foreground h-6 w-6 animate-spin" }) })) : productData ? (_jsx(ProductDecisionsSummary, { data: productData })) : (_jsx("p", { className: "text-muted-foreground p-4 text-center text-sm", children: "No product decisions available." })) }), _jsx(TabsContent, { value: "technical", className: "mt-0 flex-1 overflow-y-auto", children: _jsx(TechDecisionsContent, { data: techData }) })] }), _jsx(DrawerActionBar, { onReject: onReject, onApprove: onApprove, approveLabel: "Approve Plan", approveIcon: _jsx(Check, { className: "mr-1.5 h-4 w-4" }), revisionPlaceholder: "Ask AI to revise the plan...", isProcessing: isProcessing, isRejecting: isRejecting })] }));
11
+ return (_jsxs("div", { className: "flex min-h-0 flex-1 flex-col", children: [_jsxs(Tabs, { defaultValue: "technical", className: "flex min-h-0 flex-1 flex-col", children: [_jsx("div", { className: "shrink-0 px-4 pt-4", children: _jsxs(TabsList, { className: "grid w-full grid-cols-2", children: [_jsx(TabsTrigger, { value: "product", children: "Product" }), _jsx(TabsTrigger, { value: "technical", children: "Technical" })] }) }), _jsx(TabsContent, { value: "product", className: "mt-0 flex-1 overflow-y-auto", children: productData === null ? (_jsx("div", { className: "flex items-center justify-center p-8", "data-testid": "product-loading", children: _jsx(Loader2, { className: "text-muted-foreground h-6 w-6 animate-spin" }) })) : productData ? (_jsx(ProductDecisionsSummary, { data: productData })) : (_jsx("p", { className: "text-muted-foreground p-4 text-center text-sm", children: "No product decisions available." })) }), _jsx(TabsContent, { value: "technical", className: "mt-0 flex-1 overflow-y-auto", children: _jsx(TechDecisionsContent, { data: techData }) })] }), _jsx(DrawerActionBar, { onReject: onReject, onApprove: onApprove, approveLabel: "Approve Plan", approveIcon: _jsx(Check, { className: "mr-1.5 h-4 w-4" }), revisionPlaceholder: "Ask AI to revise the plan...", isProcessing: isProcessing, isRejecting: isRejecting, chatInput: chatInput, onChatInputChange: onChatInputChange })] }));
12
12
  }
@@ -1 +1 @@
1
- {"version":3,"file":"control-center-inner.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/web/components/features/control-center/control-center-inner.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAE1C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uCAAuC,CAAC;AAa5E,UAAU,uBAAuB;IAC/B,YAAY,EAAE,cAAc,EAAE,CAAC;IAC/B,YAAY,EAAE,IAAI,EAAE,CAAC;CACtB;AAED,wBAAgB,kBAAkB,CAAC,EAAE,YAAY,EAAE,YAAY,EAAE,EAAE,uBAAuB,2CAmMzF"}
1
+ {"version":3,"file":"control-center-inner.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/web/components/features/control-center/control-center-inner.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAE1C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uCAAuC,CAAC;AAc5E,UAAU,uBAAuB;IAC/B,YAAY,EAAE,cAAc,EAAE,CAAC;IAC/B,YAAY,EAAE,IAAI,EAAE,CAAC;CACtB;AAED,wBAAgB,kBAAkB,CAAC,EAAE,YAAY,EAAE,YAAY,EAAE,EAAE,uBAAuB,2CAsMzF"}