@shepai/cli 1.86.0 → 1.87.0-pr257.29a5ad6

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 (244) hide show
  1. package/dist/src/presentation/web/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page.d.ts +11 -0
  2. package/dist/src/presentation/web/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page.d.ts.map +1 -0
  3. package/dist/src/presentation/web/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page.js +49 -0
  4. package/dist/src/presentation/web/app/(dashboard)/feature/[featureId]/[tab]/page.d.ts +3 -0
  5. package/dist/src/presentation/web/app/(dashboard)/feature/[featureId]/[tab]/page.d.ts.map +1 -0
  6. package/dist/src/presentation/web/app/(dashboard)/feature/[featureId]/[tab]/page.js +4 -0
  7. package/dist/src/presentation/web/app/actions/get-feature-plan.d.ts +10 -0
  8. package/dist/src/presentation/web/app/actions/get-feature-plan.d.ts.map +1 -1
  9. package/dist/src/presentation/web/app/actions/get-feature-plan.js +8 -0
  10. package/dist/src/presentation/web/app/api/attachments/upload-from-path/route.d.ts +3 -0
  11. package/dist/src/presentation/web/app/api/attachments/upload-from-path/route.d.ts.map +1 -0
  12. package/dist/src/presentation/web/app/api/attachments/upload-from-path/route.js +120 -0
  13. package/dist/src/presentation/web/components/common/control-center-drawer/drawer-view.d.ts +4 -0
  14. package/dist/src/presentation/web/components/common/control-center-drawer/drawer-view.d.ts.map +1 -1
  15. package/dist/src/presentation/web/components/common/control-center-drawer/drawer-view.js +17 -0
  16. package/dist/src/presentation/web/components/common/control-center-drawer/feature-drawer-client.d.ts +4 -2
  17. package/dist/src/presentation/web/components/common/control-center-drawer/feature-drawer-client.d.ts.map +1 -1
  18. package/dist/src/presentation/web/components/common/control-center-drawer/feature-drawer-client.js +2 -2
  19. package/dist/src/presentation/web/components/common/feature-create-drawer/feature-create-drawer.d.ts.map +1 -1
  20. package/dist/src/presentation/web/components/common/feature-create-drawer/feature-create-drawer.js +38 -13
  21. package/dist/src/presentation/web/components/common/feature-drawer-tabs/feature-drawer-tabs.d.ts +3 -1
  22. package/dist/src/presentation/web/components/common/feature-drawer-tabs/feature-drawer-tabs.d.ts.map +1 -1
  23. package/dist/src/presentation/web/components/common/feature-drawer-tabs/feature-drawer-tabs.js +65 -3
  24. package/dist/src/presentation/web/components/common/feature-drawer-tabs/plan-tab.d.ts.map +1 -1
  25. package/dist/src/presentation/web/components/common/feature-drawer-tabs/plan-tab.js +3 -20
  26. package/dist/src/presentation/web/components/common/feature-drawer-tabs/plan-tab.stories.d.ts.map +1 -1
  27. package/dist/src/presentation/web/components/common/feature-drawer-tabs/plan-tab.stories.js +74 -0
  28. package/dist/src/presentation/web/components/common/task-progress-view/index.d.ts +3 -0
  29. package/dist/src/presentation/web/components/common/task-progress-view/index.d.ts.map +1 -0
  30. package/dist/src/presentation/web/components/common/task-progress-view/index.js +1 -0
  31. package/dist/src/presentation/web/components/common/task-progress-view/task-progress-view.d.ts +6 -0
  32. package/dist/src/presentation/web/components/common/task-progress-view/task-progress-view.d.ts.map +1 -0
  33. package/dist/src/presentation/web/components/common/task-progress-view/task-progress-view.js +84 -0
  34. package/dist/src/presentation/web/components/common/task-progress-view/task-progress-view.stories.d.ts +16 -0
  35. package/dist/src/presentation/web/components/common/task-progress-view/task-progress-view.stories.d.ts.map +1 -0
  36. package/dist/src/presentation/web/components/common/task-progress-view/task-progress-view.stories.js +194 -0
  37. package/dist/tsconfig.build.tsbuildinfo +1 -1
  38. package/package.json +1 -1
  39. package/web/.next/BUILD_ID +1 -1
  40. package/web/.next/app-path-routes-manifest.json +3 -0
  41. package/web/.next/build-manifest.json +2 -2
  42. package/web/.next/fallback-build-manifest.json +2 -2
  43. package/web/.next/prerender-manifest.json +3 -3
  44. package/web/.next/required-server-files.js +1 -1
  45. package/web/.next/required-server-files.json +1 -1
  46. package/web/.next/routes-manifest.json +15 -0
  47. package/web/.next/server/app/(dashboard)/@drawer/create/page/server-reference-manifest.json +18 -18
  48. package/web/.next/server/app/(dashboard)/@drawer/create/page.js.nft.json +1 -1
  49. package/web/.next/server/app/(dashboard)/@drawer/create/page_client-reference-manifest.js +1 -1
  50. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page/app-paths-manifest.json +3 -0
  51. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page/build-manifest.json +18 -0
  52. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page/next-font-manifest.json +6 -0
  53. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page/react-loadable-manifest.json +1 -0
  54. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page/server-reference-manifest.json +320 -0
  55. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page.js +20 -0
  56. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page.js.map +5 -0
  57. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page.js.nft.json +1 -0
  58. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page_client-reference-manifest.js +2 -0
  59. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page/server-reference-manifest.json +21 -21
  60. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page.js +1 -1
  61. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page.js.nft.json +1 -1
  62. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page_client-reference-manifest.js +1 -1
  63. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page/server-reference-manifest.json +14 -14
  64. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page.js.nft.json +1 -1
  65. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page_client-reference-manifest.js +1 -1
  66. package/web/.next/server/app/(dashboard)/create/page/server-reference-manifest.json +18 -18
  67. package/web/.next/server/app/(dashboard)/create/page.js.nft.json +1 -1
  68. package/web/.next/server/app/(dashboard)/create/page_client-reference-manifest.js +1 -1
  69. package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page/app-paths-manifest.json +3 -0
  70. package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page/build-manifest.json +18 -0
  71. package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page/next-font-manifest.json +6 -0
  72. package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page/react-loadable-manifest.json +1 -0
  73. package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page/server-reference-manifest.json +320 -0
  74. package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page.js +20 -0
  75. package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page.js.map +5 -0
  76. package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page.js.nft.json +1 -0
  77. package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page_client-reference-manifest.js +2 -0
  78. package/web/.next/server/app/(dashboard)/feature/[featureId]/page/server-reference-manifest.json +21 -21
  79. package/web/.next/server/app/(dashboard)/feature/[featureId]/page.js +1 -1
  80. package/web/.next/server/app/(dashboard)/feature/[featureId]/page.js.nft.json +1 -1
  81. package/web/.next/server/app/(dashboard)/feature/[featureId]/page_client-reference-manifest.js +1 -1
  82. package/web/.next/server/app/(dashboard)/page/server-reference-manifest.json +14 -14
  83. package/web/.next/server/app/(dashboard)/page.js.nft.json +1 -1
  84. package/web/.next/server/app/(dashboard)/page_client-reference-manifest.js +1 -1
  85. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page/server-reference-manifest.json +14 -14
  86. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page.js.nft.json +1 -1
  87. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page_client-reference-manifest.js +1 -1
  88. package/web/.next/server/app/_global-error.html +2 -2
  89. package/web/.next/server/app/_global-error.rsc +1 -1
  90. package/web/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
  91. package/web/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  92. package/web/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  93. package/web/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  94. package/web/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  95. package/web/.next/server/app/_not-found/page/server-reference-manifest.json +1 -1
  96. package/web/.next/server/app/_not-found/page.js.nft.json +1 -1
  97. package/web/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  98. package/web/.next/server/app/api/attachments/preview/route.js.nft.json +1 -1
  99. package/web/.next/server/app/api/attachments/upload-from-path/route/app-paths-manifest.json +3 -0
  100. package/web/.next/server/app/api/attachments/upload-from-path/route/build-manifest.json +11 -0
  101. package/web/.next/server/app/api/attachments/upload-from-path/route/server-reference-manifest.json +4 -0
  102. package/web/.next/server/app/api/attachments/upload-from-path/route.js +7 -0
  103. package/web/.next/server/app/api/attachments/upload-from-path/route.js.map +5 -0
  104. package/web/.next/server/app/api/attachments/upload-from-path/route.js.nft.json +1 -0
  105. package/web/.next/server/app/api/attachments/upload-from-path/route_client-reference-manifest.js +2 -0
  106. package/web/.next/server/app/settings/page/server-reference-manifest.json +5 -5
  107. package/web/.next/server/app/settings/page.js.nft.json +1 -1
  108. package/web/.next/server/app/settings/page_client-reference-manifest.js +1 -1
  109. package/web/.next/server/app/skills/page/server-reference-manifest.json +6 -6
  110. package/web/.next/server/app/skills/page.js +1 -1
  111. package/web/.next/server/app/skills/page.js.nft.json +1 -1
  112. package/web/.next/server/app/skills/page_client-reference-manifest.js +1 -1
  113. package/web/.next/server/app/tools/page/server-reference-manifest.json +6 -6
  114. package/web/.next/server/app/tools/page.js +1 -1
  115. package/web/.next/server/app/tools/page.js.nft.json +1 -1
  116. package/web/.next/server/app/tools/page_client-reference-manifest.js +1 -1
  117. package/web/.next/server/app/version/page/server-reference-manifest.json +1 -1
  118. package/web/.next/server/app/version/page.js.nft.json +1 -1
  119. package/web/.next/server/app/version/page_client-reference-manifest.js +1 -1
  120. package/web/.next/server/app-paths-manifest.json +3 -0
  121. package/web/.next/server/chunks/8ba4b_server_app_api_attachments_upload-from-path_route_actions_05020a44.js +3 -0
  122. package/web/.next/server/chunks/8ba4b_server_app_api_attachments_upload-from-path_route_actions_05020a44.js.map +1 -0
  123. package/web/.next/server/chunks/[root-of-the-server]__a5879003._.js +3 -0
  124. package/web/.next/server/chunks/[root-of-the-server]__a5879003._.js.map +1 -0
  125. package/web/.next/server/chunks/ssr/403f9_next_dist_esm_build_templates_app-page_c29a2302.js +4 -0
  126. package/web/.next/server/chunks/ssr/403f9_next_dist_esm_build_templates_app-page_c29a2302.js.map +1 -0
  127. package/web/.next/server/chunks/ssr/403f9_next_dist_esm_build_templates_app-page_d1fd387b.js +4 -0
  128. package/web/.next/server/chunks/ssr/403f9_next_dist_esm_build_templates_app-page_d1fd387b.js.map +1 -0
  129. package/web/.next/server/chunks/ssr/744ca_web_components_common_control-center-drawer_create-drawer-client_tsx_5e26fc0a._.js +1 -1
  130. package/web/.next/server/chunks/ssr/744ca_web_components_common_control-center-drawer_create-drawer-client_tsx_5e26fc0a._.js.map +1 -1
  131. package/web/.next/server/chunks/ssr/7f428_lucide-react_dist_esm_icons_e56b3bd6._.js +3 -0
  132. package/web/.next/server/chunks/ssr/7f428_lucide-react_dist_esm_icons_e56b3bd6._.js.map +1 -0
  133. package/web/.next/server/chunks/ssr/8ba4b_server_app_(dashboard)_@drawer_repository_[repositoryId]_page_actions_da7eef33.js +1 -1
  134. package/web/.next/server/chunks/ssr/8ba4b_server_app_(dashboard)_@drawer_repository_[repositoryId]_page_actions_da7eef33.js.map +1 -1
  135. package/web/.next/server/chunks/ssr/8ba4b_server_app_(dashboard)_repository_[repositoryId]_page_actions_0a9251aa.js +1 -1
  136. package/web/.next/server/chunks/ssr/8ba4b_server_app_(dashboard)_repository_[repositoryId]_page_actions_0a9251aa.js.map +1 -1
  137. package/web/.next/server/chunks/ssr/[root-of-the-server]__11033878._.js +1 -1
  138. package/web/.next/server/chunks/ssr/[root-of-the-server]__11033878._.js.map +1 -1
  139. package/web/.next/server/chunks/ssr/[root-of-the-server]__17143953._.js +1 -1
  140. package/web/.next/server/chunks/ssr/[root-of-the-server]__17143953._.js.map +1 -1
  141. package/web/.next/server/chunks/ssr/[root-of-the-server]__357d99f9._.js +1 -1
  142. package/web/.next/server/chunks/ssr/[root-of-the-server]__45aad79d._.js +3 -0
  143. package/web/.next/server/chunks/ssr/[root-of-the-server]__45aad79d._.js.map +1 -0
  144. package/web/.next/server/chunks/ssr/[root-of-the-server]__4be9a9bb._.js +1 -1
  145. package/web/.next/server/chunks/ssr/[root-of-the-server]__5b00ed0b._.js +3 -0
  146. package/web/.next/server/chunks/ssr/[root-of-the-server]__5b00ed0b._.js.map +1 -0
  147. package/web/.next/server/chunks/ssr/[root-of-the-server]__5cc4752a._.js +3 -0
  148. package/web/.next/server/chunks/ssr/[root-of-the-server]__5cc4752a._.js.map +1 -0
  149. package/web/.next/server/chunks/ssr/[root-of-the-server]__5d87af2e._.js +1 -1
  150. package/web/.next/server/chunks/ssr/{[root-of-the-server]__f0d8d054._.js → [root-of-the-server]__89e8a5cc._.js} +3 -3
  151. package/web/.next/server/chunks/ssr/[root-of-the-server]__89e8a5cc._.js.map +1 -0
  152. package/web/.next/server/chunks/ssr/[root-of-the-server]__94128fa9._.js +3 -0
  153. package/web/.next/server/chunks/ssr/[root-of-the-server]__94128fa9._.js.map +1 -0
  154. package/web/.next/server/chunks/ssr/[root-of-the-server]__9bfb8e7c._.js +3 -0
  155. package/web/.next/server/chunks/ssr/[root-of-the-server]__9bfb8e7c._.js.map +1 -0
  156. package/web/.next/server/chunks/ssr/[root-of-the-server]__9de266fa._.js +1 -1
  157. package/web/.next/server/chunks/ssr/[root-of-the-server]__9de266fa._.js.map +1 -1
  158. package/web/.next/server/chunks/ssr/[root-of-the-server]__aad040c0._.js +1 -1
  159. package/web/.next/server/chunks/ssr/[root-of-the-server]__aad040c0._.js.map +1 -1
  160. package/web/.next/server/chunks/ssr/{[root-of-the-server]__b3a4cef4._.js → [root-of-the-server]__e630cc47._.js} +2 -2
  161. package/web/.next/server/chunks/ssr/[root-of-the-server]__e630cc47._.js.map +1 -0
  162. package/web/.next/server/chunks/ssr/[root-of-the-server]__fdc75809._.js +1 -1
  163. package/web/.next/server/chunks/ssr/[root-of-the-server]__fdc75809._.js.map +1 -1
  164. package/web/.next/server/chunks/ssr/_050a0a7c._.js +3 -0
  165. package/web/.next/server/chunks/ssr/_050a0a7c._.js.map +1 -0
  166. package/web/.next/server/chunks/ssr/_135edb9c._.js +1 -1
  167. package/web/.next/server/chunks/ssr/_135edb9c._.js.map +1 -1
  168. package/web/.next/server/chunks/ssr/_1b58e8b4._.js +3 -0
  169. package/web/.next/server/chunks/ssr/_1b58e8b4._.js.map +1 -0
  170. package/web/.next/server/chunks/ssr/_21c75883._.js +3 -0
  171. package/web/.next/server/chunks/ssr/{_752e01fd._.js.map → _21c75883._.js.map} +1 -1
  172. package/web/.next/server/chunks/ssr/_8dacd1e7._.js +1 -1
  173. package/web/.next/server/chunks/ssr/_8dacd1e7._.js.map +1 -1
  174. package/web/.next/server/chunks/ssr/_922aa39f._.js +3 -0
  175. package/web/.next/server/chunks/ssr/_922aa39f._.js.map +1 -0
  176. package/web/.next/server/chunks/ssr/_cc77a143._.js +1 -1
  177. package/web/.next/server/chunks/ssr/_cc77a143._.js.map +1 -1
  178. package/web/.next/server/chunks/ssr/{_a2ec151c._.js → _e30a1619._.js} +2 -2
  179. package/web/.next/server/chunks/ssr/{_a2ec151c._.js.map → _e30a1619._.js.map} +1 -1
  180. package/web/.next/server/chunks/ssr/b1a17_presentation_web_components_features_settings_settings-page-client_tsx_6ed9d5f8._.js +1 -1
  181. package/web/.next/server/chunks/ssr/b1a17_presentation_web_components_features_settings_settings-page-client_tsx_6ed9d5f8._.js.map +1 -1
  182. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_(dashboard)_page_actions_021a05f2.js +1 -1
  183. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_(dashboard)_page_actions_021a05f2.js.map +1 -1
  184. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_skills_page_actions_1fa8042e.js +1 -1
  185. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_skills_page_actions_1fa8042e.js.map +1 -1
  186. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_tools_page_actions_24684200.js +1 -1
  187. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_tools_page_actions_24684200.js.map +1 -1
  188. package/web/.next/server/chunks/ssr/src_presentation_web_app_(dashboard)_feature_[featureId]_[tab]_page_tsx_40a5d287._.js +3 -0
  189. package/web/.next/server/chunks/ssr/src_presentation_web_app_(dashboard)_feature_[featureId]_[tab]_page_tsx_40a5d287._.js.map +1 -0
  190. package/web/.next/server/chunks/ssr/src_presentation_web_c4348b8a._.js +2 -2
  191. package/web/.next/server/chunks/ssr/src_presentation_web_c4348b8a._.js.map +1 -1
  192. package/web/.next/server/chunks/ssr/src_presentation_web_components_a5e6c910._.js +3 -0
  193. package/web/.next/server/chunks/ssr/src_presentation_web_components_a5e6c910._.js.map +1 -0
  194. package/web/.next/server/chunks/ssr/src_presentation_web_components_bf50c527._.js +1 -1
  195. package/web/.next/server/chunks/ssr/src_presentation_web_components_bf50c527._.js.map +1 -1
  196. package/web/.next/server/chunks/ssr/src_presentation_web_components_de814675._.js +1 -1
  197. package/web/.next/server/chunks/ssr/src_presentation_web_components_de814675._.js.map +1 -1
  198. package/web/.next/server/chunks/ssr/src_presentation_web_components_features_control-center_7ac3562e._.js +1 -1
  199. package/web/.next/server/chunks/ssr/src_presentation_web_components_features_control-center_7ac3562e._.js.map +1 -1
  200. package/web/.next/server/chunks/ssr/src_presentation_web_e4510d10._.js +2 -2
  201. package/web/.next/server/chunks/ssr/src_presentation_web_e4510d10._.js.map +1 -1
  202. package/web/.next/server/pages/500.html +2 -2
  203. package/web/.next/server/server-reference-manifest.js +1 -1
  204. package/web/.next/server/server-reference-manifest.json +322 -28
  205. package/web/.next/static/chunks/{20e5c07abd2699c2.js → 183ebd80757fd64c.js} +2 -2
  206. package/web/.next/static/chunks/{8b59757e9f52e364.js → 67e5d7847fd698f3.js} +1 -1
  207. package/web/.next/static/chunks/{98b1c6b413aeb539.js → 728d12889cb99f50.js} +1 -1
  208. package/web/.next/static/chunks/8ce8f561822f9884.js +1 -0
  209. package/web/.next/static/chunks/8d4efb009d9c65d5.js +1 -0
  210. package/web/.next/static/chunks/91d63f8e429f5900.css +2 -0
  211. package/web/.next/static/chunks/{ba99f8c298491782.js → 931d71d2fd12dda7.js} +1 -1
  212. package/web/.next/static/chunks/{eafcdd214c540495.js → 9923c5f5b7c0c3b1.js} +1 -1
  213. package/web/.next/static/chunks/{c267885c32e4091c.js → afb05da12a4d3f75.js} +1 -1
  214. package/web/.next/static/chunks/c717ad9c046a21a7.js +1 -0
  215. package/web/.next/static/chunks/{c481a0ab2ddddbf4.js → d2a0d5c9408f2bec.js} +1 -1
  216. package/web/.next/static/chunks/{673af06602f590f0.js → d60dfab8a7c7c0d8.js} +1 -1
  217. package/web/.next/static/chunks/e6e4f1c2b5868bda.js +11 -0
  218. package/web/.next/server/chunks/ssr/[root-of-the-server]__ae824a5b._.js +0 -3
  219. package/web/.next/server/chunks/ssr/[root-of-the-server]__ae824a5b._.js.map +0 -1
  220. package/web/.next/server/chunks/ssr/[root-of-the-server]__b3a4cef4._.js.map +0 -1
  221. package/web/.next/server/chunks/ssr/[root-of-the-server]__c3c963c6._.js +0 -3
  222. package/web/.next/server/chunks/ssr/[root-of-the-server]__c3c963c6._.js.map +0 -1
  223. package/web/.next/server/chunks/ssr/[root-of-the-server]__f0d8d054._.js.map +0 -1
  224. package/web/.next/server/chunks/ssr/_5860e4e2._.js +0 -3
  225. package/web/.next/server/chunks/ssr/_5860e4e2._.js.map +0 -1
  226. package/web/.next/server/chunks/ssr/_752e01fd._.js +0 -3
  227. package/web/.next/server/chunks/ssr/_887258d0._.js +0 -3
  228. package/web/.next/server/chunks/ssr/_887258d0._.js.map +0 -1
  229. package/web/.next/server/chunks/ssr/_cf366ac8._.js +0 -3
  230. package/web/.next/server/chunks/ssr/_cf366ac8._.js.map +0 -1
  231. package/web/.next/server/chunks/ssr/_f38b49fe._.js +0 -3
  232. package/web/.next/server/chunks/ssr/_f38b49fe._.js.map +0 -1
  233. package/web/.next/server/chunks/ssr/node_modules__pnpm_07f6911c._.js +0 -3
  234. package/web/.next/server/chunks/ssr/node_modules__pnpm_07f6911c._.js.map +0 -1
  235. package/web/.next/server/chunks/ssr/src_presentation_web_components_5124369c._.js +0 -3
  236. package/web/.next/server/chunks/ssr/src_presentation_web_components_5124369c._.js.map +0 -1
  237. package/web/.next/static/chunks/30c827a88342741e.js +0 -1
  238. package/web/.next/static/chunks/50f89c3112f6dd23.css +0 -2
  239. package/web/.next/static/chunks/a1c2ecb710b44081.js +0 -1
  240. package/web/.next/static/chunks/c2e2e1720b4f9a1a.js +0 -1
  241. package/web/.next/static/chunks/e49abd7c0c1cdef2.js +0 -11
  242. /package/web/.next/static/{VCU_mY2u0y_7bLsvmLjyS → CZ_pvgAQvNcqahRvqx3fv}/_buildManifest.js +0 -0
  243. /package/web/.next/static/{VCU_mY2u0y_7bLsvmLjyS → CZ_pvgAQvNcqahRvqx3fv}/_clientMiddlewareManifest.json +0 -0
  244. /package/web/.next/static/{VCU_mY2u0y_7bLsvmLjyS → CZ_pvgAQvNcqahRvqx3fv}/_ssgManifest.js +0 -0
@@ -0,0 +1,11 @@
1
+ /** Skip static pre-rendering since we need runtime DI container. */
2
+ export declare const dynamic = "force-dynamic";
3
+ interface FeatureDrawerTabPageProps {
4
+ params: Promise<{
5
+ featureId: string;
6
+ tab: string;
7
+ }>;
8
+ }
9
+ export default function FeatureDrawerTabPage({ params }: FeatureDrawerTabPageProps): Promise<import("react/jsx-runtime").JSX.Element | null>;
10
+ export {};
11
+ //# sourceMappingURL=page.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"page.d.ts","sourceRoot":"","sources":["../../../../../../../../../../src/presentation/web/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page.tsx"],"names":[],"mappings":"AAaA,oEAAoE;AACpE,eAAO,MAAM,OAAO,kBAAkB,CAAC;AAEvC,UAAU,yBAAyB;IACjC,MAAM,EAAE,OAAO,CAAC;QAAE,SAAS,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CACrD;AAED,wBAA8B,oBAAoB,CAAC,EAAE,MAAM,EAAE,EAAE,yBAAyB,2DA8CvF"}
@@ -0,0 +1,49 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { resolve } from '../../../../../../lib/server-container.js';
3
+ import { buildFeatureNodeData } from '../../../../../build-feature-node-data.js';
4
+ import { computeDrawerView, parseTabKey, } from '../../../../../../components/common/control-center-drawer/drawer-view.js';
5
+ import { FeatureDrawerClient } from '../../../../../../components/common/control-center-drawer/feature-drawer-client.js';
6
+ /** Skip static pre-rendering since we need runtime DI container. */
7
+ export const dynamic = 'force-dynamic';
8
+ export default async function FeatureDrawerTabPage({ params }) {
9
+ const { featureId, tab } = await params;
10
+ const urlTab = parseTabKey(tab);
11
+ try {
12
+ const featureRepo = resolve('IFeatureRepository');
13
+ const agentRunRepo = resolve('IAgentRunRepository');
14
+ const repoRepo = resolve('IRepositoryRepository');
15
+ const gitPrService = resolve('IGitPrService');
16
+ const feature = await featureRepo.findById(featureId);
17
+ if (!feature)
18
+ return null;
19
+ const run = feature.agentRunId ? await agentRunRepo.findById(feature.agentRunId) : null;
20
+ const getArtifact = resolve('GetFeatureArtifactUseCase');
21
+ const [repo, baseBranch, artifact, remoteUrl] = await Promise.all([
22
+ repoRepo.findByPath(feature.repositoryPath).catch(() => null),
23
+ gitPrService.getDefaultBranch(feature.repositoryPath).catch(() => 'main'),
24
+ getArtifact.execute(featureId).catch(() => null),
25
+ gitPrService.getRemoteUrl(feature.repositoryPath).catch(() => null),
26
+ ]);
27
+ const nodeData = buildFeatureNodeData(feature, run, {
28
+ repositoryName: repo?.name,
29
+ baseBranch,
30
+ oneLiner: artifact?.oneLiner,
31
+ remoteUrl: remoteUrl ?? undefined,
32
+ });
33
+ const view = computeDrawerView({
34
+ selectedNode: nodeData,
35
+ isCreateDrawerOpen: false,
36
+ pendingRepositoryPath: '',
37
+ pendingParentFeatureId: undefined,
38
+ selectedRepoNode: null,
39
+ features: [],
40
+ workflowDefaults: undefined,
41
+ });
42
+ if (!view)
43
+ return null;
44
+ return _jsx(FeatureDrawerClient, { view: view, urlTab: urlTab });
45
+ }
46
+ catch {
47
+ return null;
48
+ }
49
+ }
@@ -0,0 +1,3 @@
1
+ /** Children slot stub — canvas is rendered by the layout. */
2
+ export default function FeatureTabPage(): null;
3
+ //# sourceMappingURL=page.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"page.d.ts","sourceRoot":"","sources":["../../../../../../../../../src/presentation/web/app/(dashboard)/feature/[featureId]/[tab]/page.tsx"],"names":[],"mappings":"AAAA,6DAA6D;AAC7D,MAAM,CAAC,OAAO,UAAU,cAAc,SAErC"}
@@ -0,0 +1,4 @@
1
+ /** Children slot stub — canvas is rendered by the layout. */
2
+ export default function FeatureTabPage() {
3
+ return null;
4
+ }
@@ -1,7 +1,17 @@
1
+ export interface AcceptanceCriterionData {
2
+ description: string;
3
+ verified: boolean;
4
+ }
5
+ export interface ActionItemData {
6
+ name: string;
7
+ description: string;
8
+ acceptanceCriteria: AcceptanceCriterionData[];
9
+ }
1
10
  export interface PlanTaskData {
2
11
  title: string;
3
12
  description: string;
4
13
  state: string;
14
+ actionItems: ActionItemData[];
5
15
  }
6
16
  export interface PlanData {
7
17
  state: string;
@@ -1 +1 @@
1
- {"version":3,"file":"get-feature-plan.d.ts","sourceRoot":"","sources":["../../../../../../src/presentation/web/app/actions/get-feature-plan.ts"],"names":[],"mappings":"AAKA,MAAM,WAAW,YAAY;IAC3B,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,QAAQ;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,YAAY,EAAE,CAAC;CACvB;AAED,KAAK,aAAa,GAAG;IAAE,IAAI,EAAE,QAAQ,GAAG,SAAS,CAAA;CAAE,GAAG;IAAE,KAAK,EAAE,MAAM,CAAA;CAAE,CAAC;AAExE,wBAAsB,cAAc,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,CAAC,CAgC9E"}
1
+ {"version":3,"file":"get-feature-plan.d.ts","sourceRoot":"","sources":["../../../../../../src/presentation/web/app/actions/get-feature-plan.ts"],"names":[],"mappings":"AAKA,MAAM,WAAW,uBAAuB;IACtC,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,OAAO,CAAC;CACnB;AAED,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,kBAAkB,EAAE,uBAAuB,EAAE,CAAC;CAC/C;AAED,MAAM,WAAW,YAAY;IAC3B,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,cAAc,EAAE,CAAC;CAC/B;AAED,MAAM,WAAW,QAAQ;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,YAAY,EAAE,CAAC;CACvB;AAED,KAAK,aAAa,GAAG;IAAE,IAAI,EAAE,QAAQ,GAAG,SAAS,CAAA;CAAE,GAAG;IAAE,KAAK,EAAE,MAAM,CAAA;CAAE,CAAC;AAExE,wBAAsB,cAAc,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,CAAC,CAwC9E"}
@@ -20,6 +20,14 @@ export async function getFeaturePlan(featureId) {
20
20
  title: t.title ?? '',
21
21
  description: t.description ?? '',
22
22
  state: t.state,
23
+ actionItems: (t.actionItems ?? []).map((ai) => ({
24
+ name: ai.name,
25
+ description: ai.description,
26
+ acceptanceCriteria: (ai.acceptanceCriteria ?? []).map((ac) => ({
27
+ description: ac.description,
28
+ verified: ac.verified,
29
+ })),
30
+ })),
23
31
  })),
24
32
  };
25
33
  return { plan };
@@ -0,0 +1,3 @@
1
+ import { NextResponse } from 'next/server';
2
+ export declare function POST(request: Request): Promise<NextResponse>;
3
+ //# sourceMappingURL=route.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"route.d.ts","sourceRoot":"","sources":["../../../../../../../../src/presentation/web/app/api/attachments/upload-from-path/route.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAoF3C,wBAAsB,IAAI,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,CAAC,YAAY,CAAC,CAmDlE"}
@@ -0,0 +1,120 @@
1
+ import { NextResponse } from 'next/server';
2
+ import { readFile } from 'fs/promises';
3
+ import { extname, basename } from 'path';
4
+ import { resolve as resolvePath } from 'path';
5
+ import { resolve } from '../../../../lib/server-container.js';
6
+ const MAX_FILE_SIZE = 10 * 1024 * 1024; // 10 MB
7
+ const ALLOWED_EXTENSIONS = new Set([
8
+ '.png',
9
+ '.jpg',
10
+ '.jpeg',
11
+ '.gif',
12
+ '.webp',
13
+ '.svg',
14
+ '.bmp',
15
+ '.ico',
16
+ '.pdf',
17
+ '.doc',
18
+ '.docx',
19
+ '.xls',
20
+ '.xlsx',
21
+ '.ppt',
22
+ '.pptx',
23
+ '.txt',
24
+ '.md',
25
+ '.csv',
26
+ '.json',
27
+ '.yaml',
28
+ '.yml',
29
+ '.xml',
30
+ '.ts',
31
+ '.tsx',
32
+ '.js',
33
+ '.jsx',
34
+ '.py',
35
+ '.rb',
36
+ '.go',
37
+ '.rs',
38
+ '.java',
39
+ '.c',
40
+ '.cpp',
41
+ '.h',
42
+ '.hpp',
43
+ '.cs',
44
+ '.swift',
45
+ '.kt',
46
+ '.html',
47
+ '.css',
48
+ '.scss',
49
+ '.less',
50
+ '.sh',
51
+ '.bash',
52
+ '.zsh',
53
+ '.fish',
54
+ '.toml',
55
+ '.ini',
56
+ '.cfg',
57
+ '.conf',
58
+ '.env',
59
+ '.zip',
60
+ '.tar',
61
+ '.gz',
62
+ '.log',
63
+ ]);
64
+ const MIME_MAP = {
65
+ '.png': 'image/png',
66
+ '.jpg': 'image/jpeg',
67
+ '.jpeg': 'image/jpeg',
68
+ '.gif': 'image/gif',
69
+ '.webp': 'image/webp',
70
+ '.svg': 'image/svg+xml',
71
+ '.bmp': 'image/bmp',
72
+ '.ico': 'image/x-icon',
73
+ '.pdf': 'application/pdf',
74
+ '.txt': 'text/plain',
75
+ '.md': 'text/markdown',
76
+ '.json': 'application/json',
77
+ '.yaml': 'text/yaml',
78
+ '.yml': 'text/yaml',
79
+ };
80
+ export async function POST(request) {
81
+ try {
82
+ const body = await request.json();
83
+ const { path, sessionId } = body;
84
+ if (!path || !sessionId) {
85
+ return NextResponse.json({ error: 'Missing required fields: path, sessionId' }, { status: 400 });
86
+ }
87
+ const ext = extname(path).toLowerCase();
88
+ if (ext && !ALLOWED_EXTENSIONS.has(ext)) {
89
+ return NextResponse.json({ error: `File type "${ext}" is not allowed` }, { status: 400 });
90
+ }
91
+ let buffer;
92
+ try {
93
+ buffer = await readFile(resolvePath(path));
94
+ }
95
+ catch {
96
+ return NextResponse.json({ error: 'File not found or unreadable' }, { status: 404 });
97
+ }
98
+ if (buffer.length > MAX_FILE_SIZE) {
99
+ return NextResponse.json({
100
+ error: `File exceeds 10 MB limit (${(buffer.length / 1024 / 1024).toFixed(1)} MB)`,
101
+ }, { status: 413 });
102
+ }
103
+ const filename = basename(path);
104
+ const mimeType = MIME_MAP[ext] ?? 'application/octet-stream';
105
+ const service = resolve('AttachmentStorageService');
106
+ const attachment = service.store(buffer, filename, mimeType, sessionId);
107
+ return NextResponse.json({
108
+ id: attachment.id,
109
+ name: attachment.name,
110
+ size: Number(attachment.size),
111
+ mimeType: attachment.mimeType,
112
+ path: attachment.path,
113
+ createdAt: attachment.createdAt,
114
+ });
115
+ }
116
+ catch (error) {
117
+ const message = error instanceof Error ? error.message : 'Upload failed';
118
+ return NextResponse.json({ error: message }, { status: 500 });
119
+ }
120
+ }
@@ -4,6 +4,10 @@ import type { ParentFeatureOption } from '../../common/feature-create-drawer/fea
4
4
  import type { WorkflowDefaults } from '../../../app/actions/get-workflow-defaults.js';
5
5
  /** Tab key matching FeatureDrawerTabs */
6
6
  export type FeatureTabKey = 'overview' | 'activity' | 'log' | 'plan' | 'prd-review' | 'tech-decisions' | 'product-decisions' | 'merge-review';
7
+ /** All valid tab key values — used for URL param validation. */
8
+ export declare const VALID_TAB_KEYS: ReadonlySet<string>;
9
+ /** Type-guard: returns the value as FeatureTabKey if valid, otherwise undefined. */
10
+ export declare function parseTabKey(value: string | null | undefined): FeatureTabKey | undefined;
7
11
  /**
8
12
  * Discriminated union representing every possible drawer state in the control center.
9
13
  * Only one view can be active at a time.
@@ -1 +1 @@
1
- {"version":3,"file":"drawer-view.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/web/components/common/control-center-drawer/drawer-view.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAC;AACxE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,qCAAqC,CAAC;AAC9E,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,iEAAiE,CAAC;AAC3G,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,qCAAqC,CAAC;AAE5E,yCAAyC;AACzC,MAAM,MAAM,aAAa,GACrB,UAAU,GACV,UAAU,GACV,KAAK,GACL,MAAM,GACN,YAAY,GACZ,gBAAgB,GAChB,mBAAmB,GACnB,cAAc,CAAC;AAEnB;;;GAGG;AACH,MAAM,MAAM,UAAU;AACpB,qEAAqE;AACnE;IAAE,IAAI,EAAE,SAAS,CAAC;IAAC,IAAI,EAAE,eAAe,CAAC;IAAC,UAAU,EAAE,aAAa,CAAA;CAAE;AACvE,4BAA4B;GAC1B;IACE,IAAI,EAAE,gBAAgB,CAAC;IACvB,cAAc,EAAE,MAAM,CAAC;IACvB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,QAAQ,EAAE,mBAAmB,EAAE,CAAC;IAChC,gBAAgB,CAAC,EAAE,gBAAgB,CAAC;CACrC;AACH,8BAA8B;GAC5B;IAAE,IAAI,EAAE,YAAY,CAAC;IAAC,IAAI,EAAE,kBAAkB,CAAA;CAAE,CAAC;AAErD,2DAA2D;AAC3D,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,eAAe,GAAG,aAAa,CAOrE;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,EAChC,YAAY,EACZ,kBAAkB,EAClB,qBAAqB,EACrB,sBAAsB,EACtB,gBAAgB,EAChB,QAAQ,EACR,gBAAgB,GACjB,EAAE;IACD,YAAY,EAAE,eAAe,GAAG,IAAI,CAAC;IACrC,kBAAkB,EAAE,OAAO,CAAC;IAC5B,qBAAqB,EAAE,MAAM,CAAC;IAC9B,sBAAsB,EAAE,MAAM,GAAG,SAAS,CAAC;IAC3C,gBAAgB,EAAE,kBAAkB,GAAG,IAAI,CAAC;IAC5C,QAAQ,EAAE,mBAAmB,EAAE,CAAC;IAChC,gBAAgB,EAAE,gBAAgB,GAAG,SAAS,CAAC;CAChD,GAAG,UAAU,GAAG,IAAI,CAoBpB"}
1
+ {"version":3,"file":"drawer-view.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/web/components/common/control-center-drawer/drawer-view.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAC;AACxE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,qCAAqC,CAAC;AAC9E,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,iEAAiE,CAAC;AAC3G,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,qCAAqC,CAAC;AAE5E,yCAAyC;AACzC,MAAM,MAAM,aAAa,GACrB,UAAU,GACV,UAAU,GACV,KAAK,GACL,MAAM,GACN,YAAY,GACZ,gBAAgB,GAChB,mBAAmB,GACnB,cAAc,CAAC;AAEnB,gEAAgE;AAChE,eAAO,MAAM,cAAc,EAAE,WAAW,CAAC,MAAM,CAS7C,CAAC;AAEH,oFAAoF;AACpF,wBAAgB,WAAW,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,aAAa,GAAG,SAAS,CAGvF;AAED;;;GAGG;AACH,MAAM,MAAM,UAAU;AACpB,qEAAqE;AACnE;IAAE,IAAI,EAAE,SAAS,CAAC;IAAC,IAAI,EAAE,eAAe,CAAC;IAAC,UAAU,EAAE,aAAa,CAAA;CAAE;AACvE,4BAA4B;GAC1B;IACE,IAAI,EAAE,gBAAgB,CAAC;IACvB,cAAc,EAAE,MAAM,CAAC;IACvB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,QAAQ,EAAE,mBAAmB,EAAE,CAAC;IAChC,gBAAgB,CAAC,EAAE,gBAAgB,CAAC;CACrC;AACH,8BAA8B;GAC5B;IAAE,IAAI,EAAE,YAAY,CAAC;IAAC,IAAI,EAAE,kBAAkB,CAAA;CAAE,CAAC;AAErD,2DAA2D;AAC3D,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,eAAe,GAAG,aAAa,CAOrE;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,EAChC,YAAY,EACZ,kBAAkB,EAClB,qBAAqB,EACrB,sBAAsB,EACtB,gBAAgB,EAChB,QAAQ,EACR,gBAAgB,GACjB,EAAE;IACD,YAAY,EAAE,eAAe,GAAG,IAAI,CAAC;IACrC,kBAAkB,EAAE,OAAO,CAAC;IAC5B,qBAAqB,EAAE,MAAM,CAAC;IAC9B,sBAAsB,EAAE,MAAM,GAAG,SAAS,CAAC;IAC3C,gBAAgB,EAAE,kBAAkB,GAAG,IAAI,CAAC;IAC5C,QAAQ,EAAE,mBAAmB,EAAE,CAAC;IAChC,gBAAgB,EAAE,gBAAgB,GAAG,SAAS,CAAC;CAChD,GAAG,UAAU,GAAG,IAAI,CAoBpB"}
@@ -1,3 +1,20 @@
1
+ /** All valid tab key values — used for URL param validation. */
2
+ export const VALID_TAB_KEYS = new Set([
3
+ 'overview',
4
+ 'activity',
5
+ 'log',
6
+ 'plan',
7
+ 'prd-review',
8
+ 'tech-decisions',
9
+ 'product-decisions',
10
+ 'merge-review',
11
+ ]);
12
+ /** Type-guard: returns the value as FeatureTabKey if valid, otherwise undefined. */
13
+ export function parseTabKey(value) {
14
+ if (value && VALID_TAB_KEYS.has(value))
15
+ return value;
16
+ return undefined;
17
+ }
1
18
  /** Derives the initial tab from node lifecycle + state. */
2
19
  export function deriveInitialTab(node) {
3
20
  if (node.lifecycle === 'requirements' && node.state === 'action-required')
@@ -1,6 +1,8 @@
1
- import type { DrawerView } from './drawer-view.js';
1
+ import type { DrawerView, FeatureTabKey } from './drawer-view.js';
2
2
  export interface FeatureDrawerClientProps {
3
3
  view: DrawerView;
4
+ /** Tab key extracted from the URL path segment (e.g. /feature/[id]/activity → 'activity'). */
5
+ urlTab?: FeatureTabKey;
4
6
  }
5
- export declare function FeatureDrawerClient({ view: initialView }: FeatureDrawerClientProps): import("react/jsx-runtime").JSX.Element;
7
+ export declare function FeatureDrawerClient({ view: initialView, urlTab }: FeatureDrawerClientProps): import("react/jsx-runtime").JSX.Element;
6
8
  //# sourceMappingURL=feature-drawer-client.d.ts.map
@@ -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":"AAqCA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAGhD,MAAM,WAAW,wBAAwB;IACvC,IAAI,EAAE,UAAU,CAAC;CAClB;AAED,wBAAgB,mBAAmB,CAAC,EAAE,IAAI,EAAE,WAAW,EAAE,EAAE,wBAAwB,2CA6hBlF"}
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":"AAqCA,OAAO,KAAK,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAG/D,MAAM,WAAW,wBAAwB;IACvC,IAAI,EAAE,UAAU,CAAC;IACjB,8FAA8F;IAC9F,MAAM,CAAC,EAAE,aAAa,CAAC;CACxB;AAED,wBAAgB,mBAAmB,CAAC,EAAE,IAAI,EAAE,WAAW,EAAE,MAAM,EAAE,EAAE,wBAAwB,2CA8hB1F"}
@@ -28,7 +28,7 @@ import { useFeatureActions } from '../../common/feature-drawer/use-feature-actio
28
28
  import { resolveSseEventUpdates } from '../../common/feature-node/derive-feature-state.js';
29
29
  import { deriveInitialTab } from './drawer-view.js';
30
30
  import { useArtifactFetch } from './use-artifact-fetch.js';
31
- export function FeatureDrawerClient({ view: initialView }) {
31
+ export function FeatureDrawerClient({ view: initialView, urlTab }) {
32
32
  const featureFlags = useFeatureFlags();
33
33
  const router = useRouter();
34
34
  const deleteSound = useSoundAction('delete');
@@ -323,7 +323,7 @@ export function FeatureDrawerClient({ view: initialView }) {
323
323
  // ── Body ──────────────────────────────────────────────────────────────
324
324
  let body = null;
325
325
  if (view.type === 'feature' && featureNode) {
326
- body = (_jsx(FeatureDrawerTabs, { featureNode: featureNode, featureId: featureNode.featureId, initialTab: view.initialTab, prdData: prdData, prdSelections: prdSelections, onPrdSelect: (qId, oId) => setPrdSelections((prev) => ({ ...prev, [qId]: oId })), onPrdApprove: handlePrdApprove, onPrdReject: handlePrdReject, isPrdLoading: isLoadingPrd, techData: techData, onTechApprove: handleTechApprove, onTechReject: handleTechReject, isTechLoading: isLoadingTech, productData: isLoadingTechProduct ? null : techProductData, mergeData: mergeData, onMergeApprove: handleMergeApprove, onMergeReject: handleMergeReject, isMergeLoading: isLoadingMerge, isRejecting: isRejecting, chatInput: chatInput, onChatInputChange: setChatInput }));
326
+ body = (_jsx(FeatureDrawerTabs, { featureNode: featureNode, featureId: featureNode.featureId, initialTab: view.initialTab, urlTab: urlTab, prdData: prdData, prdSelections: prdSelections, onPrdSelect: (qId, oId) => setPrdSelections((prev) => ({ ...prev, [qId]: oId })), onPrdApprove: handlePrdApprove, onPrdReject: handlePrdReject, isPrdLoading: isLoadingPrd, techData: techData, onTechApprove: handleTechApprove, onTechReject: handleTechReject, isTechLoading: isLoadingTech, productData: isLoadingTechProduct ? null : techProductData, mergeData: mergeData, onMergeApprove: handleMergeApprove, onMergeReject: handleMergeReject, isMergeLoading: isLoadingMerge, isRejecting: isRejecting, chatInput: chatInput, onChatInputChange: setChatInput }));
327
327
  }
328
328
  return (_jsx(BaseDrawer, { open: isOpen, onClose: attemptClose, size: "md", modal: false, header: header, "data-testid": view.type === 'feature' ? 'feature-drawer' : 'repository-drawer', children: body }));
329
329
  }
@@ -1 +1 @@
1
- {"version":3,"file":"feature-create-drawer.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/web/components/common/feature-create-drawer/feature-create-drawer.tsx"],"names":[],"mappings":"AAkBA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,qCAAqC,CAAC;AAI5E,YAAY,EAAE,cAAc,EAAE,MAAM,0DAA0D,CAAC;AAE/F,uFAAuF;AACvF,MAAM,WAAW,cAAc;IAC7B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,0DAA0D;AAC1D,MAAM,WAAW,mBAAmB;IAClC,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,oBAAoB;IACnC,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,cAAc,EAAE,CAAC;IAC9B,cAAc,EAAE,MAAM,CAAC;IACvB,aAAa,EAAE;QACb,QAAQ,EAAE,OAAO,CAAC;QAClB,SAAS,EAAE,OAAO,CAAC;QACnB,UAAU,EAAE,OAAO,CAAC;KACrB,CAAC;IACF,IAAI,EAAE,OAAO,CAAC;IACd,MAAM,EAAE,OAAO,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,0EAA0E;IAC1E,IAAI,EAAE,OAAO,CAAC;IACd,wDAAwD;IACxD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,mDAAmD;IACnD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AA+ED,MAAM,WAAW,wBAAwB;IACvC,IAAI,EAAE,OAAO,CAAC;IACd,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,QAAQ,EAAE,CAAC,IAAI,EAAE,oBAAoB,KAAK,IAAI,CAAC;IAC/C,cAAc,EAAE,MAAM,CAAC;IACvB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,gBAAgB,CAAC,EAAE,gBAAgB,CAAC;IACpC,qEAAqE;IACrE,QAAQ,CAAC,EAAE,mBAAmB,EAAE,CAAC;IACjC,kGAAkG;IAClG,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,8CAA8C;IAC9C,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,yCAAyC;IACzC,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,wBAAgB,mBAAmB,CAAC,EAClC,IAAI,EACJ,OAAO,EACP,QAAQ,EACR,cAAc,EACd,YAAoB,EACpB,gBAAgB,EAChB,QAAQ,EACR,eAAe,EACf,gBAAgB,EAChB,YAAY,GACb,EAAE,wBAAwB,2CAkjB1B"}
1
+ {"version":3,"file":"feature-create-drawer.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/web/components/common/feature-create-drawer/feature-create-drawer.tsx"],"names":[],"mappings":"AAkBA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,qCAAqC,CAAC;AAI5E,YAAY,EAAE,cAAc,EAAE,MAAM,0DAA0D,CAAC;AAE/F,uFAAuF;AACvF,MAAM,WAAW,cAAc;IAC7B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,0DAA0D;AAC1D,MAAM,WAAW,mBAAmB;IAClC,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,oBAAoB;IACnC,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,cAAc,EAAE,CAAC;IAC9B,cAAc,EAAE,MAAM,CAAC;IACvB,aAAa,EAAE;QACb,QAAQ,EAAE,OAAO,CAAC;QAClB,SAAS,EAAE,OAAO,CAAC;QACnB,UAAU,EAAE,OAAO,CAAC;KACrB,CAAC;IACF,IAAI,EAAE,OAAO,CAAC;IACd,MAAM,EAAE,OAAO,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,0EAA0E;IAC1E,IAAI,EAAE,OAAO,CAAC;IACd,wDAAwD;IACxD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,mDAAmD;IACnD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AA+ED,MAAM,WAAW,wBAAwB;IACvC,IAAI,EAAE,OAAO,CAAC;IACd,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,QAAQ,EAAE,CAAC,IAAI,EAAE,oBAAoB,KAAK,IAAI,CAAC;IAC/C,cAAc,EAAE,MAAM,CAAC;IACvB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,gBAAgB,CAAC,EAAE,gBAAgB,CAAC;IACpC,qEAAqE;IACrE,QAAQ,CAAC,EAAE,mBAAmB,EAAE,CAAC;IACjC,kGAAkG;IAClG,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,8CAA8C;IAC9C,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,yCAAyC;IACzC,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,wBAAgB,mBAAmB,CAAC,EAClC,IAAI,EACJ,OAAO,EACP,QAAQ,EACR,cAAc,EACd,YAAoB,EACpB,gBAAgB,EAChB,QAAQ,EACR,eAAe,EACf,gBAAgB,EAChB,YAAY,GACb,EAAE,wBAAwB,2CA6kB1B"}
@@ -289,20 +289,45 @@ export function FeatureCreateDrawer({ open, onClose, onSubmit, repositoryPath, i
289
289
  const handleAddFiles = useCallback(async () => {
290
290
  try {
291
291
  const files = await pickFiles();
292
- if (files) {
293
- setAttachments((prev) => {
294
- const existingPaths = new Set(prev.map((f) => f.path));
295
- const unique = files
296
- .filter((f) => !existingPaths.has(f.path))
297
- .map((f) => ({
298
- id: crypto.randomUUID(),
299
- name: f.name,
300
- size: f.size,
292
+ if (!files)
293
+ return;
294
+ for (const file of files) {
295
+ const tempId = crypto.randomUUID();
296
+ setAttachments((prev) => [
297
+ ...prev,
298
+ {
299
+ id: tempId,
300
+ name: file.name,
301
+ size: file.size,
301
302
  mimeType: 'application/octet-stream',
302
- path: f.path,
303
- }));
304
- return unique.length > 0 ? [...prev, ...unique] : prev;
305
- });
303
+ path: '',
304
+ loading: true,
305
+ },
306
+ ]);
307
+ try {
308
+ const res = await fetch('/api/attachments/upload-from-path', {
309
+ method: 'POST',
310
+ headers: { 'Content-Type': 'application/json' },
311
+ body: JSON.stringify({ path: file.path, sessionId: sessionIdRef.current }),
312
+ });
313
+ if (!res.ok) {
314
+ const body = await res.json().catch(() => ({ error: 'Upload failed' }));
315
+ setAttachments((prev) => prev.filter((a) => a.id !== tempId));
316
+ setUploadError(body.error ?? 'Upload failed');
317
+ return;
318
+ }
319
+ const uploaded = await res.json();
320
+ setAttachments((prev) => {
321
+ const isDupe = prev.some((a) => a.id !== tempId && a.path === uploaded.path);
322
+ if (isDupe)
323
+ return prev.filter((a) => a.id !== tempId);
324
+ return prev.map((a) => a.id === tempId ? { ...uploaded, id: tempId, loading: false } : a);
325
+ });
326
+ }
327
+ catch {
328
+ setAttachments((prev) => prev.filter((a) => a.id !== tempId));
329
+ setUploadError('Upload failed');
330
+ }
306
331
  }
307
332
  }
308
333
  catch {
@@ -8,6 +8,8 @@ export interface FeatureDrawerTabsProps {
8
8
  featureNode: FeatureNodeData;
9
9
  featureId: string;
10
10
  initialTab?: FeatureTabKey;
11
+ /** Tab key from URL path segment (e.g. /feature/[id]/activity → 'activity'). */
12
+ urlTab?: FeatureTabKey;
11
13
  prdData?: PrdQuestionnaireData | null;
12
14
  prdSelections?: Record<string, string>;
13
15
  onPrdSelect?: (questionId: string, optionId: string) => void;
@@ -27,5 +29,5 @@ export interface FeatureDrawerTabsProps {
27
29
  chatInput?: string;
28
30
  onChatInputChange?: (value: string) => void;
29
31
  }
30
- export declare function FeatureDrawerTabs({ featureNode, featureId, initialTab, prdData, prdSelections, onPrdSelect, onPrdApprove, onPrdReject, isPrdLoading, techData, onTechApprove, onTechReject, isTechLoading, productData, mergeData, onMergeApprove, onMergeReject, isMergeLoading, isRejecting, chatInput, onChatInputChange, }: FeatureDrawerTabsProps): import("react/jsx-runtime").JSX.Element;
32
+ export declare function FeatureDrawerTabs({ featureNode, featureId, initialTab, urlTab, prdData, prdSelections, onPrdSelect, onPrdApprove, onPrdReject, isPrdLoading, techData, onTechApprove, onTechReject, isTechLoading, productData, mergeData, onMergeApprove, onMergeReject, isMergeLoading, isRejecting, chatInput, onChatInputChange, }: FeatureDrawerTabsProps): import("react/jsx-runtime").JSX.Element;
31
33
  //# sourceMappingURL=feature-drawer-tabs.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"feature-drawer-tabs.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/web/components/common/feature-drawer-tabs/feature-drawer-tabs.tsx"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAC;AACxE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,uCAAuC,CAAC;AAClF,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,2CAA2C,CAAC;AACzF,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,+CAA+C,CAAC;AACjG,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAC;AAaxE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uDAAuD,CAAC;AAiD3F,MAAM,WAAW,sBAAsB;IACrC,WAAW,EAAE,eAAe,CAAC;IAC7B,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,aAAa,CAAC;IAG3B,OAAO,CAAC,EAAE,oBAAoB,GAAG,IAAI,CAAC;IACtC,aAAa,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACvC,WAAW,CAAC,EAAE,CAAC,UAAU,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;IAC7D,YAAY,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;IAC1C,WAAW,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;IACzC,YAAY,CAAC,EAAE,OAAO,CAAC;IAGvB,QAAQ,CAAC,EAAE,uBAAuB,GAAG,IAAI,CAAC;IAC1C,aAAa,CAAC,EAAE,MAAM,IAAI,CAAC;IAC3B,YAAY,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;IAC1C,aAAa,CAAC,EAAE,OAAO,CAAC;IAGxB,WAAW,CAAC,EAAE,2BAA2B,GAAG,IAAI,CAAC;IAGjD,SAAS,CAAC,EAAE,eAAe,GAAG,IAAI,CAAC;IACnC,cAAc,CAAC,EAAE,MAAM,IAAI,CAAC;IAC5B,aAAa,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;IAC3C,cAAc,CAAC,EAAE,OAAO,CAAC;IAGzB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,iBAAiB,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CAC7C;AAwBD,wBAAgB,iBAAiB,CAAC,EAChC,WAAW,EACX,SAAS,EACT,UAAU,EACV,OAAO,EACP,aAAa,EACb,WAAW,EACX,YAAY,EACZ,WAAW,EACX,YAAY,EACZ,QAAQ,EACR,aAAa,EACb,YAAY,EACZ,aAAa,EACb,WAAW,EACX,SAAS,EACT,cAAc,EACd,aAAa,EACb,cAAc,EACd,WAAW,EACX,SAAS,EACT,iBAAiB,GAClB,EAAE,sBAAsB,2CA4MxB"}
1
+ {"version":3,"file":"feature-drawer-tabs.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/web/components/common/feature-drawer-tabs/feature-drawer-tabs.tsx"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAC;AACxE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,uCAAuC,CAAC;AAClF,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,2CAA2C,CAAC;AACzF,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,+CAA+C,CAAC;AACjG,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAC;AAaxE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uDAAuD,CAAC;AAiD3F,MAAM,WAAW,sBAAsB;IACrC,WAAW,EAAE,eAAe,CAAC;IAC7B,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,aAAa,CAAC;IAC3B,gFAAgF;IAChF,MAAM,CAAC,EAAE,aAAa,CAAC;IAGvB,OAAO,CAAC,EAAE,oBAAoB,GAAG,IAAI,CAAC;IACtC,aAAa,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACvC,WAAW,CAAC,EAAE,CAAC,UAAU,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;IAC7D,YAAY,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;IAC1C,WAAW,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;IACzC,YAAY,CAAC,EAAE,OAAO,CAAC;IAGvB,QAAQ,CAAC,EAAE,uBAAuB,GAAG,IAAI,CAAC;IAC1C,aAAa,CAAC,EAAE,MAAM,IAAI,CAAC;IAC3B,YAAY,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;IAC1C,aAAa,CAAC,EAAE,OAAO,CAAC;IAGxB,WAAW,CAAC,EAAE,2BAA2B,GAAG,IAAI,CAAC;IAGjD,SAAS,CAAC,EAAE,eAAe,GAAG,IAAI,CAAC;IACnC,cAAc,CAAC,EAAE,MAAM,IAAI,CAAC;IAC5B,aAAa,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;IAC3C,cAAc,CAAC,EAAE,OAAO,CAAC;IAGzB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,iBAAiB,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CAC7C;AAwBD,wBAAgB,iBAAiB,CAAC,EAChC,WAAW,EACX,SAAS,EACT,UAAU,EACV,MAAM,EACN,OAAO,EACP,aAAa,EACb,WAAW,EACX,YAAY,EACZ,WAAW,EACX,YAAY,EACZ,QAAQ,EACR,aAAa,EACb,YAAY,EACZ,aAAa,EACb,WAAW,EACX,SAAS,EACT,cAAc,EACd,aAAa,EACb,cAAc,EACd,WAAW,EACX,SAAS,EACT,iBAAiB,GAClB,EAAE,sBAAsB,2CAwQxB"}
@@ -1,6 +1,7 @@
1
1
  'use client';
2
2
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
3
  import { useState, useEffect, useCallback, useRef, useMemo } from 'react';
4
+ import { usePathname } from 'next/navigation';
4
5
  import { Loader2, Check } from 'lucide-react';
5
6
  import { Tabs, TabsList, TabsTrigger, TabsContent } from '../../ui/tabs.js';
6
7
  import { getFeaturePhaseTimings } from '../../../app/actions/get-feature-phase-timings.js';
@@ -63,14 +64,74 @@ const TAB_FETCHERS = {
63
64
  activity: fetchActivity,
64
65
  plan: fetchPlan,
65
66
  };
66
- export function FeatureDrawerTabs({ featureNode, featureId, initialTab, prdData, prdSelections, onPrdSelect, onPrdApprove, onPrdReject, isPrdLoading, techData, onTechApprove, onTechReject, isTechLoading, productData, mergeData, onMergeApprove, onMergeReject, isMergeLoading, isRejecting, chatInput, onChatInputChange, }) {
67
+ export function FeatureDrawerTabs({ featureNode, featureId, initialTab, urlTab, prdData, prdSelections, onPrdSelect, onPrdApprove, onPrdReject, isPrdLoading, techData, onTechApprove, onTechReject, isTechLoading, productData, mergeData, onMergeApprove, onMergeReject, isMergeLoading, isRejecting, chatInput, onChatInputChange, }) {
68
+ const pathname = usePathname();
67
69
  const featureLogs = useFeatureLogs(featureId);
68
70
  const visibleTabs = useMemo(() => computeVisibleTabs(featureNode), [featureNode]);
69
71
  const visibleTabDefs = useMemo(() => ALL_TABS.filter((t) => visibleTabs.includes(t.key)), [visibleTabs]);
70
- // Use initialTab if it's visible, otherwise default to 'overview'
71
- const effectiveInitial = initialTab && visibleTabs.includes(initialTab) ? initialTab : 'overview';
72
+ // Derive the base path (without tab segment) from the current pathname.
73
+ // e.g. /feature/abc123/activity /feature/abc123
74
+ const basePath = useMemo(() => {
75
+ const match = pathname.match(/^(\/feature\/[^/]+)/);
76
+ return match ? match[1] : pathname;
77
+ }, [pathname]);
78
+ // Resolve the effective initial tab: URL path tab > initialTab prop > 'overview'
79
+ const effectiveInitial = useMemo(() => {
80
+ if (urlTab && visibleTabs.includes(urlTab))
81
+ return urlTab;
82
+ if (initialTab && visibleTabs.includes(initialTab))
83
+ return initialTab;
84
+ return 'overview';
85
+ // Only compute on mount — subsequent changes are handled by effects below
86
+ // eslint-disable-next-line react-hooks/exhaustive-deps
87
+ }, []);
72
88
  const [activeTab, setActiveTab] = useState(effectiveInitial);
73
89
  const { tabs, fetchTab, refreshTab } = useTabDataFetch(featureId, TAB_FETCHERS);
90
+ // Sync URL when active tab changes via user interaction.
91
+ // Use window.history.pushState instead of router.push to avoid triggering a
92
+ // server component re-render (which would remount the drawer).
93
+ const isUserInteraction = useRef(false);
94
+ useEffect(() => {
95
+ if (!isUserInteraction.current)
96
+ return;
97
+ isUserInteraction.current = false;
98
+ // Build the target URL from the base path + tab segment
99
+ const targetUrl = activeTab === 'overview' ? basePath : `${basePath}/${activeTab}`;
100
+ // Only update URL if it actually changed
101
+ if (targetUrl !== pathname) {
102
+ window.history.pushState(null, '', targetUrl);
103
+ }
104
+ }, [activeTab, basePath, pathname]);
105
+ // Sync active tab from URL when pathname changes (e.g. browser back/forward).
106
+ // Skip on initial mount — the effectiveInitial handles that via urlTab prop.
107
+ const prevPathnameRef = useRef(pathname);
108
+ useEffect(() => {
109
+ if (prevPathnameRef.current === pathname)
110
+ return; // Skip initial mount
111
+ prevPathnameRef.current = pathname;
112
+ if (isUserInteraction.current)
113
+ return; // Skip — this is our own navigation
114
+ const segments = pathname.split('/');
115
+ // pathname is /feature/[id] or /feature/[id]/[tab]
116
+ const pathTab = segments.length >= 4 ? segments[3] : undefined;
117
+ const resolved = pathTab && visibleTabs.includes(pathTab) ? pathTab : 'overview';
118
+ if (resolved !== activeTab) {
119
+ setActiveTab(resolved);
120
+ if (resolved === 'activity' || resolved === 'plan') {
121
+ fetchTab(resolved);
122
+ }
123
+ }
124
+ }, [pathname]); // eslint-disable-line react-hooks/exhaustive-deps
125
+ // Trigger lazy fetch for URL-driven initial tab
126
+ const initialFetchDone = useRef(false);
127
+ useEffect(() => {
128
+ if (initialFetchDone.current)
129
+ return;
130
+ initialFetchDone.current = true;
131
+ if (activeTab === 'activity' || activeTab === 'plan') {
132
+ fetchTab(activeTab);
133
+ }
134
+ }, [activeTab, fetchTab]);
74
135
  // Reset tab when featureId changes
75
136
  const prevFeatureIdRef = useRef(featureId);
76
137
  useEffect(() => {
@@ -110,6 +171,7 @@ export function FeatureDrawerTabs({ featureNode, featureId, initialTab, prdData,
110
171
  }, [featureNode, refreshTab]);
111
172
  const handleTabChange = useCallback((value) => {
112
173
  const tab = value;
174
+ isUserInteraction.current = true;
113
175
  setActiveTab(tab);
114
176
  if (tab === 'activity' || tab === 'plan') {
115
177
  fetchTab(tab);
@@ -1 +1 @@
1
- {"version":3,"file":"plan-tab.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/web/components/common/feature-drawer-tabs/plan-tab.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,QAAQ,EAAgB,MAAM,gCAAgC,CAAC;AAE7E,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,QAAQ,GAAG,IAAI,CAAC;IACtB,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;CACtB;AAoBD,wBAAgB,OAAO,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,EAAE,YAAY,2CAgD7D"}
1
+ {"version":3,"file":"plan-tab.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/web/components/common/feature-drawer-tabs/plan-tab.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,gCAAgC,CAAC;AAE/D,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,QAAQ,GAAG,IAAI,CAAC;IACtB,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;CACtB;AAQD,wBAAgB,OAAO,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,EAAE,YAAY,2CAgD7D"}
@@ -1,20 +1,14 @@
1
1
  'use client';
2
2
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
- import { Loader2, Circle, Check, Eye } from 'lucide-react';
3
+ import { Loader2 } from 'lucide-react';
4
4
  import { AlertCircle, ListTodo } from 'lucide-react';
5
5
  import { Badge } from '../../ui/badge.js';
6
+ import { TaskProgressView } from '../../common/task-progress-view/index.js';
6
7
  const planStateBadgeStyles = {
7
8
  Requirements: 'border-transparent bg-blue-50 text-blue-700 hover:bg-blue-50',
8
9
  ClarificationRequired: 'border-transparent bg-amber-50 text-amber-700 hover:bg-amber-50',
9
10
  Ready: 'border-transparent bg-green-50 text-green-700 hover:bg-green-50',
10
11
  };
11
- const taskStateConfig = {
12
- Todo: { icon: Circle, colorClass: 'text-muted-foreground' },
13
- 'Work in Progress': { icon: Loader2, colorClass: 'text-blue-600', spinning: true },
14
- Done: { icon: Check, colorClass: 'text-emerald-600' },
15
- Review: { icon: Eye, colorClass: 'text-amber-600' },
16
- };
17
- const defaultTaskConfig = { icon: Circle, colorClass: 'text-muted-foreground' };
18
12
  export function PlanTab({ plan, loading, error }) {
19
13
  if (loading) {
20
14
  return (_jsx("div", { "data-testid": "plan-tab-loading", className: "flex items-center justify-center p-8", children: _jsx(Loader2, { className: "text-muted-foreground h-6 w-6 animate-spin" }) }));
@@ -25,16 +19,5 @@ export function PlanTab({ plan, loading, error }) {
25
19
  if (!plan) {
26
20
  return (_jsxs("div", { className: "flex flex-col items-center justify-center gap-2 p-8", children: [_jsx(ListTodo, { className: "text-muted-foreground h-8 w-8" }), _jsx("p", { className: "text-muted-foreground text-sm", children: "No plan created yet" })] }));
27
21
  }
28
- return (_jsxs("div", { className: "flex flex-col gap-4 p-4", children: [_jsxs("div", { className: "flex items-center gap-2", children: [_jsx("span", { className: "text-muted-foreground text-xs font-medium", children: "Plan State" }), _jsx(Badge, { className: planStateBadgeStyles[plan.state] ?? 'border-transparent bg-gray-50 text-gray-700', children: plan.state })] }), plan.overview ? (_jsxs("div", { className: "flex flex-col gap-1", children: [_jsx("span", { className: "text-muted-foreground text-xs font-medium", children: "Overview" }), _jsx("p", { className: "text-sm leading-relaxed", children: plan.overview })] })) : null, _jsx(TaskList, { tasks: plan.tasks })] }));
29
- }
30
- function TaskList({ tasks }) {
31
- if (tasks.length === 0) {
32
- return (_jsx("div", { className: "flex flex-col items-center justify-center gap-2 py-4", children: _jsx("p", { className: "text-muted-foreground text-sm", children: "No tasks defined yet" }) }));
33
- }
34
- return (_jsxs("div", { className: "flex flex-col gap-1", children: [_jsx("span", { className: "text-muted-foreground text-xs font-medium", children: "Tasks" }), _jsx("div", { "data-testid": "plan-task-list", className: "flex flex-col gap-2", children: tasks.map((task, index) => (_jsx(TaskItem, { task: task, index: index }, task.title || `task-${index}`))) })] }));
35
- }
36
- function TaskItem({ task, index }) {
37
- const config = taskStateConfig[task.state] ?? defaultTaskConfig;
38
- const Icon = config.icon;
39
- return (_jsxs("div", { "data-testid": `plan-task-${index}`, className: `flex items-start gap-2 rounded-md border px-3 py-2 ${config.colorClass}`, children: [_jsx(Icon, { className: `mt-0.5 h-4 w-4 shrink-0 ${config.spinning ? 'animate-spin' : ''}` }), _jsxs("div", { className: "flex min-w-0 flex-col gap-0.5", children: [_jsx("span", { className: "text-sm font-medium", children: task.title }), task.description ? (_jsx("span", { className: "text-muted-foreground text-xs", children: task.description })) : null] })] }));
22
+ return (_jsxs("div", { className: "flex flex-col gap-4 p-4", children: [_jsxs("div", { className: "flex items-center gap-2", children: [_jsx("span", { className: "text-muted-foreground text-xs font-medium", children: "Plan State" }), _jsx(Badge, { className: planStateBadgeStyles[plan.state] ?? 'border-transparent bg-gray-50 text-gray-700', children: plan.state })] }), plan.overview ? (_jsxs("div", { className: "flex flex-col gap-1", children: [_jsx("span", { className: "text-muted-foreground text-xs font-medium", children: "Overview" }), _jsx("p", { className: "text-sm leading-relaxed", children: plan.overview })] })) : null, _jsx(TaskProgressView, { tasks: plan.tasks })] }));
40
23
  }
@@ -1 +1 @@
1
- {"version":3,"file":"plan-tab.stories.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/web/components/common/feature-drawer-tabs/plan-tab.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAGrC,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,OAAO,CAc9B,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,OAAO,CAAC,CAAC;AA0HtC,6EAA6E;AAC7E,eAAO,MAAM,OAAO,EAAE,KAMrB,CAAC;AAEF,2BAA2B;AAC3B,eAAO,MAAM,YAAY,EAAE,KAM1B,CAAC;AAEF,wCAAwC;AACxC,eAAO,MAAM,SAAS,EAAE,KAMvB,CAAC;AAEF,wEAAwE;AACxE,eAAO,MAAM,qBAAqB,EAAE,KAMnC,CAAC;AAEF,mDAAmD;AACnD,eAAO,MAAM,OAAO,EAAE,KAMrB,CAAC;AAEF,qEAAqE;AACrE,eAAO,MAAM,OAAO,EAAE,KAMrB,CAAC;AAEF,yCAAyC;AACzC,eAAO,MAAM,KAAK,EAAE,KAMnB,CAAC;AAEF,0CAA0C;AAC1C,eAAO,MAAM,KAAK,EAAE,KAMnB,CAAC"}
1
+ {"version":3,"file":"plan-tab.stories.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/web/components/common/feature-drawer-tabs/plan-tab.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAGrC,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,OAAO,CAc9B,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,OAAO,CAAC,CAAC;AAoMtC,6EAA6E;AAC7E,eAAO,MAAM,OAAO,EAAE,KAMrB,CAAC;AAEF,2BAA2B;AAC3B,eAAO,MAAM,YAAY,EAAE,KAM1B,CAAC;AAEF,wCAAwC;AACxC,eAAO,MAAM,SAAS,EAAE,KAMvB,CAAC;AAEF,wEAAwE;AACxE,eAAO,MAAM,qBAAqB,EAAE,KAMnC,CAAC;AAEF,mDAAmD;AACnD,eAAO,MAAM,OAAO,EAAE,KAMrB,CAAC;AAEF,qEAAqE;AACrE,eAAO,MAAM,OAAO,EAAE,KAMrB,CAAC;AAEF,yCAAyC;AACzC,eAAO,MAAM,KAAK,EAAE,KAMnB,CAAC;AAEF,0CAA0C;AAC1C,eAAO,MAAM,KAAK,EAAE,KAMnB,CAAC"}