jumbo-cli 3.11.0 → 3.12.0

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 (218) hide show
  1. package/dist/application/context/project/stats/AudiencePainStatsView.d.ts +5 -0
  2. package/dist/application/context/project/stats/AudiencePainStatsView.d.ts.map +1 -0
  3. package/dist/application/context/project/stats/AudiencePainStatsView.js +2 -0
  4. package/dist/application/context/project/stats/AudiencePainStatsView.js.map +1 -0
  5. package/dist/application/context/project/stats/AudiencePainsCount.d.ts +2 -0
  6. package/dist/application/context/project/stats/AudiencePainsCount.d.ts.map +1 -0
  7. package/dist/application/context/project/stats/AudiencePainsCount.js +2 -0
  8. package/dist/application/context/project/stats/AudiencePainsCount.js.map +1 -0
  9. package/dist/application/context/project/stats/AudienceStatsView.d.ts +9 -0
  10. package/dist/application/context/project/stats/AudienceStatsView.d.ts.map +1 -0
  11. package/dist/application/context/project/stats/AudienceStatsView.js +2 -0
  12. package/dist/application/context/project/stats/AudienceStatsView.js.map +1 -0
  13. package/dist/application/context/project/stats/ClosedGoalsCount.d.ts +2 -0
  14. package/dist/application/context/project/stats/ClosedGoalsCount.d.ts.map +1 -0
  15. package/dist/application/context/project/stats/ClosedGoalsCount.js +2 -0
  16. package/dist/application/context/project/stats/ClosedGoalsCount.js.map +1 -0
  17. package/dist/application/context/project/stats/ComponentStatsView.d.ts +5 -0
  18. package/dist/application/context/project/stats/ComponentStatsView.d.ts.map +1 -0
  19. package/dist/application/context/project/stats/ComponentStatsView.js +2 -0
  20. package/dist/application/context/project/stats/ComponentStatsView.js.map +1 -0
  21. package/dist/application/context/project/stats/ComponentsCount.d.ts +2 -0
  22. package/dist/application/context/project/stats/ComponentsCount.d.ts.map +1 -0
  23. package/dist/application/context/project/stats/ComponentsCount.js +2 -0
  24. package/dist/application/context/project/stats/ComponentsCount.js.map +1 -0
  25. package/dist/application/context/project/stats/DecisionStatsView.d.ts +5 -0
  26. package/dist/application/context/project/stats/DecisionStatsView.d.ts.map +1 -0
  27. package/dist/application/context/project/stats/DecisionStatsView.js +2 -0
  28. package/dist/application/context/project/stats/DecisionStatsView.js.map +1 -0
  29. package/dist/application/context/project/stats/DecisionsCount.d.ts +2 -0
  30. package/dist/application/context/project/stats/DecisionsCount.d.ts.map +1 -0
  31. package/dist/application/context/project/stats/DecisionsCount.js +2 -0
  32. package/dist/application/context/project/stats/DecisionsCount.js.map +1 -0
  33. package/dist/application/context/project/stats/DefinedGoalsCount.d.ts +2 -0
  34. package/dist/application/context/project/stats/DefinedGoalsCount.d.ts.map +1 -0
  35. package/dist/application/context/project/stats/DefinedGoalsCount.js +2 -0
  36. package/dist/application/context/project/stats/DefinedGoalsCount.js.map +1 -0
  37. package/dist/application/context/project/stats/DependenciesCount.d.ts +2 -0
  38. package/dist/application/context/project/stats/DependenciesCount.d.ts.map +1 -0
  39. package/dist/application/context/project/stats/DependenciesCount.js +2 -0
  40. package/dist/application/context/project/stats/DependenciesCount.js.map +1 -0
  41. package/dist/application/context/project/stats/DependencyStatsView.d.ts +5 -0
  42. package/dist/application/context/project/stats/DependencyStatsView.d.ts.map +1 -0
  43. package/dist/application/context/project/stats/DependencyStatsView.js +2 -0
  44. package/dist/application/context/project/stats/DependencyStatsView.js.map +1 -0
  45. package/dist/application/context/project/stats/GoalStatsView.d.ts +13 -0
  46. package/dist/application/context/project/stats/GoalStatsView.d.ts.map +1 -0
  47. package/dist/application/context/project/stats/GoalStatsView.js +2 -0
  48. package/dist/application/context/project/stats/GoalStatsView.js.map +1 -0
  49. package/dist/application/context/project/stats/GraphStatsView.d.ts +5 -0
  50. package/dist/application/context/project/stats/GraphStatsView.d.ts.map +1 -0
  51. package/dist/application/context/project/stats/GraphStatsView.js +2 -0
  52. package/dist/application/context/project/stats/GraphStatsView.js.map +1 -0
  53. package/dist/application/context/project/stats/GuidelineStatsView.d.ts +5 -0
  54. package/dist/application/context/project/stats/GuidelineStatsView.d.ts.map +1 -0
  55. package/dist/application/context/project/stats/GuidelineStatsView.js +2 -0
  56. package/dist/application/context/project/stats/GuidelineStatsView.js.map +1 -0
  57. package/dist/application/context/project/stats/GuidelinesCount.d.ts +2 -0
  58. package/dist/application/context/project/stats/GuidelinesCount.d.ts.map +1 -0
  59. package/dist/application/context/project/stats/GuidelinesCount.js +2 -0
  60. package/dist/application/context/project/stats/GuidelinesCount.js.map +1 -0
  61. package/dist/application/context/project/stats/InProgressGoalsCount.d.ts +2 -0
  62. package/dist/application/context/project/stats/InProgressGoalsCount.d.ts.map +1 -0
  63. package/dist/application/context/project/stats/InProgressGoalsCount.js +2 -0
  64. package/dist/application/context/project/stats/InProgressGoalsCount.js.map +1 -0
  65. package/dist/application/context/project/stats/InvariantStatsView.d.ts +5 -0
  66. package/dist/application/context/project/stats/InvariantStatsView.d.ts.map +1 -0
  67. package/dist/application/context/project/stats/InvariantStatsView.js +2 -0
  68. package/dist/application/context/project/stats/InvariantStatsView.js.map +1 -0
  69. package/dist/application/context/project/stats/InvariantsCount.d.ts +2 -0
  70. package/dist/application/context/project/stats/InvariantsCount.d.ts.map +1 -0
  71. package/dist/application/context/project/stats/InvariantsCount.js +2 -0
  72. package/dist/application/context/project/stats/InvariantsCount.js.map +1 -0
  73. package/dist/application/context/project/stats/MemoryStatsView.d.ts +13 -0
  74. package/dist/application/context/project/stats/MemoryStatsView.d.ts.map +1 -0
  75. package/dist/application/context/project/stats/MemoryStatsView.js +2 -0
  76. package/dist/application/context/project/stats/MemoryStatsView.js.map +1 -0
  77. package/dist/application/context/project/stats/PrimaryAudiences.d.ts +2 -0
  78. package/dist/application/context/project/stats/PrimaryAudiences.d.ts.map +1 -0
  79. package/dist/application/context/project/stats/PrimaryAudiences.js +2 -0
  80. package/dist/application/context/project/stats/PrimaryAudiences.js.map +1 -0
  81. package/dist/application/context/project/stats/ProjectStatsSnapshotView.d.ts +6 -74
  82. package/dist/application/context/project/stats/ProjectStatsSnapshotView.d.ts.map +1 -1
  83. package/dist/application/context/project/stats/ProjectStatsView.d.ts +9 -0
  84. package/dist/application/context/project/stats/ProjectStatsView.d.ts.map +1 -0
  85. package/dist/application/context/project/stats/ProjectStatsView.js +2 -0
  86. package/dist/application/context/project/stats/ProjectStatsView.js.map +1 -0
  87. package/dist/application/context/project/stats/RefinedGoalsCount.d.ts +2 -0
  88. package/dist/application/context/project/stats/RefinedGoalsCount.d.ts.map +1 -0
  89. package/dist/application/context/project/stats/RefinedGoalsCount.js +2 -0
  90. package/dist/application/context/project/stats/RefinedGoalsCount.js.map +1 -0
  91. package/dist/application/context/project/stats/RelationCount.d.ts +2 -0
  92. package/dist/application/context/project/stats/RelationCount.d.ts.map +1 -0
  93. package/dist/application/context/project/stats/RelationCount.js +2 -0
  94. package/dist/application/context/project/stats/RelationCount.js.map +1 -0
  95. package/dist/application/context/project/stats/SecondaryAudiences.d.ts +2 -0
  96. package/dist/application/context/project/stats/SecondaryAudiences.d.ts.map +1 -0
  97. package/dist/application/context/project/stats/SecondaryAudiences.js +2 -0
  98. package/dist/application/context/project/stats/SecondaryAudiences.js.map +1 -0
  99. package/dist/application/context/project/stats/SessionsCount.d.ts +2 -0
  100. package/dist/application/context/project/stats/SessionsCount.d.ts.map +1 -0
  101. package/dist/application/context/project/stats/SessionsCount.js +2 -0
  102. package/dist/application/context/project/stats/SessionsCount.js.map +1 -0
  103. package/dist/application/context/project/stats/SessionsStatsView.d.ts +5 -0
  104. package/dist/application/context/project/stats/SessionsStatsView.d.ts.map +1 -0
  105. package/dist/application/context/project/stats/SessionsStatsView.js +2 -0
  106. package/dist/application/context/project/stats/SessionsStatsView.js.map +1 -0
  107. package/dist/application/context/project/stats/SubmittedGoalsCount.d.ts +2 -0
  108. package/dist/application/context/project/stats/SubmittedGoalsCount.d.ts.map +1 -0
  109. package/dist/application/context/project/stats/SubmittedGoalsCount.js +2 -0
  110. package/dist/application/context/project/stats/SubmittedGoalsCount.js.map +1 -0
  111. package/dist/application/context/project/stats/TotalAudiences.d.ts +2 -0
  112. package/dist/application/context/project/stats/TotalAudiences.d.ts.map +1 -0
  113. package/dist/application/context/project/stats/TotalAudiences.js +2 -0
  114. package/dist/application/context/project/stats/TotalAudiences.js.map +1 -0
  115. package/dist/application/context/project/stats/ValuePropositionsCount.d.ts +2 -0
  116. package/dist/application/context/project/stats/ValuePropositionsCount.d.ts.map +1 -0
  117. package/dist/application/context/project/stats/ValuePropositionsCount.js +2 -0
  118. package/dist/application/context/project/stats/ValuePropositionsCount.js.map +1 -0
  119. package/dist/application/context/project/stats/ValuePropositionsStatsView.d.ts +5 -0
  120. package/dist/application/context/project/stats/ValuePropositionsStatsView.d.ts.map +1 -0
  121. package/dist/application/context/project/stats/ValuePropositionsStatsView.js +2 -0
  122. package/dist/application/context/project/stats/ValuePropositionsStatsView.js.map +1 -0
  123. package/dist/application/context/project/stats/WorkStatsView.d.ts +7 -0
  124. package/dist/application/context/project/stats/WorkStatsView.d.ts.map +1 -0
  125. package/dist/application/context/project/stats/WorkStatsView.js +2 -0
  126. package/dist/application/context/project/stats/WorkStatsView.js.map +1 -0
  127. package/dist/presentation/cli/commands/goals/show/GoalShowOutputBuilder.d.ts.map +1 -1
  128. package/dist/presentation/cli/commands/goals/show/GoalShowOutputBuilder.js +10 -2
  129. package/dist/presentation/cli/commands/goals/show/GoalShowOutputBuilder.js.map +1 -1
  130. package/dist/presentation/shared/DesignTokens.d.ts +12 -2
  131. package/dist/presentation/shared/DesignTokens.d.ts.map +1 -1
  132. package/dist/presentation/shared/DesignTokens.js +12 -2
  133. package/dist/presentation/shared/DesignTokens.js.map +1 -1
  134. package/dist/presentation/tui/application-shell/App.d.ts.map +1 -1
  135. package/dist/presentation/tui/application-shell/App.js +25 -35
  136. package/dist/presentation/tui/application-shell/App.js.map +1 -1
  137. package/dist/presentation/tui/application-shell/ApplicationLauncher.d.ts.map +1 -1
  138. package/dist/presentation/tui/application-shell/ApplicationLauncher.js +1 -0
  139. package/dist/presentation/tui/application-shell/ApplicationLauncher.js.map +1 -1
  140. package/dist/presentation/tui/application-shell/Footer.d.ts +2 -1
  141. package/dist/presentation/tui/application-shell/Footer.d.ts.map +1 -1
  142. package/dist/presentation/tui/application-shell/Footer.js +10 -4
  143. package/dist/presentation/tui/application-shell/Footer.js.map +1 -1
  144. package/dist/presentation/tui/application-shell/FooterShortcutDescriptor.d.ts +5 -1
  145. package/dist/presentation/tui/application-shell/FooterShortcutDescriptor.d.ts.map +1 -1
  146. package/dist/presentation/tui/application-shell/FooterShortcutDescriptor.js +5 -1
  147. package/dist/presentation/tui/application-shell/FooterShortcutDescriptor.js.map +1 -1
  148. package/dist/presentation/tui/cockpit/DaemonActionLine.d.ts.map +1 -1
  149. package/dist/presentation/tui/cockpit/DaemonActionLine.js +3 -3
  150. package/dist/presentation/tui/cockpit/DaemonActionLine.js.map +1 -1
  151. package/dist/presentation/tui/goals/AddGoalRequestFactory.d.ts +14 -0
  152. package/dist/presentation/tui/goals/AddGoalRequestFactory.d.ts.map +1 -0
  153. package/dist/presentation/tui/goals/AddGoalRequestFactory.js +36 -0
  154. package/dist/presentation/tui/goals/AddGoalRequestFactory.js.map +1 -0
  155. package/dist/presentation/tui/goals/GoalsScreen.d.ts +13 -1
  156. package/dist/presentation/tui/goals/GoalsScreen.d.ts.map +1 -1
  157. package/dist/presentation/tui/goals/GoalsScreen.js +360 -86
  158. package/dist/presentation/tui/goals/GoalsScreen.js.map +1 -1
  159. package/dist/presentation/tui/goals/GoalsScreenConstants.d.ts +41 -17
  160. package/dist/presentation/tui/goals/GoalsScreenConstants.d.ts.map +1 -1
  161. package/dist/presentation/tui/goals/GoalsScreenConstants.js +47 -16
  162. package/dist/presentation/tui/goals/GoalsScreenConstants.js.map +1 -1
  163. package/dist/presentation/tui/memory/components/ComponentsScreen.d.ts.map +1 -1
  164. package/dist/presentation/tui/memory/components/ComponentsScreen.js +1 -2
  165. package/dist/presentation/tui/memory/components/ComponentsScreen.js.map +1 -1
  166. package/dist/presentation/tui/memory/decisions/DecisionsScreen.d.ts.map +1 -1
  167. package/dist/presentation/tui/memory/decisions/DecisionsScreen.js +1 -2
  168. package/dist/presentation/tui/memory/decisions/DecisionsScreen.js.map +1 -1
  169. package/dist/presentation/tui/memory/dependencies/DependenciesScreen.d.ts.map +1 -1
  170. package/dist/presentation/tui/memory/dependencies/DependenciesScreen.js +1 -2
  171. package/dist/presentation/tui/memory/dependencies/DependenciesScreen.js.map +1 -1
  172. package/dist/presentation/tui/memory/entity-browser/EntityDetailView.d.ts +4 -4
  173. package/dist/presentation/tui/memory/entity-browser/EntityDetailView.d.ts.map +1 -1
  174. package/dist/presentation/tui/memory/entity-browser/EntityDetailView.js +33 -25
  175. package/dist/presentation/tui/memory/entity-browser/EntityDetailView.js.map +1 -1
  176. package/dist/presentation/tui/memory/entity-browser/MemoryEntityScreen.d.ts +1 -2
  177. package/dist/presentation/tui/memory/entity-browser/MemoryEntityScreen.d.ts.map +1 -1
  178. package/dist/presentation/tui/memory/entity-browser/MemoryEntityScreen.js +47 -78
  179. package/dist/presentation/tui/memory/entity-browser/MemoryEntityScreen.js.map +1 -1
  180. package/dist/presentation/tui/memory/guidelines/GuidelinesScreen.d.ts.map +1 -1
  181. package/dist/presentation/tui/memory/guidelines/GuidelinesScreen.js +1 -2
  182. package/dist/presentation/tui/memory/guidelines/GuidelinesScreen.js.map +1 -1
  183. package/dist/presentation/tui/memory/invariants/InvariantsScreen.d.ts.map +1 -1
  184. package/dist/presentation/tui/memory/invariants/InvariantsScreen.js +1 -2
  185. package/dist/presentation/tui/memory/invariants/InvariantsScreen.js.map +1 -1
  186. package/dist/presentation/tui/navigation/MegaMenu.d.ts +6 -1
  187. package/dist/presentation/tui/navigation/MegaMenu.d.ts.map +1 -1
  188. package/dist/presentation/tui/navigation/MegaMenu.js +20 -7
  189. package/dist/presentation/tui/navigation/MegaMenu.js.map +1 -1
  190. package/dist/presentation/tui/navigation/MegaMenuDefinitions.d.ts +14 -0
  191. package/dist/presentation/tui/navigation/MegaMenuDefinitions.d.ts.map +1 -1
  192. package/dist/presentation/tui/navigation/MegaMenuDefinitions.js +59 -120
  193. package/dist/presentation/tui/navigation/MegaMenuDefinitions.js.map +1 -1
  194. package/dist/presentation/tui/navigation/ScreenDefinitions.d.ts +2 -2
  195. package/dist/presentation/tui/navigation/ScreenDefinitions.js +1 -1
  196. package/dist/presentation/tui/navigation/ScreenDefinitions.js.map +1 -1
  197. package/dist/presentation/tui/navigation/ScreenRouter.d.ts +8 -1
  198. package/dist/presentation/tui/navigation/ScreenRouter.d.ts.map +1 -1
  199. package/dist/presentation/tui/navigation/ScreenRouter.js +6 -3
  200. package/dist/presentation/tui/navigation/ScreenRouter.js.map +1 -1
  201. package/dist/presentation/tui/settings/SettingsScreen.d.ts +3 -0
  202. package/dist/presentation/tui/settings/SettingsScreen.d.ts.map +1 -0
  203. package/dist/presentation/tui/settings/SettingsScreen.js +14 -0
  204. package/dist/presentation/tui/settings/SettingsScreen.js.map +1 -0
  205. package/dist/presentation/tui/state-reading/StateReaderControllers.d.ts +2 -0
  206. package/dist/presentation/tui/state-reading/StateReaderControllers.d.ts.map +1 -1
  207. package/dist/presentation/tui/state-reading/useGoalContext.d.ts +4 -0
  208. package/dist/presentation/tui/state-reading/useGoalContext.d.ts.map +1 -0
  209. package/dist/presentation/tui/state-reading/useGoalContext.js +17 -0
  210. package/dist/presentation/tui/state-reading/useGoalContext.js.map +1 -0
  211. package/dist/presentation/tui/state-reading/useGoalsList.d.ts +1 -1
  212. package/dist/presentation/tui/state-reading/useGoalsList.d.ts.map +1 -1
  213. package/dist/presentation/tui/state-reading/useGoalsList.js +1 -1
  214. package/dist/presentation/tui/state-reading/useGoalsList.js.map +1 -1
  215. package/dist/presentation/tui/ui-primitives/KeyBadge.d.ts.map +1 -1
  216. package/dist/presentation/tui/ui-primitives/KeyBadge.js +2 -1
  217. package/dist/presentation/tui/ui-primitives/KeyBadge.js.map +1 -1
  218. package/package.json +1 -1
@@ -9,8 +9,12 @@ export declare const FooterShortcut: {
9
9
  readonly char: "q";
10
10
  readonly label: "quit";
11
11
  };
12
+ readonly MEGA_MENU: {
13
+ readonly char: "m";
14
+ readonly label: "menu";
15
+ };
12
16
  readonly NOTIFICATIONS: {
13
- readonly char: "n";
17
+ readonly char: "i";
14
18
  };
15
19
  };
16
20
  //# sourceMappingURL=FooterShortcutDescriptor.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"FooterShortcutDescriptor.d.ts","sourceRoot":"","sources":["../../../../src/presentation/tui/application-shell/FooterShortcutDescriptor.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,wBAAwB;IACvC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,WAAW,kCAAmC,SAAQ,wBAAwB;IAClF,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;CACxB;AAED,eAAO,MAAM,cAAc;;;;;;;;CAQuE,CAAC"}
1
+ {"version":3,"file":"FooterShortcutDescriptor.d.ts","sourceRoot":"","sources":["../../../../src/presentation/tui/application-shell/FooterShortcutDescriptor.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,wBAAwB;IACvC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,WAAW,kCAAmC,SAAQ,wBAAwB;IAClF,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;CACxB;AAED,eAAO,MAAM,cAAc;;;;;;;;;;;;CAYuE,CAAC"}
@@ -3,8 +3,12 @@ export const FooterShortcut = {
3
3
  char: "q",
4
4
  label: "quit",
5
5
  },
6
+ MEGA_MENU: {
7
+ char: "m",
8
+ label: "menu",
9
+ },
6
10
  NOTIFICATIONS: {
7
- char: "n",
11
+ char: "i",
8
12
  },
9
13
  };
10
14
  //# sourceMappingURL=FooterShortcutDescriptor.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"FooterShortcutDescriptor.js","sourceRoot":"","sources":["../../../../src/presentation/tui/application-shell/FooterShortcutDescriptor.ts"],"names":[],"mappings":"AAQA,MAAM,CAAC,MAAM,cAAc,GAAG;IAC5B,IAAI,EAAE;QACJ,IAAI,EAAE,GAAG;QACT,KAAK,EAAE,MAAM;KACd;IACD,aAAa,EAAE;QACb,IAAI,EAAE,GAAG;KACV;CAC+F,CAAC"}
1
+ {"version":3,"file":"FooterShortcutDescriptor.js","sourceRoot":"","sources":["../../../../src/presentation/tui/application-shell/FooterShortcutDescriptor.ts"],"names":[],"mappings":"AAQA,MAAM,CAAC,MAAM,cAAc,GAAG;IAC5B,IAAI,EAAE;QACJ,IAAI,EAAE,GAAG;QACT,KAAK,EAAE,MAAM;KACd;IACD,SAAS,EAAE;QACT,IAAI,EAAE,GAAG;QACT,KAAK,EAAE,MAAM;KACd;IACD,aAAa,EAAE;QACb,IAAI,EAAE,GAAG;KACV;CAC+F,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"DaemonActionLine.d.ts","sourceRoot":"","sources":["../../../../src/presentation/tui/cockpit/DaemonActionLine.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,8CAA8C,CAAC;AAMvF,wBAAgB,gBAAgB,CAAC,EAC/B,QAAQ,EACR,QAAQ,EACR,WAAW,GACZ,EAAE;IACD,QAAQ,CAAC,QAAQ,EAAE,kBAAkB,CAAC;IACtC,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAC;IAC3B,QAAQ,CAAC,WAAW,EAAE,OAAO,CAAC;CAC/B,GAAG,KAAK,CAAC,YAAY,CA8BrB"}
1
+ {"version":3,"file":"DaemonActionLine.d.ts","sourceRoot":"","sources":["../../../../src/presentation/tui/cockpit/DaemonActionLine.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,8CAA8C,CAAC;AAMvF,wBAAgB,gBAAgB,CAAC,EAC/B,QAAQ,EACR,QAAQ,EACR,WAAW,GACZ,EAAE;IACD,QAAQ,CAAC,QAAQ,EAAE,kBAAkB,CAAC;IACtC,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAC;IAC3B,QAAQ,CAAC,WAAW,EAAE,OAAO,CAAC;CAC/B,GAAG,KAAK,CAAC,YAAY,CAiCrB"}
@@ -10,11 +10,11 @@ export function DaemonActionLine({ snapshot, selected, infoVisible, }) {
10
10
  const action = getDaemonAction(snapshot);
11
11
  const badgeColor = getDaemonShortcutBadgeColor(selected);
12
12
  return (React.createElement(Box, { width: DAEMON_PANEL_CONTENT_WIDTH, marginTop: 1, gap: 1 },
13
- React.createElement(KeyBadge, { char: "s", label: action, color: badgeColor, labelColor: BaseColors.shade4 }),
14
- React.createElement(KeyBadge, { char: "@", label: CockpitDaemonPanelCopy.action.config, color: badgeColor, labelColor: BaseColors.shade4 }),
13
+ React.createElement(KeyBadge, { char: "s", label: action, compact: true, color: badgeColor, labelColor: BaseColors.shade4 }),
14
+ React.createElement(KeyBadge, { char: "@", label: CockpitDaemonPanelCopy.action.config, compact: true, color: badgeColor, labelColor: BaseColors.shade4 }),
15
15
  React.createElement(KeyBadge, { char: "i", label: infoVisible
16
16
  ? CockpitDaemonPanelCopy.action.infoOpen
17
- : CockpitDaemonPanelCopy.action.info, color: badgeColor, labelColor: BaseColors.shade4 })));
17
+ : CockpitDaemonPanelCopy.action.info, compact: true, color: badgeColor, labelColor: BaseColors.shade4 })));
18
18
  }
19
19
  function getDaemonAction(snapshot) {
20
20
  if (snapshot.status === SubprocessStatus.RUNNING) {
@@ -1 +1 @@
1
- {"version":3,"file":"DaemonActionLine.js","sourceRoot":"","sources":["../../../../src/presentation/tui/cockpit/DaemonActionLine.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAC1B,OAAO,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAC1D,OAAO,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AAExD,OAAO,EAAE,gBAAgB,EAAE,MAAM,4CAA4C,CAAC;AAC9E,OAAO,EAAE,0BAA0B,EAAE,MAAM,0BAA0B,CAAC;AACtE,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AACrE,OAAO,EAAE,2BAA2B,EAAE,MAAM,+BAA+B,CAAC;AAE5E,MAAM,UAAU,gBAAgB,CAAC,EAC/B,QAAQ,EACR,QAAQ,EACR,WAAW,GAKZ;IACC,MAAM,MAAM,GAAG,eAAe,CAAC,QAAQ,CAAC,CAAC;IACzC,MAAM,UAAU,GAAG,2BAA2B,CAAC,QAAQ,CAAC,CAAC;IAEzD,OAAO,CACL,oBAAC,GAAG,IAAC,KAAK,EAAE,0BAA0B,EAAE,SAAS,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC;QAC1D,oBAAC,QAAQ,IACP,IAAI,EAAC,GAAG,EACR,KAAK,EAAE,MAAM,EACb,KAAK,EAAE,UAAU,EACjB,UAAU,EAAE,UAAU,CAAC,MAAM,GAC7B;QACF,oBAAC,QAAQ,IACP,IAAI,EAAC,GAAG,EACR,KAAK,EAAE,sBAAsB,CAAC,MAAM,CAAC,MAAM,EAC3C,KAAK,EAAE,UAAU,EACjB,UAAU,EAAE,UAAU,CAAC,MAAM,GAC7B;QACF,oBAAC,QAAQ,IACP,IAAI,EAAC,GAAG,EACR,KAAK,EACH,WAAW;gBACT,CAAC,CAAC,sBAAsB,CAAC,MAAM,CAAC,QAAQ;gBACxC,CAAC,CAAC,sBAAsB,CAAC,MAAM,CAAC,IAAI,EAExC,KAAK,EAAE,UAAU,EACjB,UAAU,EAAE,UAAU,CAAC,MAAM,GAC7B,CACE,CACP,CAAC;AACJ,CAAC;AAED,SAAS,eAAe,CACtB,QAA4B;IAE5B,IAAI,QAAQ,CAAC,MAAM,KAAK,gBAAgB,CAAC,OAAO,EAAE,CAAC;QACjD,OAAO,sBAAsB,CAAC,MAAM,CAAC,IAAI,CAAC;IAC5C,CAAC;IAED,IAAI,QAAQ,CAAC,MAAM,KAAK,gBAAgB,CAAC,QAAQ,EAAE,CAAC;QAClD,OAAO,sBAAsB,CAAC,MAAM,CAAC,IAAI,CAAC;IAC5C,CAAC;IAED,OAAO,sBAAsB,CAAC,MAAM,CAAC,KAAK,CAAC;AAC7C,CAAC"}
1
+ {"version":3,"file":"DaemonActionLine.js","sourceRoot":"","sources":["../../../../src/presentation/tui/cockpit/DaemonActionLine.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAC1B,OAAO,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAC1D,OAAO,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AAExD,OAAO,EAAE,gBAAgB,EAAE,MAAM,4CAA4C,CAAC;AAC9E,OAAO,EAAE,0BAA0B,EAAE,MAAM,0BAA0B,CAAC;AACtE,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AACrE,OAAO,EAAE,2BAA2B,EAAE,MAAM,+BAA+B,CAAC;AAE5E,MAAM,UAAU,gBAAgB,CAAC,EAC/B,QAAQ,EACR,QAAQ,EACR,WAAW,GAKZ;IACC,MAAM,MAAM,GAAG,eAAe,CAAC,QAAQ,CAAC,CAAC;IACzC,MAAM,UAAU,GAAG,2BAA2B,CAAC,QAAQ,CAAC,CAAC;IAEzD,OAAO,CACL,oBAAC,GAAG,IAAC,KAAK,EAAE,0BAA0B,EAAE,SAAS,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC;QAC1D,oBAAC,QAAQ,IACP,IAAI,EAAC,GAAG,EACR,KAAK,EAAE,MAAM,EACb,OAAO,QACP,KAAK,EAAE,UAAU,EACjB,UAAU,EAAE,UAAU,CAAC,MAAM,GAC7B;QACF,oBAAC,QAAQ,IACP,IAAI,EAAC,GAAG,EACR,KAAK,EAAE,sBAAsB,CAAC,MAAM,CAAC,MAAM,EAC3C,OAAO,QACP,KAAK,EAAE,UAAU,EACjB,UAAU,EAAE,UAAU,CAAC,MAAM,GAC7B;QACF,oBAAC,QAAQ,IACP,IAAI,EAAC,GAAG,EACR,KAAK,EACH,WAAW;gBACT,CAAC,CAAC,sBAAsB,CAAC,MAAM,CAAC,QAAQ;gBACxC,CAAC,CAAC,sBAAsB,CAAC,MAAM,CAAC,IAAI,EAExC,OAAO,QACP,KAAK,EAAE,UAAU,EACjB,UAAU,EAAE,UAAU,CAAC,MAAM,GAC7B,CACE,CACP,CAAC;AACJ,CAAC;AAED,SAAS,eAAe,CACtB,QAA4B;IAE5B,IAAI,QAAQ,CAAC,MAAM,KAAK,gBAAgB,CAAC,OAAO,EAAE,CAAC;QACjD,OAAO,sBAAsB,CAAC,MAAM,CAAC,IAAI,CAAC;IAC5C,CAAC;IAED,IAAI,QAAQ,CAAC,MAAM,KAAK,gBAAgB,CAAC,QAAQ,EAAE,CAAC;QAClD,OAAO,sBAAsB,CAAC,MAAM,CAAC,IAAI,CAAC;IAC5C,CAAC;IAED,OAAO,sBAAsB,CAAC,MAAM,CAAC,KAAK,CAAC;AAC7C,CAAC"}
@@ -0,0 +1,14 @@
1
+ /**
2
+ * AddGoalRequestFactory - Assembles an AddGoalRequest from GoalAuthoringValues.
3
+ *
4
+ * Normalizes free-text authoring fields at the presentation-application
5
+ * boundary: blank optional text becomes undefined and whitespace/comma
6
+ * separated lists become arrays. Shared by the App overlay and GoalsScreen
7
+ * submission paths so the two cannot drift.
8
+ */
9
+ import type { AddGoalRequest } from "../../../application/context/goals/add/AddGoalRequest.js";
10
+ import type { GoalAuthoringValues } from "./GoalAuthoringFlow.js";
11
+ export declare const AddGoalRequestFactory: {
12
+ readonly create: (values: GoalAuthoringValues) => AddGoalRequest;
13
+ };
14
+ //# sourceMappingURL=AddGoalRequestFactory.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AddGoalRequestFactory.d.ts","sourceRoot":"","sources":["../../../../src/presentation/tui/goals/AddGoalRequestFactory.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,0DAA0D,CAAC;AAC/F,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAElE,eAAO,MAAM,qBAAqB;8BACjB,mBAAmB,KAAG,cAAc;CAc3C,CAAC"}
@@ -0,0 +1,36 @@
1
+ /**
2
+ * AddGoalRequestFactory - Assembles an AddGoalRequest from GoalAuthoringValues.
3
+ *
4
+ * Normalizes free-text authoring fields at the presentation-application
5
+ * boundary: blank optional text becomes undefined and whitespace/comma
6
+ * separated lists become arrays. Shared by the App overlay and GoalsScreen
7
+ * submission paths so the two cannot drift.
8
+ */
9
+ export const AddGoalRequestFactory = {
10
+ create(values) {
11
+ return {
12
+ title: values.title,
13
+ objective: values.objective,
14
+ successCriteria: [...values.successCriteria],
15
+ scopeIn: optionalList(values.scopeIn),
16
+ scopeOut: optionalList(values.scopeOut),
17
+ nextGoalId: optionalText(values.nextGoal),
18
+ previousGoalId: optionalText(values.previousGoal),
19
+ prerequisiteGoals: optionalList(values.prerequisiteGoals),
20
+ branch: optionalText(values.branch),
21
+ worktree: optionalText(values.worktree),
22
+ };
23
+ },
24
+ };
25
+ function optionalText(value) {
26
+ const trimmed = value.trim();
27
+ return trimmed.length > 0 ? trimmed : undefined;
28
+ }
29
+ function optionalList(value) {
30
+ const values = value
31
+ .split(/[\s,]+/)
32
+ .map((item) => item.trim())
33
+ .filter((item) => item.length > 0);
34
+ return values.length > 0 ? values : undefined;
35
+ }
36
+ //# sourceMappingURL=AddGoalRequestFactory.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AddGoalRequestFactory.js","sourceRoot":"","sources":["../../../../src/presentation/tui/goals/AddGoalRequestFactory.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAKH,MAAM,CAAC,MAAM,qBAAqB,GAAG;IACnC,MAAM,CAAC,MAA2B;QAChC,OAAO;YACL,KAAK,EAAE,MAAM,CAAC,KAAK;YACnB,SAAS,EAAE,MAAM,CAAC,SAAS;YAC3B,eAAe,EAAE,CAAC,GAAG,MAAM,CAAC,eAAe,CAAC;YAC5C,OAAO,EAAE,YAAY,CAAC,MAAM,CAAC,OAAO,CAAC;YACrC,QAAQ,EAAE,YAAY,CAAC,MAAM,CAAC,QAAQ,CAAC;YACvC,UAAU,EAAE,YAAY,CAAC,MAAM,CAAC,QAAQ,CAAC;YACzC,cAAc,EAAE,YAAY,CAAC,MAAM,CAAC,YAAY,CAAC;YACjD,iBAAiB,EAAE,YAAY,CAAC,MAAM,CAAC,iBAAiB,CAAC;YACzD,MAAM,EAAE,YAAY,CAAC,MAAM,CAAC,MAAM,CAAC;YACnC,QAAQ,EAAE,YAAY,CAAC,MAAM,CAAC,QAAQ,CAAC;SACxC,CAAC;IACJ,CAAC;CACO,CAAC;AAEX,SAAS,YAAY,CAAC,KAAa;IACjC,MAAM,OAAO,GAAG,KAAK,CAAC,IAAI,EAAE,CAAC;IAC7B,OAAO,OAAO,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS,CAAC;AAClD,CAAC;AAED,SAAS,YAAY,CAAC,KAAa;IACjC,MAAM,MAAM,GAAG,KAAK;SACjB,KAAK,CAAC,QAAQ,CAAC;SACf,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC;SAC1B,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;IAErC,OAAO,MAAM,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS,CAAC;AAChD,CAAC"}
@@ -1,3 +1,15 @@
1
1
  import React from "react";
2
- export declare function GoalsScreen(): React.ReactElement;
2
+ import { type GoalStatusType } from "../../../domain/goals/Constants.js";
3
+ import type { AddGoalRequest } from "../../../application/context/goals/add/AddGoalRequest.js";
4
+ import type { AddGoalResponse } from "../../../application/context/goals/add/AddGoalResponse.js";
5
+ import type { RequestController } from "../action-dispatch/RequestController.js";
6
+ interface GoalsScreenProps {
7
+ readonly statusFilter?: readonly GoalStatusType[];
8
+ readonly terminalWidth?: number;
9
+ readonly shortcutsEnabled?: boolean;
10
+ readonly addGoalController?: RequestController<AddGoalRequest, AddGoalResponse>;
11
+ readonly onModalOpenChange?: (isOpen: boolean) => void;
12
+ }
13
+ export declare function GoalsScreen({ statusFilter, terminalWidth, shortcutsEnabled, addGoalController, onModalOpenChange, }?: GoalsScreenProps): React.ReactElement;
14
+ export {};
3
15
  //# sourceMappingURL=GoalsScreen.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"GoalsScreen.d.ts","sourceRoot":"","sources":["../../../../src/presentation/tui/goals/GoalsScreen.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA4B,MAAM,OAAO,CAAC;AAuDjD,wBAAgB,WAAW,IAAI,KAAK,CAAC,YAAY,CAwKhD"}
1
+ {"version":3,"file":"GoalsScreen.d.ts","sourceRoot":"","sources":["../../../../src/presentation/tui/goals/GoalsScreen.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAoD,MAAM,OAAO,CAAC;AAOzE,OAAO,EAAc,KAAK,cAAc,EAAE,MAAM,oCAAoC,CAAC;AAErF,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,0DAA0D,CAAC;AAC/F,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,2DAA2D,CAAC;AAcjG,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,yCAAyC,CAAC;AAmEjF,UAAU,gBAAgB;IACxB,QAAQ,CAAC,YAAY,CAAC,EAAE,SAAS,cAAc,EAAE,CAAC;IAClD,QAAQ,CAAC,aAAa,CAAC,EAAE,MAAM,CAAC;IAChC,QAAQ,CAAC,gBAAgB,CAAC,EAAE,OAAO,CAAC;IACpC,QAAQ,CAAC,iBAAiB,CAAC,EAAE,iBAAiB,CAC5C,cAAc,EACd,eAAe,CAChB,CAAC;IACF,QAAQ,CAAC,iBAAiB,CAAC,EAAE,CAAC,MAAM,EAAE,OAAO,KAAK,IAAI,CAAC;CACxD;AA0BD,wBAAgB,WAAW,CAAC,EAC1B,YAAY,EACZ,aAAa,EACb,gBAAuB,EACvB,iBAAiB,EACjB,iBAAiB,GAClB,GAAE,gBAAqB,GAAG,KAAK,CAAC,YAAY,CA0O5C"}
@@ -1,14 +1,15 @@
1
- import React, { useMemo, useState } from "react";
1
+ import React, { useCallback, useEffect, useMemo, useState } from "react";
2
2
  import { Box, Text, useInput } from "ink";
3
- import { BaseColors, SemanticColors, TuiLayout, } from "../../shared/DesignTokens.js";
3
+ import { BaseColors, SemanticColors, TuiGlyphs, } from "../../shared/DesignTokens.js";
4
4
  import { GoalStatus } from "../../../domain/goals/Constants.js";
5
- import { DetailPane } from "../ui-primitives/DetailPane.js";
6
5
  import { KeyBadge } from "../ui-primitives/KeyBadge.js";
7
- import { Panel } from "../ui-primitives/Panel.js";
8
- import { Tumbler } from "../ui-primitives/Tumbler.js";
6
+ import { HorizontalRule } from "../ui-primitives/HorizontalRule.js";
9
7
  import { GoalAuthoringFlow } from "./GoalAuthoringFlow.js";
8
+ import { AddGoalRequestFactory } from "./AddGoalRequestFactory.js";
9
+ import { ActionDispatcher } from "../action-dispatch/ActionDispatcher.js";
10
+ import { useGoalContext } from "../state-reading/useGoalContext.js";
10
11
  import { useGoalsList } from "../state-reading/useGoalsList.js";
11
- import { GOAL_DETAIL_JOIN_SEPARATOR, GOAL_STATUS_FILTER_ALL, GOAL_STATUS_FILTERS, GOAL_TUMBLER_MAX_DISPLAY_LENGTH, GoalsScreenCopy, } from "./GoalsScreenConstants.js";
12
+ import { GOAL_BROWSER_TITLE_MAX_LENGTH, GOAL_DECISION_PAGE_SIZE, GOAL_RELATED_DESCRIPTION_MAX_LENGTH, GOAL_SECTION_PAGE_SIZE, GOAL_STATUS_FILTER_ALL, GOAL_STATUS_FILTERS, GoalsScreenCopy, } from "./GoalsScreenConstants.js";
12
13
  const STATUS_COLORS = {
13
14
  [GoalStatus.TODO]: SemanticColors.muted,
14
15
  [GoalStatus.REFINED]: SemanticColors.info,
@@ -24,15 +25,26 @@ const STATUS_COLORS = {
24
25
  [GoalStatus.IN_REFINEMENT]: SemanticColors.info,
25
26
  [GoalStatus.UNBLOCKED]: SemanticColors.warning,
26
27
  };
27
- export function GoalsScreen() {
28
+ const EMPTY_GOAL_CONTEXT = {
29
+ components: [],
30
+ dependencies: [],
31
+ decisions: [],
32
+ invariants: [],
33
+ guidelines: [],
34
+ };
35
+ export function GoalsScreen({ statusFilter, terminalWidth, shortcutsEnabled = true, addGoalController, onModalOpenChange, } = {}) {
28
36
  const [selectedIndex, setSelectedIndex] = useState(0);
37
+ const [sectionPageFlowIndex, setSectionPageFlowIndex] = useState(0);
29
38
  const [filterIndex, setFilterIndex] = useState(0);
30
39
  const [authoringOpen, setAuthoringOpen] = useState(false);
40
+ const [authoringError, setAuthoringError] = useState(null);
41
+ const [authoringWorking, setAuthoringWorking] = useState(false);
31
42
  const activeFilter = GOAL_STATUS_FILTERS[filterIndex];
32
- const requestedStatus = activeFilter === GOAL_STATUS_FILTER_ALL
33
- ? undefined
34
- : activeFilter;
35
- const goalsList = useGoalsList(requestedStatus);
43
+ const requestedStatusFilter = useMemo(() => statusFilter ??
44
+ (activeFilter === GOAL_STATUS_FILTER_ALL
45
+ ? undefined
46
+ : [activeFilter]), [activeFilter, statusFilter]);
47
+ const goalsList = useGoalsList(requestedStatusFilter);
36
48
  const visibleGoals = useMemo(() => {
37
49
  const responseGoals = goalsList.data?.goals;
38
50
  if (responseGoals !== undefined) {
@@ -41,96 +53,350 @@ export function GoalsScreen() {
41
53
  return [];
42
54
  }, [goalsList.data]);
43
55
  const selectedGoal = visibleGoals[selectedIndex] ?? visibleGoals[0];
56
+ const goalContext = useGoalContext(selectedGoal?.id);
57
+ const contextualGoal = goalContext.data?.contextualGoalView.goal;
58
+ const activeGoal = contextualGoal !== undefined && contextualGoal.goalId === selectedGoal?.id
59
+ ? toGoalListEntry(contextualGoal)
60
+ : selectedGoal;
61
+ const activeContext = contextualGoal !== undefined && contextualGoal.goalId === selectedGoal?.id
62
+ ? goalContext.data?.contextualGoalView.context ?? EMPTY_GOAL_CONTEXT
63
+ : EMPTY_GOAL_CONTEXT;
64
+ const sections = useMemo(() => (activeGoal === undefined ? [] : buildGoalSections(activeGoal, activeContext)), [activeContext, activeGoal]);
65
+ const sectionPages = useMemo(() => sections.flatMap(toGoalSectionPages), [sections]);
66
+ const activeSectionPage = sectionPages[sectionPageFlowIndex] ?? sectionPages[0];
67
+ const filterLabel = statusFilter?.join(", ") ?? activeFilter;
68
+ useEffect(() => {
69
+ setSelectedIndex(0);
70
+ setSectionPageFlowIndex(0);
71
+ }, [requestedStatusFilter]);
72
+ useEffect(() => {
73
+ setSectionPageFlowIndex(0);
74
+ }, [selectedGoal?.id]);
75
+ useEffect(() => {
76
+ setSectionPageFlowIndex((currentIndex) => {
77
+ if (sectionPages.length === 0) {
78
+ return 0;
79
+ }
80
+ return Math.min(currentIndex, sectionPages.length - 1);
81
+ });
82
+ }, [sectionPages.length]);
83
+ useEffect(() => {
84
+ setSelectedIndex((currentIndex) => {
85
+ if (visibleGoals.length === 0) {
86
+ return 0;
87
+ }
88
+ return Math.min(currentIndex, visibleGoals.length - 1);
89
+ });
90
+ }, [visibleGoals.length]);
91
+ const updateAuthoringOpen = useCallback((isOpen) => {
92
+ setAuthoringOpen(isOpen);
93
+ onModalOpenChange?.(isOpen);
94
+ }, [onModalOpenChange]);
95
+ useEffect(() => () => {
96
+ onModalOpenChange?.(false);
97
+ }, [onModalOpenChange]);
44
98
  useInput((input, key) => {
45
- if (authoringOpen) {
99
+ if (!shortcutsEnabled || authoringOpen) {
100
+ return;
101
+ }
102
+ if (input === "n" || input === "N" || input === "a" || input === "A") {
103
+ setAuthoringError(null);
104
+ updateAuthoringOpen(true);
105
+ return;
106
+ }
107
+ if (input === " " && statusFilter === undefined) {
108
+ setFilterIndex((currentIndex) => wrapIndex(currentIndex + 1, GOAL_STATUS_FILTERS.length));
109
+ return;
110
+ }
111
+ if (visibleGoals.length > 0 && key.upArrow) {
112
+ setSelectedIndex((currentIndex) => wrapIndex(currentIndex - 1, visibleGoals.length));
46
113
  return;
47
114
  }
48
- if (key.rightArrow) {
49
- const nextFilterIndex = (filterIndex + 1) % GOAL_STATUS_FILTERS.length;
50
- setFilterIndex(nextFilterIndex);
51
- setSelectedIndex(0);
115
+ if (visibleGoals.length > 0 && key.downArrow) {
116
+ setSelectedIndex((currentIndex) => wrapIndex(currentIndex + 1, visibleGoals.length));
52
117
  return;
53
118
  }
54
- if (key.leftArrow) {
55
- const nextFilterIndex = filterIndex === 0 ? GOAL_STATUS_FILTERS.length - 1 : filterIndex - 1;
56
- setFilterIndex(nextFilterIndex);
57
- setSelectedIndex(0);
119
+ if (sectionPages.length > 0 && key.leftArrow) {
120
+ setSectionPageFlowIndex((currentIndex) => wrapIndex(currentIndex - 1, sectionPages.length));
58
121
  return;
59
122
  }
60
- if (input === "a" || input === "A") {
61
- setAuthoringOpen(true);
123
+ if (sectionPages.length > 0 && key.rightArrow) {
124
+ setSectionPageFlowIndex((currentIndex) => wrapIndex(currentIndex + 1, sectionPages.length));
62
125
  }
63
126
  });
64
- const handleAuthoringComplete = (_values) => {
65
- setAuthoringOpen(false);
127
+ const handleAuthoringComplete = async (values) => {
128
+ if (addGoalController === undefined) {
129
+ setAuthoringError(GoalsScreenCopy.authoringUnavailable);
130
+ return;
131
+ }
132
+ setAuthoringWorking(true);
133
+ setAuthoringError(null);
134
+ const result = await ActionDispatcher.dispatch(addGoalController, AddGoalRequestFactory.create(values));
135
+ setAuthoringWorking(false);
136
+ if (!result.ok) {
137
+ setAuthoringError(result.error.message);
138
+ return;
139
+ }
140
+ updateAuthoringOpen(false);
141
+ await goalsList.refresh();
66
142
  };
67
143
  const handleAuthoringCancel = () => {
68
- setAuthoringOpen(false);
144
+ setAuthoringError(null);
145
+ updateAuthoringOpen(false);
146
+ };
147
+ if (authoringOpen) {
148
+ return (React.createElement(GoalAuthoringFlow, { onComplete: handleAuthoringComplete, onCancel: handleAuthoringCancel, dispatchError: authoringError, disabled: authoringWorking }));
149
+ }
150
+ return (React.createElement(Box, { flexDirection: "column", paddingTop: 1 },
151
+ React.createElement(Box, { flexDirection: "column", paddingX: 1 },
152
+ React.createElement(Box, { gap: 1 },
153
+ React.createElement(Text, { color: SemanticColors.h2, bold: true }, GoalsScreenCopy.browserTitle),
154
+ React.createElement(KeyBadge, { char: "n", label: GoalsScreenCopy.newGoal })),
155
+ React.createElement(Box, { gap: 3 },
156
+ React.createElement(Box, null,
157
+ React.createElement(Text, { color: SemanticColors.label },
158
+ GoalsScreenCopy.showingLabel,
159
+ " "),
160
+ React.createElement(Text, { color: SemanticColors.primary }, selectedGoal ? `${selectedIndex + 1}/${visibleGoals.length}` : "0/0"),
161
+ React.createElement(KeyBadge, { char: "\u2191\u2193" })),
162
+ React.createElement(Box, null,
163
+ React.createElement(Text, { color: SemanticColors.label },
164
+ GoalsScreenCopy.stateLineLabel,
165
+ " "),
166
+ React.createElement(Text, { color: SemanticColors.primary }, formatFilterLabel(filterLabel)),
167
+ React.createElement(KeyBadge, { char: "space" })))),
168
+ React.createElement(HorizontalRule, { color: SemanticColors.label, width: terminalWidth }),
169
+ React.createElement(Box, { flexDirection: "column", paddingX: 1 }, goalsList.loading && goalsList.data === null ? (React.createElement(Text, { color: SemanticColors.muted }, GoalsScreenCopy.loadingGoals)) : goalsList.error !== null ? (React.createElement(Text, { color: SemanticColors.error }, goalsList.error.message)) : activeGoal === undefined || activeSectionPage === undefined ? (React.createElement(Text, { color: SemanticColors.muted }, GoalsScreenCopy.emptyGoals)) : (React.createElement(Box, { flexDirection: "column" },
170
+ React.createElement(GoalHeading, { goal: activeGoal }),
171
+ React.createElement(SectionHeading, { section: activeSectionPage.section, pageIndex: activeSectionPage.pageIndex, totalPages: activeSectionPage.totalPages }),
172
+ goalContext.loading && goalContext.data === null && (React.createElement(Text, { color: SemanticColors.muted }, GoalsScreenCopy.loadingContext)),
173
+ React.createElement(GoalSectionRows, { rows: activeSectionPage.rows, emptyText: activeSectionPage.section.emptyText ?? GoalsScreenCopy.emptyFieldValue }))))));
174
+ }
175
+ function GoalHeading({ goal, }) {
176
+ return (React.createElement(Box, { flexDirection: "column" },
177
+ React.createElement(Box, null,
178
+ React.createElement(Text, { color: SemanticColors.headline }, "GOAL: "),
179
+ React.createElement(Text, { color: SemanticColors.headline }, truncateText(goal.title, GOAL_BROWSER_TITLE_MAX_LENGTH)),
180
+ React.createElement(KeyBadge, { char: "\u2190\u2192", label: "details" }))));
181
+ }
182
+ function SectionHeading({ section, pageIndex, totalPages, }) {
183
+ const normalizedTitle = section.title.endsWith(":")
184
+ ? section.title.slice(0, -1)
185
+ : section.title;
186
+ const title = totalPages > 1
187
+ ? `${normalizedTitle} (${pageIndex + 1}/${totalPages}):`
188
+ : section.title.endsWith(":")
189
+ ? section.title
190
+ : `${section.title}:`;
191
+ return (React.createElement(Box, { marginTop: 1 },
192
+ React.createElement(Text, { color: SemanticColors.h2, bold: true }, title)));
193
+ }
194
+ function GoalSectionRows({ rows, emptyText, }) {
195
+ if (rows.length === 0) {
196
+ return (React.createElement(Text, { color: SemanticColors.muted, italic: true }, emptyText));
197
+ }
198
+ return (React.createElement(Box, { flexDirection: "column" }, rows.map((row, index) => (React.createElement(Box, { key: `${row.label ?? row.heading ?? row.name ?? "row"}-${index}`, marginTop: (row.heading !== undefined ||
199
+ row.name !== undefined ||
200
+ row.marker === "bullet") &&
201
+ index > 0
202
+ ? 1
203
+ : 0 }, row.heading !== undefined ? (React.createElement(Text, { color: SemanticColors.h2, bold: true }, row.heading)) : row.name !== undefined ? (React.createElement(Box, { flexDirection: "column" },
204
+ React.createElement(Text, { color: SemanticColors.h3 }, row.name),
205
+ row.value.length > 0 && (React.createElement(Text, { color: row.color ?? SemanticColors.primary }, row.value)),
206
+ row.fields?.map((field, fieldIndex) => (React.createElement(Box, { key: `${field.label}-${fieldIndex}` },
207
+ React.createElement(Text, { color: SemanticColors.label },
208
+ field.label,
209
+ " "),
210
+ React.createElement(Text, { color: SemanticColors.primary }, field.value)))))) : row.label === undefined && row.marker === "bullet" ? (React.createElement(React.Fragment, null,
211
+ React.createElement(Box, { flexShrink: 0 },
212
+ React.createElement(Text, { color: SemanticColors.label },
213
+ TuiGlyphs.bullet,
214
+ " ")),
215
+ React.createElement(Text, { color: row.color ?? SemanticColors.primary }, row.value))) : row.label === undefined ? (React.createElement(Text, { color: row.color ?? SemanticColors.primary }, row.value)) : (React.createElement(React.Fragment, null,
216
+ React.createElement(Text, { color: SemanticColors.label },
217
+ row.label,
218
+ " "),
219
+ React.createElement(Text, { color: row.color ?? SemanticColors.primary }, row.value))))))));
220
+ }
221
+ function buildGoalSections(goal, context) {
222
+ return [
223
+ {
224
+ key: "objectiveMetadata",
225
+ title: GoalsScreenCopy.sections.objective,
226
+ paginated: false,
227
+ rows: [
228
+ { value: goal.objective },
229
+ {
230
+ heading: GoalsScreenCopy.sections.metadata,
231
+ value: GoalsScreenCopy.sections.metadata,
232
+ },
233
+ { label: GoalsScreenCopy.details.id, value: goal.id },
234
+ {
235
+ label: GoalsScreenCopy.details.status,
236
+ value: goal.status,
237
+ color: STATUS_COLORS[goal.status],
238
+ },
239
+ { label: GoalsScreenCopy.details.createdAt, value: goal.createdAt },
240
+ { label: GoalsScreenCopy.details.updatedAt, value: goal.updatedAt },
241
+ {
242
+ label: GoalsScreenCopy.details.branch,
243
+ value: goal.branch ?? GoalsScreenCopy.emptyFieldValue,
244
+ },
245
+ {
246
+ label: GoalsScreenCopy.details.worktree,
247
+ value: goal.worktree ?? GoalsScreenCopy.emptyFieldValue,
248
+ },
249
+ {
250
+ label: GoalsScreenCopy.details.claimedBy,
251
+ value: goal.claimedBy ?? GoalsScreenCopy.emptyFieldValue,
252
+ },
253
+ {
254
+ label: GoalsScreenCopy.details.claimedAt,
255
+ value: goal.claimedAt ?? GoalsScreenCopy.emptyFieldValue,
256
+ },
257
+ {
258
+ label: GoalsScreenCopy.details.claimExpiresAt,
259
+ value: goal.claimExpiresAt ?? GoalsScreenCopy.emptyFieldValue,
260
+ },
261
+ ],
262
+ },
263
+ textSection("note", GoalsScreenCopy.sections.note, goal.note),
264
+ textSection("reviewIssues", GoalsScreenCopy.sections.reviewIssues, goal.reviewIssues),
265
+ listSection("successCriteria", GoalsScreenCopy.sections.successCriteria, goal.criteria.map((criterion) => ({ value: criterion, marker: "bullet" }))),
266
+ listSection("currentProgress", GoalsScreenCopy.sections.currentProgress, goal.progress.map((progress) => ({ value: progress, marker: "bullet" }))),
267
+ listSection("scope", GoalsScreenCopy.sections.scope, [
268
+ ...goal.scopeIn.map((scopeItem) => ({
269
+ label: GoalsScreenCopy.details.scopeIn,
270
+ value: scopeItem,
271
+ })),
272
+ ...goal.scopeOut.map((scopeItem) => ({
273
+ label: GoalsScreenCopy.details.scopeOut,
274
+ value: scopeItem,
275
+ })),
276
+ ...goal.prerequisiteGoals.map((goalId) => ({
277
+ label: GoalsScreenCopy.details.prerequisites,
278
+ value: goalId,
279
+ })),
280
+ ]),
281
+ relatedSection("relatedComponents", GoalsScreenCopy.sections.relatedComponents, context.components, formatComponent),
282
+ relatedSection("relatedDependencies", GoalsScreenCopy.sections.relatedDependencies, context.dependencies, formatDependency),
283
+ decisionsSection(context.decisions),
284
+ relatedSection("relatedInvariants", GoalsScreenCopy.sections.relatedInvariants, context.invariants, formatInvariant),
285
+ relatedSection("relatedGuidelines", GoalsScreenCopy.sections.relatedGuidelines, context.guidelines, formatGuideline),
286
+ ];
287
+ }
288
+ function textSection(key, title, value) {
289
+ return {
290
+ key,
291
+ title,
292
+ paginated: false,
293
+ rows: value === undefined || value.trim().length === 0
294
+ ? []
295
+ : [{ value }],
296
+ };
297
+ }
298
+ function listSection(key, title, rows) {
299
+ return {
300
+ key,
301
+ title,
302
+ rows,
303
+ paginated: true,
69
304
  };
70
- const tumblerItems = visibleGoals.map((goal) => ({
71
- key: goal.id,
72
- value: `${goal.title} ${goal.status}`,
305
+ }
306
+ function relatedSection(key, title, relations, formatEntity) {
307
+ return listSection(key, title, relations.map((relation) => {
308
+ const display = formatEntity(relation.entity);
309
+ return {
310
+ name: display.name,
311
+ value: truncateText(display.description, GOAL_RELATED_DESCRIPTION_MAX_LENGTH),
312
+ };
73
313
  }));
74
- const handleFocusedGoalChange = (item) => {
75
- const nextSelectedIndex = visibleGoals.findIndex((goal) => goal.id === item.key);
76
- if (nextSelectedIndex >= 0) {
77
- setSelectedIndex(nextSelectedIndex);
78
- }
314
+ }
315
+ function toGoalSectionPages(section) {
316
+ const pageSize = section.pageSize ?? GOAL_SECTION_PAGE_SIZE;
317
+ const totalPages = section.paginated
318
+ ? Math.max(1, Math.ceil(section.rows.length / pageSize))
319
+ : 1;
320
+ return Array.from({ length: totalPages }, (_, pageIndex) => ({
321
+ section,
322
+ pageIndex,
323
+ totalPages,
324
+ rows: getRenderedRows(section, pageIndex),
325
+ }));
326
+ }
327
+ function formatComponent(component) {
328
+ return { name: component.name, description: component.description };
329
+ }
330
+ function formatDependency(dependency) {
331
+ const version = dependency.versionConstraint
332
+ ? `@${dependency.versionConstraint}`
333
+ : "";
334
+ return {
335
+ name: `${dependency.ecosystem}:${dependency.packageName}${version}`,
336
+ description: dependency.contract || dependency.endpoint || "External dependency",
79
337
  };
80
- if (authoringOpen) {
81
- return (React.createElement(GoalAuthoringFlow, { onComplete: handleAuthoringComplete, onCancel: handleAuthoringCancel }));
338
+ }
339
+ function decisionsSection(decisions) {
340
+ return {
341
+ key: "relatedDecisions",
342
+ title: GoalsScreenCopy.sections.relatedDecisions,
343
+ paginated: true,
344
+ pageSize: GOAL_DECISION_PAGE_SIZE,
345
+ rows: decisions.map((related) => ({
346
+ name: related.entity.title,
347
+ value: "",
348
+ fields: [
349
+ {
350
+ label: GoalsScreenCopy.details.decisionContext,
351
+ value: related.entity.context,
352
+ },
353
+ ...(related.entity.rationale !== null &&
354
+ related.entity.rationale.length > 0
355
+ ? [
356
+ {
357
+ label: GoalsScreenCopy.details.decisionRationale,
358
+ value: related.entity.rationale,
359
+ },
360
+ ]
361
+ : []),
362
+ ],
363
+ })),
364
+ };
365
+ }
366
+ function formatInvariant(invariant) {
367
+ return { name: invariant.title, description: invariant.description };
368
+ }
369
+ function formatGuideline(guideline) {
370
+ return {
371
+ name: `[${guideline.category}] ${guideline.title}`,
372
+ description: guideline.description,
373
+ };
374
+ }
375
+ function formatFilterLabel(filter) {
376
+ if (filter === GOAL_STATUS_FILTER_ALL) {
377
+ return "All";
378
+ }
379
+ return filter;
380
+ }
381
+ function getRenderedRows(section, pageIndex) {
382
+ if (section === undefined) {
383
+ return [];
384
+ }
385
+ if (!section.paginated) {
386
+ return section.rows;
387
+ }
388
+ const pageSize = section.pageSize ?? GOAL_SECTION_PAGE_SIZE;
389
+ const start = pageIndex * pageSize;
390
+ return section.rows.slice(start, start + pageSize);
391
+ }
392
+ function wrapIndex(index, itemCount) {
393
+ return (index + itemCount) % itemCount;
394
+ }
395
+ function truncateText(value, maxLength) {
396
+ if (value.length <= maxLength) {
397
+ return value;
82
398
  }
83
- return (React.createElement(Box, { flexDirection: "column", paddingX: 1, paddingTop: 1, gap: 1 },
84
- React.createElement(Box, { gap: 2 },
85
- goalsList.loading && goalsList.data === null ? (React.createElement(Panel, { title: GoalsScreenCopy.listTitle, width: TuiLayout.listPanelWidth },
86
- React.createElement(Text, { color: SemanticColors.muted }, GoalsScreenCopy.loadingGoals))) : goalsList.error !== null ? (React.createElement(Panel, { title: GoalsScreenCopy.listTitle, width: TuiLayout.listPanelWidth },
87
- React.createElement(Text, { color: SemanticColors.error }, goalsList.error.message))) : (React.createElement(Tumbler, { key: activeFilter, title: GoalsScreenCopy.listTitle, items: tumblerItems, initialFocusedKey: selectedGoal?.id, maxDisplayLength: GOAL_TUMBLER_MAX_DISPLAY_LENGTH, width: TuiLayout.listPanelWidth, emptyMessage: GoalsScreenCopy.emptyGoals, onFocusedItemChange: handleFocusedGoalChange })),
88
- selectedGoal && (React.createElement(DetailPane, { title: GoalsScreenCopy.detailTitle, width: TuiLayout.detailPanelWidth, entries: [
89
- { label: GoalsScreenCopy.details.id, value: selectedGoal.id },
90
- { label: GoalsScreenCopy.details.title, value: selectedGoal.title },
91
- {
92
- label: GoalsScreenCopy.details.status,
93
- value: selectedGoal.status,
94
- valueColor: STATUS_COLORS[selectedGoal.status],
95
- },
96
- { label: GoalsScreenCopy.details.objective, value: selectedGoal.objective },
97
- {
98
- label: GoalsScreenCopy.details.criteria,
99
- value: selectedGoal.criteria.join(GOAL_DETAIL_JOIN_SEPARATOR),
100
- },
101
- {
102
- label: GoalsScreenCopy.details.scopeIn,
103
- value: selectedGoal.scopeIn.join(GOAL_DETAIL_JOIN_SEPARATOR),
104
- },
105
- {
106
- label: GoalsScreenCopy.details.scopeOut,
107
- value: selectedGoal.scopeOut.join(GOAL_DETAIL_JOIN_SEPARATOR),
108
- },
109
- {
110
- label: GoalsScreenCopy.details.prerequisites,
111
- value: selectedGoal.prerequisiteGoals
112
- .join(GOAL_DETAIL_JOIN_SEPARATOR) || GoalsScreenCopy.emptyFieldValue,
113
- },
114
- {
115
- label: GoalsScreenCopy.details.progress,
116
- value: selectedGoal.progress.join(GOAL_DETAIL_JOIN_SEPARATOR)
117
- || GoalsScreenCopy.emptyFieldValue,
118
- },
119
- { label: GoalsScreenCopy.details.note, value: selectedGoal.note ?? GoalsScreenCopy.emptyFieldValue },
120
- {
121
- label: GoalsScreenCopy.details.reviewIssues,
122
- value: selectedGoal.reviewIssues ?? GoalsScreenCopy.emptyFieldValue,
123
- },
124
- {
125
- label: GoalsScreenCopy.details.nextGoal,
126
- value: selectedGoal.nextGoalId ?? GoalsScreenCopy.emptyFieldValue,
127
- },
128
- ] }))),
129
- selectedGoal && (React.createElement(Panel, { title: GoalsScreenCopy.actionHintsTitle },
130
- React.createElement(Box, { gap: 2 },
131
- React.createElement(KeyBadge, { char: "a", label: GoalsScreenCopy.shortcuts.author }),
132
- React.createElement(KeyBadge, { char: "\u2191\u2193", label: GoalsScreenCopy.shortcuts.select }),
133
- React.createElement(KeyBadge, { char: "\u2190\u2192", label: GoalsScreenCopy.shortcuts.filter }))))));
399
+ return `${value.slice(0, maxLength - 3)}...`;
134
400
  }
135
401
  function toGoalListEntry(goal) {
136
402
  return {
@@ -146,6 +412,14 @@ function toGoalListEntry(goal) {
146
412
  note: goal.note,
147
413
  reviewIssues: goal.reviewIssues,
148
414
  nextGoalId: goal.nextGoalId,
415
+ branch: goal.branch,
416
+ worktree: goal.worktree,
417
+ claimedBy: goal.claimedBy,
418
+ claimedAt: goal.claimedAt,
419
+ claimExpiresAt: goal.claimExpiresAt,
420
+ version: goal.version,
421
+ createdAt: goal.createdAt,
422
+ updatedAt: goal.updatedAt,
149
423
  };
150
424
  }
151
425
  //# sourceMappingURL=GoalsScreen.js.map