@shepai/cli 1.123.0-pr399.41eb3f6 → 1.123.0-pr400.4068079

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 (165) hide show
  1. package/dist/eslint.config.mjs +2 -0
  2. package/dist/src/presentation/web/components/common/control-center-drawer/feature-drawer-client.d.ts.map +1 -1
  3. package/dist/src/presentation/web/components/common/control-center-drawer/feature-drawer-client.js +28 -4
  4. package/dist/src/presentation/web/components/common/feature-drawer-tabs/feature-drawer-tabs.d.ts.map +1 -1
  5. package/dist/src/presentation/web/components/common/feature-drawer-tabs/feature-drawer-tabs.js +2 -1
  6. package/dist/src/presentation/web/components/common/feature-drawer-tabs/feature-running-controls.d.ts +12 -0
  7. package/dist/src/presentation/web/components/common/feature-drawer-tabs/feature-running-controls.d.ts.map +1 -0
  8. package/dist/src/presentation/web/components/common/feature-drawer-tabs/feature-running-controls.js +19 -0
  9. package/dist/src/presentation/web/components/common/feature-drawer-tabs/feature-running-controls.stories.d.ts +26 -0
  10. package/dist/src/presentation/web/components/common/feature-drawer-tabs/feature-running-controls.stories.d.ts.map +1 -0
  11. package/dist/src/presentation/web/components/common/feature-drawer-tabs/feature-running-controls.stories.js +91 -0
  12. package/dist/src/presentation/web/components/common/feature-drawer-tabs/overview-tab.d.ts.map +1 -1
  13. package/dist/src/presentation/web/components/common/feature-drawer-tabs/overview-tab.js +3 -9
  14. package/dist/src/presentation/web/components/common/feature-drawer-tabs/overview-tab.stories.d.ts +0 -4
  15. package/dist/src/presentation/web/components/common/feature-drawer-tabs/overview-tab.stories.d.ts.map +1 -1
  16. package/dist/src/presentation/web/components/common/feature-drawer-tabs/overview-tab.stories.js +0 -13
  17. package/dist/src/presentation/web/components/common/feature-node/feature-node.d.ts.map +1 -1
  18. package/dist/src/presentation/web/components/common/feature-node/feature-node.js +14 -6
  19. package/dist/src/presentation/web/components/common/feature-node/feature-node.stories.d.ts +1 -0
  20. package/dist/src/presentation/web/components/common/feature-node/feature-node.stories.d.ts.map +1 -1
  21. package/dist/src/presentation/web/components/common/feature-node/feature-node.stories.js +16 -0
  22. package/dist/src/presentation/web/hooks/use-deploy-action.d.ts.map +1 -1
  23. package/dist/src/presentation/web/hooks/use-deploy-action.js +0 -34
  24. package/dist/tsconfig.build.tsbuildinfo +1 -1
  25. package/package.json +1 -1
  26. package/web/.next/BUILD_ID +1 -1
  27. package/web/.next/build-manifest.json +2 -2
  28. package/web/.next/fallback-build-manifest.json +2 -2
  29. package/web/.next/prerender-manifest.json +3 -3
  30. package/web/.next/required-server-files.js +1 -1
  31. package/web/.next/required-server-files.json +1 -1
  32. package/web/.next/server/app/(dashboard)/@drawer/create/page/server-reference-manifest.json +22 -22
  33. package/web/.next/server/app/(dashboard)/@drawer/create/page.js.nft.json +1 -1
  34. package/web/.next/server/app/(dashboard)/@drawer/create/page_client-reference-manifest.js +1 -1
  35. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page/server-reference-manifest.json +28 -28
  36. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page.js.nft.json +1 -1
  37. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page_client-reference-manifest.js +1 -1
  38. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page/server-reference-manifest.json +28 -28
  39. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page.js.nft.json +1 -1
  40. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page_client-reference-manifest.js +1 -1
  41. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page/server-reference-manifest.json +20 -20
  42. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page.js.nft.json +1 -1
  43. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page_client-reference-manifest.js +1 -1
  44. package/web/.next/server/app/(dashboard)/create/page/server-reference-manifest.json +22 -22
  45. package/web/.next/server/app/(dashboard)/create/page.js.nft.json +1 -1
  46. package/web/.next/server/app/(dashboard)/create/page_client-reference-manifest.js +1 -1
  47. package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page/server-reference-manifest.json +28 -28
  48. package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page.js.nft.json +1 -1
  49. package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page_client-reference-manifest.js +1 -1
  50. package/web/.next/server/app/(dashboard)/feature/[featureId]/page/server-reference-manifest.json +28 -28
  51. package/web/.next/server/app/(dashboard)/feature/[featureId]/page.js.nft.json +1 -1
  52. package/web/.next/server/app/(dashboard)/feature/[featureId]/page_client-reference-manifest.js +1 -1
  53. package/web/.next/server/app/(dashboard)/page/server-reference-manifest.json +20 -20
  54. package/web/.next/server/app/(dashboard)/page.js.nft.json +1 -1
  55. package/web/.next/server/app/(dashboard)/page_client-reference-manifest.js +1 -1
  56. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page/server-reference-manifest.json +20 -20
  57. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page.js.nft.json +1 -1
  58. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page_client-reference-manifest.js +1 -1
  59. package/web/.next/server/app/_global-error.html +2 -2
  60. package/web/.next/server/app/_global-error.rsc +1 -1
  61. package/web/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
  62. package/web/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  63. package/web/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  64. package/web/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  65. package/web/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  66. package/web/.next/server/app/_not-found/page/server-reference-manifest.json +1 -1
  67. package/web/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  68. package/web/.next/server/app/api/attachments/preview/route.js.nft.json +1 -1
  69. package/web/.next/server/app/api/evidence/route.js.nft.json +1 -1
  70. package/web/.next/server/app/api/graph-data/route.js.nft.json +1 -1
  71. package/web/.next/server/app/settings/page/server-reference-manifest.json +6 -6
  72. package/web/.next/server/app/settings/page.js.nft.json +1 -1
  73. package/web/.next/server/app/settings/page_client-reference-manifest.js +1 -1
  74. package/web/.next/server/app/skills/page/server-reference-manifest.json +6 -6
  75. package/web/.next/server/app/skills/page.js.nft.json +1 -1
  76. package/web/.next/server/app/skills/page_client-reference-manifest.js +1 -1
  77. package/web/.next/server/app/tools/page/server-reference-manifest.json +6 -6
  78. package/web/.next/server/app/tools/page.js.nft.json +1 -1
  79. package/web/.next/server/app/tools/page_client-reference-manifest.js +1 -1
  80. package/web/.next/server/app/version/page/server-reference-manifest.json +1 -1
  81. package/web/.next/server/app/version/page_client-reference-manifest.js +1 -1
  82. package/web/.next/server/chunks/[root-of-the-server]__a402b567._.js +1 -1
  83. package/web/.next/server/chunks/ssr/744ca_web_components_common_control-center-drawer_create-drawer-client_tsx_5e26fc0a._.js +1 -1
  84. package/web/.next/server/chunks/ssr/744ca_web_components_common_control-center-drawer_create-drawer-client_tsx_5e26fc0a._.js.map +1 -1
  85. package/web/.next/server/chunks/ssr/8ba4b_server_app_(dashboard)_@drawer_repository_[repositoryId]_page_actions_f30d0343.js +1 -1
  86. package/web/.next/server/chunks/ssr/8ba4b_server_app_(dashboard)_@drawer_repository_[repositoryId]_page_actions_f30d0343.js.map +1 -1
  87. package/web/.next/server/chunks/ssr/8ba4b_server_app_(dashboard)_repository_[repositoryId]_page_actions_9f1775bb.js +1 -1
  88. package/web/.next/server/chunks/ssr/8ba4b_server_app_(dashboard)_repository_[repositoryId]_page_actions_9f1775bb.js.map +1 -1
  89. package/web/.next/server/chunks/ssr/[root-of-the-server]__06fef644._.js +1 -1
  90. package/web/.next/server/chunks/ssr/[root-of-the-server]__14664e9b._.js +2 -2
  91. package/web/.next/server/chunks/ssr/[root-of-the-server]__545792ab._.js +1 -1
  92. package/web/.next/server/chunks/ssr/[root-of-the-server]__545792ab._.js.map +1 -1
  93. package/web/.next/server/chunks/ssr/[root-of-the-server]__6b17a22d._.js +1 -1
  94. package/web/.next/server/chunks/ssr/[root-of-the-server]__6b17a22d._.js.map +1 -1
  95. package/web/.next/server/chunks/ssr/[root-of-the-server]__6bb00d90._.js +2 -2
  96. package/web/.next/server/chunks/ssr/[root-of-the-server]__6bb00d90._.js.map +1 -1
  97. package/web/.next/server/chunks/ssr/[root-of-the-server]__7cbda1ea._.js +1 -1
  98. package/web/.next/server/chunks/ssr/[root-of-the-server]__7cbda1ea._.js.map +1 -1
  99. package/web/.next/server/chunks/ssr/[root-of-the-server]__804c006d._.js +1 -1
  100. package/web/.next/server/chunks/ssr/[root-of-the-server]__804c006d._.js.map +1 -1
  101. package/web/.next/server/chunks/ssr/[root-of-the-server]__8c553503._.js +2 -2
  102. package/web/.next/server/chunks/ssr/[root-of-the-server]__9e8b25ad._.js +1 -1
  103. package/web/.next/server/chunks/ssr/[root-of-the-server]__9e8b25ad._.js.map +1 -1
  104. package/web/.next/server/chunks/ssr/[root-of-the-server]__a7de2711._.js +2 -2
  105. package/web/.next/server/chunks/ssr/[root-of-the-server]__aed1d6f8._.js +1 -1
  106. package/web/.next/server/chunks/ssr/[root-of-the-server]__aed1d6f8._.js.map +1 -1
  107. package/web/.next/server/chunks/ssr/[root-of-the-server]__ce6057f6._.js +1 -1
  108. package/web/.next/server/chunks/ssr/[root-of-the-server]__ce6057f6._.js.map +1 -1
  109. package/web/.next/server/chunks/ssr/{_223a713c._.js → _0eeb1fb9._.js} +2 -2
  110. package/web/.next/server/chunks/ssr/{_223a713c._.js.map → _0eeb1fb9._.js.map} +1 -1
  111. package/web/.next/server/chunks/ssr/_135edb9c._.js +3 -0
  112. package/web/.next/server/chunks/ssr/{_6328bfd6._.js.map → _135edb9c._.js.map} +1 -1
  113. package/web/.next/server/chunks/ssr/_2f6f48b8._.js +1 -1
  114. package/web/.next/server/chunks/ssr/_2f6f48b8._.js.map +1 -1
  115. package/web/.next/server/chunks/ssr/{_5cd2a694._.js → _4534f2fb._.js} +2 -2
  116. package/web/.next/server/chunks/ssr/_4534f2fb._.js.map +1 -0
  117. package/web/.next/server/chunks/ssr/_cc77a143._.js +3 -0
  118. package/web/.next/server/chunks/ssr/_cc77a143._.js.map +1 -0
  119. package/web/.next/server/chunks/ssr/_e9703421._.js +1 -1
  120. package/web/.next/server/chunks/ssr/_e9703421._.js.map +1 -1
  121. package/web/.next/server/chunks/ssr/b1a17_presentation_web_components_features_settings_settings-page-client_tsx_6ed9d5f8._.js +1 -1
  122. package/web/.next/server/chunks/ssr/b1a17_presentation_web_components_features_settings_settings-page-client_tsx_6ed9d5f8._.js.map +1 -1
  123. package/web/.next/server/chunks/ssr/src_presentation_web_5f039db1._.js +2 -2
  124. package/web/.next/server/chunks/ssr/src_presentation_web_5f039db1._.js.map +1 -1
  125. package/web/.next/server/chunks/ssr/{src_presentation_web_3dcac3bc._.js → src_presentation_web_94835cd9._.js} +2 -2
  126. package/web/.next/server/chunks/ssr/{src_presentation_web_3dcac3bc._.js.map → src_presentation_web_94835cd9._.js.map} +1 -1
  127. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_(dashboard)_page_actions_2a52b697.js +1 -1
  128. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_(dashboard)_page_actions_2a52b697.js.map +1 -1
  129. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_skills_page_actions_1fa8042e.js +1 -1
  130. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_skills_page_actions_1fa8042e.js.map +1 -1
  131. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_tools_page_actions_24684200.js +1 -1
  132. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_tools_page_actions_24684200.js.map +1 -1
  133. package/web/.next/server/chunks/ssr/src_presentation_web_c4337169._.js +2 -2
  134. package/web/.next/server/chunks/ssr/src_presentation_web_c4337169._.js.map +1 -1
  135. package/web/.next/server/chunks/ssr/src_presentation_web_components_bf50c527._.js +1 -1
  136. package/web/.next/server/chunks/ssr/src_presentation_web_components_de814675._.js +1 -1
  137. package/web/.next/server/chunks/ssr/src_presentation_web_components_features_control-center_7ac3562e._.js +1 -1
  138. package/web/.next/server/chunks/ssr/src_presentation_web_components_features_control-center_7ac3562e._.js.map +1 -1
  139. package/web/.next/server/pages/500.html +2 -2
  140. package/web/.next/server/server-reference-manifest.js +1 -1
  141. package/web/.next/server/server-reference-manifest.json +34 -34
  142. package/web/.next/static/chunks/080d81075ffb0190.js +1 -0
  143. package/web/.next/static/chunks/{d1e6c5bb743e3587.js → 09c0a62d51eaf54c.js} +2 -2
  144. package/web/.next/static/chunks/18333a0675917206.js +1 -0
  145. package/web/.next/static/chunks/4375e78a414529cc.js +1 -0
  146. package/web/.next/static/chunks/48fd4b6b2115677d.js +1 -0
  147. package/web/.next/static/chunks/{af09691e4d666285.js → 81dd2a468d937c85.js} +1 -1
  148. package/web/.next/static/chunks/{31c534b010db1201.js → 844c1e34a04d362c.js} +1 -1
  149. package/web/.next/static/chunks/{a14820d87c06b28e.js → 8bc01498cf09ba9d.js} +1 -1
  150. package/web/.next/static/chunks/bc68420a98367e99.css +1 -0
  151. package/web/.next/static/chunks/c9cfd7f8d973abad.js +2 -0
  152. package/web/.next/static/chunks/{03b829609cb3e4b1.js → db7302c21227d948.js} +1 -1
  153. package/web/.next/server/chunks/ssr/_4a948d3a._.js +0 -3
  154. package/web/.next/server/chunks/ssr/_4a948d3a._.js.map +0 -1
  155. package/web/.next/server/chunks/ssr/_5cd2a694._.js.map +0 -1
  156. package/web/.next/server/chunks/ssr/_6328bfd6._.js +0 -3
  157. package/web/.next/static/chunks/06dcf11946519cf7.js +0 -1
  158. package/web/.next/static/chunks/14ce5ffbb86dd80e.js +0 -1
  159. package/web/.next/static/chunks/2756e2f53da55fa1.js +0 -1
  160. package/web/.next/static/chunks/31cacff494356d30.js +0 -1
  161. package/web/.next/static/chunks/3925626b99dcd57a.css +0 -1
  162. package/web/.next/static/chunks/49d332348d0d7191.js +0 -2
  163. /package/web/.next/static/{5K1b8IucGUZnZ7EHoN8aO → Ik2ZjKg2IuFVlpPKt56km}/_buildManifest.js +0 -0
  164. /package/web/.next/static/{5K1b8IucGUZnZ7EHoN8aO → Ik2ZjKg2IuFVlpPKt56km}/_clientMiddlewareManifest.json +0 -0
  165. /package/web/.next/static/{5K1b8IucGUZnZ7EHoN8aO → Ik2ZjKg2IuFVlpPKt56km}/_ssgManifest.js +0 -0
@@ -45,6 +45,8 @@ export default tseslint.config(
45
45
  'packages/core/src/domain/generated/**', // TypeSpec-generated domain models (core)
46
46
  // TypeSpec (handled by tsp linter)
47
47
  'tsp/**',
48
+ // Spec YAML files (not JS/TS, handled by spec tooling)
49
+ 'specs/**',
48
50
  // Test outputs
49
51
  'test-results/**',
50
52
  'playwright-report/**',
@@ -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":"AAoCA,OAAO,KAAK,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAI/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,2CAkiB1F"}
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":"AAwCA,OAAO,KAAK,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAI/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,2CAslB1F"}
@@ -3,10 +3,11 @@ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-run
3
3
  import { useState, useCallback, useEffect, useRef } from 'react';
4
4
  import { useRouter, usePathname } from 'next/navigation';
5
5
  import { toast } from 'sonner';
6
- import { Loader2, Trash2, Copy, Check, Code2, ExternalLink } from 'lucide-react';
6
+ import { Loader2, Trash2, Play, Square, Copy, Check, Code2, ExternalLink } from 'lucide-react';
7
7
  import { approveFeature } from '../../../app/actions/approve-feature.js';
8
8
  import { resumeFeature } from '../../../app/actions/resume-feature.js';
9
9
  import { startFeature } from '../../../app/actions/start-feature.js';
10
+ import { stopFeature } from '../../../app/actions/stop-feature.js';
10
11
  import { rejectFeature } from '../../../app/actions/reject-feature.js';
11
12
  import { getFeatureArtifact } from '../../../app/actions/get-feature-artifact.js';
12
13
  import { getResearchArtifact } from '../../../app/actions/get-research-artifact.js';
@@ -14,11 +15,15 @@ import { getMergeReviewData } from '../../../app/actions/get-merge-review-data.j
14
15
  import { useFeatureFlags } from '../../../hooks/feature-flags-context.js';
15
16
  import { useSoundAction } from '../../../hooks/use-sound-action.js';
16
17
  import { useGuardedDrawerClose } from '../../../hooks/drawer-close-guard.js';
18
+ import { useDeployAction } from '../../../hooks/use-deploy-action.js';
17
19
  import { useAgentEventsContext } from '../../../hooks/agent-events-provider.js';
18
20
  import { BaseDrawer } from '../../common/base-drawer/index.js';
21
+ import { DeploymentStatusBadge } from '../../common/deployment-status-badge/index.js';
19
22
  import { DrawerTitle, DrawerDescription } from '../../ui/drawer.js';
20
23
  import { Button } from '../../ui/button.js';
24
+ import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from '../../ui/tooltip.js';
21
25
  import { DeleteFeatureDialog } from '../../common/delete-feature-dialog/index.js';
26
+ import { ActionButton } from '../../common/action-button/index.js';
22
27
  import { OpenActionMenu } from '../../common/open-action-menu/index.js';
23
28
  import { FeatureDrawerTabs } from '../../common/feature-drawer-tabs/index.js';
24
29
  import { useFeatureActions } from '../../common/feature-drawer/use-feature-actions.js';
@@ -296,6 +301,20 @@ export function FeatureDrawerClient({ view: initialView, urlTab }) {
296
301
  return { ...prev, node: { ...prev.node, state: 'running' } };
297
302
  });
298
303
  }, []);
304
+ const handleStop = useCallback(async (featureId) => {
305
+ const result = await stopFeature(featureId);
306
+ if (result.error) {
307
+ toast.error(result.error);
308
+ return;
309
+ }
310
+ toast.success('Feature stopped');
311
+ // Optimistically update the drawer view — agent run will be interrupted
312
+ setView((prev) => {
313
+ if (prev.type !== 'feature')
314
+ return prev;
315
+ return { ...prev, node: { ...prev.node, state: 'error' } };
316
+ });
317
+ }, []);
299
318
  // ── Hooks (always called unconditionally per Rules of Hooks) ──────────
300
319
  const featureActionsInput = featureNode?.repositoryPath && featureNode?.branch
301
320
  ? {
@@ -312,7 +331,9 @@ export function FeatureDrawerClient({ view: initialView, urlTab }) {
312
331
  repositoryPath: featureNode.repositoryPath,
313
332
  branch: featureNode.branch,
314
333
  }
315
- : undefined;
334
+ : null;
335
+ const deployAction = useDeployAction(featureDeployTarget);
336
+ const isFeatureDeployActive = deployAction.status === 'Booting' || deployAction.status === 'Ready';
316
337
  // ── Short ID copy ───────────────────────────────────────────────────
317
338
  const COPY_FEEDBACK_DELAY = 2000;
318
339
  const [idCopied, setIdCopied] = useState(false);
@@ -330,7 +351,7 @@ export function FeatureDrawerClient({ view: initialView, urlTab }) {
330
351
  const repoName = featureNode.repositoryName ??
331
352
  featureNode.repositoryPath.split('/').filter(Boolean).at(-1) ??
332
353
  '';
333
- header = (_jsxs(_Fragment, { children: [_jsxs("div", { "data-testid": "feature-drawer-header", children: [_jsx(DrawerTitle, { children: featureNode.name }), repoName ? (_jsxs("div", { className: "flex items-center gap-1.5 pt-0.5", children: [_jsx(Code2, { className: "text-muted-foreground size-3.5 shrink-0" }), featureNode.remoteUrl ? (_jsxs("a", { href: featureNode.remoteUrl, target: "_blank", rel: "noopener noreferrer", className: "text-muted-foreground hover:text-foreground inline-flex items-center gap-1 text-xs transition-colors", "data-testid": "feature-drawer-repo-link", children: [repoName, _jsx(ExternalLink, { className: "size-3" })] })) : (_jsx("span", { className: "text-muted-foreground text-xs", children: repoName }))] })) : null, _jsx(DrawerDescription, { className: "sr-only", children: featureNode.name })] }), featureActionsInput ? (_jsxs("div", { className: "flex items-center gap-2 pt-2", "data-testid": "feature-drawer-actions", children: [_jsx(OpenActionMenu, { actions: featureActions, repositoryPath: featureActionsInput.repositoryPath, showSpecs: !!featureActionsInput.specPath }), _jsxs("div", { className: "ml-auto flex items-center gap-1.5", children: [_jsx("code", { className: "bg-muted text-muted-foreground rounded px-1.5 py-0.5 font-mono text-xs", children: shortId }), _jsx("button", { type: "button", onClick: handleCopyId, className: "text-muted-foreground hover:text-foreground inline-flex items-center rounded p-0.5 transition-colors", "aria-label": "Copy feature ID", "data-testid": "feature-drawer-copy-id", children: idCopied ? (_jsx(Check, { className: "size-3.5 text-green-600" })) : (_jsx(Copy, { className: "size-3.5" })) })] }), featureNode.featureId ? (_jsxs(_Fragment, { children: [_jsx(Button, { variant: "ghost", size: "icon-sm", "aria-label": "Delete feature", disabled: isDeleting, className: "text-muted-foreground hover:text-destructive", "data-testid": "feature-drawer-delete", onClick: () => setDeleteDialogOpen(true), children: isDeleting ? (_jsx(Loader2, { className: "size-4 animate-spin" })) : (_jsx(Trash2, { className: "size-4" })) }), _jsx(DeleteFeatureDialog, { open: deleteDialogOpen, onOpenChange: setDeleteDialogOpen, onConfirm: (cleanup, cascadeDelete) => handleDelete(featureNode.featureId, cleanup, cascadeDelete), isDeleting: isDeleting, featureName: featureNode.name, featureId: featureNode.featureId, hasChildren: featureNode.hasChildren })] })) : null] })) : null] }));
354
+ header = (_jsxs(_Fragment, { children: [_jsxs("div", { "data-testid": "feature-drawer-header", children: [_jsx(DrawerTitle, { children: featureNode.name }), repoName ? (_jsxs("div", { className: "flex items-center gap-1.5 pt-0.5", children: [_jsx(Code2, { className: "text-muted-foreground size-3.5 shrink-0" }), featureNode.remoteUrl ? (_jsxs("a", { href: featureNode.remoteUrl, target: "_blank", rel: "noopener noreferrer", className: "text-muted-foreground hover:text-foreground inline-flex items-center gap-1 text-xs transition-colors", "data-testid": "feature-drawer-repo-link", children: [repoName, _jsx(ExternalLink, { className: "size-3" })] })) : (_jsx("span", { className: "text-muted-foreground text-xs", children: repoName }))] })) : null, _jsx(DrawerDescription, { className: "sr-only", children: featureNode.name })] }), featureActionsInput ? (_jsxs("div", { className: "flex items-center gap-2 pt-2", "data-testid": "feature-drawer-actions", children: [_jsx(OpenActionMenu, { actions: featureActions, repositoryPath: featureActionsInput.repositoryPath, showSpecs: !!featureActionsInput.specPath }), featureFlags.envDeploy && featureDeployTarget ? (_jsxs(_Fragment, { children: [_jsx(TooltipProvider, { children: _jsxs(Tooltip, { children: [_jsx(TooltipTrigger, { asChild: true, children: _jsx("span", { children: _jsx(ActionButton, { label: isFeatureDeployActive ? 'Stop Dev Server' : 'Start Dev Server', onClick: isFeatureDeployActive ? deployAction.stop : deployAction.deploy, loading: deployAction.deployLoading || deployAction.stopLoading, error: !!deployAction.deployError, icon: isFeatureDeployActive ? Square : Play, iconOnly: true, variant: "outline", size: "icon-sm" }) }) }), _jsx(TooltipContent, { children: isFeatureDeployActive ? 'Stop Dev Server' : 'Start Dev Server' })] }) }), isFeatureDeployActive ? (_jsx(DeploymentStatusBadge, { status: deployAction.status, url: deployAction.url, targetId: featureDeployTarget?.targetId })) : null] })) : null, _jsxs("div", { className: "ml-auto flex items-center gap-1.5", children: [_jsx("code", { className: "bg-muted text-muted-foreground rounded px-1.5 py-0.5 font-mono text-xs", children: shortId }), _jsx("button", { type: "button", onClick: handleCopyId, className: "text-muted-foreground hover:text-foreground inline-flex items-center rounded p-0.5 transition-colors", "aria-label": "Copy feature ID", "data-testid": "feature-drawer-copy-id", children: idCopied ? (_jsx(Check, { className: "size-3.5 text-green-600" })) : (_jsx(Copy, { className: "size-3.5" })) })] }), featureNode.featureId ? (_jsxs(_Fragment, { children: [_jsx(Button, { variant: "ghost", size: "icon-sm", "aria-label": "Delete feature", disabled: isDeleting, className: "text-muted-foreground hover:text-destructive", "data-testid": "feature-drawer-delete", onClick: () => setDeleteDialogOpen(true), children: isDeleting ? (_jsx(Loader2, { className: "size-4 animate-spin" })) : (_jsx(Trash2, { className: "size-4" })) }), _jsx(DeleteFeatureDialog, { open: deleteDialogOpen, onOpenChange: setDeleteDialogOpen, onConfirm: (cleanup, cascadeDelete) => handleDelete(featureNode.featureId, cleanup, cascadeDelete), isDeleting: isDeleting, featureName: featureNode.name, featureId: featureNode.featureId, hasChildren: featureNode.hasChildren })] })) : null] })) : null] }));
334
355
  }
335
356
  // ── Body ──────────────────────────────────────────────────────────────
336
357
  let body = null;
@@ -339,8 +360,11 @@ export function FeatureDrawerClient({ view: initialView, urlTab }) {
339
360
  ...featureNode,
340
361
  ...(featureNode.state === 'error' && { onRetry: handleRetry }),
341
362
  ...(featureNode.state === 'pending' && { onStart: handleStart }),
363
+ ...((featureNode.state === 'running' || featureNode.state === 'action-required') && {
364
+ onStop: handleStop,
365
+ }),
342
366
  };
343
367
  body = (_jsx(FeatureDrawerTabs, { featureNode: enrichedNode, featureId: featureNode.featureId, initialTab: view.initialTab, urlTab: urlTab, sseEvents: events, 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 }));
344
368
  }
345
- return (_jsx(BaseDrawer, { open: isOpen, onClose: attemptClose, size: "md", modal: false, header: header, deployTarget: featureFlags.envDeploy ? featureDeployTarget : undefined, "data-testid": view.type === 'feature' ? 'feature-drawer' : 'repository-drawer', children: body }));
369
+ return (_jsx(BaseDrawer, { open: isOpen, onClose: attemptClose, size: "md", modal: false, header: header, "data-testid": view.type === 'feature' ? 'feature-drawer' : 'repository-drawer', children: body }));
346
370
  }
@@ -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":"AAKA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,sCAAsC,CAAC;AAS9E,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;AAMxE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uCAAuC,CAAC;AAQ9E,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uDAAuD,CAAC;AA8C3F,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;IACvB,mFAAmF;IACnF,SAAS,CAAC,EAAE,SAAS,iBAAiB,EAAE,CAAC;IAGzC,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,EAAE,WAAW,EAAE,gBAAgB,EAAE,KAAK,IAAI,CAAC;IAC1E,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,EAAE,WAAW,EAAE,gBAAgB,EAAE,KAAK,IAAI,CAAC;IAC3E,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,EAAE,WAAW,EAAE,gBAAgB,EAAE,KAAK,IAAI,CAAC;IAC5E,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,EACjB,SAAS,GACV,EAAE,sBAAsB,2CA8UxB"}
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":"AAKA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,sCAAsC,CAAC;AAS9E,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;AAMxE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uCAAuC,CAAC;AAS9E,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uDAAuD,CAAC;AA8C3F,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;IACvB,mFAAmF;IACnF,SAAS,CAAC,EAAE,SAAS,iBAAiB,EAAE,CAAC;IAGzC,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,EAAE,WAAW,EAAE,gBAAgB,EAAE,KAAK,IAAI,CAAC;IAC1E,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,EAAE,WAAW,EAAE,gBAAgB,EAAE,KAAK,IAAI,CAAC;IAC3E,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,EAAE,WAAW,EAAE,gBAAgB,EAAE,KAAK,IAAI,CAAC;IAC5E,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,EACjB,SAAS,GACV,EAAE,sBAAsB,2CAgVxB"}
@@ -15,6 +15,7 @@ import { OverviewTab } from './overview-tab.js';
15
15
  import { ActivityTab } from './activity-tab.js';
16
16
  import { LogTab } from './log-tab.js';
17
17
  import { PlanTab } from './plan-tab.js';
18
+ import { FeatureRunningControls } from './feature-running-controls.js';
18
19
  import { useFeatureLogs } from '../../../hooks/use-feature-logs.js';
19
20
  import { useTabDataFetch } from './use-tab-data-fetch.js';
20
21
  /** All possible tabs in display order. */
@@ -241,7 +242,7 @@ export function FeatureDrawerTabs({ featureNode, featureId, initialTab, urlTab,
241
242
  fetchTab(tab);
242
243
  }
243
244
  }, [fetchTab]);
244
- return (_jsx("div", { className: "flex min-h-0 flex-1 flex-col", children: _jsxs(Tabs, { value: activeTab, onValueChange: handleTabChange, className: "flex min-h-0 flex-1 flex-col", children: [_jsx("div", { className: "shrink-0 overflow-x-auto px-4 pt-4", children: _jsx(TabsList, { className: "flex w-full", children: visibleTabDefs.map((tab) => (_jsx(TabsTrigger, { value: tab.key, className: "flex-1", children: tab.label }, tab.key))) }) }), _jsx(TabsContent, { value: "overview", className: "mt-0 flex-1 overflow-y-auto", children: _jsx(OverviewTab, { data: featureNode }) }), _jsx(TabsContent, { value: "activity", className: "mt-0 flex-1 overflow-y-auto", children: _jsx(ActivityTab, { timings: tabs.activity.data?.timings ?? null, loading: tabs.activity.loading, error: tabs.activity.error, rejectionFeedback: tabs.activity.data?.rejectionFeedback }) }), _jsx(TabsContent, { value: "log", className: "mt-0 flex-1 overflow-hidden", children: _jsx(LogTab, { content: featureLogs.content, isConnected: featureLogs.isConnected, error: featureLogs.error }) }), _jsx(TabsContent, { value: "plan", className: "mt-0 flex-1 overflow-y-auto", children: _jsx(PlanTab, { plan: tabs.plan.data, loading: tabs.plan.loading, error: tabs.plan.error }) }), visibleTabs.includes('prd-review') ? (_jsx(TabsContent, { value: "prd-review", className: "mt-0 flex min-h-0 flex-1 flex-col", children: prdData ? (_jsx(PrdQuestionnaire, { data: prdData, selections: prdSelections ?? {}, onSelect: onPrdSelect ?? (() => undefined), onApprove: onPrdApprove ?? (() => undefined), onReject: onPrdReject, isProcessing: isPrdLoading, isRejecting: isRejecting, chatInput: chatInput, onChatInputChange: onChatInputChange })) : (_jsx("div", { className: "flex items-center justify-center p-8", children: _jsx(Loader2, { className: "text-muted-foreground h-6 w-6 animate-spin" }) })) })) : null, visibleTabs.includes('tech-decisions') ? (_jsx(TabsContent, { value: "tech-decisions", className: "mt-0 flex min-h-0 flex-1 flex-col", children: techData ? (_jsxs("div", { className: "flex min-h-0 flex-1 flex-col", children: [_jsx("div", { className: "flex-1 overflow-y-auto", children: _jsx(TechDecisionsContent, { data: techData }) }), _jsx(DrawerActionBarForTech, { onApprove: onTechApprove ?? (() => undefined), onReject: onTechReject, isProcessing: isTechLoading, isRejecting: isRejecting, chatInput: chatInput, onChatInputChange: onChatInputChange })] })) : (_jsx("div", { className: "flex items-center justify-center p-8", children: _jsx(Loader2, { className: "text-muted-foreground h-6 w-6 animate-spin" }) })) })) : null, visibleTabs.includes('product-decisions') ? (_jsx(TabsContent, { value: "product-decisions", className: "mt-0 flex-1 overflow-y-auto", children: productData === null ? (_jsx("div", { className: "flex items-center justify-center p-8", 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." })) })) : null, visibleTabs.includes('merge-review') ? (_jsx(TabsContent, { value: "merge-review", className: "mt-0 flex min-h-0 flex-1 flex-col", children: mergeData ? (_jsx(MergeReview, { data: mergeData, readOnly: featureNode.lifecycle === 'maintain', onApprove: onMergeApprove ?? (() => undefined), onReject: onMergeReject, isProcessing: isMergeLoading, isRejecting: isRejecting, chatInput: chatInput, onChatInputChange: onChatInputChange })) : (_jsx("div", { className: "flex items-center justify-center p-8", children: _jsx(Loader2, { className: "text-muted-foreground h-6 w-6 animate-spin" }) })) })) : null] }) }));
245
+ return (_jsxs("div", { className: "flex min-h-0 flex-1 flex-col", children: [_jsx(FeatureRunningControls, { data: featureNode }), _jsxs(Tabs, { value: activeTab, onValueChange: handleTabChange, className: "flex min-h-0 flex-1 flex-col", children: [_jsx("div", { className: "shrink-0 overflow-x-auto px-4 pt-4", children: _jsx(TabsList, { className: "flex w-full", children: visibleTabDefs.map((tab) => (_jsx(TabsTrigger, { value: tab.key, className: "flex-1", children: tab.label }, tab.key))) }) }), _jsx(TabsContent, { value: "overview", className: "mt-0 flex-1 overflow-y-auto", children: _jsx(OverviewTab, { data: featureNode }) }), _jsx(TabsContent, { value: "activity", className: "mt-0 flex-1 overflow-y-auto", children: _jsx(ActivityTab, { timings: tabs.activity.data?.timings ?? null, loading: tabs.activity.loading, error: tabs.activity.error, rejectionFeedback: tabs.activity.data?.rejectionFeedback }) }), _jsx(TabsContent, { value: "log", className: "mt-0 flex-1 overflow-hidden", children: _jsx(LogTab, { content: featureLogs.content, isConnected: featureLogs.isConnected, error: featureLogs.error }) }), _jsx(TabsContent, { value: "plan", className: "mt-0 flex-1 overflow-y-auto", children: _jsx(PlanTab, { plan: tabs.plan.data, loading: tabs.plan.loading, error: tabs.plan.error }) }), visibleTabs.includes('prd-review') ? (_jsx(TabsContent, { value: "prd-review", className: "mt-0 flex min-h-0 flex-1 flex-col", children: prdData ? (_jsx(PrdQuestionnaire, { data: prdData, selections: prdSelections ?? {}, onSelect: onPrdSelect ?? (() => undefined), onApprove: onPrdApprove ?? (() => undefined), onReject: onPrdReject, isProcessing: isPrdLoading, isRejecting: isRejecting, chatInput: chatInput, onChatInputChange: onChatInputChange })) : (_jsx("div", { className: "flex items-center justify-center p-8", children: _jsx(Loader2, { className: "text-muted-foreground h-6 w-6 animate-spin" }) })) })) : null, visibleTabs.includes('tech-decisions') ? (_jsx(TabsContent, { value: "tech-decisions", className: "mt-0 flex min-h-0 flex-1 flex-col", children: techData ? (_jsxs("div", { className: "flex min-h-0 flex-1 flex-col", children: [_jsx("div", { className: "flex-1 overflow-y-auto", children: _jsx(TechDecisionsContent, { data: techData }) }), _jsx(DrawerActionBarForTech, { onApprove: onTechApprove ?? (() => undefined), onReject: onTechReject, isProcessing: isTechLoading, isRejecting: isRejecting, chatInput: chatInput, onChatInputChange: onChatInputChange })] })) : (_jsx("div", { className: "flex items-center justify-center p-8", children: _jsx(Loader2, { className: "text-muted-foreground h-6 w-6 animate-spin" }) })) })) : null, visibleTabs.includes('product-decisions') ? (_jsx(TabsContent, { value: "product-decisions", className: "mt-0 flex-1 overflow-y-auto", children: productData === null ? (_jsx("div", { className: "flex items-center justify-center p-8", 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." })) })) : null, visibleTabs.includes('merge-review') ? (_jsx(TabsContent, { value: "merge-review", className: "mt-0 flex min-h-0 flex-1 flex-col", children: mergeData ? (_jsx(MergeReview, { data: mergeData, readOnly: featureNode.lifecycle === 'maintain', onApprove: onMergeApprove ?? (() => undefined), onReject: onMergeReject, isProcessing: isMergeLoading, isRejecting: isRejecting, chatInput: chatInput, onChatInputChange: onChatInputChange })) : (_jsx("div", { className: "flex items-center justify-center p-8", children: _jsx(Loader2, { className: "text-muted-foreground h-6 w-6 animate-spin" }) })) })) : null] })] }));
245
246
  }
246
247
  // ── Private helper ──────────────────────────────────────────────────────
247
248
  function DrawerActionBarForTech({ onApprove, onReject, isProcessing, isRejecting, chatInput, onChatInputChange, }) {
@@ -0,0 +1,12 @@
1
+ import type { FeatureNodeData } from '../../common/feature-node/index.js';
2
+ interface FeatureRunningControlsProps {
3
+ data: FeatureNodeData;
4
+ }
5
+ /**
6
+ * Controls bar rendered above all feature drawer tabs.
7
+ * Shows the lifecycle phase label, current state badge, and context-appropriate
8
+ * action buttons (Stop, Retry, Start) regardless of which tab is active.
9
+ */
10
+ export declare function FeatureRunningControls({ data }: FeatureRunningControlsProps): import("react/jsx-runtime").JSX.Element;
11
+ export {};
12
+ //# sourceMappingURL=feature-running-controls.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"feature-running-controls.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/web/components/common/feature-drawer-tabs/feature-running-controls.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAC;AAExE,UAAU,2BAA2B;IACnC,IAAI,EAAE,eAAe,CAAC;CACvB;AAED;;;;GAIG;AACH,wBAAgB,sBAAsB,CAAC,EAAE,IAAI,EAAE,EAAE,2BAA2B,2CAuE3E"}
@@ -0,0 +1,19 @@
1
+ 'use client';
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import { RotateCcw, Square, Play } from 'lucide-react';
4
+ import { cn } from '../../../lib/utils.js';
5
+ import { CometSpinner } from '../../ui/comet-spinner.js';
6
+ import { featureNodeStateConfig, lifecycleDisplayLabels } from '../../common/feature-node/index.js';
7
+ /**
8
+ * Controls bar rendered above all feature drawer tabs.
9
+ * Shows the lifecycle phase label, current state badge, and context-appropriate
10
+ * action buttons (Stop, Retry, Start) regardless of which tab is active.
11
+ */
12
+ export function FeatureRunningControls({ data }) {
13
+ const config = featureNodeStateConfig[data.state];
14
+ const Icon = config.icon;
15
+ const isRunning = data.state === 'running' || data.state === 'action-required';
16
+ const isError = data.state === 'error';
17
+ const isPending = data.state === 'pending';
18
+ return (_jsxs("div", { "data-testid": "feature-drawer-controls", className: "flex shrink-0 items-center gap-2 border-b px-4 py-2.5", children: [_jsx("span", { className: "text-muted-foreground min-w-0 flex-1 truncate text-xs font-semibold tracking-widest uppercase", children: lifecycleDisplayLabels[data.lifecycle] }), _jsxs("div", { "data-testid": "feature-drawer-state-badge", className: cn('flex shrink-0 items-center gap-1.5 rounded-full px-2.5 py-1 text-xs font-medium', config.badgeBgClass, config.badgeClass), children: [data.state === 'running' ? (_jsx(CometSpinner, { size: "sm", className: "shrink-0" })) : (_jsx(Icon, { className: "h-3.5 w-3.5 shrink-0" })), _jsx("span", { children: config.label })] }), isRunning && data.onStop ? (_jsxs("button", { "data-testid": "feature-drawer-stop-button", onClick: () => data.onStop(data.featureId), className: "flex shrink-0 cursor-pointer items-center gap-1.5 rounded-full bg-red-50 px-3 py-1.5 text-xs font-medium text-red-700 transition-colors hover:bg-red-100", children: [_jsx(Square, { className: "h-3.5 w-3.5 fill-red-700" }), "Stop"] })) : null, isError && data.onRetry ? (_jsxs("button", { "data-testid": "feature-drawer-retry-button", onClick: () => data.onRetry(data.featureId), className: "flex shrink-0 cursor-pointer items-center gap-1.5 rounded-full bg-amber-50 px-3 py-1.5 text-xs font-medium text-amber-700 transition-colors hover:bg-amber-100", children: [_jsx(RotateCcw, { className: "h-3.5 w-3.5" }), "Retry"] })) : null, isPending && data.onStart ? (_jsxs("button", { "data-testid": "feature-drawer-start-button", onClick: () => data.onStart(data.featureId), className: "flex shrink-0 cursor-pointer items-center gap-1.5 rounded-full bg-emerald-50 px-3 py-1.5 text-xs font-medium text-emerald-700 transition-colors hover:bg-emerald-100", children: [_jsx(Play, { className: "h-3.5 w-3.5 fill-emerald-700" }), "Start"] })) : null] }));
19
+ }
@@ -0,0 +1,26 @@
1
+ import type { Meta, StoryObj } from '@storybook/react';
2
+ import { FeatureRunningControls } from './feature-running-controls.js';
3
+ declare const meta: Meta<typeof FeatureRunningControls>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof FeatureRunningControls>;
6
+ /** Running state — spinner in badge, Stop button visible. */
7
+ export declare const Running: Story;
8
+ /** Running state — no stop callback provided (button hidden). */
9
+ export declare const RunningNoStop: Story;
10
+ /** Action-required state — amber badge, Stop button visible. */
11
+ export declare const ActionRequired: Story;
12
+ /** Error state — red badge, Retry button visible. */
13
+ export declare const ErrorWithRetry: Story;
14
+ /** Error state — no retry callback (button hidden). */
15
+ export declare const ErrorNoRetry: Story;
16
+ /** Pending state — slate badge, Start button visible. */
17
+ export declare const PendingWithStart: Story;
18
+ /** Done state — emerald badge, no action button. */
19
+ export declare const Done: Story;
20
+ /** Blocked state — gray badge, no action button. */
21
+ export declare const Blocked: Story;
22
+ /** Creating state — blue badge, no action button. */
23
+ export declare const Creating: Story;
24
+ /** Long lifecycle label — truncates gracefully. */
25
+ export declare const LongLabel: Story;
26
+ //# sourceMappingURL=feature-running-controls.stories.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"feature-running-controls.stories.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/web/components/common/feature-drawer-tabs/feature-running-controls.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAEvD,OAAO,EAAE,sBAAsB,EAAE,MAAM,4BAA4B,CAAC;AAGpE,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,sBAAsB,CAc7C,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,sBAAsB,CAAC,CAAC;AAoBrD,6DAA6D;AAC7D,eAAO,MAAM,OAAO,EAAE,KAErB,CAAC;AAEF,iEAAiE;AACjE,eAAO,MAAM,aAAa,EAAE,KAE3B,CAAC;AAEF,gEAAgE;AAChE,eAAO,MAAM,cAAc,EAAE,KAS5B,CAAC;AAEF,qDAAqD;AACrD,eAAO,MAAM,cAAc,EAAE,KAE5B,CAAC;AAEF,uDAAuD;AACvD,eAAO,MAAM,YAAY,EAAE,KAE1B,CAAC;AAEF,yDAAyD;AACzD,eAAO,MAAM,gBAAgB,EAAE,KAS9B,CAAC;AAEF,oDAAoD;AACpD,eAAO,MAAM,IAAI,EAAE,KAElB,CAAC;AAEF,oDAAoD;AACpD,eAAO,MAAM,OAAO,EAAE,KAErB,CAAC;AAEF,qDAAqD;AACrD,eAAO,MAAM,QAAQ,EAAE,KAEtB,CAAC;AAEF,mDAAmD;AACnD,eAAO,MAAM,SAAS,EAAE,KASvB,CAAC"}
@@ -0,0 +1,91 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { fn } from '@storybook/test';
3
+ import { FeatureRunningControls } from './feature-running-controls.js';
4
+ const meta = {
5
+ title: 'Drawers/Feature/Tabs/FeatureRunningControls',
6
+ component: FeatureRunningControls,
7
+ tags: ['autodocs'],
8
+ parameters: {
9
+ layout: 'fullscreen',
10
+ },
11
+ decorators: [
12
+ (Story) => (_jsx("div", { style: { width: '560px', border: '1px solid var(--color-border)' }, children: _jsx(Story, {}) })),
13
+ ],
14
+ };
15
+ export default meta;
16
+ /* ---------------------------------------------------------------------------
17
+ * Data fixtures
18
+ * ------------------------------------------------------------------------- */
19
+ const base = {
20
+ name: 'Auth Module',
21
+ featureId: 'f1',
22
+ lifecycle: 'implementation',
23
+ state: 'running',
24
+ progress: 65,
25
+ repositoryPath: '/home/user/my-repo',
26
+ branch: 'feat/auth-module',
27
+ };
28
+ /* ---------------------------------------------------------------------------
29
+ * Stories — one per meaningful state
30
+ * ------------------------------------------------------------------------- */
31
+ /** Running state — spinner in badge, Stop button visible. */
32
+ export const Running = {
33
+ args: { data: { ...base, state: 'running', onStop: fn() } },
34
+ };
35
+ /** Running state — no stop callback provided (button hidden). */
36
+ export const RunningNoStop = {
37
+ args: { data: { ...base, state: 'running' } },
38
+ };
39
+ /** Action-required state — amber badge, Stop button visible. */
40
+ export const ActionRequired = {
41
+ args: {
42
+ data: {
43
+ ...base,
44
+ lifecycle: 'requirements',
45
+ state: 'action-required',
46
+ onStop: fn(),
47
+ },
48
+ },
49
+ };
50
+ /** Error state — red badge, Retry button visible. */
51
+ export const ErrorWithRetry = {
52
+ args: { data: { ...base, state: 'error', onRetry: fn() } },
53
+ };
54
+ /** Error state — no retry callback (button hidden). */
55
+ export const ErrorNoRetry = {
56
+ args: { data: { ...base, state: 'error' } },
57
+ };
58
+ /** Pending state — slate badge, Start button visible. */
59
+ export const PendingWithStart = {
60
+ args: {
61
+ data: {
62
+ ...base,
63
+ lifecycle: 'pending',
64
+ state: 'pending',
65
+ onStart: fn(),
66
+ },
67
+ },
68
+ };
69
+ /** Done state — emerald badge, no action button. */
70
+ export const Done = {
71
+ args: { data: { ...base, lifecycle: 'maintain', state: 'done', progress: 100 } },
72
+ };
73
+ /** Blocked state — gray badge, no action button. */
74
+ export const Blocked = {
75
+ args: { data: { ...base, state: 'blocked' } },
76
+ };
77
+ /** Creating state — blue badge, no action button. */
78
+ export const Creating = {
79
+ args: { data: { ...base, state: 'creating', lifecycle: 'requirements' } },
80
+ };
81
+ /** Long lifecycle label — truncates gracefully. */
82
+ export const LongLabel = {
83
+ args: {
84
+ data: {
85
+ ...base,
86
+ lifecycle: 'implementation',
87
+ state: 'running',
88
+ onStop: fn(),
89
+ },
90
+ },
91
+ };
@@ -1 +1 @@
1
- {"version":3,"file":"overview-tab.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/web/components/common/feature-drawer-tabs/overview-tab.tsx"],"names":[],"mappings":"AAwBA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAC;AAQxE,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,eAAe,CAAC;CACvB;AAED,wBAAgB,WAAW,CAAC,EAAE,IAAI,EAAE,EAAE,gBAAgB,2CA+DrD"}
1
+ {"version":3,"file":"overview-tab.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/web/components/common/feature-drawer-tabs/overview-tab.tsx"],"names":[],"mappings":"AAqBA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAC;AAQxE,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,eAAe,CAAC;CACvB;AAED,wBAAgB,WAAW,CAAC,EAAE,IAAI,EAAE,EAAE,gBAAgB,2CAqCrD"}
@@ -1,26 +1,20 @@
1
1
  'use client';
2
2
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
3
3
  import { useState, useEffect, useRef } from 'react';
4
- import { AlertTriangle, Check, ExternalLink, FileSearch, GitBranch, GitCommitHorizontal, RotateCcw, ShieldCheck, Square, X, Zap, } from 'lucide-react';
4
+ import { AlertTriangle, Check, ExternalLink, FileSearch, GitBranch, GitCommitHorizontal, ShieldCheck, X, Zap, } from 'lucide-react';
5
5
  import { InlineAttachments } from '../../common/inline-attachments/index.js';
6
6
  import { PrStatus } from '../../../../../../packages/core/src/domain/generated/output.js';
7
7
  import { cn } from '../../../lib/utils.js';
8
8
  import { Badge } from '../../ui/badge.js';
9
9
  import { Separator } from '../../ui/separator.js';
10
10
  import { CiStatusBadge } from '../../common/ci-status-badge/index.js';
11
- import { CometSpinner } from '../../ui/comet-spinner.js';
12
- import { featureNodeStateConfig, lifecycleDisplayLabels } from '../../common/feature-node/index.js';
11
+ import { featureNodeStateConfig } from '../../common/feature-node/index.js';
13
12
  import { getAgentTypeIcon, agentTypeLabels, } from '../../common/feature-node/agent-type-icons.js';
14
13
  import { getModelMeta } from '../../../lib/model-metadata.js';
15
14
  import { formatDuration } from '../../../lib/format-duration.js';
16
15
  export function OverviewTab({ data }) {
17
16
  const isCompleted = data.lifecycle === 'maintain';
18
- return (_jsxs(_Fragment, { 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[data.lifecycle] }), _jsxs("div", { className: "flex items-center gap-2", children: [_jsx(FeatureStateBadge, { data: data }), data.state === 'error' && data.onRetry ? (_jsxs("button", { "data-testid": "feature-drawer-retry-button", onClick: () => data.onRetry(data.featureId), className: "flex shrink-0 cursor-pointer items-center gap-1.5 rounded-full bg-red-50 px-3 py-1.5 text-sm font-medium text-red-700 transition-colors hover:bg-red-100", children: [_jsx(RotateCcw, { className: "h-3.5 w-3.5" }), "Retry"] })) : null, (data.state === 'running' || data.state === 'action-required') && data.onStop ? (_jsxs("button", { "data-testid": "feature-drawer-stop-button", onClick: () => data.onStop(data.featureId), className: "flex shrink-0 cursor-pointer items-center gap-1.5 rounded-full bg-red-50 px-3 py-1.5 text-sm font-medium text-red-700 transition-colors hover:bg-red-100", children: [_jsx(Square, { className: "h-3.5 w-3.5" }), "Stop"] })) : null] }), !isCompleted && data.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: [data.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[data.state].progressClass), style: { width: `${data.progress}%` } }) })] })) : null, isCompleted && data.pr ? _jsx(FeaturePrInfo, { pr: data.pr }) : null] }), _jsx(FeatureInfo, { data: data }), !isCompleted && data.pr ? (_jsxs(_Fragment, { children: [_jsx(Separator, {}), _jsx("div", { className: "p-4", children: _jsx(FeaturePrInfo, { pr: data.pr }) })] })) : null, _jsx(FeatureDetails, { data: data }), _jsx(FeatureSettings, { data: data })] }));
19
- }
20
- function FeatureStateBadge({ data }) {
21
- const config = featureNodeStateConfig[data.state];
22
- const Icon = config.icon;
23
- return (_jsxs("div", { className: cn('flex items-center gap-2 rounded-full px-3 py-1.5 text-sm font-medium', config.badgeBgClass, config.badgeClass), children: [data.state === 'running' ? (_jsx(CometSpinner, { size: "sm", className: "shrink-0" })) : (_jsx(Icon, { className: "h-4 w-4 shrink-0" })), _jsx("span", { children: config.label })] }));
17
+ return (_jsxs(_Fragment, { children: [_jsxs("div", { "data-testid": "feature-drawer-status", className: "flex flex-col gap-3 p-4", children: [!isCompleted && data.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: [data.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[data.state].progressClass), style: { width: `${data.progress}%` } }) })] })) : null, isCompleted && data.pr ? _jsx(FeaturePrInfo, { pr: data.pr }) : null] }), _jsx(FeatureInfo, { data: data }), !isCompleted && data.pr ? (_jsxs(_Fragment, { children: [_jsx(Separator, {}), _jsx("div", { className: "p-4", children: _jsx(FeaturePrInfo, { pr: data.pr }) })] })) : null, _jsx(FeatureDetails, { data: data }), _jsx(FeatureSettings, { data: data })] }));
24
18
  }
25
19
  // ── Feature Info section ─────────────────────────────────────────────
26
20
  function formatRelativeTime(timestamp) {
@@ -15,10 +15,6 @@ export declare const DoneWithMergedPr: Story;
15
15
  export declare const Blocked: Story;
16
16
  /** Error state showing error message detail. */
17
17
  export declare const Error: Story;
18
- /** Error state with retry button visible. */
19
- export declare const ErrorWithRetry: Story;
20
- /** Running state with stop button visible. */
21
- export declare const RunningWithStop: Story;
22
18
  /** Minimal data — only required fields, no optional details or PR. */
23
19
  export declare const Minimal: Story;
24
20
  /** Fast mode feature — shows lightning icon in details section. */
@@ -1 +1 @@
1
- {"version":3,"file":"overview-tab.stories.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/web/components/common/feature-drawer-tabs/overview-tab.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAGvD,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAG7C,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,WAAW,CAclC,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,WAAW,CAAC,CAAC;AA0G1C,uEAAuE;AACvE,eAAO,MAAM,OAAO,EAAE,KAErB,CAAC;AAEF,8CAA8C;AAC9C,eAAO,MAAM,IAAI,EAAE,KAElB,CAAC;AAEF,yDAAyD;AACzD,eAAO,MAAM,UAAU,EAAE,KAExB,CAAC;AAEF,wDAAwD;AACxD,eAAO,MAAM,gBAAgB,EAAE,KAE9B,CAAC;AAEF,iDAAiD;AACjD,eAAO,MAAM,OAAO,EAAE,KAErB,CAAC;AAEF,gDAAgD;AAChD,eAAO,MAAM,KAAK,EAAE,KAEnB,CAAC;AAOF,6CAA6C;AAC7C,eAAO,MAAM,cAAc,EAAE,KAE5B,CAAC;AAEF,8CAA8C;AAC9C,eAAO,MAAM,eAAe,EAAE,KAE7B,CAAC;AAEF,sEAAsE;AACtE,eAAO,MAAM,OAAO,EAAE,KAErB,CAAC;AAwBF,mEAAmE;AACnE,eAAO,MAAM,QAAQ,EAAE,KAEtB,CAAC;AAMF,0BAA0B;AAC1B,eAAO,MAAM,iBAAiB,EAAE,KAE/B,CAAC;AAEF,sBAAsB;AACtB,eAAO,MAAM,aAAa,EAAE,KAE3B,CAAC;AAEF,oBAAoB;AACpB,eAAO,MAAM,WAAW,EAAE,KAEzB,CAAC;AAEF,sBAAsB;AACtB,eAAO,MAAM,aAAa,EAAE,KAE3B,CAAC;AAEF,gEAAgE;AAChE,eAAO,MAAM,oBAAoB,EAAE,KAclC,CAAC;AAqBF,4DAA4D;AAC5D,eAAO,MAAM,sBAAsB,EAAE,KAEpC,CAAC;AAEF,sDAAsD;AACtD,eAAO,MAAM,gBAAgB,EAAE,KAO9B,CAAC;AAEF,+FAA+F;AAC/F,eAAO,MAAM,eAAe,EAAE,KAgB7B,CAAC;AAMF,oFAAoF;AACpF,eAAO,MAAM,eAAe,EAAE,KAY7B,CAAC;AAEF,kDAAkD;AAClD,eAAO,MAAM,uBAAuB,EAAE,KAYrC,CAAC;AAEF,mDAAmD;AACnD,eAAO,MAAM,uBAAuB,EAAE,KAYrC,CAAC;AAEF,2CAA2C;AAC3C,eAAO,MAAM,oBAAoB,EAAE,KAYlC,CAAC;AAEF,+DAA+D;AAC/D,eAAO,MAAM,mBAAmB,EAAE,KAQjC,CAAC"}
1
+ {"version":3,"file":"overview-tab.stories.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/web/components/common/feature-drawer-tabs/overview-tab.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAEvD,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAG7C,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,WAAW,CAclC,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,WAAW,CAAC,CAAC;AA0G1C,uEAAuE;AACvE,eAAO,MAAM,OAAO,EAAE,KAErB,CAAC;AAEF,8CAA8C;AAC9C,eAAO,MAAM,IAAI,EAAE,KAElB,CAAC;AAEF,yDAAyD;AACzD,eAAO,MAAM,UAAU,EAAE,KAExB,CAAC;AAEF,wDAAwD;AACxD,eAAO,MAAM,gBAAgB,EAAE,KAE9B,CAAC;AAEF,iDAAiD;AACjD,eAAO,MAAM,OAAO,EAAE,KAErB,CAAC;AAEF,gDAAgD;AAChD,eAAO,MAAM,KAAK,EAAE,KAEnB,CAAC;AAEF,sEAAsE;AACtE,eAAO,MAAM,OAAO,EAAE,KAErB,CAAC;AAwBF,mEAAmE;AACnE,eAAO,MAAM,QAAQ,EAAE,KAEtB,CAAC;AAMF,0BAA0B;AAC1B,eAAO,MAAM,iBAAiB,EAAE,KAE/B,CAAC;AAEF,sBAAsB;AACtB,eAAO,MAAM,aAAa,EAAE,KAE3B,CAAC;AAEF,oBAAoB;AACpB,eAAO,MAAM,WAAW,EAAE,KAEzB,CAAC;AAEF,sBAAsB;AACtB,eAAO,MAAM,aAAa,EAAE,KAE3B,CAAC;AAEF,gEAAgE;AAChE,eAAO,MAAM,oBAAoB,EAAE,KAclC,CAAC;AAqBF,4DAA4D;AAC5D,eAAO,MAAM,sBAAsB,EAAE,KAEpC,CAAC;AAEF,sDAAsD;AACtD,eAAO,MAAM,gBAAgB,EAAE,KAO9B,CAAC;AAEF,+FAA+F;AAC/F,eAAO,MAAM,eAAe,EAAE,KAgB7B,CAAC;AAMF,oFAAoF;AACpF,eAAO,MAAM,eAAe,EAAE,KAY7B,CAAC;AAEF,kDAAkD;AAClD,eAAO,MAAM,uBAAuB,EAAE,KAYrC,CAAC;AAEF,mDAAmD;AACnD,eAAO,MAAM,uBAAuB,EAAE,KAYrC,CAAC;AAEF,2CAA2C;AAC3C,eAAO,MAAM,oBAAoB,EAAE,KAYlC,CAAC;AAEF,+DAA+D;AAC/D,eAAO,MAAM,mBAAmB,EAAE,KAQjC,CAAC"}
@@ -1,5 +1,4 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
- import { fn } from '@storybook/test';
3
2
  import { PrStatus, CiStatus } from '../../../../../../packages/core/src/domain/generated/output.js';
4
3
  import { OverviewTab } from './overview-tab.js';
5
4
  const meta = {
@@ -133,18 +132,6 @@ export const Blocked = {
133
132
  export const Error = {
134
133
  args: { data: errorData },
135
134
  };
136
- const errorWithRetryData = {
137
- ...errorData,
138
- onRetry: fn(),
139
- };
140
- /** Error state with retry button visible. */
141
- export const ErrorWithRetry = {
142
- args: { data: errorWithRetryData },
143
- };
144
- /** Running state with stop button visible. */
145
- export const RunningWithStop = {
146
- args: { data: { ...fullData, onStop: fn() } },
147
- };
148
135
  /** Minimal data — only required fields, no optional details or PR. */
149
136
  export const Minimal = {
150
137
  args: { data: minimalData },
@@ -1 +1 @@
1
- {"version":3,"file":"feature-node.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/web/components/common/feature-node/feature-node.tsx"],"names":[],"mappings":"AAyBA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AA6DnE,wBAAgB,WAAW,CAAC,EAC1B,IAAI,EACJ,QAAQ,GACT,EAAE;IACD,IAAI,EAAE,eAAe,CAAC;IACtB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB,2CA8UA"}
1
+ {"version":3,"file":"feature-node.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/web/components/common/feature-node/feature-node.tsx"],"names":[],"mappings":"AAyBA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AA6DnE,wBAAgB,WAAW,CAAC,EAC1B,IAAI,EACJ,QAAQ,GACT,EAAE;IACD,IAAI,EAAE,eAAe,CAAC;IACtB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB,2CAiWA"}
@@ -80,16 +80,24 @@ export function FeatureNode({ data, selected, }) {
80
80
  ? 'BLOCKED'
81
81
  : data.state === 'pending'
82
82
  ? 'PENDING'
83
- : lifecycleDisplayLabels[data.lifecycle] }), _jsxs("div", { className: "flex items-center gap-0.5", children: [data.fastMode ? (_jsx(TooltipProvider, { children: _jsxs(Tooltip, { children: [_jsx(TooltipTrigger, { asChild: true, children: _jsx("span", { "data-testid": "feature-node-fast-mode-badge", className: "-mt-1 p-1", children: _jsx(Zap, { className: "h-3.5 w-3.5 text-amber-500" }) }) }), _jsx(TooltipContent, { side: "bottom", children: "Fast Mode" })] }) })) : null, data.agentType ? (_jsx(TooltipProvider, { children: _jsxs(Tooltip, { children: [_jsx(TooltipTrigger, { asChild: true, children: _jsx("button", { type: "button", "aria-label": agentTypeLabels[data.agentType] ?? data.agentType, "data-testid": "feature-node-agent-badge", onClick: (e) => {
83
+ : lifecycleDisplayLabels[data.lifecycle] }), _jsxs("div", { className: "flex items-center gap-0.5", children: [data.deployment ? (_jsx(TooltipProvider, { children: _jsxs(Tooltip, { children: [_jsx(TooltipTrigger, { asChild: true, children: _jsx("button", { type: "button", "aria-label": data.deployment.status === DeploymentState.Booting
84
+ ? 'Deploying'
85
+ : 'Open dev server', "data-testid": "feature-node-deployment-indicator", onClick: (e) => {
86
+ e.stopPropagation();
87
+ if (data.deployment?.status === DeploymentState.Ready &&
88
+ data.deployment.url) {
89
+ window.open(data.deployment.url, '_blank', 'noopener,noreferrer');
90
+ }
91
+ }, className: cn('nodrag -mt-1 p-1', data.deployment.status === DeploymentState.Ready && data.deployment.url
92
+ ? 'cursor-pointer opacity-80 transition-opacity hover:opacity-100'
93
+ : 'cursor-default'), children: data.deployment.status === DeploymentState.Booting ? (_jsx(Loader2, { className: "h-3.5 w-3.5 animate-spin text-blue-500" })) : (_jsx(Globe, { className: "h-3.5 w-3.5 text-green-600" })) }) }), _jsx(TooltipContent, { side: "bottom", children: data.deployment.status === DeploymentState.Booting
94
+ ? 'Deploying...'
95
+ : (data.deployment.url ?? 'Live') })] }) })) : null, data.fastMode ? (_jsx(TooltipProvider, { children: _jsxs(Tooltip, { children: [_jsx(TooltipTrigger, { asChild: true, children: _jsx("span", { "data-testid": "feature-node-fast-mode-badge", className: "-mt-1 p-1", children: _jsx(Zap, { className: "h-3.5 w-3.5 text-amber-500" }) }) }), _jsx(TooltipContent, { side: "bottom", children: "Fast Mode" })] }) })) : null, data.agentType ? (_jsx(TooltipProvider, { children: _jsxs(Tooltip, { children: [_jsx(TooltipTrigger, { asChild: true, children: _jsx("button", { type: "button", "aria-label": agentTypeLabels[data.agentType] ?? data.agentType, "data-testid": "feature-node-agent-badge", onClick: (e) => {
84
96
  e.stopPropagation();
85
97
  data.onSettings?.();
86
98
  }, className: cn('nodrag -mt-1 -mr-1 p-1', data.onSettings
87
99
  ? 'cursor-pointer opacity-80 transition-opacity hover:opacity-100'
88
- : 'cursor-default'), children: _jsx(AgentIcon, { agentType: data.agentType, className: "h-3.5 w-3.5" }) }) }), _jsxs(TooltipContent, { side: "bottom", children: [_jsx("span", { className: "font-medium", children: agentTypeLabels[data.agentType] ?? data.agentType }), data.modelId ? (_jsxs("span", { className: "ml-1 opacity-70", children: ["\u00B7 ", getModelMeta(data.modelId).displayName || data.modelId] })) : null] })] }) })) : null] })] }), _jsx("h3", { className: "mt-1 truncate text-sm font-bold", children: data.name }), data.description ? (_jsx("p", { "data-testid": "feature-node-description", className: "text-muted-foreground mt-0.5 truncate text-xs", children: data.description })) : null, data.deployment ? (_jsxs("div", { "data-testid": "feature-node-deployment-indicator", className: cn('mt-1.5 flex items-center gap-1.5 rounded-full px-2 py-0.5 text-[10px] font-medium', data.deployment.status === DeploymentState.Booting
89
- ? 'bg-blue-50 text-blue-700'
90
- : 'bg-green-50 text-green-700'), children: [data.deployment.status === DeploymentState.Booting ? (_jsx(Loader2, { className: "h-3 w-3 animate-spin" })) : (_jsx(Globe, { className: "h-3 w-3" })), _jsx("span", { className: "truncate", children: data.deployment.status === DeploymentState.Booting
91
- ? 'Deploying...'
92
- : (data.deployment.url ?? 'Live') })] })) : null, _jsx("div", { className: "mt-auto pt-2", children: data.state === 'deleting' ? (_jsxs(_Fragment, { children: [_jsxs("div", { className: "mt-1.5 flex items-center gap-1.5 text-xs", children: [_jsx(Trash2, { className: "h-3.5 w-3.5 shrink-0 text-gray-400" }), _jsx("span", { className: "text-muted-foreground", children: "Deleting\u2026" })] }), _jsx("div", { "data-testid": "feature-node-progress-bar", className: "bg-muted mt-1.5 h-1 w-full overflow-hidden rounded-full", children: _jsx("div", { className: "motion-safe:animate-indeterminate-progress bg-foreground/30 h-full w-1/3 rounded-full" }) })] })) : data.state === 'creating' ? (_jsxs(_Fragment, { children: [_jsxs("div", { className: "mt-1.5 flex items-center gap-1.5 text-xs", children: [_jsx(Icon, { className: "h-3.5 w-3.5 shrink-0 animate-spin" }), _jsx("span", { className: "text-muted-foreground", children: getBadgeText(data) })] }), _jsx("div", { "data-testid": "feature-node-progress-bar", className: "bg-muted mt-1.5 h-1 w-full overflow-hidden rounded-full", children: _jsx("div", { className: "motion-safe:animate-indeterminate-progress bg-foreground/30 h-full w-1/3 rounded-full" }) })] })) : data.state === 'running' ? (_jsxs(_Fragment, { children: [_jsxs("div", { className: "mt-1.5 flex items-center gap-1.5 text-xs", children: [_jsx(AgentIcon, { agentType: data.agentType, className: "h-3.5 w-3.5 shrink-0" }), _jsx("span", { className: "text-muted-foreground", children: getBadgeText(data) })] }), _jsx("div", { "data-testid": "feature-node-progress-bar", className: "bg-muted mt-1.5 h-1 w-full overflow-hidden rounded-full", children: _jsx("div", { className: "animate-indeterminate-progress bg-foreground/30 h-full w-1/3 rounded-full" }) })] })) : config.showProgressBar ? (_jsxs(_Fragment, { children: [_jsx("div", { className: "text-muted-foreground flex items-center justify-end text-[10px]", children: _jsxs("span", { children: [data.progress, "%"] }) }), _jsx("div", { "data-testid": "feature-node-progress-bar", className: "bg-muted mt-1.5 h-1 w-full overflow-hidden rounded-full", children: _jsx("div", { className: cn('h-full rounded-full transition-all', config.progressClass), style: { width: `${data.progress}%` } }) })] })) : (_jsxs(_Fragment, { children: [_jsxs("div", { className: "text-muted-foreground flex items-center justify-between text-[10px]", children: [_jsx("span", { children: data.featureId }), (data.worktreePath ?? data.repositoryPath) ? (_jsx(FeatureSessionsDropdown, { repositoryPath: data.worktreePath ?? data.repositoryPath })) : null] }), _jsxs("div", { className: "mt-1.5 flex items-center gap-1.5", children: [_jsxs("div", { "data-testid": "feature-node-badge", className: (() => {
100
+ : 'cursor-default'), children: _jsx(AgentIcon, { agentType: data.agentType, className: "h-3.5 w-3.5" }) }) }), _jsxs(TooltipContent, { side: "bottom", children: [_jsx("span", { className: "font-medium", children: agentTypeLabels[data.agentType] ?? data.agentType }), data.modelId ? (_jsxs("span", { className: "ml-1 opacity-70", children: ["\u00B7 ", getModelMeta(data.modelId).displayName || data.modelId] })) : null] })] }) })) : null] })] }), _jsx("h3", { className: "mt-1 truncate text-sm font-bold", children: data.name }), data.description ? (_jsx("p", { "data-testid": "feature-node-description", className: "text-muted-foreground mt-0.5 truncate text-xs", children: data.description })) : null, _jsx("div", { className: "mt-auto pt-2", children: data.state === 'deleting' ? (_jsxs(_Fragment, { children: [_jsxs("div", { className: "mt-1.5 flex items-center gap-1.5 text-xs", children: [_jsx(Trash2, { className: "h-3.5 w-3.5 shrink-0 text-gray-400" }), _jsx("span", { className: "text-muted-foreground", children: "Deleting\u2026" })] }), _jsx("div", { "data-testid": "feature-node-progress-bar", className: "bg-muted mt-1.5 h-1 w-full overflow-hidden rounded-full", children: _jsx("div", { className: "motion-safe:animate-indeterminate-progress bg-foreground/30 h-full w-1/3 rounded-full" }) })] })) : data.state === 'creating' ? (_jsxs(_Fragment, { children: [_jsxs("div", { className: "mt-1.5 flex items-center gap-1.5 text-xs", children: [_jsx(Icon, { className: "h-3.5 w-3.5 shrink-0 animate-spin" }), _jsx("span", { className: "text-muted-foreground", children: getBadgeText(data) })] }), _jsx("div", { "data-testid": "feature-node-progress-bar", className: "bg-muted mt-1.5 h-1 w-full overflow-hidden rounded-full", children: _jsx("div", { className: "motion-safe:animate-indeterminate-progress bg-foreground/30 h-full w-1/3 rounded-full" }) })] })) : data.state === 'running' ? (_jsxs(_Fragment, { children: [_jsxs("div", { className: "mt-1.5 flex items-center gap-1.5 text-xs", children: [_jsx(AgentIcon, { agentType: data.agentType, className: "h-3.5 w-3.5 shrink-0" }), _jsx("span", { className: "text-muted-foreground", children: getBadgeText(data) })] }), _jsx("div", { "data-testid": "feature-node-progress-bar", className: "bg-muted mt-1.5 h-1 w-full overflow-hidden rounded-full", children: _jsx("div", { className: "animate-indeterminate-progress bg-foreground/30 h-full w-1/3 rounded-full" }) })] })) : config.showProgressBar ? (_jsxs(_Fragment, { children: [_jsx("div", { className: "text-muted-foreground flex items-center justify-end text-[10px]", children: _jsxs("span", { children: [data.progress, "%"] }) }), _jsx("div", { "data-testid": "feature-node-progress-bar", className: "bg-muted mt-1.5 h-1 w-full overflow-hidden rounded-full", children: _jsx("div", { className: cn('h-full rounded-full transition-all', config.progressClass), style: { width: `${data.progress}%` } }) })] })) : (_jsxs(_Fragment, { children: [_jsxs("div", { className: "text-muted-foreground flex items-center justify-between text-[10px]", children: [_jsx("span", { children: data.featureId }), (data.worktreePath ?? data.repositoryPath) ? (_jsx(FeatureSessionsDropdown, { repositoryPath: data.worktreePath ?? data.repositoryPath })) : null] }), _jsxs("div", { className: "mt-1.5 flex items-center gap-1.5", children: [_jsxs("div", { "data-testid": "feature-node-badge", className: (() => {
93
101
  const override = getActionRequiredBadgeClasses(data);
94
102
  return cn('flex min-w-0 flex-1 items-center justify-center gap-1.5 rounded-full px-2.5 py-1 text-[11px] font-medium', override?.badgeBgClass ?? config.badgeBgClass, override?.badgeClass ?? config.badgeClass);
95
103
  })(), children: [(() => {
@@ -22,6 +22,7 @@ export declare const FastModeDone: Story;
22
22
  export declare const DeploymentBooting: Story;
23
23
  export declare const DeploymentReady: Story;
24
24
  export declare const DeploymentReadyNoUrl: Story;
25
+ export declare const DeploymentWithFastModeAndAgent: Story;
25
26
  export declare const Interactive: Story;
26
27
  export declare const Pending: Story;
27
28
  export declare const PendingWithStart: Story;
@@ -1 +1 @@
1
- {"version":3,"file":"feature-node.stories.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/web/components/common/feature-node/feature-node.stories.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAMvD,OAAO,KAAK,EACV,eAAe,EAIhB,MAAM,6BAA6B,CAAC;AAiCrC,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,eAAe,CAc/B,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,eAAe,CAAC,CAAC;AAEvC,eAAO,MAAM,OAAO,EAAE,KAErB,CAAC;AA0HF,eAAO,MAAM,SAAS,EAAE,KAQvB,CAAC;AAYF,eAAO,MAAM,aAAa,EAAE,KAqB3B,CAAC;AA2EF,eAAO,MAAM,aAAa,EAAE,KAQ3B,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,KAMxB,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,KAOzB,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,KAW7B,CAAC;AAEF,eAAO,MAAM,gBAAgB,EAAE,KAW9B,CAAC;AAEF,eAAO,MAAM,QAAQ,EAAE,KAUtB,CAAC;AAEF,eAAO,MAAM,yBAAyB,EAAE,KAUvC,CAAC;AAEF,eAAO,MAAM,QAAQ,EAAE,KAUtB,CAAC;AAEF,eAAO,MAAM,gBAAgB,EAAE,KAW9B,CAAC;AAEF,eAAO,MAAM,cAAc,EAAE,KAY5B,CAAC;AAEF,eAAO,MAAM,gBAAgB,EAAE,KAW9B,CAAC;AAEF,eAAO,MAAM,QAAQ,EAAE,KAatB,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,KAc1B,CAAC;AAEF,eAAO,MAAM,iBAAiB,EAAE,KAY/B,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,KAa7B,CAAC;AAEF,eAAO,MAAM,oBAAoB,EAAE,KAYlC,CAAC;AA4EF,eAAO,MAAM,WAAW,EAAE,KAOzB,CAAC;AAEF,eAAO,MAAM,OAAO,EAAE,KAUrB,CAAC;AAEF,eAAO,MAAM,gBAAgB,EAAE,KAW9B,CAAC"}
1
+ {"version":3,"file":"feature-node.stories.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/web/components/common/feature-node/feature-node.stories.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAMvD,OAAO,KAAK,EACV,eAAe,EAIhB,MAAM,6BAA6B,CAAC;AAiCrC,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,eAAe,CAc/B,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,eAAe,CAAC,CAAC;AAEvC,eAAO,MAAM,OAAO,EAAE,KAErB,CAAC;AA0HF,eAAO,MAAM,SAAS,EAAE,KAQvB,CAAC;AAYF,eAAO,MAAM,aAAa,EAAE,KAqB3B,CAAC;AA2EF,eAAO,MAAM,aAAa,EAAE,KAQ3B,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,KAMxB,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,KAOzB,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,KAW7B,CAAC;AAEF,eAAO,MAAM,gBAAgB,EAAE,KAW9B,CAAC;AAEF,eAAO,MAAM,QAAQ,EAAE,KAUtB,CAAC;AAEF,eAAO,MAAM,yBAAyB,EAAE,KAUvC,CAAC;AAEF,eAAO,MAAM,QAAQ,EAAE,KAUtB,CAAC;AAEF,eAAO,MAAM,gBAAgB,EAAE,KAW9B,CAAC;AAEF,eAAO,MAAM,cAAc,EAAE,KAY5B,CAAC;AAEF,eAAO,MAAM,gBAAgB,EAAE,KAW9B,CAAC;AAEF,eAAO,MAAM,QAAQ,EAAE,KAatB,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,KAc1B,CAAC;AAEF,eAAO,MAAM,iBAAiB,EAAE,KAY/B,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,KAa7B,CAAC;AAEF,eAAO,MAAM,oBAAoB,EAAE,KAYlC,CAAC;AAEF,eAAO,MAAM,8BAA8B,EAAE,KAe5C,CAAC;AA4EF,eAAO,MAAM,WAAW,EAAE,KAOzB,CAAC;AAEF,eAAO,MAAM,OAAO,EAAE,KAUrB,CAAC;AAEF,eAAO,MAAM,gBAAgB,EAAE,KAW9B,CAAC"}
@@ -424,6 +424,22 @@ export const DeploymentReadyNoUrl = {
424
424
  },
425
425
  render: (args) => _jsx(FeatureNodeCanvas, { data: args }),
426
426
  };
427
+ export const DeploymentWithFastModeAndAgent = {
428
+ args: {
429
+ name: 'Full Stack App',
430
+ description: 'Next.js app with all inline icons',
431
+ featureId: '#d4',
432
+ lifecycle: 'deploy',
433
+ state: 'done',
434
+ progress: 100,
435
+ runtime: '22m',
436
+ fastMode: true,
437
+ agentType: 'claude-code',
438
+ modelId: 'claude-sonnet-4-6',
439
+ deployment: { status: DeploymentState.Ready, url: 'http://localhost:3000' },
440
+ },
441
+ render: (args) => _jsx(FeatureNodeCanvas, { data: args }),
442
+ };
427
443
  const interactiveInitialNodes = [
428
444
  {
429
445
  id: 'node-1',
@@ -1 +1 @@
1
- {"version":3,"file":"use-deploy-action.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/web/hooks/use-deploy-action.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sCAAsC,CAAC;AAM5E,MAAM,WAAW,iBAAiB;IAChC,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,SAAS,GAAG,YAAY,CAAC;IACrC,cAAc,EAAE,MAAM,CAAC;IACvB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,iBAAiB;IAChC,MAAM,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IAC5B,IAAI,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IAC1B,aAAa,EAAE,OAAO,CAAC;IACvB,WAAW,EAAE,OAAO,CAAC;IACrB,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,MAAM,EAAE,eAAe,GAAG,IAAI,CAAC;IAC/B,GAAG,EAAE,MAAM,GAAG,IAAI,CAAC;CACpB;AAOD,wBAAgB,eAAe,CAAC,KAAK,EAAE,iBAAiB,GAAG,IAAI,GAAG,iBAAiB,CA8MlF"}
1
+ {"version":3,"file":"use-deploy-action.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/web/hooks/use-deploy-action.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sCAAsC,CAAC;AAM5E,MAAM,WAAW,iBAAiB;IAChC,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,SAAS,GAAG,YAAY,CAAC;IACrC,cAAc,EAAE,MAAM,CAAC;IACvB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,iBAAiB;IAChC,MAAM,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IAC5B,IAAI,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IAC1B,aAAa,EAAE,OAAO,CAAC;IACvB,WAAW,EAAE,OAAO,CAAC;IACrB,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,MAAM,EAAE,eAAe,GAAG,IAAI,CAAC;IAC/B,GAAG,EAAE,MAAM,GAAG,IAAI,CAAC;CACpB;AAOD,wBAAgB,eAAe,CAAC,KAAK,EAAE,iBAAiB,GAAG,IAAI,GAAG,iBAAiB,CAwKlF"}
@@ -38,38 +38,6 @@ export function useDeployAction(input) {
38
38
  clearInterval(pollIntervalRef.current);
39
39
  };
40
40
  }, []);
41
- // Fetch initial deployment status on mount (or when input changes) so we
42
- // pick up any already-running dev server that was started before this
43
- // component mounted. Without this, closing and reopening the drawer would
44
- // lose awareness of the running deployment.
45
- const pollAfterInitialFetchRef = useRef(null);
46
- const initialFetchIdRef = useRef(null);
47
- useEffect(() => {
48
- const targetId = input?.targetId ?? null;
49
- // Only fetch once per targetId to avoid redundant calls
50
- if (targetId === initialFetchIdRef.current)
51
- return;
52
- initialFetchIdRef.current = targetId;
53
- if (!targetId)
54
- return;
55
- let cancelled = false;
56
- getDeploymentStatus(targetId).then((result) => {
57
- if (cancelled || !mountedRef.current)
58
- return;
59
- if (result && result.state !== 'Stopped') {
60
- log.info(`initial status fetch: state=${result.state}, url=${result.url}`);
61
- setStatus(result.state);
62
- setUrl(result.url);
63
- // Start polling to keep the state fresh
64
- // (startPolling is defined below, but the effect runs after render
65
- // so it will be available via the ref-based closure)
66
- pollAfterInitialFetchRef.current?.(targetId);
67
- }
68
- });
69
- return () => {
70
- cancelled = true;
71
- };
72
- }, [input?.targetId]);
73
41
  const stopPolling = useCallback(() => {
74
42
  if (pollIntervalRef.current) {
75
43
  log.debug('stopping polling');
@@ -103,8 +71,6 @@ export function useDeployAction(input) {
103
71
  }
104
72
  }, POLL_INTERVAL);
105
73
  }, [stopPolling]);
106
- // Keep ref in sync so the initial-fetch effect can start polling
107
- pollAfterInitialFetchRef.current = startPolling;
108
74
  const handleDeploy = useCallback(async () => {
109
75
  if (!input) {
110
76
  log.warn('deploy() called but input is null — no-op');