@shepai/cli 1.107.1-pr328.f999d56 → 1.107.1-pr332.9596579

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 (162) hide show
  1. package/dist/packages/core/src/application/use-cases/features/delete-feature.use-case.d.ts +0 -1
  2. package/dist/packages/core/src/application/use-cases/features/delete-feature.use-case.d.ts.map +1 -1
  3. package/dist/packages/core/src/application/use-cases/features/delete-feature.use-case.js +3 -8
  4. package/dist/packages/core/src/infrastructure/persistence/sqlite/migrations.d.ts.map +1 -1
  5. package/dist/packages/core/src/infrastructure/persistence/sqlite/migrations.js +12 -0
  6. package/dist/packages/core/src/infrastructure/services/pr-sync/pr-sync-watcher.service.d.ts +13 -2
  7. package/dist/packages/core/src/infrastructure/services/pr-sync/pr-sync-watcher.service.d.ts.map +1 -1
  8. package/dist/packages/core/src/infrastructure/services/pr-sync/pr-sync-watcher.service.js +80 -3
  9. package/dist/src/presentation/cli/commands/ui.command.d.ts.map +1 -1
  10. package/dist/src/presentation/cli/commands/ui.command.js +3 -1
  11. package/dist/src/presentation/web/app/actions/delete-feature.d.ts +1 -1
  12. package/dist/src/presentation/web/app/actions/delete-feature.d.ts.map +1 -1
  13. package/dist/src/presentation/web/app/actions/delete-feature.js +3 -8
  14. package/dist/src/presentation/web/app/actions/get-feature-drawer-data.d.ts +3 -0
  15. package/dist/src/presentation/web/app/actions/get-feature-drawer-data.d.ts.map +1 -1
  16. package/dist/src/presentation/web/app/actions/get-feature-drawer-data.js +7 -32
  17. package/dist/src/presentation/web/components/common/delete-feature-dialog/delete-feature-dialog-config.d.ts +1 -2
  18. package/dist/src/presentation/web/components/common/delete-feature-dialog/delete-feature-dialog-config.d.ts.map +1 -1
  19. package/dist/src/presentation/web/components/common/delete-feature-dialog/delete-feature-dialog.d.ts +1 -1
  20. package/dist/src/presentation/web/components/common/delete-feature-dialog/delete-feature-dialog.d.ts.map +1 -1
  21. package/dist/src/presentation/web/components/common/delete-feature-dialog/delete-feature-dialog.js +2 -4
  22. package/dist/src/presentation/web/components/common/delete-feature-dialog/delete-feature-dialog.stories.d.ts +0 -2
  23. package/dist/src/presentation/web/components/common/delete-feature-dialog/delete-feature-dialog.stories.d.ts.map +1 -1
  24. package/dist/src/presentation/web/components/common/delete-feature-dialog/delete-feature-dialog.stories.js +0 -11
  25. package/dist/src/presentation/web/components/common/feature-node/feature-node-state-config.d.ts +1 -2
  26. package/dist/src/presentation/web/components/common/feature-node/feature-node-state-config.d.ts.map +1 -1
  27. package/dist/src/presentation/web/components/common/feature-node/feature-node.d.ts.map +1 -1
  28. package/dist/src/presentation/web/components/common/feature-node/feature-node.js +3 -3
  29. package/dist/src/presentation/web/components/features/control-center/use-control-center-state.d.ts +1 -1
  30. package/dist/src/presentation/web/components/features/control-center/use-control-center-state.d.ts.map +1 -1
  31. package/dist/src/presentation/web/components/features/control-center/use-control-center-state.js +10 -13
  32. package/dist/src/presentation/web/dev-server.js +3 -1
  33. package/dist/src/presentation/web/lib/derive-graph.d.ts +1 -1
  34. package/dist/src/presentation/web/lib/derive-graph.d.ts.map +1 -1
  35. package/dist/src/presentation/web/lib/derive-graph.js +2 -13
  36. package/dist/tsconfig.build.tsbuildinfo +1 -1
  37. package/package.json +1 -1
  38. package/web/.next/BUILD_ID +1 -1
  39. package/web/.next/build-manifest.json +2 -2
  40. package/web/.next/fallback-build-manifest.json +2 -2
  41. package/web/.next/prerender-manifest.json +3 -3
  42. package/web/.next/required-server-files.js +1 -1
  43. package/web/.next/required-server-files.json +1 -1
  44. package/web/.next/server/app/(dashboard)/@drawer/create/page/server-reference-manifest.json +20 -20
  45. package/web/.next/server/app/(dashboard)/@drawer/create/page.js.nft.json +1 -1
  46. package/web/.next/server/app/(dashboard)/@drawer/create/page_client-reference-manifest.js +1 -1
  47. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page/server-reference-manifest.json +26 -26
  48. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page.js.nft.json +1 -1
  49. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page_client-reference-manifest.js +1 -1
  50. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page/server-reference-manifest.json +26 -26
  51. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page.js.nft.json +1 -1
  52. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page_client-reference-manifest.js +1 -1
  53. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page/server-reference-manifest.json +18 -18
  54. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page.js.nft.json +1 -1
  55. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page_client-reference-manifest.js +1 -1
  56. package/web/.next/server/app/(dashboard)/create/page/server-reference-manifest.json +20 -20
  57. package/web/.next/server/app/(dashboard)/create/page.js.nft.json +1 -1
  58. package/web/.next/server/app/(dashboard)/create/page_client-reference-manifest.js +1 -1
  59. package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page/server-reference-manifest.json +26 -26
  60. package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page.js.nft.json +1 -1
  61. package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page_client-reference-manifest.js +1 -1
  62. package/web/.next/server/app/(dashboard)/feature/[featureId]/page/server-reference-manifest.json +26 -26
  63. package/web/.next/server/app/(dashboard)/feature/[featureId]/page.js.nft.json +1 -1
  64. package/web/.next/server/app/(dashboard)/feature/[featureId]/page_client-reference-manifest.js +1 -1
  65. package/web/.next/server/app/(dashboard)/page/server-reference-manifest.json +18 -18
  66. package/web/.next/server/app/(dashboard)/page.js.nft.json +1 -1
  67. package/web/.next/server/app/(dashboard)/page_client-reference-manifest.js +1 -1
  68. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page/server-reference-manifest.json +18 -18
  69. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page.js.nft.json +1 -1
  70. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page_client-reference-manifest.js +1 -1
  71. package/web/.next/server/app/_global-error.html +2 -2
  72. package/web/.next/server/app/_global-error.rsc +1 -1
  73. package/web/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
  74. package/web/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  75. package/web/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  76. package/web/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  77. package/web/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  78. package/web/.next/server/app/_not-found/page/server-reference-manifest.json +1 -1
  79. package/web/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  80. package/web/.next/server/app/settings/page/server-reference-manifest.json +5 -5
  81. package/web/.next/server/app/settings/page.js.nft.json +1 -1
  82. package/web/.next/server/app/settings/page_client-reference-manifest.js +1 -1
  83. package/web/.next/server/app/skills/page/server-reference-manifest.json +6 -6
  84. package/web/.next/server/app/skills/page_client-reference-manifest.js +1 -1
  85. package/web/.next/server/app/tools/page/server-reference-manifest.json +6 -6
  86. package/web/.next/server/app/tools/page_client-reference-manifest.js +1 -1
  87. package/web/.next/server/app/version/page/server-reference-manifest.json +1 -1
  88. package/web/.next/server/app/version/page_client-reference-manifest.js +1 -1
  89. package/web/.next/server/chunks/[root-of-the-server]__a402b567._.js +1 -1
  90. package/web/.next/server/chunks/ssr/744ca_web_components_common_control-center-drawer_create-drawer-client_tsx_5e26fc0a._.js +1 -1
  91. package/web/.next/server/chunks/ssr/744ca_web_components_common_control-center-drawer_create-drawer-client_tsx_5e26fc0a._.js.map +1 -1
  92. package/web/.next/server/chunks/ssr/8ba4b_server_app_(dashboard)_@drawer_repository_[repositoryId]_page_actions_a1104008.js +1 -1
  93. package/web/.next/server/chunks/ssr/8ba4b_server_app_(dashboard)_@drawer_repository_[repositoryId]_page_actions_a1104008.js.map +1 -1
  94. package/web/.next/server/chunks/ssr/8ba4b_server_app_(dashboard)_repository_[repositoryId]_page_actions_92642200.js +1 -1
  95. package/web/.next/server/chunks/ssr/8ba4b_server_app_(dashboard)_repository_[repositoryId]_page_actions_92642200.js.map +1 -1
  96. package/web/.next/server/chunks/ssr/[root-of-the-server]__039967e3._.js +1 -1
  97. package/web/.next/server/chunks/ssr/[root-of-the-server]__039967e3._.js.map +1 -1
  98. package/web/.next/server/chunks/ssr/[root-of-the-server]__07a39ff2._.js +1 -1
  99. package/web/.next/server/chunks/ssr/[root-of-the-server]__11033878._.js +1 -1
  100. package/web/.next/server/chunks/ssr/[root-of-the-server]__11033878._.js.map +1 -1
  101. package/web/.next/server/chunks/ssr/[root-of-the-server]__24dd0927._.js +2 -2
  102. package/web/.next/server/chunks/ssr/[root-of-the-server]__24dd0927._.js.map +1 -1
  103. package/web/.next/server/chunks/ssr/[root-of-the-server]__2773312c._.js +1 -1
  104. package/web/.next/server/chunks/ssr/[root-of-the-server]__2773312c._.js.map +1 -1
  105. package/web/.next/server/chunks/ssr/[root-of-the-server]__5d87af2e._.js +1 -1
  106. package/web/.next/server/chunks/ssr/[root-of-the-server]__845a9d2a._.js +1 -1
  107. package/web/.next/server/chunks/ssr/[root-of-the-server]__845a9d2a._.js.map +1 -1
  108. package/web/.next/server/chunks/ssr/[root-of-the-server]__89e8a5cc._.js +2 -2
  109. package/web/.next/server/chunks/ssr/[root-of-the-server]__aad040c0._.js +2 -2
  110. package/web/.next/server/chunks/ssr/[root-of-the-server]__aad040c0._.js.map +1 -1
  111. package/web/.next/server/chunks/ssr/[root-of-the-server]__cbd8062c._.js +1 -1
  112. package/web/.next/server/chunks/ssr/[root-of-the-server]__cbd8062c._.js.map +1 -1
  113. package/web/.next/server/chunks/ssr/[root-of-the-server]__e70c5627._.js +1 -1
  114. package/web/.next/server/chunks/ssr/[root-of-the-server]__e70c5627._.js.map +1 -1
  115. package/web/.next/server/chunks/ssr/[root-of-the-server]__fdc75809._.js +1 -1
  116. package/web/.next/server/chunks/ssr/[root-of-the-server]__fdc75809._.js.map +1 -1
  117. package/web/.next/server/chunks/ssr/_135edb9c._.js +1 -1
  118. package/web/.next/server/chunks/ssr/_135edb9c._.js.map +1 -1
  119. package/web/.next/server/chunks/ssr/{_ba74f6b7._.js → _26322be1._.js} +2 -2
  120. package/web/.next/server/chunks/ssr/{_ba74f6b7._.js.map → _26322be1._.js.map} +1 -1
  121. package/web/.next/server/chunks/ssr/{_37783997._.js → _6dc86a79._.js} +2 -2
  122. package/web/.next/server/chunks/ssr/{_37783997._.js.map → _6dc86a79._.js.map} +1 -1
  123. package/web/.next/server/chunks/ssr/_8dacd1e7._.js +1 -1
  124. package/web/.next/server/chunks/ssr/_8dacd1e7._.js.map +1 -1
  125. package/web/.next/server/chunks/ssr/{_e9273616._.js → _b00b81e2._.js} +2 -2
  126. package/web/.next/server/chunks/ssr/{_e9273616._.js.map → _b00b81e2._.js.map} +1 -1
  127. package/web/.next/server/chunks/ssr/_cc77a143._.js +1 -1
  128. package/web/.next/server/chunks/ssr/_cc77a143._.js.map +1 -1
  129. package/web/.next/server/chunks/ssr/b1a17_presentation_web_components_features_settings_settings-page-client_tsx_6ed9d5f8._.js +1 -1
  130. package/web/.next/server/chunks/ssr/b1a17_presentation_web_components_features_settings_settings-page-client_tsx_6ed9d5f8._.js.map +1 -1
  131. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_(dashboard)_page_actions_888633e1.js +1 -1
  132. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_(dashboard)_page_actions_888633e1.js.map +1 -1
  133. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_skills_page_actions_1fa8042e.js +1 -1
  134. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_skills_page_actions_1fa8042e.js.map +1 -1
  135. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_tools_page_actions_24684200.js +1 -1
  136. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_tools_page_actions_24684200.js.map +1 -1
  137. package/web/.next/server/chunks/ssr/src_presentation_web_ce7cbc3c._.js +2 -2
  138. package/web/.next/server/chunks/ssr/src_presentation_web_ce7cbc3c._.js.map +1 -1
  139. package/web/.next/server/chunks/ssr/src_presentation_web_components_bf50c527._.js +1 -1
  140. package/web/.next/server/chunks/ssr/src_presentation_web_components_de814675._.js +1 -1
  141. package/web/.next/server/chunks/ssr/src_presentation_web_components_features_control-center_7ac3562e._.js +1 -1
  142. package/web/.next/server/chunks/ssr/src_presentation_web_components_features_control-center_7ac3562e._.js.map +1 -1
  143. package/web/.next/server/chunks/ssr/src_presentation_web_e2604413._.js +2 -2
  144. package/web/.next/server/chunks/ssr/src_presentation_web_e2604413._.js.map +1 -1
  145. package/web/.next/server/pages/500.html +2 -2
  146. package/web/.next/server/server-reference-manifest.js +1 -1
  147. package/web/.next/server/server-reference-manifest.json +31 -31
  148. package/web/.next/static/chunks/{93014d01fb5734b9.js → 0aebfe0cc138d8e5.js} +1 -1
  149. package/web/.next/static/chunks/{5e418b28cadf38e8.js → 459bde4dc76e7515.js} +1 -1
  150. package/web/.next/static/chunks/{988410fd36d267c6.js → 6dc8ef32b30d7a72.js} +1 -1
  151. package/web/.next/static/chunks/{dc220116dbff4d03.js → 97a78353a41c1e0e.js} +2 -2
  152. package/web/.next/static/chunks/b87e4a6c062c042b.js +1 -0
  153. package/web/.next/static/chunks/c84e66417125d965.js +1 -0
  154. package/web/.next/static/chunks/{5fe6d3eec5b9bd6c.js → d6ec0d0994e29654.js} +1 -1
  155. package/web/.next/static/chunks/{fe7a1c9b6a3c4f72.js → d818bd28902d366f.js} +2 -2
  156. package/web/.next/static/chunks/{b3ea40b506985f38.js → e17acc20b8dedaf9.js} +1 -1
  157. package/web/.next/static/chunks/{ce54919357398651.js → e33142f775d270e4.js} +1 -1
  158. package/web/.next/static/chunks/19a32614fa80022e.js +0 -1
  159. package/web/.next/static/chunks/d268af9f5127b1a8.js +0 -1
  160. /package/web/.next/static/{YoKyBbfUKVV4yMGJg6xlx → u6uJlyVULGtO2gAWwb7dm}/_buildManifest.js +0 -0
  161. /package/web/.next/static/{YoKyBbfUKVV4yMGJg6xlx → u6uJlyVULGtO2gAWwb7dm}/_clientMiddlewareManifest.json +0 -0
  162. /package/web/.next/static/{YoKyBbfUKVV4yMGJg6xlx → u6uJlyVULGtO2gAWwb7dm}/_ssgManifest.js +0 -0
@@ -20,7 +20,6 @@ import type { IAgentRunRepository } from '../../ports/output/agents/agent-run-re
20
20
  import type { IGitPrService } from '../../ports/output/services/git-pr-service.interface.js';
21
21
  export interface DeleteFeatureOptions {
22
22
  cleanup?: boolean;
23
- cascadeDelete?: boolean;
24
23
  }
25
24
  export declare class DeleteFeatureUseCase {
26
25
  private readonly featureRepo;
@@ -1 +1 @@
1
- {"version":3,"file":"delete-feature.use-case.d.ts","sourceRoot":"","sources":["../../../../../../../packages/core/src/application/use-cases/features/delete-feature.use-case.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAGH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qCAAqC,CAAC;AAEnE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,iEAAiE,CAAC;AAC1G,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,2DAA2D,CAAC;AAClG,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,8DAA8D,CAAC;AAChH,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,6DAA6D,CAAC;AACvG,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,yDAAyD,CAAC;AAE7F,MAAM,WAAW,oBAAoB;IACnC,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB;AAED,qBACa,oBAAoB;IAEC,OAAO,CAAC,QAAQ,CAAC,WAAW;IAC9B,OAAO,CAAC,QAAQ,CAAC,eAAe;IAE5D,OAAO,CAAC,QAAQ,CAAC,cAAc;IACA,OAAO,CAAC,QAAQ,CAAC,OAAO;IAC9B,OAAO,CAAC,QAAQ,CAAC,YAAY;gBALP,WAAW,EAAE,kBAAkB,EACjC,eAAe,EAAE,gBAAgB,EAE7D,cAAc,EAAE,2BAA2B,EACZ,OAAO,EAAE,mBAAmB,EAClC,YAAY,EAAE,aAAa;IAGjE,OAAO,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,oBAAoB,GAAG,OAAO,CAAC,OAAO,CAAC;IA2BlF,0DAA0D;YAC5C,iBAAiB;IAQ/B,6DAA6D;YAC/C,yBAAyB;IAWvC,sDAAsD;YACxC,sBAAsB;IAYpC,6EAA6E;YAC/D,oBAAoB;CAsDnC"}
1
+ {"version":3,"file":"delete-feature.use-case.d.ts","sourceRoot":"","sources":["../../../../../../../packages/core/src/application/use-cases/features/delete-feature.use-case.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAGH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qCAAqC,CAAC;AAEnE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,iEAAiE,CAAC;AAC1G,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,2DAA2D,CAAC;AAClG,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,8DAA8D,CAAC;AAChH,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,6DAA6D,CAAC;AACvG,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,yDAAyD,CAAC;AAE7F,MAAM,WAAW,oBAAoB;IACnC,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,qBACa,oBAAoB;IAEC,OAAO,CAAC,QAAQ,CAAC,WAAW;IAC9B,OAAO,CAAC,QAAQ,CAAC,eAAe;IAE5D,OAAO,CAAC,QAAQ,CAAC,cAAc;IACA,OAAO,CAAC,QAAQ,CAAC,OAAO;IAC9B,OAAO,CAAC,QAAQ,CAAC,YAAY;gBALP,WAAW,EAAE,kBAAkB,EACjC,eAAe,EAAE,gBAAgB,EAE7D,cAAc,EAAE,2BAA2B,EACZ,OAAO,EAAE,mBAAmB,EAClC,YAAY,EAAE,aAAa;IAGjE,OAAO,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,oBAAoB,GAAG,OAAO,CAAC,OAAO,CAAC;IAqBlF,0DAA0D;YAC5C,iBAAiB;IAQ/B,6DAA6D;YAC/C,yBAAyB;IAWvC,sDAAsD;YACxC,sBAAsB;IAYpC,6EAA6E;YAC/D,oBAAoB;CAsDnC"}
@@ -46,17 +46,12 @@ let DeleteFeatureUseCase = class DeleteFeatureUseCase {
46
46
  if (!feature) {
47
47
  throw new Error(`Feature not found: "${featureId}"`);
48
48
  }
49
- const cascadeDelete = options?.cascadeDelete !== false;
50
- // 2. Immediately soft-delete the feature (and children if cascading)
49
+ // 2. Immediately soft-delete the feature and all children
51
50
  // This makes them vanish from all queries right away (no reappear bug)
52
- if (cascadeDelete) {
53
- await this.cascadeSoftDelete(feature.id);
54
- }
51
+ await this.cascadeSoftDelete(feature.id);
55
52
  await this.markDeletingAndSoftDelete(feature);
56
53
  // 3. Then perform cleanup (best-effort, feature is already hidden)
57
- if (cascadeDelete) {
58
- await this.cascadeCleanupChildren(feature.id, options);
59
- }
54
+ await this.cascadeCleanupChildren(feature.id, options);
60
55
  await this.cleanupSingleFeature(feature, options);
61
56
  return feature;
62
57
  }
@@ -1 +1 @@
1
- {"version":3,"file":"migrations.d.ts","sourceRoot":"","sources":["../../../../../../../packages/core/src/infrastructure/persistence/sqlite/migrations.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,QAAQ,MAAM,gBAAgB,CAAC;AAggB3C;;;GAGG;AACH,eAAO,MAAM,qBAAqB,QAA4C,CAAC;AAE/E;;;;;;;GAOG;AACH,wBAAsB,mBAAmB,CAAC,EAAE,EAAE,QAAQ,CAAC,QAAQ,GAAG,OAAO,CAAC,IAAI,CAAC,CA4B9E"}
1
+ {"version":3,"file":"migrations.d.ts","sourceRoot":"","sources":["../../../../../../../packages/core/src/infrastructure/persistence/sqlite/migrations.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,QAAQ,MAAM,gBAAgB,CAAC;AA4gB3C;;;GAGG;AACH,eAAO,MAAM,qBAAqB,QAA4C,CAAC;AAE/E;;;;;;;GAOG;AACH,wBAAsB,mBAAmB,CAAC,EAAE,EAAE,QAAQ,CAAC,QAAQ,GAAG,OAAO,CAAC,IAAI,CAAC,CA4B9E"}
@@ -499,6 +499,18 @@ WHERE repository_path NOT IN (SELECT path FROM repositories WHERE path IS NOT NU
499
499
  // Migration 032: Change envDeploy feature flag default to enabled (1).
500
500
  sql: `UPDATE settings SET feature_flag_env_deploy = 1 WHERE feature_flag_env_deploy = 0;`,
501
501
  },
502
+ {
503
+ version: 33,
504
+ sql: `
505
+ -- Migration 033: Create pr_sync_lock table for cross-process poll coordination
506
+ CREATE TABLE IF NOT EXISTS pr_sync_lock (
507
+ id INTEGER PRIMARY KEY CHECK (id = 1),
508
+ locked_by TEXT NOT NULL,
509
+ locked_at INTEGER NOT NULL,
510
+ expires_at INTEGER NOT NULL
511
+ );
512
+ `,
513
+ },
502
514
  ];
503
515
  /**
504
516
  * The latest schema version (highest migration version number).
@@ -13,6 +13,7 @@ import type { IFeatureRepository } from '../../../application/ports/output/repos
13
13
  import type { IAgentRunRepository } from '../../../application/ports/output/agents/agent-run-repository.interface.js';
14
14
  import type { IGitPrService } from '../../../application/ports/output/services/git-pr-service.interface.js';
15
15
  import type { INotificationService } from '../../../application/ports/output/services/notification-service.interface.js';
16
+ import type Database from 'better-sqlite3';
16
17
  export declare class PrSyncWatcherService {
17
18
  private readonly featureRepo;
18
19
  private readonly agentRunRepo;
@@ -21,12 +22,22 @@ export declare class PrSyncWatcherService {
21
22
  private readonly pollIntervalMs;
22
23
  private readonly trackedFeatures;
23
24
  private readonly skippedRepos;
25
+ private readonly rateLimitedUntil;
26
+ private readonly db;
27
+ private readonly processId;
24
28
  private intervalId;
25
- constructor(featureRepo: IFeatureRepository, agentRunRepo: IAgentRunRepository, gitPrService: IGitPrService, notificationService: INotificationService, pollIntervalMs?: number);
29
+ private pollCycle;
30
+ constructor(featureRepo: IFeatureRepository, agentRunRepo: IAgentRunRepository, gitPrService: IGitPrService, notificationService: INotificationService, pollIntervalMs?: number, db?: Database.Database | null);
26
31
  isRunning(): boolean;
27
32
  start(): void;
28
33
  stop(): void;
34
+ /** Attempt to acquire the cross-process poll lock. Returns true if acquired. */
35
+ private tryAcquireLock;
36
+ /** Check if a feature should be polled this cycle based on its unchanged cycles count. */
37
+ private shouldPollFeature;
29
38
  private poll;
39
+ private isRateLimited;
40
+ private handleRateLimitError;
30
41
  private processRepository;
31
42
  private processFeature;
32
43
  /** Mark associated agent run as completed so the UI reflects "done" state. */
@@ -39,7 +50,7 @@ export declare class PrSyncWatcherService {
39
50
  *
40
51
  * @throws Error if the watcher is already initialized
41
52
  */
42
- export declare function initializePrSyncWatcher(featureRepo: IFeatureRepository, agentRunRepo: IAgentRunRepository, gitPrService: IGitPrService, notificationService: INotificationService, pollIntervalMs?: number): void;
53
+ export declare function initializePrSyncWatcher(featureRepo: IFeatureRepository, agentRunRepo: IAgentRunRepository, gitPrService: IGitPrService, notificationService: INotificationService, pollIntervalMs?: number, db?: Database.Database | null): void;
43
54
  /**
44
55
  * Get the PR sync watcher singleton.
45
56
  *
@@ -1 +1 @@
1
- {"version":3,"file":"pr-sync-watcher.service.d.ts","sourceRoot":"","sources":["../../../../../../../packages/core/src/infrastructure/services/pr-sync/pr-sync-watcher.service.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAWH,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,gFAAgF,CAAC;AACzH,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,4EAA4E,CAAC;AACtH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,wEAAwE,CAAC;AAK5G,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,8EAA8E,CAAC;AAkBzH,qBAAa,oBAAoB;IAC/B,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAqB;IACjD,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAsB;IACnD,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAgB;IAC7C,OAAO,CAAC,QAAQ,CAAC,mBAAmB,CAAuB;IAC3D,OAAO,CAAC,QAAQ,CAAC,cAAc,CAAS;IACxC,OAAO,CAAC,QAAQ,CAAC,eAAe,CAAqC;IACrE,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAqB;IAClD,OAAO,CAAC,UAAU,CAA+C;gBAG/D,WAAW,EAAE,kBAAkB,EAC/B,YAAY,EAAE,mBAAmB,EACjC,YAAY,EAAE,aAAa,EAC3B,mBAAmB,EAAE,oBAAoB,EACzC,cAAc,GAAE,MAAiC;IASnD,SAAS,IAAI,OAAO;IAIpB,KAAK,IAAI,IAAI;IAcb,IAAI,IAAI,IAAI;YASE,IAAI;YAuCJ,iBAAiB;YA6CjB,cAAc;IAyK5B,8EAA8E;YAChE,gBAAgB;IAW9B,OAAO,CAAC,gBAAgB;CAoBzB;AAMD;;;;;GAKG;AACH,wBAAgB,uBAAuB,CACrC,WAAW,EAAE,kBAAkB,EAC/B,YAAY,EAAE,mBAAmB,EACjC,YAAY,EAAE,aAAa,EAC3B,mBAAmB,EAAE,oBAAoB,EACzC,cAAc,CAAC,EAAE,MAAM,GACtB,IAAI,CAYN;AAED;;;;;GAKG;AACH,wBAAgB,gBAAgB,IAAI,oBAAoB,CAQvD;AAED;;GAEG;AACH,wBAAgB,gBAAgB,IAAI,OAAO,CAE1C;AAED;;;;;GAKG;AACH,wBAAgB,kBAAkB,IAAI,IAAI,CAKzC"}
1
+ {"version":3,"file":"pr-sync-watcher.service.d.ts","sourceRoot":"","sources":["../../../../../../../packages/core/src/infrastructure/services/pr-sync/pr-sync-watcher.service.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAWH,OAAO,KAAK,EAAE,kBAAkB,EAA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EAA8E;YAChE,gBAAgB;IAW9B,OAAO,CAAC,gBAAgB;CAoBzB;AAMD;;;;;GAKG;AACH,wBAAgB,uBAAuB,CACrC,WAAW,EAAE,kBAAkB,EAC/B,YAAY,EAAE,mBAAmB,EACjC,YAAY,EAAE,aAAa,EAC3B,mBAAmB,EAAE,oBAAoB,EACzC,cAAc,CAAC,EAAE,MAAM,EACvB,EAAE,CAAC,EAAE,QAAQ,CAAC,QAAQ,GAAG,IAAI,GAC5B,IAAI,CAaN;AAED;;;;;GAKG;AACH,wBAAgB,gBAAgB,IAAI,oBAAoB,CAQvD;AAED;;GAEG;AACH,wBAAgB,gBAAgB,IAAI,OAAO,CAE1C;AAED;;;;;GAKG;AACH,wBAAgB,kBAAkB,IAAI,IAAI,CAKzC"}
@@ -11,6 +11,8 @@
11
11
  */
12
12
  import { SdlcLifecycle, PrStatus, CiStatus, AgentRunStatus, NotificationEventType, NotificationSeverity, } from '../../../domain/generated/output.js';
13
13
  const DEFAULT_POLL_INTERVAL_MS = 30_000;
14
+ const LOCK_TTL_MS = 60_000;
15
+ const RATE_LIMIT_BACKOFF_MS = 5 * 60_000;
14
16
  const TAG = '[PrSyncWatcher]';
15
17
  const CI_STATUS_MAP = {
16
18
  success: CiStatus.Success,
@@ -25,13 +27,19 @@ export class PrSyncWatcherService {
25
27
  pollIntervalMs;
26
28
  trackedFeatures = new Map();
27
29
  skippedRepos = new Set();
30
+ rateLimitedUntil = new Map();
31
+ db;
32
+ processId;
28
33
  intervalId = null;
29
- constructor(featureRepo, agentRunRepo, gitPrService, notificationService, pollIntervalMs = DEFAULT_POLL_INTERVAL_MS) {
34
+ pollCycle = 0;
35
+ constructor(featureRepo, agentRunRepo, gitPrService, notificationService, pollIntervalMs = DEFAULT_POLL_INTERVAL_MS, db = null) {
30
36
  this.featureRepo = featureRepo;
31
37
  this.agentRunRepo = agentRunRepo;
32
38
  this.gitPrService = gitPrService;
33
39
  this.notificationService = notificationService;
34
40
  this.pollIntervalMs = pollIntervalMs;
41
+ this.db = db;
42
+ this.processId = `${process.pid}-${Date.now()}`;
35
43
  }
36
44
  isRunning() {
37
45
  return this.intervalId !== null;
@@ -55,8 +63,40 @@ export class PrSyncWatcherService {
55
63
  console.log(`${TAG} Stopped`);
56
64
  }
57
65
  }
66
+ /** Attempt to acquire the cross-process poll lock. Returns true if acquired. */
67
+ tryAcquireLock() {
68
+ if (!this.db)
69
+ return true; // no DB → single-process mode, always proceed
70
+ const now = Date.now();
71
+ const expiresAt = now + LOCK_TTL_MS;
72
+ const stmt = this.db.prepare(`
73
+ INSERT OR REPLACE INTO pr_sync_lock (id, locked_by, locked_at, expires_at)
74
+ SELECT 1, ?, ?, ?
75
+ WHERE NOT EXISTS (
76
+ SELECT 1 FROM pr_sync_lock WHERE id = 1 AND locked_by != ? AND expires_at > ?
77
+ )
78
+ `);
79
+ const result = stmt.run(this.processId, now, expiresAt, this.processId, now);
80
+ return result.changes > 0;
81
+ }
82
+ /** Check if a feature should be polled this cycle based on its unchanged cycles count. */
83
+ shouldPollFeature(featureId) {
84
+ const tracked = this.trackedFeatures.get(featureId);
85
+ if (!tracked)
86
+ return true; // new feature, always poll
87
+ const uc = tracked.unchangedCycles;
88
+ if (uc <= 2)
89
+ return true; // poll every cycle
90
+ if (uc <= 5)
91
+ return this.pollCycle % 2 === 0; // poll every 2nd cycle
92
+ return this.pollCycle % 4 === 0; // poll every 4th cycle
93
+ }
58
94
  async poll() {
59
95
  try {
96
+ if (!this.tryAcquireLock()) {
97
+ return; // another process holds the lock — skip this cycle
98
+ }
99
+ this.pollCycle++;
60
100
  const allFeatures = await this.featureRepo.list({ lifecycle: SdlcLifecycle.Review });
61
101
  // Include features with a valid repositoryPath (with or without PR data)
62
102
  const features = allFeatures.filter((f) => f.repositoryPath);
@@ -89,9 +129,32 @@ export class PrSyncWatcherService {
89
129
  console.warn(`${TAG} Poll failed: ${msg}`);
90
130
  }
91
131
  }
132
+ isRateLimited(repoPath) {
133
+ const until = this.rateLimitedUntil.get(repoPath);
134
+ if (until === undefined)
135
+ return false;
136
+ if (Date.now() >= until) {
137
+ this.rateLimitedUntil.delete(repoPath);
138
+ // eslint-disable-next-line no-console
139
+ console.log(`${TAG} Rate limit backoff expired for ${repoPath}`);
140
+ return false;
141
+ }
142
+ return true;
143
+ }
144
+ handleRateLimitError(repoPath, error) {
145
+ const msg = error.message;
146
+ if (msg.includes('API rate limit exceeded') || msg.includes('rate limit')) {
147
+ const backoffUntil = Date.now() + RATE_LIMIT_BACKOFF_MS;
148
+ this.rateLimitedUntil.set(repoPath, backoffUntil);
149
+ // eslint-disable-next-line no-console
150
+ console.warn(`${TAG} Rate limited for ${repoPath}, backing off until ${new Date(backoffUntil).toISOString()}`);
151
+ }
152
+ }
92
153
  async processRepository(repoPath, features) {
93
154
  if (this.skippedRepos.has(repoPath))
94
155
  return;
156
+ if (this.isRateLimited(repoPath))
157
+ return;
95
158
  // Skip repos without a git remote — gh pr list will always fail
96
159
  try {
97
160
  if (!(await this.gitPrService.hasRemote(repoPath))) {
@@ -110,6 +173,8 @@ export class PrSyncWatcherService {
110
173
  }
111
174
  catch (error) {
112
175
  const msg = error instanceof Error ? error.message : String(error);
176
+ if (error instanceof Error)
177
+ this.handleRateLimitError(repoPath, error);
113
178
  // eslint-disable-next-line no-console
114
179
  console.warn(`${TAG} listPrStatuses failed for ${repoPath}: ${msg}`);
115
180
  return;
@@ -153,10 +218,15 @@ export class PrSyncWatcherService {
153
218
  ciStatus: undefined,
154
219
  mergeable: undefined,
155
220
  featureName: feature.name,
221
+ unchangedCycles: 0,
156
222
  });
157
223
  await this.featureRepo.update(feature);
158
224
  return;
159
225
  }
226
+ // Check exponential backoff — skip features that haven't changed recently
227
+ if (!this.shouldPollFeature(feature.id)) {
228
+ return;
229
+ }
160
230
  const pr = feature.pr;
161
231
  const prStatusInfo = statusByNumber.get(pr.number);
162
232
  let needsUpdate = false;
@@ -169,6 +239,7 @@ export class PrSyncWatcherService {
169
239
  ciStatus: pr.ciStatus,
170
240
  mergeable: pr.mergeable,
171
241
  featureName: feature.name,
242
+ unchangedCycles: 0,
172
243
  });
173
244
  }
174
245
  const tracked = this.trackedFeatures.get(feature.id);
@@ -223,12 +294,18 @@ export class PrSyncWatcherService {
223
294
  }
224
295
  catch (error) {
225
296
  const msg = error instanceof Error ? error.message : String(error);
297
+ if (error instanceof Error)
298
+ this.handleRateLimitError(feature.repositoryPath, error);
226
299
  // eslint-disable-next-line no-console
227
300
  console.warn(`${TAG} getCiStatus failed for "${feature.name}": ${msg}`);
228
301
  }
229
302
  if (needsUpdate) {
303
+ tracked.unchangedCycles = 0;
230
304
  await this.featureRepo.update(feature);
231
305
  }
306
+ else {
307
+ tracked.unchangedCycles++;
308
+ }
232
309
  }
233
310
  /** Mark associated agent run as completed so the UI reflects "done" state. */
234
311
  async completeAgentRun(feature) {
@@ -264,11 +341,11 @@ let watcherInstance = null;
264
341
  *
265
342
  * @throws Error if the watcher is already initialized
266
343
  */
267
- export function initializePrSyncWatcher(featureRepo, agentRunRepo, gitPrService, notificationService, pollIntervalMs) {
344
+ export function initializePrSyncWatcher(featureRepo, agentRunRepo, gitPrService, notificationService, pollIntervalMs, db) {
268
345
  if (watcherInstance !== null) {
269
346
  throw new Error('PR sync watcher already initialized. Cannot re-initialize.');
270
347
  }
271
- watcherInstance = new PrSyncWatcherService(featureRepo, agentRunRepo, gitPrService, notificationService, pollIntervalMs);
348
+ watcherInstance = new PrSyncWatcherService(featureRepo, agentRunRepo, gitPrService, notificationService, pollIntervalMs, db ?? null);
272
349
  }
273
350
  /**
274
351
  * Get the PR sync watcher singleton.
@@ -1 +1 @@
1
- {"version":3,"file":"ui.command.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/cli/commands/ui.command.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAE,OAAO,EAAwB,MAAM,WAAW,CAAC;AA+B1D;;GAEG;AACH,wBAAgB,eAAe,IAAI,OAAO,CAkFzC"}
1
+ {"version":3,"file":"ui.command.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/cli/commands/ui.command.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAE,OAAO,EAAwB,MAAM,WAAW,CAAC;AAgC1D;;GAEG;AACH,wBAAgB,eAAe,IAAI,OAAO,CA0FzC"}
@@ -21,6 +21,7 @@ import { setVersionEnvVars } from '../../../../packages/core/src/infrastructure/
21
21
  import { resolveWebDir } from '../../../../packages/core/src/infrastructure/services/web-server.service.js';
22
22
  import { initializeNotificationWatcher, getNotificationWatcher, } from '../../../../packages/core/src/infrastructure/services/notifications/notification-watcher.service.js';
23
23
  import { initializePrSyncWatcher, getPrSyncWatcher, } from '../../../../packages/core/src/infrastructure/services/pr-sync/pr-sync-watcher.service.js';
24
+ import { getExistingConnection } from '../../../../packages/core/src/infrastructure/persistence/sqlite/connection.js';
24
25
  import { BrowserOpenerService } from '../../../../packages/core/src/infrastructure/services/browser-opener.service.js';
25
26
  import { colors, fmt, messages } from '../ui/index.js';
26
27
  function parsePort(value) {
@@ -66,7 +67,8 @@ Examples:
66
67
  getNotificationWatcher().start();
67
68
  // Start PR sync watcher to detect PR/CI status transitions on GitHub
68
69
  const gitPrService = container.resolve('IGitPrService');
69
- initializePrSyncWatcher(featureRepo, runRepo, gitPrService, notificationService);
70
+ const db = getExistingConnection();
71
+ initializePrSyncWatcher(featureRepo, runRepo, gitPrService, notificationService, undefined, db);
70
72
  getPrSyncWatcher().start();
71
73
  const url = `http://localhost:${port}`;
72
74
  messages.success(`Server ready at ${fmt.code(url)}`);
@@ -1,5 +1,5 @@
1
1
  import type { Feature } from '../../../../../packages/core/src/domain/generated/output.js';
2
- export declare function deleteFeature(featureId: string, cleanup?: boolean, cascadeDelete?: boolean): Promise<{
2
+ export declare function deleteFeature(featureId: string, cleanup?: boolean): Promise<{
3
3
  feature?: Feature;
4
4
  error?: string;
5
5
  }>;
@@ -1 +1 @@
1
- {"version":3,"file":"delete-feature.d.ts","sourceRoot":"","sources":["../../../../../../src/presentation/web/app/actions/delete-feature.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,sCAAsC,CAAC;AAEpE,wBAAsB,aAAa,CACjC,SAAS,EAAE,MAAM,EACjB,OAAO,CAAC,EAAE,OAAO,EACjB,aAAa,CAAC,EAAE,OAAO,GACtB,OAAO,CAAC;IAAE,OAAO,CAAC,EAAE,OAAO,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC,CAmBhD"}
1
+ {"version":3,"file":"delete-feature.d.ts","sourceRoot":"","sources":["../../../../../../src/presentation/web/app/actions/delete-feature.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,sCAAsC,CAAC;AAEpE,wBAAsB,aAAa,CACjC,SAAS,EAAE,MAAM,EACjB,OAAO,CAAC,EAAE,OAAO,GAChB,OAAO,CAAC;IAAE,OAAO,CAAC,EAAE,OAAO,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC,CAgBhD"}
@@ -1,18 +1,13 @@
1
1
  'use server';
2
2
  import { resolve } from '../../lib/server-container.js';
3
- export async function deleteFeature(featureId, cleanup, cascadeDelete) {
3
+ export async function deleteFeature(featureId, cleanup) {
4
4
  if (!featureId?.trim()) {
5
5
  return { error: 'id is required' };
6
6
  }
7
7
  try {
8
8
  const deleteFeatureUseCase = resolve('DeleteFeatureUseCase');
9
- const options = {};
10
- if (cleanup !== undefined)
11
- options.cleanup = cleanup;
12
- if (cascadeDelete !== undefined)
13
- options.cascadeDelete = cascadeDelete;
14
- const feature = Object.keys(options).length > 0
15
- ? await deleteFeatureUseCase.execute(featureId, options)
9
+ const feature = cleanup !== undefined
10
+ ? await deleteFeatureUseCase.execute(featureId, { cleanup })
16
11
  : await deleteFeatureUseCase.execute(featureId);
17
12
  return { feature };
18
13
  }
@@ -3,6 +3,9 @@ import type { FeatureNodeData } from '../../components/common/feature-node/index
3
3
  * Fetches full FeatureNodeData for a given feature ID.
4
4
  * Used by the drawer for targeted data syncing without triggering
5
5
  * a full router.refresh() / server component re-render.
6
+ *
7
+ * CI status and mergeable status are read from the DB (already updated
8
+ * by PrSyncWatcherService) instead of making duplicate GitHub API calls.
6
9
  */
7
10
  export declare function getFeatureDrawerData(featureId: string): Promise<FeatureNodeData | null>;
8
11
  //# sourceMappingURL=get-feature-drawer-data.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"get-feature-drawer-data.d.ts","sourceRoot":"","sources":["../../../../../../src/presentation/web/app/actions/get-feature-drawer-data.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAC;AAQxE;;;;GAIG;AACH,wBAAsB,oBAAoB,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,eAAe,GAAG,IAAI,CAAC,CAsD7F"}
1
+ {"version":3,"file":"get-feature-drawer-data.d.ts","sourceRoot":"","sources":["../../../../../../src/presentation/web/app/actions/get-feature-drawer-data.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAC;AAExE;;;;;;;GAOG;AACH,wBAAsB,oBAAoB,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,eAAe,GAAG,IAAI,CAAC,CAgC7F"}
@@ -1,16 +1,13 @@
1
1
  'use server';
2
2
  import { resolve } from '../../lib/server-container.js';
3
- import { CiStatus } from '../../../../../packages/core/src/domain/generated/output.js';
4
3
  import { buildFeatureNodeData } from '../build-feature-node-data.js';
5
- const CI_STATUS_MAP = {
6
- success: CiStatus.Success,
7
- failure: CiStatus.Failure,
8
- pending: CiStatus.Pending,
9
- };
10
4
  /**
11
5
  * Fetches full FeatureNodeData for a given feature ID.
12
6
  * Used by the drawer for targeted data syncing without triggering
13
7
  * a full router.refresh() / server component re-render.
8
+ *
9
+ * CI status and mergeable status are read from the DB (already updated
10
+ * by PrSyncWatcherService) instead of making duplicate GitHub API calls.
14
11
  */
15
12
  export async function getFeatureDrawerData(featureId) {
16
13
  try {
@@ -23,37 +20,15 @@ export async function getFeatureDrawerData(featureId) {
23
20
  if (!feature)
24
21
  return null;
25
22
  const run = feature.agentRunId ? await agentRunRepo.findById(feature.agentRunId) : null;
26
- const [repo, baseBranch, artifact, remoteUrl, liveMergeable, liveCiResult] = await Promise.all([
23
+ // CI status and mergeable status are read from the feature record (updated by
24
+ // PrSyncWatcherService every 30s) — no duplicate GitHub API calls needed.
25
+ // Only getDefaultBranch and getRemoteUrl are kept as they are local git operations.
26
+ const [repo, baseBranch, artifact, remoteUrl] = await Promise.all([
27
27
  repoRepo.findByPath(feature.repositoryPath).catch(() => null),
28
28
  gitPrService.getDefaultBranch(feature.repositoryPath).catch(() => 'main'),
29
29
  getArtifact.execute(featureId).catch(() => null),
30
30
  gitPrService.getRemoteUrl(feature.repositoryPath).catch(() => null),
31
- feature.pr?.number
32
- ? gitPrService
33
- .getMergeableStatus(feature.repositoryPath, feature.pr.number)
34
- .catch(() => undefined)
35
- : Promise.resolve(undefined),
36
- feature.branch
37
- ? gitPrService.getCiStatus(feature.repositoryPath, feature.branch).catch(() => undefined)
38
- : Promise.resolve(undefined),
39
31
  ]);
40
- // Merge live PR status into feature data
41
- if (feature.pr) {
42
- const liveCiStatus = liveCiResult
43
- ? (CI_STATUS_MAP[liveCiResult.status] ?? CiStatus.Pending)
44
- : undefined;
45
- const updates = {};
46
- if (liveMergeable !== undefined)
47
- updates.mergeable = liveMergeable;
48
- if (liveCiStatus !== undefined)
49
- updates.ciStatus = liveCiStatus;
50
- if (Object.keys(updates).length > 0) {
51
- feature.pr = { ...feature.pr, ...updates };
52
- featureRepo.update(feature).catch(() => {
53
- /* best-effort persist */
54
- });
55
- }
56
- }
57
32
  return buildFeatureNodeData(feature, run, {
58
33
  repositoryName: repo?.name,
59
34
  baseBranch,
@@ -1,10 +1,9 @@
1
1
  export interface DeleteFeatureDialogProps {
2
2
  open: boolean;
3
3
  onOpenChange: (open: boolean) => void;
4
- onConfirm: (cleanup: boolean, cascadeDelete: boolean) => void;
4
+ onConfirm: (cleanup: boolean) => void;
5
5
  isDeleting: boolean;
6
6
  featureName: string;
7
7
  featureId: string;
8
- hasChildren?: boolean;
9
8
  }
10
9
  //# sourceMappingURL=delete-feature-dialog-config.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"delete-feature-dialog-config.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/web/components/common/delete-feature-dialog/delete-feature-dialog-config.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,wBAAwB;IACvC,IAAI,EAAE,OAAO,CAAC;IACd,YAAY,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IACtC,SAAS,EAAE,CAAC,OAAO,EAAE,OAAO,EAAE,aAAa,EAAE,OAAO,KAAK,IAAI,CAAC;IAC9D,UAAU,EAAE,OAAO,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB"}
1
+ {"version":3,"file":"delete-feature-dialog-config.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/web/components/common/delete-feature-dialog/delete-feature-dialog-config.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,wBAAwB;IACvC,IAAI,EAAE,OAAO,CAAC;IACd,YAAY,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IACtC,SAAS,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;IACtC,UAAU,EAAE,OAAO,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;CACnB"}
@@ -1,3 +1,3 @@
1
1
  import type { DeleteFeatureDialogProps } from './delete-feature-dialog-config.js';
2
- export declare function DeleteFeatureDialog({ open, onOpenChange, onConfirm, isDeleting, featureName, featureId, hasChildren, }: DeleteFeatureDialogProps): import("react/jsx-runtime").JSX.Element;
2
+ export declare function DeleteFeatureDialog({ open, onOpenChange, onConfirm, isDeleting, featureName, featureId, }: DeleteFeatureDialogProps): import("react/jsx-runtime").JSX.Element;
3
3
  //# sourceMappingURL=delete-feature-dialog.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"delete-feature-dialog.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/web/components/common/delete-feature-dialog/delete-feature-dialog.tsx"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,gCAAgC,CAAC;AAE/E,wBAAgB,mBAAmB,CAAC,EAClC,IAAI,EACJ,YAAY,EACZ,SAAS,EACT,UAAU,EACV,WAAW,EACX,SAAS,EACT,WAAW,GACZ,EAAE,wBAAwB,2CAuE1B"}
1
+ {"version":3,"file":"delete-feature-dialog.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/web/components/common/delete-feature-dialog/delete-feature-dialog.tsx"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,gCAAgC,CAAC;AAE/E,wBAAgB,mBAAmB,CAAC,EAClC,IAAI,EACJ,YAAY,EACZ,SAAS,EACT,UAAU,EACV,WAAW,EACX,SAAS,GACV,EAAE,wBAAwB,2CAqD1B"}
@@ -5,14 +5,12 @@ import { Loader2 } from 'lucide-react';
5
5
  import { AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogTitle, } from '../../ui/alert-dialog.js';
6
6
  import { Checkbox } from '../../ui/checkbox.js';
7
7
  import { Label } from '../../ui/label.js';
8
- export function DeleteFeatureDialog({ open, onOpenChange, onConfirm, isDeleting, featureName, featureId, hasChildren, }) {
8
+ export function DeleteFeatureDialog({ open, onOpenChange, onConfirm, isDeleting, featureName, featureId, }) {
9
9
  const [cleanup, setCleanup] = useState(true);
10
- const [cascadeDelete, setCascadeDelete] = useState(true);
11
10
  useEffect(() => {
12
11
  if (open) {
13
12
  setCleanup(true);
14
- setCascadeDelete(true);
15
13
  }
16
14
  }, [open]);
17
- return (_jsx(AlertDialog, { open: open, onOpenChange: onOpenChange, children: _jsxs(AlertDialogContent, { onCloseAutoFocus: (e) => e.preventDefault(), children: [_jsxs(AlertDialogHeader, { children: [_jsx(AlertDialogTitle, { children: "Delete feature?" }), _jsxs(AlertDialogDescription, { children: ["This will permanently delete ", _jsx("strong", { children: featureName }), " (", featureId, "). This action cannot be undone."] })] }), _jsxs("div", { className: "flex flex-col gap-2", children: [hasChildren ? (_jsxs("div", { className: "flex items-center gap-2", children: [_jsx(Checkbox, { id: "cascade-delete-checkbox", checked: cascadeDelete, onCheckedChange: (checked) => setCascadeDelete(checked === true), disabled: isDeleting, "aria-label": "Also delete sub-features" }), _jsx(Label, { htmlFor: "cascade-delete-checkbox", className: "cursor-pointer text-sm", children: "Also delete sub-features" })] })) : null, _jsxs("div", { className: "flex items-center gap-2", children: [_jsx(Checkbox, { id: "cleanup-checkbox", checked: cleanup, onCheckedChange: (checked) => setCleanup(checked === true), disabled: isDeleting, "aria-label": "Clean up worktree and branches" }), _jsx(Label, { htmlFor: "cleanup-checkbox", className: "cursor-pointer text-sm", children: "Clean up worktree and branches" })] })] }), _jsxs(AlertDialogFooter, { children: [_jsx(AlertDialogCancel, { disabled: isDeleting, onClick: () => onOpenChange(false), children: "Cancel" }), _jsx(AlertDialogAction, { variant: "destructive", disabled: isDeleting, onClick: () => onConfirm(cleanup, cascadeDelete), children: isDeleting ? (_jsxs(_Fragment, { children: [_jsx(Loader2, { className: "mr-2 h-4 w-4 animate-spin" }), "Deleting\u2026"] })) : ('Delete') })] })] }) }));
15
+ return (_jsx(AlertDialog, { open: open, onOpenChange: onOpenChange, children: _jsxs(AlertDialogContent, { onCloseAutoFocus: (e) => e.preventDefault(), children: [_jsxs(AlertDialogHeader, { children: [_jsx(AlertDialogTitle, { children: "Delete feature?" }), _jsxs(AlertDialogDescription, { children: ["This will permanently delete ", _jsx("strong", { children: featureName }), " (", featureId, "). This action cannot be undone."] })] }), _jsxs("div", { className: "flex items-center gap-2", children: [_jsx(Checkbox, { id: "cleanup-checkbox", checked: cleanup, onCheckedChange: (checked) => setCleanup(checked === true), disabled: isDeleting, "aria-label": "Clean up worktree and branches" }), _jsx(Label, { htmlFor: "cleanup-checkbox", className: "cursor-pointer text-sm", children: "Clean up worktree and branches" })] }), _jsxs(AlertDialogFooter, { children: [_jsx(AlertDialogCancel, { disabled: isDeleting, onClick: () => onOpenChange(false), children: "Cancel" }), _jsx(AlertDialogAction, { variant: "destructive", disabled: isDeleting, onClick: () => onConfirm(cleanup), children: isDeleting ? (_jsxs(_Fragment, { children: [_jsx(Loader2, { className: "mr-2 h-4 w-4 animate-spin" }), "Deleting\u2026"] })) : ('Delete') })] })] }) }));
18
16
  }
@@ -4,7 +4,5 @@ declare const meta: Meta<typeof DeleteFeatureDialog>;
4
4
  export default meta;
5
5
  type Story = StoryObj<typeof DeleteFeatureDialog>;
6
6
  export declare const Default: Story;
7
- export declare const WithChildren: Story;
8
7
  export declare const Deleting: Story;
9
- export declare const DeletingWithChildren: Story;
10
8
  //# sourceMappingURL=delete-feature-dialog.stories.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"delete-feature-dialog.stories.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/web/components/common/delete-feature-dialog/delete-feature-dialog.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAEvD,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAE9D,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,mBAAmB,CAe1C,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAElD,eAAO,MAAM,OAAO,EAAE,KAAU,CAAC;AAEjC,eAAO,MAAM,YAAY,EAAE,KAI1B,CAAC;AAEF,eAAO,MAAM,QAAQ,EAAE,KAItB,CAAC;AAEF,eAAO,MAAM,oBAAoB,EAAE,KAKlC,CAAC"}
1
+ {"version":3,"file":"delete-feature-dialog.stories.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/web/components/common/delete-feature-dialog/delete-feature-dialog.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAEvD,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAE9D,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,mBAAmB,CAe1C,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAElD,eAAO,MAAM,OAAO,EAAE,KAAU,CAAC;AAEjC,eAAO,MAAM,QAAQ,EAAE,KAItB,CAAC"}
@@ -18,19 +18,8 @@ const meta = {
18
18
  };
19
19
  export default meta;
20
20
  export const Default = {};
21
- export const WithChildren = {
22
- args: {
23
- hasChildren: true,
24
- },
25
- };
26
21
  export const Deleting = {
27
22
  args: {
28
23
  isDeleting: true,
29
24
  },
30
25
  };
31
- export const DeletingWithChildren = {
32
- args: {
33
- isDeleting: true,
34
- hasChildren: true,
35
- },
36
- };
@@ -66,8 +66,7 @@ export interface FeatureNodeData {
66
66
  };
67
67
  onAction?: () => void;
68
68
  onSettings?: () => void;
69
- hasChildren?: boolean;
70
- onDelete?: (featureId: string, cleanup?: boolean, cascadeDelete?: boolean) => void;
69
+ onDelete?: (featureId: string, cleanup?: boolean) => void;
71
70
  onRetry?: (featureId: string) => void;
72
71
  showHandles?: boolean;
73
72
  }
@@ -1 +1 @@
1
- {"version":3,"file":"feature-node-state-config.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/web/components/common/feature-node/feature-node-state-config.ts"],"names":[],"m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KAAK,IAAI,CAAC;IACtC,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB;AAED,MAAM,MAAM,eAAe,GAAG,IAAI,CAAC,eAAe,EAAE,aAAa,CAAC,CAAC;AAEnE,MAAM,WAAW,sBAAsB;IACrC,IAAI,EAAE,UAAU,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;IACnB,aAAa,EAAE,MAAM,CAAC;IACtB,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,MAAM,CAAC;IACrB,KAAK,EAAE,MAAM,CAAC;IACd,eAAe,EAAE,OAAO,CAAC;CAC1B;AAED,eAAO,MAAM,sBAAsB,EAAE,MAAM,CAAC,gBAAgB,EAAE,sBAAsB,CAuEnF,CAAC"}
1
+ {"version":3,"file":"feature-node-state-config.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/web/components/common/feature-node/feature-node-state-config.ts"],"names":[],"mappings":"AAAA,OAAO,EAOL,KAAK,UAAU,EAChB,MAAM,cAAc,CAAC;AACtB,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAC1C,OAAO,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,eAAe,EAAE,MAAM,sCAAsC,CAAC;AAChG,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAEzD,MAAM,MAAM,gBAAgB,GACxB,UAAU,GACV,SAAS,GACT,iBAAiB,GACjB,MAAM,GACN,SAAS,GACT,OAAO,GACP,UAAU,CAAC;AAEf,MAAM,MAAM,qBAAqB,GAC7B,cAAc,GACd,UAAU,GACV,gBAAgB,GAChB,QAAQ,GACR,QAAQ,GACR,UAAU,CAAC;AAEf,0DAA0D;AAC1D,eAAO,MAAM,sBAAsB,EAAE,MAAM,CAAC,qBAAqB,EAAE,MAAM,CAOxE,CAAC;AAEF,gFAAgF;AAChF,eAAO,MAAM,qBAAqB,EAAE,MAAM,CAAC,qBAAqB,EAAE,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Z,MAAM,EAAE,MAAM,CAAC;QACf,MAAM,EAAE,QAAQ,CAAC;QACjB,QAAQ,CAAC,EAAE,QAAQ,CAAC;QACpB,UAAU,CAAC,EAAE,MAAM,CAAC;QACpB,SAAS,CAAC,EAAE,OAAO,CAAC;KACrB,CAAC;IACF,+DAA+D;IAC/D,UAAU,CAAC,EAAE;QACX,MAAM,EAAE,eAAe,CAAC;QACxB,GAAG,CAAC,EAAE,MAAM,CAAC;KACd,CAAC;IACF,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IACtB,UAAU,CAAC,EAAE,MAAM,IAAI,CAAC;IACxB,QAAQ,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,OAAO,KAAK,IAAI,CAAC;IAC1D,OAAO,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,IAAI,CAAC;IACtC,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB;AAED,MAAM,MAAM,eAAe,GAAG,IAAI,CAAC,eAAe,EAAE,aAAa,CAAC,CAAC;AAEnE,MAAM,WAAW,sBAAsB;IACrC,IAAI,EAAE,UAAU,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;IACnB,aAAa,EAAE,MAAM,CAAC;IACtB,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,MAAM,CAAC;IACrB,KAAK,EAAE,MAAM,CAAC;IACd,eAAe,EAAE,OAAO,CAAC;CAC1B;AAED,eAAO,MAAM,sBAAsB,EAAE,MAAM,CAAC,gBAAgB,EAAE,sBAAsB,CAuEnF,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"feature-node.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/web/components/common/feature-node/feature-node.tsx"],"names":[],"mappings":"AAwBA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AA0DnE,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,2CAsTA"}
1
+ {"version":3,"file":"feature-node.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/web/components/common/feature-node/feature-node.tsx"],"names":[],"mappings":"AAwBA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AA0DnE,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,2CAqTA"}
@@ -70,10 +70,10 @@ export function FeatureNode({ data, selected, }) {
70
70
  return (_jsxs("div", { className: "animate-in fade-in group relative duration-300", children: [data.showHandles ? (_jsx(Handle, { type: "target", position: Position.Left, isConnectable: false, className: "opacity-0!" })) : null, data.onDelete && data.featureId && data.state !== 'deleting' ? (_jsxs(_Fragment, { children: [_jsx("div", { className: "absolute top-1/2 -left-10 -translate-y-1/2 opacity-0 transition-opacity group-hover:opacity-100", onPointerDown: (e) => e.stopPropagation(), children: _jsx(TooltipProvider, { children: _jsxs(Tooltip, { children: [_jsx(TooltipTrigger, { asChild: true, children: _jsx("button", { "aria-label": "Delete feature", "data-testid": "feature-node-delete-button", onClick: (e) => {
71
71
  e.stopPropagation();
72
72
  setConfirmOpen(true);
73
- }, className: "bg-card text-muted-foreground hover:border-destructive hover:text-destructive flex h-7 w-7 cursor-pointer items-center justify-center rounded-full border shadow-sm transition-colors", children: _jsx(Trash2, { className: "h-3.5 w-3.5" }) }) }), _jsx(TooltipContent, { children: "Delete feature" })] }) }) }), _jsx(DeleteFeatureDialog, { open: confirmOpen, onOpenChange: setConfirmOpen, onConfirm: (cleanup, cascadeDelete) => {
73
+ }, className: "bg-card text-muted-foreground hover:border-destructive hover:text-destructive flex h-7 w-7 cursor-pointer items-center justify-center rounded-full border shadow-sm transition-colors", children: _jsx(Trash2, { className: "h-3.5 w-3.5" }) }) }), _jsx(TooltipContent, { children: "Delete feature" })] }) }) }), _jsx(DeleteFeatureDialog, { open: confirmOpen, onOpenChange: setConfirmOpen, onConfirm: (cleanup) => {
74
74
  setConfirmOpen(false);
75
- data.onDelete?.(data.featureId, cleanup, cascadeDelete);
76
- }, isDeleting: false, featureName: data.name ?? 'this feature', featureId: data.featureId, hasChildren: data.hasChildren })] })) : null, _jsxs("div", { "data-testid": "feature-node-card", "aria-busy": data.state === 'creating' || data.state === 'deleting' ? 'true' : undefined, className: cn('bg-card flex min-h-35 w-72 cursor-pointer flex-col rounded-lg border p-3 shadow-sm', selected && 'ring-primary ring-2', data.state === 'deleting' && 'opacity-60'), children: [_jsxs("div", { className: "flex items-center justify-between", children: [_jsx("span", { "data-testid": "feature-node-lifecycle-label", className: cn('text-[10px] font-semibold tracking-wider'), children: data.state === 'blocked' ? 'BLOCKED' : 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) => {
75
+ data.onDelete?.(data.featureId, cleanup);
76
+ }, isDeleting: false, featureName: data.name ?? 'this feature', featureId: data.featureId })] })) : null, _jsxs("div", { "data-testid": "feature-node-card", "aria-busy": data.state === 'creating' || data.state === 'deleting' ? 'true' : undefined, className: cn('bg-card flex min-h-35 w-72 cursor-pointer flex-col rounded-lg border p-3 shadow-sm', selected && 'ring-primary ring-2', data.state === 'deleting' && 'opacity-60'), children: [_jsxs("div", { className: "flex items-center justify-between", children: [_jsx("span", { "data-testid": "feature-node-lifecycle-label", className: cn('text-[10px] font-semibold tracking-wider'), children: data.state === 'blocked' ? 'BLOCKED' : 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) => {
77
77
  e.stopPropagation();
78
78
  data.onSettings?.();
79
79
  }, className: cn('nodrag -mt-1 -mr-1 p-1', data.onSettings
@@ -14,7 +14,7 @@ export interface ControlCenterState {
14
14
  repoPath: string;
15
15
  };
16
16
  handleLayout: (direction: LayoutDirection) => void;
17
- handleDeleteFeature: (featureId: string, cleanup?: boolean, cascadeDelete?: boolean) => void;
17
+ handleDeleteFeature: (featureId: string, cleanup?: boolean) => void;
18
18
  handleRetryFeature: (featureId: string) => void;
19
19
  handleDeleteRepository: (repositoryId: string) => Promise<void>;
20
20
  createFeatureNode: (sourceNodeId: string | null, dataOverride?: Partial<FeatureNodeData>, edgeType?: string) => string;
@@ -1 +1 @@
1
- {"version":3,"file":"use-control-center-state.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/web/components/features/control-center/use-control-center-state.ts"],"names":[],"mappings":"A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;IACxD,wBAAwB,EAAE,CAAC,aAAa,EAAE,MAAM,KAAK,MAAM,GAAG,SAAS,CAAC;IACxE,gDAAgD;IAChD,iBAAiB,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,kBAAkB,GAAG,SAAS,CAAC;IACtE,0EAA0E;IAC1E,YAAY,EAAE,CAAC,SAAS,EAAE,cAAc,KAAK,IAAI,CAAC;CACnD;AAQD,wBAAgB,qBAAqB,CACnC,YAAY,EAAE,cAAc,EAAE,EAC9B,YAAY,EAAE,IAAI,EAAE,GACnB,kBAAkB,CAgcpB"}
1
+ {"version":3,"file":"use-control-center-state.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/web/components/features/control-center/use-control-center-state.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,UAAU,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAClE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAC;AACxE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,qCAAqC,CAAC;AAC9E,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uCAAuC,CAAC;AAC5E,OAAO,EAGL,KAAK,eAAe,EACrB,MAAM,yBAAyB,CAAC;AAcjC,OAAO,EAAiB,KAAK,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAM7E,MAAM,WAAW,kBAAkB;IACjC,KAAK,EAAE,cAAc,EAAE,CAAC;IACxB,KAAK,EAAE,IAAI,EAAE,CAAC;IACd,aAAa,EAAE,CAAC,OAAO,EAAE,UAAU,CAAC,cAAc,CAAC,EAAE,KAAK,IAAI,CAAC;IAC/D,aAAa,EAAE,CAAC,UAAU,EAAE,UAAU,KAAK,IAAI,CAAC;IAChD,mBAAmB,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK;QAAE,QAAQ,EAAE,OAAO,CAAC;QAAC,QAAQ,EAAE,MAAM,CAAA;KAAE,CAAC;IAC/E,YAAY,EAAE,CAAC,SAAS,E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