@kortix/ui 0.14.19 → 0.15.1

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 (538) hide show
  1. package/README.md +1 -1
  2. package/dist/_vendor/kortix-shared.js +1188 -202
  3. package/dist/_vendor/shared/artifact-annotations.d.ts +85 -607
  4. package/dist/_vendor/shared/artifact-comments.d.ts +53 -489
  5. package/dist/_vendor/shared/code-language.d.ts +2 -2
  6. package/dist/_vendor/shared/html.d.ts +7 -0
  7. package/dist/_vendor/shared/index.d.ts +1 -1
  8. package/dist/_vendor/shared/peer-message-prompt.d.ts +7 -1
  9. package/dist/_vendor/shared/pixel-mark.d.ts +28 -0
  10. package/dist/_vendor/shared/project-glyphs.d.ts +103 -20
  11. package/dist/_vendor/shared/runtime-versions.d.ts +2 -6
  12. package/dist/_vendor/shared/tool-output/media-path.d.ts +1 -6
  13. package/dist/_vendor/shared/tool-output/scan.d.ts +2 -0
  14. package/dist/_vendor/shared/utils/string.d.ts +6 -0
  15. package/dist/_vendor/shared/webhook-signing.d.ts +3 -1
  16. package/dist/access/access/access-dialog-share.d.ts +3 -28
  17. package/dist/access/access/access-dialog-share.js +3 -75
  18. package/dist/artifacts/artifact-frame.js +26 -2
  19. package/dist/artifacts/artifact-session.js +8 -3
  20. package/dist/artifacts/frame-policy.d.ts +2 -9
  21. package/dist/artifacts/frame-policy.js +2 -25
  22. package/dist/customize/agents/agent-page.js +5 -5
  23. package/dist/customize/agents/agent-status.js +1 -1
  24. package/dist/customize/agents/agents-page.js +4 -4
  25. package/dist/customize/agents/create-agent-modal.js +1 -1
  26. package/dist/customize/connectors/connector-filter.d.ts +2 -1
  27. package/dist/customize/connectors/connector-filter.js +2 -3
  28. package/dist/customize/connectors/connectors-page.js +15 -24
  29. package/dist/customize/connectors/detail/connector-status.d.ts +3 -24
  30. package/dist/customize/connectors/detail/connector-status.js +2 -42
  31. package/dist/customize/connectors/detail/use-connector-detail.d.ts +2 -6
  32. package/dist/customize/connectors/detail/use-connector-detail.js +3 -13
  33. package/dist/customize/connectors/install/install.d.ts +2 -6
  34. package/dist/customize/connectors/install/install.js +2 -16
  35. package/dist/customize/connectors/provider-label.d.ts +4 -17
  36. package/dist/customize/connectors/provider-label.js +4 -37
  37. package/dist/customize/connectors/use-agent-access.d.ts +3 -3
  38. package/dist/customize/providers/provider-connect.d.ts +6 -15
  39. package/dist/customize/providers/provider-connect.js +5 -36
  40. package/dist/customize/sections/connector-connection-form.d.ts +3 -7
  41. package/dist/customize/sections/connector-connection-form.js +2 -33
  42. package/dist/customize/sections/connector-oauth2-auto.d.ts +3 -33
  43. package/dist/customize/sections/connector-oauth2-auto.js +2 -64
  44. package/dist/customize/sections/connectors-view.js +50 -37
  45. package/dist/customize/sections/gateway-view.d.ts +6 -5
  46. package/dist/customize/sections/gateway-view.js +31 -13
  47. package/dist/customize/sections/llm-provider/chatgpt-subscription-connect.js +21 -18
  48. package/dist/customize/sections/llm-provider/constants.d.ts +1 -2
  49. package/dist/customize/sections/llm-provider/constants.js +1 -2
  50. package/dist/customize/sections/llm-provider/device-grant.d.ts +15 -0
  51. package/dist/customize/sections/llm-provider/device-grant.js +27 -0
  52. package/dist/customize/sections/llm-provider/utils.d.ts +1 -41
  53. package/dist/customize/sections/llm-provider/utils.js +1 -52
  54. package/dist/customize/sections/view/account-secret-resources-panel.js +4 -1
  55. package/dist/customize/sections/view/agent-editor-catalog.js +0 -5
  56. package/dist/customize/sections/view/agent-editor.d.ts +2 -2
  57. package/dist/customize/sections/view/agent-editor.js +2 -2
  58. package/dist/customize/sections/view/channel-settings-patch.js +1 -1
  59. package/dist/customize/sections/view/channels-view.js +8 -8
  60. package/dist/customize/sections/view/connector-connections.d.ts +5 -85
  61. package/dist/customize/sections/view/connector-connections.js +5 -99
  62. package/dist/customize/sections/view/gateway/gateway-logs.d.ts +42 -3
  63. package/dist/customize/sections/view/gateway/gateway-logs.js +212 -15
  64. package/dist/customize/sections/view/gateway/gateway-overview.js +1 -1
  65. package/dist/customize/sections/view/gateway/gateway-routing.d.ts +3 -3
  66. package/dist/customize/sections/view/gateway/gateway-routing.js +81 -200
  67. package/dist/customize/sections/view/gateway/routing-parts.d.ts +101 -0
  68. package/dist/customize/sections/view/gateway/routing-parts.js +154 -0
  69. package/dist/customize/sections/view/gateway/routing-sentence-layout.d.ts +2 -0
  70. package/dist/customize/sections/view/gateway/routing-sentence-layout.js +82 -0
  71. package/dist/customize/sections/view/review-center-connected.js +54 -21
  72. package/dist/customize/sections/view/review-view.d.ts +7 -0
  73. package/dist/customize/sections/view/review-view.js +11 -0
  74. package/dist/customize/sections/view/secret-delivery.d.ts +4 -5
  75. package/dist/customize/sections/view/secret-delivery.js +6 -5
  76. package/dist/customize/sections/view/secrets-view.js +1 -1
  77. package/dist/customize/sections/view/subscription-usage-tab.d.ts +14 -0
  78. package/dist/customize/sections/view/subscription-usage-tab.js +122 -0
  79. package/dist/customize/sections/view/subscription-usage.d.ts +34 -0
  80. package/dist/customize/sections/view/subscription-usage.js +98 -0
  81. package/dist/customize/settings/tabs/experimental-tab.js +3 -3
  82. package/dist/customize/settings/tabs/general-tab.js +65 -10
  83. package/dist/customize/shared/catalog/catalog-card.d.ts +9 -4
  84. package/dist/customize/shared/catalog/catalog-card.js +3 -3
  85. package/dist/customize/shared/channels-switch-dialog.d.ts +1 -1
  86. package/dist/customize/shared/channels-switch-dialog.js +1 -1
  87. package/dist/customize/shared/feature-gate-screen.js +1 -1
  88. package/dist/customize/triggers/schedule/post-to-field.d.ts +1 -1
  89. package/dist/customize/triggers/schedule/post-to-field.js +2 -2
  90. package/dist/customize/triggers/schedule/trigger-composer-logic.d.ts +1 -1
  91. package/dist/customize/triggers/schedule/trigger-runs-logic.d.ts +6 -0
  92. package/dist/customize/triggers/schedule/trigger-runs-logic.js +13 -0
  93. package/dist/customize/triggers/schedule/trigger-runs-panel.js +9 -2
  94. package/dist/files/drives/conflict-marks.d.ts +28 -0
  95. package/dist/files/drives/conflict-marks.js +39 -0
  96. package/dist/files/drives/session-drives-chip.js +15 -10
  97. package/dist/files/project/api/runtime-files.d.ts +2 -2
  98. package/dist/files/project/api/runtime-files.js +2 -2
  99. package/dist/files/project/components/drive-explorer.js +1 -1
  100. package/dist/files/project/components/drive-grid-view.js +0 -1
  101. package/dist/files/project/components/drive-list-view.js +0 -1
  102. package/dist/files/project/components/file-explorer-page.js +1 -1
  103. package/dist/files/project/hooks/index.d.ts +1 -1
  104. package/dist/files/project/hooks/index.js +1 -1
  105. package/dist/files/project/hooks/use-server-health.d.ts +1 -1
  106. package/dist/files/project/hooks/use-server-health.js +1 -1
  107. package/dist/files/project/search/workspace-search-service.d.ts +1 -1
  108. package/dist/files/project/search/workspace-search-service.js +1 -1
  109. package/dist/files/runtime/hooks/index.d.ts +1 -1
  110. package/dist/files/runtime/hooks/index.js +1 -1
  111. package/dist/files/runtime/hooks/server-health-state.d.ts +2 -2
  112. package/dist/files/runtime/hooks/server-health-state.js +2 -2
  113. package/dist/files/runtime/hooks/system-dir.js +2 -2
  114. package/dist/files/runtime/hooks/use-file-content.d.ts +1 -1
  115. package/dist/files/runtime/hooks/use-file-content.js +1 -1
  116. package/dist/files/runtime/hooks/use-file-list.d.ts +1 -1
  117. package/dist/files/runtime/hooks/use-file-list.js +3 -3
  118. package/dist/files/runtime/hooks/use-server-health.d.ts +2 -2
  119. package/dist/files/runtime/hooks/use-server-health.js +3 -3
  120. package/dist/files/runtime/hooks/use-workspace-search.d.ts +1 -2
  121. package/dist/files/runtime/hooks/use-workspace-search.js +0 -1
  122. package/dist/files/runtime/index.d.ts +2 -2
  123. package/dist/files/runtime/index.js +2 -2
  124. package/dist/files/runtime/path-utils.d.ts +1 -1
  125. package/dist/files/runtime/path-utils.js +1 -1
  126. package/dist/files/runtime/sandbox-explorer-source.d.ts +1 -1
  127. package/dist/files/runtime/sandbox-explorer-source.js +1 -1
  128. package/dist/files/runtime/sandbox-file-explorer.d.ts +1 -1
  129. package/dist/files/runtime/sandbox-file-explorer.js +2 -2
  130. package/dist/files/tree/components/file-tree-item.js +0 -1
  131. package/dist/files/tree/hooks/use-file-events.d.ts +1 -1
  132. package/dist/files/tree/hooks/use-file-events.js +1 -1
  133. package/dist/files/viewer/index.d.ts +1 -1
  134. package/dist/files/viewer/index.js +1 -1
  135. package/dist/i18n/en.d.ts +513 -203
  136. package/dist/i18n/en.js +610 -300
  137. package/dist/index.d.ts +1 -1
  138. package/dist/index.js +1 -1
  139. package/dist/internal/account-hub/sections.d.ts +1 -1
  140. package/dist/internal/capture/use-capture-area.d.ts +5 -1
  141. package/dist/internal/capture/use-capture-area.js +16 -9
  142. package/dist/internal/files/file-read-retry.js +1 -1
  143. package/dist/internal/files/types.d.ts +2 -2
  144. package/dist/internal/files/types.js +2 -2
  145. package/dist/internal/goals/goal-meta.d.ts +76 -10
  146. package/dist/internal/goals/goal-meta.js +191 -14
  147. package/dist/internal/hooks/connectors/use-add-account.d.ts +3 -9
  148. package/dist/internal/hooks/connectors/use-add-account.js +3 -18
  149. package/dist/internal/hooks/connectors/use-connect-link.d.ts +3 -2
  150. package/dist/internal/hooks/connectors/use-connect-link.js +15 -24
  151. package/dist/internal/hooks/connectors/use-pipedream-connect-project.d.ts +3 -56
  152. package/dist/internal/hooks/connectors/use-pipedream-connect-project.js +3 -87
  153. package/dist/internal/hooks/projects/use-new-project-session.d.ts +3 -2
  154. package/dist/internal/hooks/projects/use-new-project-session.js +4 -3
  155. package/dist/internal/hooks/projects/use-project-can-run.d.ts +7 -0
  156. package/dist/internal/hooks/projects/use-project-can-run.js +12 -5
  157. package/dist/internal/hooks/projects/use-restart-project-session.d.ts +0 -1
  158. package/dist/internal/hooks/projects/use-restart-project-session.js +0 -1
  159. package/dist/internal/layout/nav-hover-card.d.ts +1 -1
  160. package/dist/internal/layout/nav-hover-card.js +1 -1
  161. package/dist/internal/layout/project-capability-nav.d.ts +1 -1
  162. package/dist/internal/layout/project-capability-nav.js +7 -3
  163. package/dist/internal/layout/project-page-header.d.ts +3 -1
  164. package/dist/internal/layout/project-page-header.js +2 -2
  165. package/dist/internal/lib/account-secret-access.d.ts +1 -41
  166. package/dist/internal/lib/account-secret-access.js +3 -46
  167. package/dist/internal/lib/browser-error-noise.d.ts +2 -2
  168. package/dist/internal/lib/browser-error-noise.js +2 -2
  169. package/dist/internal/lib/browser-noise/rules/expected-states.d.ts +2 -15
  170. package/dist/internal/lib/browser-noise/rules/expected-states.js +6 -56
  171. package/dist/internal/lib/browser-noise/rules/injected-scripts.js +18 -0
  172. package/dist/internal/lib/browser-noise/rules/old-browsers.d.ts +1 -0
  173. package/dist/internal/lib/browser-noise/rules/old-browsers.js +1 -1
  174. package/dist/internal/lib/browser-noise/rules/rejections.d.ts +0 -9
  175. package/dist/internal/lib/browser-noise/rules/rejections.js +0 -14
  176. package/dist/internal/lib/capability-tab-routes.d.ts +3 -3
  177. package/dist/internal/lib/capability-tab-routes.js +11 -3
  178. package/dist/internal/lib/delivered-but-disconnected.js +3 -5
  179. package/dist/internal/lib/error-handler.js +8 -3
  180. package/dist/internal/lib/llm-providers.d.ts +4 -110
  181. package/dist/internal/lib/llm-providers.js +5 -102
  182. package/dist/internal/lib/navigation/message-link.d.ts +32 -0
  183. package/dist/internal/lib/navigation/message-link.js +51 -0
  184. package/dist/internal/lib/navigation/session-href.d.ts +11 -0
  185. package/dist/internal/lib/navigation/session-href.js +20 -0
  186. package/dist/internal/lib/navigation/session-spawn-urls.d.ts +17 -0
  187. package/dist/internal/lib/navigation/session-spawn-urls.js +26 -0
  188. package/dist/internal/lib/pixel-mark.d.ts +4 -17
  189. package/dist/internal/lib/pixel-mark.js +5 -148
  190. package/dist/internal/lib/sounds.d.ts +4 -4
  191. package/dist/internal/lib/sounds.js +4 -4
  192. package/dist/internal/lib/space-scope.d.ts +3 -3
  193. package/dist/internal/lib/space-scope.js +3 -3
  194. package/dist/internal/lib/use-project-feature-flags.js +9 -7
  195. package/dist/internal/lib/web-notifications.d.ts +1 -1
  196. package/dist/internal/lib/web-notifications.js +0 -3
  197. package/dist/internal/notifications/notification-bell.js +1 -3
  198. package/dist/internal/notifications/notification-rows.d.ts +2 -2
  199. package/dist/internal/notifications/notification-rows.js +2 -3
  200. package/dist/internal/session-types/index.d.ts +5 -7
  201. package/dist/internal/session-types/index.js +5 -7
  202. package/dist/internal/stores/active-space-store.d.ts +1 -1
  203. package/dist/internal/stores/active-space-store.js +1 -1
  204. package/dist/internal/stores/composer-prefill-store.js +4 -1
  205. package/dist/internal/stores/kortix-computer-store.d.ts +15 -0
  206. package/dist/internal/stores/kortix-computer-store.js +12 -0
  207. package/dist/internal/stores/sound-store.d.ts +4 -4
  208. package/dist/internal/stores/sound-store.js +10 -0
  209. package/dist/lib/routes.d.ts +17 -7
  210. package/dist/lib/routes.js +18 -2
  211. package/dist/markdown/app-link-icons.d.ts +7 -0
  212. package/dist/markdown/app-link-icons.js +20 -0
  213. package/dist/markdown/app-links.d.ts +9 -0
  214. package/dist/markdown/app-links.js +112 -0
  215. package/dist/markdown/code/shiki-highlighter.js +14 -5
  216. package/dist/markdown/doc-editor/doc-attrs.d.ts +28 -0
  217. package/dist/markdown/doc-editor/doc-attrs.js +156 -0
  218. package/dist/markdown/doc-editor/doc-embed.d.ts +6 -0
  219. package/dist/markdown/doc-editor/doc-embed.js +26 -8
  220. package/dist/markdown/doc-editor/doc-extensions.d.ts +10 -0
  221. package/dist/markdown/doc-editor/doc-extensions.js +55 -8
  222. package/dist/markdown/doc-editor/doc-fidelity.d.ts +72 -0
  223. package/dist/markdown/doc-editor/doc-fidelity.js +135 -0
  224. package/dist/markdown/doc-editor/doc-node-view.d.ts +9 -0
  225. package/dist/markdown/doc-editor/doc-node-view.js +29 -0
  226. package/dist/markdown/doc-editor/markdown.d.ts +20 -0
  227. package/dist/markdown/doc-editor/markdown.js +455 -18
  228. package/dist/markdown/file-links.js +12 -3
  229. package/dist/markdown/markdown-frontmatter.d.ts +6 -6
  230. package/dist/markdown/markdown-frontmatter.js +3 -3
  231. package/dist/markdown/unified-markdown.d.ts +1 -1
  232. package/dist/markdown/unified-markdown.js +129 -10
  233. package/dist/primitives/button.js +2 -1
  234. package/dist/primitives/emoji-picker.js +16 -100
  235. package/dist/primitives/emoji-tint.js +12 -12
  236. package/dist/primitives/entity-avatar.js +14 -9
  237. package/dist/primitives/glyph-face.d.ts +19 -12
  238. package/dist/primitives/glyph-face.js +59 -20
  239. package/dist/primitives/glyph-paths-source.d.ts +7 -0
  240. package/dist/primitives/glyph-paths-source.js +14 -6
  241. package/dist/primitives/glyph-paths.generated.d.ts +1 -1
  242. package/dist/primitives/glyph-paths.generated.js +947 -204
  243. package/dist/primitives/glyph-picker.d.ts +6 -10
  244. package/dist/primitives/glyph-picker.js +147 -98
  245. package/dist/primitives/glyph-registry.js +1604 -1
  246. package/dist/primitives/glyph-tint.d.ts +28 -3
  247. package/dist/primitives/glyph-tint.js +41 -83
  248. package/dist/primitives/kortix-glyphs.d.ts +32 -0
  249. package/dist/primitives/kortix-glyphs.js +157 -0
  250. package/dist/primitives/project-icon-picker.d.ts +8 -1
  251. package/dist/primitives/project-icon-picker.js +13 -5
  252. package/dist/primitives/user-avatar.d.ts +8 -1
  253. package/dist/primitives/user-avatar.js +2 -2
  254. package/dist/providers/ui-provider.d.ts +1 -8
  255. package/dist/session/actions/project-session-list-helpers.js +1 -1
  256. package/dist/session/agents/agent-model.js +4 -0
  257. package/dist/session/agents/agent-state-mark.d.ts +12 -7
  258. package/dist/session/agents/agent-state-mark.js +37 -15
  259. package/dist/session/agents/agent-strip.js +8 -2
  260. package/dist/session/agents/agent-surface.d.ts +81 -0
  261. package/dist/session/agents/agent-surface.js +97 -0
  262. package/dist/session/agents/held-messages.d.ts +1 -5
  263. package/dist/session/agents/held-messages.js +8 -25
  264. package/dist/session/agents/legacy-subagent-chat.js +1 -1
  265. package/dist/session/agents/session-peek.js +24 -12
  266. package/dist/session/agents/steer-session.d.ts +2 -0
  267. package/dist/session/agents/steer-session.js +3 -2
  268. package/dist/session/agents/subagent-dialog-content.d.ts +30 -1
  269. package/dist/session/agents/subagent-dialog-content.js +147 -33
  270. package/dist/session/agents/subagent-view.d.ts +15 -5
  271. package/dist/session/agents/subagent-view.js +28 -6
  272. package/dist/session/agents/tasks-panel.js +2 -12
  273. package/dist/session/agents/workflow-run-controls.d.ts +3 -1
  274. package/dist/session/agents/workflow-run-controls.js +12 -7
  275. package/dist/session/composer/ComposerAboveCard.d.ts +4 -1
  276. package/dist/session/composer/ComposerAboveCard.js +2 -2
  277. package/dist/session/composer/ComposerCard.d.ts +7 -1
  278. package/dist/session/composer/ComposerCard.js +74 -9
  279. package/dist/session/composer/agent-selector.d.ts +16 -0
  280. package/dist/session/composer/agent-selector.js +19 -11
  281. package/dist/session/composer/chat-input/chat-input-control.d.ts +64 -0
  282. package/dist/session/composer/chat-input/chat-input-control.js +578 -0
  283. package/dist/session/composer/chat-input/chat-input-overrides.d.ts +76 -0
  284. package/dist/session/composer/chat-input/chat-input-overrides.js +40 -0
  285. package/dist/session/composer/chat-input/chat-input-panes.d.ts +56 -0
  286. package/dist/session/composer/chat-input/chat-input-panes.js +148 -0
  287. package/dist/session/composer/chat-input/chat-input-summary.d.ts +67 -0
  288. package/dist/session/composer/chat-input/chat-input-summary.js +67 -0
  289. package/dist/session/composer/chat-queue-lines.d.ts +20 -0
  290. package/dist/session/composer/chat-queue-lines.js +20 -0
  291. package/dist/session/composer/composer-chat-input.d.ts +9 -2
  292. package/dist/session/composer/composer-chat-input.js +14 -6
  293. package/dist/session/composer/composer-focus-context.d.ts +7 -0
  294. package/dist/session/composer/composer-focus-context.js +9 -0
  295. package/dist/session/composer/composer-toolbar.d.ts +3 -1
  296. package/dist/session/composer/composer-toolbar.js +3 -3
  297. package/dist/session/composer/composer-underbar.d.ts +10 -1
  298. package/dist/session/composer/composer-underbar.js +10 -2
  299. package/dist/session/composer/composer.d.ts +12 -0
  300. package/dist/session/composer/composer.js +71 -2
  301. package/dist/session/composer/editor/composer-editor.d.ts +10 -2
  302. package/dist/session/composer/editor/composer-editor.js +22 -6
  303. package/dist/session/composer/editor/first-visual-line.d.ts +2 -0
  304. package/dist/session/composer/editor/first-visual-line.js +9 -0
  305. package/dist/session/composer/editor/mention-node.js +2 -0
  306. package/dist/session/composer/editor/serialize.js +9 -1
  307. package/dist/session/composer/hooks/use-file-search.d.ts +16 -16
  308. package/dist/session/composer/hooks/use-file-search.js +17 -17
  309. package/dist/session/composer/menus/mention-controller.d.ts +3 -11
  310. package/dist/session/composer/menus/mention-controller.js +54 -16
  311. package/dist/session/composer/menus/mention-menu.d.ts +7 -2
  312. package/dist/session/composer/menus/mention-menu.js +17 -9
  313. package/dist/session/composer/menus/menu-items.d.ts +9 -0
  314. package/dist/session/composer/menus/space-mentions.d.ts +58 -0
  315. package/dist/session/composer/menus/space-mentions.js +99 -0
  316. package/dist/session/composer/prompt-history.d.ts +9 -0
  317. package/dist/session/composer/prompt-history.js +45 -0
  318. package/dist/session/composer/queue-projection.d.ts +2 -0
  319. package/dist/session/composer/queue-projection.js +1 -0
  320. package/dist/session/composer/queued-prompt-list.js +53 -4
  321. package/dist/session/composer/reasoning-effort-selector.d.ts +20 -0
  322. package/dist/session/composer/reasoning-effort-selector.js +3 -3
  323. package/dist/session/composer/types.d.ts +2 -1
  324. package/dist/session/composer/use-instant-session-send.js +2 -2
  325. package/dist/session/header/session-goal-indicator.js +4 -4
  326. package/dist/session/header/session-site-header.js +7 -3
  327. package/dist/session/header/subagent-hover-card.d.ts +7 -4
  328. package/dist/session/header/subagent-hover-card.js +62 -11
  329. package/dist/session/list/session-status-mark.d.ts +42 -0
  330. package/dist/{workspace/sidebar → session/list}/session-status-mark.js +37 -2
  331. package/dist/session/models/model-selector.d.ts +7 -2
  332. package/dist/session/models/model-selector.js +39 -31
  333. package/dist/session/overrides/provider-secret-pool-editor.d.ts +11 -0
  334. package/dist/session/overrides/provider-secret-pool-editor.js +17 -0
  335. package/dist/session/overrides/session-overrides-control.d.ts +5 -0
  336. package/dist/session/overrides/session-overrides-toolbar.js +147 -7
  337. package/dist/session/panel/easy/plan-card.d.ts +2 -2
  338. package/dist/session/panel/easy/plan-card.js +2 -2
  339. package/dist/session/panel/model-switch-event.d.ts +8 -0
  340. package/dist/session/panel/model-switch-event.js +19 -0
  341. package/dist/session/panel/session-audit-panel.js +3 -2
  342. package/dist/session/panel/session-desktop.js +11 -1
  343. package/dist/session/panel/session-panel-provider.js +1 -1
  344. package/dist/session/panel/shared/use-panel-handoffs.d.ts +2 -2
  345. package/dist/session/panel/shared/use-panel-handoffs.js +21 -2
  346. package/dist/session/panel/use-session-panel-state.js +2 -2
  347. package/dist/session/prompts/ask-deck.d.ts +21 -0
  348. package/dist/session/prompts/ask-deck.js +253 -0
  349. package/dist/session/prompts/session-permission-prompt.d.ts +7 -1
  350. package/dist/session/prompts/session-permission-prompt.js +3 -3
  351. package/dist/session/status/sandbox-loading-boundary.js +2 -2
  352. package/dist/session/status/session-load-state.d.ts +0 -1
  353. package/dist/session/status/session-load-state.js +2 -4
  354. package/dist/session/status/session-terminal-state.d.ts +47 -0
  355. package/dist/session/status/session-terminal-state.js +56 -0
  356. package/dist/session/thread/message-parsing.d.ts +0 -1
  357. package/dist/session/thread/message-parsing.js +0 -1
  358. package/dist/session/thread/plan-surface.d.ts +1 -1
  359. package/dist/session/thread/plan-surface.js +1 -1
  360. package/dist/session/thread/session-chat.d.ts +4 -2
  361. package/dist/session/thread/session-chat.js +547 -409
  362. package/dist/session/thread/session-context-metrics.d.ts +0 -1
  363. package/dist/session/thread/session-context-metrics.js +1 -1
  364. package/dist/session/thread/session-context-sub-sessions.js +3 -1
  365. package/dist/session/thread/show-work.d.ts +38 -0
  366. package/dist/session/thread/show-work.js +115 -0
  367. package/dist/session/thread/stop-sequence.d.ts +51 -0
  368. package/dist/session/thread/stop-sequence.js +55 -0
  369. package/dist/session/thread/thread-boot-rows.d.ts +2 -1
  370. package/dist/session/thread/thread-boot-rows.js +7 -3
  371. package/dist/session/thread/transcript-rows.d.ts +36 -0
  372. package/dist/session/thread/transcript.d.ts +48 -4
  373. package/dist/session/thread/transcript.js +228 -36
  374. package/dist/session/thread/typing-indicator.d.ts +21 -0
  375. package/dist/session/thread/typing-indicator.js +46 -0
  376. package/dist/session/tool/shared/infrastructure-contexts.d.ts +12 -0
  377. package/dist/session/tool/shared/infrastructure-contexts.js +6 -0
  378. package/dist/session/tool/tool-part-renderer.d.ts +2 -0
  379. package/dist/session/tool/tool-part-renderer.js +16 -2
  380. package/dist/session/tool/tools/apply-patch-tool.d.ts +1 -1
  381. package/dist/session/tool/tools/apply-patch-tool.js +1 -1
  382. package/dist/session/tool/tools/kortix-action-tool.js +8 -1
  383. package/dist/session/tool/tools/multi-agent-tool-bodies.d.ts +19 -0
  384. package/dist/session/tool/tools/multi-agent-tool-bodies.js +35 -14
  385. package/dist/session/tool/tools/multi-agent-tools.js +1 -1
  386. package/dist/session/tool/tools/pty-kill-tool.d.ts +1 -1
  387. package/dist/session/tool/tools/pty-kill-tool.js +1 -1
  388. package/dist/session/tool/tools/pty-read-tool.d.ts +2 -2
  389. package/dist/session/tool/tools/pty-read-tool.js +2 -2
  390. package/dist/session/tool/tools/pty-spawn-tool.d.ts +1 -1
  391. package/dist/session/tool/tools/pty-spawn-tool.js +1 -1
  392. package/dist/session/tool/tools/pty-write-tool.d.ts +1 -1
  393. package/dist/session/tool/tools/pty-write-tool.js +1 -1
  394. package/dist/session/tool/tools/session-spawn-urls.d.ts +1 -16
  395. package/dist/session/tool/tools/session-spawn-urls.js +4 -26
  396. package/dist/session/tool/tools/task-tool.d.ts +5 -18
  397. package/dist/session/tool/tools/task-tool.js +47 -86
  398. package/dist/session/tool/tools/todo-write-tool.d.ts +1 -1
  399. package/dist/session/tool/tools/todo-write-tool.js +1 -1
  400. package/dist/session/tool/tools/workflow-progress.d.ts +14 -18
  401. package/dist/session/tool/tools/workflow-progress.js +24 -179
  402. package/dist/session/tool/tools/workflow-result-text.d.ts +15 -0
  403. package/dist/session/tool/tools/workflow-result-text.js +34 -0
  404. package/dist/session/tool/tools/workflow-run-card.d.ts +35 -0
  405. package/dist/session/tool/tools/workflow-run-card.js +157 -0
  406. package/dist/session/tool/tools/workflow-tool.js +45 -58
  407. package/dist/session/turn/activity-burst.d.ts +2 -2
  408. package/dist/session/turn/activity-burst.js +11 -5
  409. package/dist/session/turn/answered-question-step.d.ts +29 -0
  410. package/dist/session/turn/answered-question-step.js +48 -3
  411. package/dist/session/turn/notice-batch-group.d.ts +4 -4
  412. package/dist/session/turn/notice-batch-group.js +5 -8
  413. package/dist/session/turn/peer-message-row.d.ts +14 -8
  414. package/dist/session/turn/peer-message-row.js +38 -64
  415. package/dist/session/turn/plan-anchor.d.ts +3 -3
  416. package/dist/session/turn/plan-anchor.js +3 -3
  417. package/dist/session/turn/plan-card.d.ts +7 -7
  418. package/dist/session/turn/plan-card.js +7 -7
  419. package/dist/session/turn/subagent-notice-row.d.ts +16 -1
  420. package/dist/session/turn/subagent-notice-row.js +47 -35
  421. package/dist/session/turn/throttled-markdown.js +4 -1
  422. package/dist/session/turn/turn-work-accordion.d.ts +10 -3
  423. package/dist/session/turn/turn-work-accordion.js +18 -11
  424. package/dist/session/turn/user-message.js +16 -42
  425. package/dist/session/turn/voice-turn.d.ts +22 -0
  426. package/dist/session/turn/voice-turn.js +32 -0
  427. package/dist/session/voice/call-ring.d.ts +10 -0
  428. package/dist/session/voice/call-ring.js +52 -0
  429. package/dist/session/voice/use-voice-call.d.ts +4 -4
  430. package/dist/session/voice/use-voice-call.js +6 -9
  431. package/dist/session/voice/voice-call-card.d.ts +6 -0
  432. package/dist/session/voice/voice-call-card.js +113 -0
  433. package/dist/session/voice/voice-call-state.d.ts +3 -0
  434. package/dist/session/voice/voice-call-state.js +2 -1
  435. package/dist/session/voice/voice-call-store.d.ts +16 -6
  436. package/dist/session/voice/voice-call-store.js +5 -5
  437. package/dist/session/voice/voice-call.d.ts +4 -8
  438. package/dist/session/voice/voice-call.js +33 -36
  439. package/dist/styles/components.css +33 -0
  440. package/dist/styles/theme.css +26 -0
  441. package/dist/styles.css +1 -1
  442. package/dist/terminal/terminal-card-gate.d.ts +6 -3
  443. package/dist/terminal/terminal-card-gate.js +21 -4
  444. package/dist/workspace/admin/project-admin-dashboard.d.ts +1 -1
  445. package/dist/workspace/admin/project-admin-dashboard.js +12 -9
  446. package/dist/workspace/index.d.ts +3 -2
  447. package/dist/workspace/index.js +2 -1
  448. package/dist/workspace/layout/use-project-home-send.d.ts +2 -0
  449. package/dist/workspace/layout/use-project-home-send.js +5 -3
  450. package/dist/workspace/memory/company-memory-page.d.ts +1 -1
  451. package/dist/workspace/memory/company-memory-page.js +1 -1
  452. package/dist/workspace/new/use-creatable-accounts.js +13 -4
  453. package/dist/workspace/projects/modal/project-icon-field.js +49 -34
  454. package/dist/workspace/review/review-center.d.ts +12 -3
  455. package/dist/workspace/review/review-center.js +50 -16
  456. package/dist/workspace/review/review-reducer.d.ts +7 -0
  457. package/dist/workspace/review/review-reducer.js +11 -0
  458. package/dist/workspace/sessions/project-sessions-helpers.js +1 -1
  459. package/dist/workspace/sessions/project-sessions-view.js +1 -1
  460. package/dist/workspace/sessions/session-row.js +6 -4
  461. package/dist/workspace/sessions/sessions-toolbar.d.ts +1 -1
  462. package/dist/workspace/sessions/sessions-toolbar.js +4 -4
  463. package/dist/workspace/sidebar/footer/project-artifacts-nav.d.ts +6 -1
  464. package/dist/workspace/sidebar/footer/project-artifacts-nav.js +47 -4
  465. package/dist/workspace/sidebar/footer/project-memory-nav.d.ts +1 -1
  466. package/dist/workspace/sidebar/footer/project-memory-nav.js +1 -1
  467. package/dist/workspace/sidebar/project-nav-items.js +13 -17
  468. package/dist/workspace/sidebar/project-session-list.d.ts +7 -1
  469. package/dist/workspace/sidebar/project-session-list.js +63 -24
  470. package/dist/workspace/sidebar/project-sidebar.js +10 -7
  471. package/dist/workspace/sidebar/project-spaces-nav.d.ts +7 -3
  472. package/dist/workspace/sidebar/project-spaces-nav.js +77 -46
  473. package/dist/workspace/sidebar/session-brief-hover-card.d.ts +4 -2
  474. package/dist/workspace/sidebar/session-brief-hover-card.js +47 -28
  475. package/dist/workspace/sidebar/session-group-sections.js +12 -4
  476. package/dist/workspace/sidebar/sidebar-more-group.d.ts +13 -0
  477. package/dist/workspace/sidebar/sidebar-more-group.js +27 -0
  478. package/dist/workspace/space/space-blocks.d.ts +3 -1
  479. package/dist/workspace/space/space-blocks.js +4 -7
  480. package/dist/workspace/space/space-page.d.ts +4 -6
  481. package/dist/workspace/space/space-page.js +10 -24
  482. package/dist/workspace/space/space-tab-panels.d.ts +14 -1
  483. package/dist/workspace/space/space-tab-panels.js +12 -21
  484. package/dist/workspace/space/space-templates.d.ts +4 -5
  485. package/dist/workspace/space/space-templates.js +2 -7
  486. package/dist/workspace/space/use-space-filter.d.ts +1 -1
  487. package/dist/workspace/space/use-space-filter.js +1 -1
  488. package/dist/workspace/spaces/channels-onboarding.d.ts +2 -2
  489. package/dist/workspace/spaces/channels-onboarding.js +4 -3
  490. package/dist/workspace/spaces/create-channel-dialog.js +4 -2
  491. package/dist/workspace/spaces/principal-card.d.ts +73 -0
  492. package/dist/workspace/spaces/principal-card.js +246 -0
  493. package/dist/workspace/spaces/space-agent-ask.d.ts +14 -0
  494. package/dist/workspace/spaces/space-agent-ask.js +36 -0
  495. package/dist/workspace/spaces/space-auto-open.d.ts +8 -0
  496. package/dist/workspace/spaces/space-auto-open.js +18 -0
  497. package/dist/workspace/spaces/space-avatar.d.ts +44 -0
  498. package/dist/workspace/spaces/space-avatar.js +41 -0
  499. package/dist/workspace/spaces/space-details-dialog.js +1 -1
  500. package/dist/workspace/spaces/space-details-panel.d.ts +27 -0
  501. package/dist/workspace/spaces/space-details-panel.js +173 -0
  502. package/dist/workspace/spaces/space-identity.d.ts +49 -0
  503. package/dist/workspace/spaces/space-identity.js +104 -0
  504. package/dist/workspace/spaces/space-members.js +1 -1
  505. package/dist/workspace/spaces/space-mention-source.d.ts +13 -0
  506. package/dist/workspace/spaces/space-mention-source.js +71 -0
  507. package/dist/workspace/spaces/space-people.d.ts +29 -0
  508. package/dist/workspace/spaces/space-people.js +87 -0
  509. package/dist/workspace/spaces/space-roster.d.ts +3 -2
  510. package/dist/workspace/spaces/space-roster.js +7 -4
  511. package/dist/workspace/spaces/space-tab-list.d.ts +37 -0
  512. package/dist/workspace/spaces/space-tab-list.js +82 -0
  513. package/dist/workspace/spaces/space-tabs.d.ts +74 -0
  514. package/dist/workspace/spaces/space-tabs.js +199 -0
  515. package/dist/workspace/spaces/space-threads-tab.js +1 -1
  516. package/dist/workspace/spaces/space-timeline-view.js +126 -17
  517. package/dist/workspace/spaces/space-timeline.d.ts +44 -9
  518. package/dist/workspace/spaces/space-timeline.js +120 -12
  519. package/dist/workspace/spaces/space-view.d.ts +19 -12
  520. package/dist/workspace/spaces/space-view.js +203 -68
  521. package/dist/workspace/spaces/use-personal-space-name.d.ts +2 -0
  522. package/dist/workspace/spaces/use-personal-space-name.js +10 -0
  523. package/package.json +11 -7
  524. package/skills/kortix-ui/SKILL.md +1 -1
  525. package/skills/kortix-ui/references/custom-dashboard.md +2 -3
  526. package/skills/kortix-ui/references/modules.md +4 -4
  527. package/dist/_vendor/shared/room-prompt.d.ts +0 -66
  528. package/dist/session/tool/tools/multi-agent-tool-data.d.ts +0 -63
  529. package/dist/session/tool/tools/multi-agent-tool-data.js +0 -118
  530. package/dist/session/voice/voice-call-bar.d.ts +0 -4
  531. package/dist/session/voice/voice-call-bar.js +0 -39
  532. package/dist/workspace/sidebar/footer/project-rooms-nav.d.ts +0 -9
  533. package/dist/workspace/sidebar/footer/project-rooms-nav.js +0 -32
  534. package/dist/workspace/sidebar/session-status-mark.d.ts +0 -19
  535. package/dist/workspace/space/space-room.d.ts +0 -20
  536. package/dist/workspace/space/space-room.js +0 -27
  537. /package/dist/{workspace/sidebar → session/list}/session-list-chrome.d.ts +0 -0
  538. /package/dist/{workspace/sidebar → session/list}/session-list-chrome.js +0 -0
@@ -1,7 +1,11 @@
1
1
  /**
2
- * The sidebar under the `project_channels` flag: Channels, then Direct
3
- * messages, in the slot the session list holds with the flag off. A section
4
- * renders once its data arrives: no skeleton rows for navigation.
2
+ * The sidebar under the `chat` flag: Spaces only. Review first, then the
3
+ * person's own space (their chat with My Kortix, at `/chat`), then every
4
+ * other space they see, each as a tile, its name and its newest message.
5
+ * There is no Direct messages section: a DM with another agent is one more
6
+ * private space in the list. The rows render once the list arrives (no
7
+ * skeleton for navigation); the personal row renders at once, since `/chat`
8
+ * creates that space on first open.
5
9
  */
6
10
  export declare function ProjectSpacesNav({ projectId }: {
7
11
  projectId: string;
@@ -1,69 +1,100 @@
1
1
  'use client';
2
2
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
- import { useProjectSpaces, useVisibleAgents } from '@kortix/sdk/react';
4
- import { CaretRightIcon, PlusIcon } from '@phosphor-icons/react';
3
+ import { useProjectSessions, useProjectSpaces, useSessionAsks } from '@kortix/sdk/react';
4
+ import { useReviewSessionSummary } from '../../internal/hooks/use-review-session-summary.js';
5
+ import { MY_KORTIX_AGENT_NAME } from '../../_vendor/kortix-shared.js';
6
+ import { CheckIcon, LockSimpleIcon, PlusIcon } from '@phosphor-icons/react';
5
7
  import { useMemo, useState } from 'react';
6
8
  import { useTranslations } from '../../i18n/index.js';
7
- import { AgentMark } from '../../internal/components/agent-mark.js';
8
- import { ProjectNavRow } from '../../internal/layout/project-nav-row.js';
9
- import { cn } from '../../internal/lib/utils.js';
10
- import { selectCollapsedSections, useSessionFilterStore, } from '../../internal/stores/session-filter-store.js';
11
- import { customizePath, uiRoutes } from '../../lib/routes.js';
9
+ import { HoverPrefetchLink } from '../../internal/components/hover-prefetch-link.js';
10
+ import { useIsMobile } from '../../internal/hooks/index.js';
11
+ import { reviewHref } from '../../internal/lib/capability-tab-routes.js';
12
+ import { uiRoutes } from '../../lib/routes.js';
12
13
  import { Button } from '../../primitives/button.js';
13
- import { Disclosure, DisclosureContent, DisclosureTrigger } from '../../primitives/disclosure.js';
14
+ import { CountBadge } from '../../primitives/count-badge.js';
14
15
  import { FadedScrollArea } from '../../primitives/faded-scroll-area.js';
15
- import Hint from '../../primitives/hint.js';
16
- import { SidebarMenu, SidebarMenuButton, SidebarMenuItem } from '../../primitives/sidebar.js';
17
- import { useUiPathname, useUiRouter } from '../../providers/ui-provider.js';
16
+ import { SidebarMenu, SidebarMenuButton, SidebarMenuItem, useSidebar } from '../../primitives/sidebar.js';
17
+ import { useUiPathname } from '../../providers/ui-provider.js';
18
18
  import { CreateChannelDialog } from '../spaces/create-channel-dialog.js';
19
19
  import { PrivateChannelsNotInRow } from '../spaces/private-channels-not-in.js';
20
- import { agentLabel } from '../spaces/space-timeline.js';
21
- import { ChannelGlyph } from '../spaces/channel-glyph.js';
22
- /** Collapse state lives in the persisted session-filter store, beside the session sections. */
23
- const CHANNELS_SECTION_ID = 'section:channels';
24
- const DMS_SECTION_ID = 'section:dms';
20
+ import { isPersonalSpace, isPrivateSpace, orderSpaces, spaceDisplayName, spacePreview, } from '../spaces/space-identity.js';
21
+ import { SpaceAvatar } from '../spaces/space-avatar.js';
22
+ import { usePersonalSpaceName } from '../spaces/use-personal-space-name.js';
23
+ import { useMentionNames, useOtherPerson } from '../spaces/space-people.js';
24
+ /** ↑/↓ move between the rows (Review, the spaces, New space), as in a list. */
25
+ function moveFocus(event) {
26
+ if (event.key !== 'ArrowDown' && event.key !== 'ArrowUp')
27
+ return;
28
+ const rows = Array.from(event.currentTarget.querySelectorAll('[data-sidebar="menu-button"]'));
29
+ const index = rows.indexOf(document.activeElement);
30
+ if (index === -1)
31
+ return;
32
+ event.preventDefault();
33
+ rows[Math.max(0, Math.min(rows.length - 1, index + (event.key === 'ArrowDown' ? 1 : -1)))]?.focus();
34
+ }
25
35
  /** `href`, or a page under it. */
26
36
  function isAt(pathname, href) {
27
37
  return !!pathname && (pathname === href || pathname.startsWith(`${href}/`));
28
38
  }
29
39
  /**
30
- * The sidebar under the `project_channels` flag: Channels, then Direct
31
- * messages, in the slot the session list holds with the flag off. A section
32
- * renders once its data arrives: no skeleton rows for navigation.
40
+ * What waits on the person across the project, the Customize nav's number:
41
+ * the review summary's "needs you", plus the agents' questions and permission
42
+ * asks (`useSessionAsks`). Connector approvals are already in the summary.
43
+ */
44
+ function useReviewBadgeCount(projectId) {
45
+ const reviewNeedsYou = useReviewSessionSummary(projectId, { enabled: true }).totalNeedsYou;
46
+ const asks = useSessionAsks(projectId).data?.asks;
47
+ return reviewNeedsYou + (asks?.filter((ask) => ask.kind !== 'approval').length ?? 0);
48
+ }
49
+ /**
50
+ * The sidebar under the `chat` flag: Spaces only. Review first, then the
51
+ * person's own space (their chat with My Kortix, at `/chat`), then every
52
+ * other space they see, each as a tile, its name and its newest message.
53
+ * There is no Direct messages section: a DM with another agent is one more
54
+ * private space in the list. The rows render once the list arrives (no
55
+ * skeleton for navigation); the personal row renders at once, since `/chat`
56
+ * creates that space on first open.
33
57
  */
34
58
  export function ProjectSpacesNav({ projectId }) {
35
59
  const t = useTranslations('sidebar');
36
60
  const pathname = useUiPathname();
37
- const router = useUiRouter();
38
61
  const spaces = useProjectSpaces(projectId);
39
- const agents = useVisibleAgents({ projectId });
62
+ const personalName = usePersonalSpaceName();
63
+ // Mentions in previews read as names.
64
+ const names = useMentionNames(projectId);
40
65
  const [createOpen, setCreateOpen] = useState(false);
41
- const collapsedSections = useSessionFilterStore(selectCollapsedSections(projectId));
42
- const collapsed = useMemo(() => new Set(collapsedSections), [collapsedSections]);
43
- const toggleSectionCollapsed = useSessionFilterStore((s) => s.toggleSectionCollapsed);
44
- const channels = spaces.data?.filter((space) => space.kind === 'channel' && !space.archived_at);
45
- return (_jsxs(FadedScrollArea, { fadeColor: "from-background", className: "h-full min-h-0 space-y-2", children: [spaces.isError && !spaces.data ? (_jsxs("div", { className: "space-y-1.5 px-2 py-2", children: [_jsx("p", { className: "text-destructive/80 text-xs", children: t('spaces.loadError') }), _jsx(Button, { variant: "outline", size: "xs", onClick: () => spaces.refetch(), children: t('retry') })] })) : null, channels ? (_jsxs(SpacesSection, { title: t('spaces.channels'), open: !collapsed.has(CHANNELS_SECTION_ID), onToggle: () => toggleSectionCollapsed(projectId, CHANNELS_SECTION_ID), action: { label: t('spaces.addChannel'), onClick: () => setCreateOpen(true) }, children: [channels.map((channel) => {
46
- const href = uiRoutes().channel(projectId, channel.slug ?? '');
47
- return (_jsxs(ProjectNavRow, { href: href, active: isAt(pathname, href), label: `#${channel.slug}`, children: [_jsx(ChannelGlyph, { visibility: channel.visibility }), _jsx("span", { children: channel.slug })] }, channel.space_id));
48
- }), _jsx(SidebarMenuItem, { children: _jsxs(SidebarMenuButton, { onClick: () => setCreateOpen(true), className: "text-muted-foreground hover:text-sidebar-foreground", children: [_jsx(PlusIcon, {}), _jsx("span", { children: t('spaces.addChannel') })] }) }), _jsx(PrivateChannelsNotInRow, { projectId: projectId })] })) : null, spaces.data && agents.length > 0 ? (_jsx(SpacesSection, { title: t('spaces.directMessages'), open: !collapsed.has(DMS_SECTION_ID), onToggle: () => toggleSectionCollapsed(projectId, DMS_SECTION_ID),
49
- // Every visible agent already has a DM row: the `+` makes a new agent.
50
- action: { label: t('spaces.newAgent'), onClick: () => router.push(customizePath(projectId, 'agents')) }, children: agents.map((agent) => {
51
- const name = agentLabel(agent.name);
52
- const href = uiRoutes().dm(projectId, agent.name);
53
- return (_jsxs(ProjectNavRow, { href: href, active: isAt(pathname, href), label: name,
54
- // The row forces every svg to size-4: the pixel mark keeps its 14px glyph.
55
- className: "[&_[data-slot=agent-mark]>svg]:size-[14px]!", children: [_jsx(AgentMark, { slug: agent.name, size: 14 }), _jsx("span", { children: name })] }, agent.name));
56
- }) })) : null, _jsx(CreateChannelDialog, { projectId: projectId, open: createOpen, onOpenChange: setCreateOpen })] }));
66
+ const { personal, others } = useMemo(() => orderSpaces(spaces.data ?? []), [spaces.data]);
67
+ const chatHref = `${uiRoutes().project(projectId)}/chat`;
68
+ // The Review page on its own route (`reviewHref`), beside this sidebar.
69
+ const review = reviewHref(projectId);
70
+ const openAsks = useReviewBadgeCount(projectId);
71
+ const hrefOf = (space) => space.kind === 'dm' ? uiRoutes().dm(projectId, space.dm_agent_name ?? '') : uiRoutes().channel(projectId, space.slug ?? '');
72
+ return (_jsxs(FadedScrollArea, { fadeColor: "from-background", className: "h-full min-h-0", children: [_jsxs(SidebarMenu, { className: "gap-px", onKeyDown: moveFocus, children: [review ? (
73
+ // Spacing, not a rule, sets Review apart from the spaces.
74
+ _jsx(SidebarMenuItem, { className: "mb-2", children: _jsx(SidebarMenuButton, { asChild: true, isActive: isAt(pathname, review), className: "text-sidebar-foreground", children: _jsxs(HoverPrefetchLink, { href: review, children: [_jsx(CheckIcon, {}), _jsx("span", { className: "min-w-0 flex-1 truncate", children: t('spaces.review') }), openAsks > 0 ? _jsx(CountBadge, { count: openAsks, tone: "waiting" }) : null] }) }) })) : null, _jsx(SpaceRow, { projectId: projectId, space: personal, href: chatHref, active: isAt(pathname, chatHref) || isAt(pathname, uiRoutes().dm(projectId, MY_KORTIX_AGENT_NAME)), name: personalName, personal: true, isPrivate: true, names: names }), spaces.isError && !spaces.data ? (_jsxs("li", { className: "space-y-1.5 px-2 py-2", children: [_jsx("p", { className: "text-destructive/80 text-xs", children: t('spaces.loadError') }), _jsx(Button, { variant: "outline", size: "xs", onClick: () => spaces.refetch(), children: t('retry') })] })) : null, others.map((space) => {
75
+ const href = hrefOf(space);
76
+ return (_jsx(SpaceRow, { projectId: projectId, space: space, href: href, active: isAt(pathname, href), name: spaceDisplayName(space, personalName), personal: isPersonalSpace(space), isPrivate: isPrivateSpace(space), names: names }, space.space_id));
77
+ }), spaces.data ? (_jsx(SidebarMenuItem, { children: _jsxs(SidebarMenuButton, { onClick: () => setCreateOpen(true), className: "text-muted-foreground hover:text-sidebar-foreground", children: [_jsx(PlusIcon, {}), _jsx("span", { children: t('spaces.addChannel') })] }) })) : null, _jsx(PrivateChannelsNotInRow, { projectId: projectId })] }), _jsx(CreateChannelDialog, { projectId: projectId, open: createOpen, onOpenChange: setCreateOpen })] }));
57
78
  }
58
79
  /**
59
- * A collapsible section: the muted label, then the caret, then a `+` at the
60
- * trailing edge. The caret and the `+` stay hidden until the header is hovered
61
- * or focused, so the list reads as names, not chrome. A collapsed section keeps
62
- * its caret, so a closed section still says it holds more.
63
- *
64
- * The `+` is a sibling of the trigger, not inside it: a button nested in a
65
- * `role="button"` is invalid, and its click would also toggle the section.
80
+ * One space: its tile (initials; the personal space's tile is filled), its
81
+ * name with a lock when private, and its newest message on the line under it.
82
+ * The selected row is the sidebar's active surface.
66
83
  */
67
- function SpacesSection({ title, open, onToggle, action, children, }) {
68
- return (_jsxs(Disclosure, { open: open, onOpenChange: onToggle, className: "group/section", transition: { duration: 0.15, ease: 'easeOut' }, children: [_jsxs("div", { className: "group/section-header flex h-8 items-center gap-1 pr-1", children: [_jsx(DisclosureTrigger, { children: _jsxs("div", { className: cn('text-muted-foreground hover:text-sidebar-foreground flex h-full min-w-0 flex-1 cursor-pointer items-center gap-1 rounded-md px-2 text-sm font-medium', 'focus-visible:ring-kortix-base focus-visible:ring-[0.6px] focus-visible:outline-none'), children: [_jsx("span", { className: "truncate", children: title }), _jsx(CaretRightIcon, { "aria-hidden": true, className: cn('duration-normal size-3 shrink-0 transition-[rotate,opacity] ease-out', 'opacity-0 group-focus-within/section-header:opacity-100 group-hover/section-header:opacity-100', 'group-data-[state=closed]/section:opacity-100 group-data-[state=open]/section:rotate-90') })] }) }), _jsx(Hint, { label: action.label, side: "right", children: _jsx(Button, { type: "button", variant: "ghost", size: "icon-xs", "aria-label": action.label, onClick: action.onClick, className: "text-muted-foreground hover:text-sidebar-foreground shrink-0 opacity-0 group-focus-within/section-header:opacity-100 group-hover/section-header:opacity-100 focus-visible:opacity-100", children: _jsx(PlusIcon, { className: "size-3.5" }) }) })] }), _jsx(DisclosureContent, { contentClassName: "pt-px", children: _jsx(SidebarMenu, { className: "gap-px", children: children }) })] }));
84
+ function SpaceRow({ projectId, space, href, active, name, personal, isPrivate, names, }) {
85
+ const t = useTranslations('sidebar.spaces');
86
+ const isMobile = useIsMobile();
87
+ const { setOpenMobile } = useSidebar();
88
+ // The same list the space's Chat tab reads (one cache entry); this row adds no poll of its own.
89
+ const threads = useProjectSessions(projectId, { spaceId: space?.space_id, parent: 'root', enabled: !!space });
90
+ const preview = useMemo(() => spacePreview(threads.sessions, names), [threads.sessions, names]);
91
+ // A two-person private space reads as the other person.
92
+ const other = useOtherPerson(projectId, space);
93
+ const shown = other?.name ?? name;
94
+ return (_jsx(SidebarMenuItem, { children: _jsx(SidebarMenuButton, { asChild: true, size: "lg", isActive: active, tooltip: shown,
95
+ // The row's svgs are forced to size-4: the lock beside the name stays at 12px.
96
+ className: "text-sidebar-foreground gap-2.5 px-2 [&_[data-slot=space-lock]]:size-3! [&_[data-slot=agent-mark]>svg]:size-auto!", children: _jsxs(HoverPrefetchLink, { href: href, onClick: () => {
97
+ if (isMobile)
98
+ setOpenMobile(false);
99
+ }, children: [_jsx(SpaceAvatar, { space: space, personal: personal, label: shown, projectId: projectId }), _jsxs("span", { className: "flex min-w-0 flex-1 flex-col gap-0.5", children: [_jsxs("span", { className: "flex min-w-0 items-center gap-1", children: [_jsx("span", { className: "truncate", children: shown }), isPrivate ? (_jsx(LockSimpleIcon, { "data-slot": "space-lock", role: "img", "aria-label": t('private'), className: "text-muted-foreground" })) : null] }), _jsx("span", { className: "text-muted-foreground truncate text-xs font-normal", children: preview ?? t('noMessages') })] })] }) }) }));
69
100
  }
@@ -1,7 +1,8 @@
1
- import { type SessionDisplayStatus, type SessionSource } from '../../session/actions/session-label.js';
2
1
  import type { ChangeRequest } from '@kortix/sdk';
3
2
  import { type ReactElement } from 'react';
3
+ import { type SessionDisplayStatus, type SessionSource } from '../../session/actions/session-label.js';
4
4
  interface SessionBrief {
5
+ sessionId?: string;
5
6
  title: string;
6
7
  status: SessionDisplayStatus;
7
8
  createdAt: string;
@@ -47,8 +48,9 @@ export declare function SessionBriefHoverCard({ sessionId, children, ...brief }:
47
48
  * The same brief remains available to keyboard and screen-reader users when
48
49
  * the visual HoverCard is absent or intentionally ignored by assistive tech.
49
50
  */
50
- export declare function SessionBriefDescription({ id, status, createdAt, source, changeRequests, waitingOn, }: Omit<SessionBrief, 'title'> & {
51
+ export declare function SessionBriefDescription({ projectId, sessionId, id, status, createdAt, source, changeRequests, waitingOn, }: Omit<SessionBrief, 'title'> & {
51
52
  id: string;
53
+ projectId: string;
52
54
  }): import("react").JSX.Element;
53
55
  /**
54
56
  * The hover card of a sub-agent row: what it is and when it ran. Same store,
@@ -1,26 +1,27 @@
1
1
  'use client';
2
2
  import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import { useFeatureFlag, useSessionGoal } from '@kortix/sdk/react';
4
+ import { ArrowsSplitIcon, GitDiffIcon, RobotIcon, TargetIcon } from '@phosphor-icons/react';
5
+ import { formatDistanceToNowStrict } from 'date-fns';
6
+ import { Slot } from 'radix-ui';
7
+ import { useEffect, useLayoutEffect, useRef } from 'react';
8
+ import { createPortal } from 'react-dom';
9
+ import { useTranslations } from '../../i18n/index.js';
3
10
  import { HoverPrefetchLink } from '../../internal/components/hover-prefetch-link.js';
4
- import { SESSION_STATUS_TRANSLATION_KEY, } from '../../session/actions/session-label.js';
5
- import { FLOATING_PANEL_SURFACE } from '../../primitives/menu-recipe.js';
11
+ import { goalHref, goalPaused, GoalStatusBadge } from '../../internal/goals/goal-meta.js';
12
+ import { reviewHref } from '../../internal/lib/capability-tab-routes.js';
13
+ import { sessionRowHoverHandlers, useSessionHoverStore, } from '../../internal/stores/session-hover-store.js';
6
14
  import { usePortalContainer } from '../../lib/portal-container.js';
7
15
  import { cn } from '../../lib/utils.js';
8
16
  import { floatingZ, useDialogDepth } from '../../lib/z-stack.js';
9
17
  import { LocalTime } from '../../primitives/local-time.js';
10
- import { menuRow } from '../../primitives/menu-recipe.js';
11
- import { CR_ID_PREFIX } from '../review/review-actions.js';
12
- import { reviewHref } from '../../internal/lib/capability-tab-routes.js';
13
- import { useTranslations } from '../../i18n/index.js';
14
- import { sessionRowHoverHandlers, useSessionHoverStore } from '../../internal/stores/session-hover-store.js';
15
- import { ArrowsSplitIcon, GitDiffIcon, RobotIcon } from '@phosphor-icons/react';
16
- import { formatDistanceToNowStrict } from 'date-fns';
17
- import { Slot } from 'radix-ui';
18
- import { useEffect, useLayoutEffect, useRef } from 'react';
19
- import { createPortal } from 'react-dom';
18
+ import { FLOATING_PANEL_SURFACE, menuRow } from '../../primitives/menu-recipe.js';
20
19
  import { shortRelative } from '../../session/actions/project-session-list-helpers.js';
20
+ import { SESSION_STATUS_TRANSLATION_KEY, } from '../../session/actions/session-label.js';
21
+ import { CR_ID_PREFIX } from '../review/review-actions.js';
21
22
  import { SessionLabelBadges } from '../sessions/session-label-badges.js';
22
23
  import { SOURCE_ICONS } from './session-source-icons.js';
23
- import { isReviewOverdue, SessionStatusMark } from './session-status-mark.js';
24
+ import { isReviewOverdue, SessionStatusMark } from '../../session/list/session-status-mark.js';
24
25
  const DATE_TIME_OPTIONS = {
25
26
  year: 'numeric',
26
27
  month: 'short',
@@ -94,11 +95,18 @@ function ChangeRequestRow({ changeRequest, projectId, onDismiss, }) {
94
95
  * `px-2.5`, so 3.5 spacing steps is exactly where the row labels start. The
95
96
  * title and the change titles share one left edge.
96
97
  */
97
- function SessionBriefContent({ title, status, createdAt, source, changeRequests, labels, waitingOn, spawned = false, subagentCount = 0, spawnedCount = 0, projectId, onDismiss, }) {
98
+ function SessionBriefContent({ sessionId, title, status, createdAt, source, changeRequests, labels, waitingOn, spawned = false, subagentCount = 0, spawnedCount = 0, projectId, onDismiss, }) {
99
+ const gate = useFeatureFlag(projectId, 'goals');
100
+ const { goal } = useSessionGoal(gate.enabled ? projectId : null, sessionId);
101
+ const goalLink = goal ? goalHref(projectId, goal) : null;
102
+ const tGoals = useTranslations('goals');
98
103
  const SourceIcon = source.kind === 'chat' ? null : SOURCE_ICONS[source.kind];
99
104
  const statusLabel = useStatusLabel(status, waitingOn);
100
105
  const t = useTranslations('sidebar.sessionList.brief');
101
- return (_jsxs(_Fragment, { children: [_jsxs("div", { className: "space-y-1.5 px-3.5 py-2.5", children: [_jsxs("div", { className: "flex items-center gap-3", children: [_jsx("p", { className: "text-foreground min-w-0 flex-1 truncate text-sm font-medium", children: title }), _jsx(RelativeCreatedTime, { createdAt: createdAt })] }), _jsxs("div", { className: "text-muted-foreground flex items-center gap-2 text-xs", children: [_jsx(SessionStatusMark, { status: status, waitingOn: waitingOn, overdue: isReviewOverdue(changeRequests) }), _jsx("span", { children: statusLabel })] }), spawned && (_jsxs("div", { className: "text-muted-foreground flex items-center gap-2 text-xs", children: [_jsx(ArrowsSplitIcon, { "aria-hidden": true, className: "size-4 shrink-0" }), _jsx("span", { children: t('spawned') })] })), subagentCount > 0 && (_jsxs("div", { className: "text-muted-foreground flex items-center gap-2 text-xs", children: [_jsx(RobotIcon, { "aria-hidden": true, className: "size-4 shrink-0" }), _jsx("span", { children: t('subAgentCount', { count: subagentCount }) })] })), spawnedCount > 0 && (_jsxs("div", { className: "text-muted-foreground flex items-center gap-2 text-xs", children: [_jsx(ArrowsSplitIcon, { "aria-hidden": true, className: "size-4 shrink-0" }), _jsx("span", { children: t('spawnedCount', { count: spawnedCount }) })] })), SourceIcon ? (_jsxs("div", { className: "text-muted-foreground flex min-w-0 items-center gap-2 text-xs", children: [_jsx(SourceIcon, { className: "size-3.5 shrink-0" }), _jsxs("span", { className: "text-foreground min-w-0 truncate", children: [source.label, source.triggerSlug ? (_jsxs("span", { className: "text-muted-foreground", children: [" \u00B7 ", source.triggerSlug] })) : null] })] })) : null, labels?.length ? _jsx(SessionLabelBadges, { session: { labels: [...labels] }, max: 6, className: "flex-wrap" }) : null] }), changeRequests.length > 0 ? (_jsx("ul", { className: "border-border max-h-64 overflow-y-auto overscroll-contain border-t p-1", children: changeRequests.map((changeRequest) => (_jsx("li", { children: _jsx(ChangeRequestRow, { changeRequest: changeRequest, projectId: projectId, onDismiss: onDismiss }) }, changeRequest.cr_id))) })) : null] }));
106
+ const goalClassName = 'text-muted-foreground flex min-w-0 items-center gap-2 text-xs';
107
+ const goalContent = goal ? (_jsxs(_Fragment, { children: [_jsx(TargetIcon, { "aria-hidden": true, className: "size-4 shrink-0" }), _jsxs("span", { className: "min-w-0 flex-1 truncate", children: [tGoals('sessionChip'), ": ", goal.goal?.objective ?? goal.slug] }), _jsx(GoalStatusBadge, { status: goal.goal?.status, paused: goalPaused(goal) })] })) : null;
108
+ return (_jsxs(_Fragment, { children: [_jsxs("div", { className: "space-y-1.5 px-3.5 py-2.5", children: [_jsxs("div", { className: "flex items-center gap-3", children: [_jsx("p", { className: "text-foreground min-w-0 flex-1 truncate text-sm font-medium", children: title }), _jsx(RelativeCreatedTime, { createdAt: createdAt })] }), _jsxs("div", { className: "text-muted-foreground flex items-center gap-2 text-xs", children: [_jsx(SessionStatusMark, { status: status, waitingOn: waitingOn, overdue: isReviewOverdue(changeRequests) }), _jsx("span", { children: statusLabel })] }), goalContent &&
109
+ (goalLink ? (_jsx(HoverPrefetchLink, { href: goalLink, onClick: onDismiss, className: goalClassName, children: goalContent })) : (_jsx("div", { className: goalClassName, children: goalContent }))), spawned && (_jsxs("div", { className: "text-muted-foreground flex items-center gap-2 text-xs", children: [_jsx(ArrowsSplitIcon, { "aria-hidden": true, className: "size-4 shrink-0" }), _jsx("span", { children: t('spawned') })] })), subagentCount > 0 && (_jsxs("div", { className: "text-muted-foreground flex items-center gap-2 text-xs", children: [_jsx(RobotIcon, { "aria-hidden": true, className: "size-4 shrink-0" }), _jsx("span", { children: t('subAgentCount', { count: subagentCount }) })] })), spawnedCount > 0 && (_jsxs("div", { className: "text-muted-foreground flex items-center gap-2 text-xs", children: [_jsx(ArrowsSplitIcon, { "aria-hidden": true, className: "size-4 shrink-0" }), _jsx("span", { children: t('spawnedCount', { count: spawnedCount }) })] })), SourceIcon ? (_jsxs("div", { className: "text-muted-foreground flex min-w-0 items-center gap-2 text-xs", children: [_jsx(SourceIcon, { className: "size-3.5 shrink-0" }), _jsxs("span", { className: "text-foreground min-w-0 truncate", children: [source.label, source.triggerSlug ? (_jsxs("span", { className: "text-muted-foreground", children: [" \u00B7 ", source.triggerSlug] })) : null] })] })) : null, labels?.length ? (_jsx(SessionLabelBadges, { session: { labels: [...labels] }, max: 6, className: "flex-wrap" })) : null] }), changeRequests.length > 0 ? (_jsx("ul", { className: "border-border max-h-64 overflow-y-auto overscroll-contain border-t p-1", children: changeRequests.map((changeRequest) => (_jsx("li", { children: _jsx(ChangeRequestRow, { changeRequest: changeRequest, projectId: projectId, onDismiss: onDismiss }) }, changeRequest.cr_id))) })) : null] }));
102
110
  }
103
111
  const CARD_EDGE_PX = 8;
104
112
  /**
@@ -139,16 +147,22 @@ export function SessionBriefCardHost() {
139
147
  shown.current = false;
140
148
  return;
141
149
  }
142
- const rect = anchor.getBoundingClientRect();
143
- const top = Math.max(CARD_EDGE_PX, Math.min(rect.top, window.innerHeight - CARD_EDGE_PX - el.offsetHeight));
144
- const reduce = window.matchMedia('(prefers-reduced-motion: reduce)').matches;
145
- // A move between rows glides; the first open fades in, as the reminders card does.
146
- el.style.transition =
147
- shown.current && via === 'pointer' && !reduce
148
- ? 'transform var(--duration-normal) var(--ease-in-out)'
149
- : 'opacity var(--duration-fast) var(--ease-out)';
150
- el.style.transform = `translate(${rect.right}px, ${top}px)`;
151
- shown.current = true;
150
+ const position = () => {
151
+ const rect = anchor.getBoundingClientRect();
152
+ const top = Math.max(CARD_EDGE_PX, Math.min(rect.top, window.innerHeight - CARD_EDGE_PX - el.offsetHeight));
153
+ const reduce = window.matchMedia('(prefers-reduced-motion: reduce)').matches;
154
+ // A move between rows glides; the first open fades in, as the reminders card does.
155
+ el.style.transition =
156
+ shown.current && via === 'pointer' && !reduce
157
+ ? 'transform var(--duration-normal) var(--ease-in-out)'
158
+ : 'opacity var(--duration-fast) var(--ease-out)';
159
+ el.style.transform = `translate(${rect.right}px, ${top}px)`;
160
+ shown.current = true;
161
+ };
162
+ position();
163
+ const observer = new ResizeObserver(position);
164
+ observer.observe(el);
165
+ return () => observer.disconnect();
152
166
  }, [visible, activeSessionId, anchor, via]);
153
167
  // Native listeners, not React's `onPointerEnter/Leave`. The card's content is
154
168
  // portaled in from the row, so in React's tree it is the row's child, not
@@ -221,16 +235,21 @@ function SessionBriefCard({ id, children, content, }) {
221
235
  }
222
236
  export function SessionBriefHoverCard({ sessionId, children, ...brief }) {
223
237
  const dismiss = useSessionHoverStore((state) => state.dismiss);
224
- return (_jsx(SessionBriefCard, { id: sessionId, content: _jsx(SessionBriefContent, { ...brief, onDismiss: dismiss }), children: children }));
238
+ return (_jsx(SessionBriefCard, { id: sessionId, content: _jsx(SessionBriefContent, { ...brief, sessionId: sessionId, onDismiss: dismiss }), children: children }));
225
239
  }
226
240
  /**
227
241
  * The same brief remains available to keyboard and screen-reader users when
228
242
  * the visual HoverCard is absent or intentionally ignored by assistive tech.
229
243
  */
230
- export function SessionBriefDescription({ id, status, createdAt, source, changeRequests, waitingOn, }) {
244
+ export function SessionBriefDescription({ projectId, sessionId, id, status, createdAt, source, changeRequests, waitingOn, }) {
231
245
  const t = useTranslations('sidebar.sessionList.brief');
246
+ const tGoals = useTranslations('goals');
247
+ const gate = useFeatureFlag(projectId, 'goals');
248
+ const { goal } = useSessionGoal(gate.enabled ? projectId : null, sessionId);
232
249
  const statusLabel = useStatusLabel(status, waitingOn);
233
- return (_jsxs("span", { id: id, className: "sr-only", children: [t('status'), ": ", statusLabel, ". ", t('created'), ": ", _jsx(SessionCreatedTime, { createdAt: createdAt }), ".", source.kind !== 'chat'
250
+ return (_jsxs("span", { id: id, className: "sr-only", children: [goal
251
+ ? `${tGoals('sessionChip')}: ${goal.goal?.objective ?? goal.slug}. ${goalPaused(goal) ? tGoals('paused') : tGoals(`status.${goal.goal?.status ?? 'draft'}`)}. `
252
+ : null, t('status'), ": ", statusLabel, ". ", t('created'), ": ", _jsx(SessionCreatedTime, { createdAt: createdAt }), ".", source.kind !== 'chat'
234
253
  ? ` ${t('source')}: ${source.label}${source.triggerSlug ? `, ${source.triggerSlug}` : ''}.`
235
254
  : null, ' ', changeRequests.length > 0
236
255
  ? `${t('changeRequests')}: ${changeRequests
@@ -14,7 +14,7 @@ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-run
14
14
  import { ApiError } from '@kortix/sdk';
15
15
  import { findCachedProjectSession, useCreateProjectSessionGroup, useDeleteProjectSessionGroup, useProjectSessions, useRenameProjectSessionGroup, useReorderProjectSessionGroups, useSetProjectSessionGroup, } from '@kortix/sdk/react';
16
16
  import { useQueryClient } from '@tanstack/react-query';
17
- import { ArrowDownIcon, ArrowUpIcon, CaretRightIcon, DotsThreeIcon, FolderSimpleIcon, PencilSimpleIcon, TrashIcon, } from '@phosphor-icons/react';
17
+ import { ArrowDownIcon, ArrowUpIcon, CaretRightIcon, DotsThreeIcon, FolderIcon, FolderOpenIcon, PencilSimpleIcon, TrashIcon, } from '@phosphor-icons/react';
18
18
  import { useMemo, useState } from 'react';
19
19
  import { useTranslations } from '../../i18n/index.js';
20
20
  import { cn } from '../../internal/lib/utils.js';
@@ -27,7 +27,7 @@ import Loading from '../../primitives/loading.js';
27
27
  import { Modal, ModalBody, ModalContent, ModalDescription, ModalFooter, ModalHeader, ModalTitle, } from '../../primitives/modal.js';
28
28
  import { errorToast, successToast } from '../../primitives/toast.js';
29
29
  import { moveGroupBy, moveGroupTo } from './session-group-order.js';
30
- import { SESSION_MENU_TRIGGER_CLASS, SESSION_ROW_HEIGHT_CLASS, SIDEBAR_PAGE_SIZE, ShowMoreButton, } from './session-list-chrome.js';
30
+ import { SESSION_MENU_TRIGGER_CLASS, SESSION_ROW_HEIGHT_CLASS, SIDEBAR_PAGE_SIZE, ShowMoreButton, } from '../../session/list/session-list-chrome.js';
31
31
  /** A dragged session row carries its id under this type. */
32
32
  const SESSION_DRAG_TYPE = 'application/x-kortix-session';
33
33
  /** A dragged group header carries its id under this type. */
@@ -226,12 +226,20 @@ function SessionGroupSection({ projectId, group, groupIds, labels, collapsedSect
226
226
  draggingGroupId = group.group_id;
227
227
  }, onDragEnd: () => {
228
228
  draggingGroupId = null;
229
- }, className: cn('group/section-header text-muted-foreground relative flex items-center gap-1 rounded-md px-2 text-sm font-medium', SESSION_ROW_HEIGHT_CLASS, drop.over === 'session' && 'bg-sidebar-row text-sidebar-foreground',
229
+ }, className: cn(
230
+ // A group is a folder, not a section label: it takes a session
231
+ // row's geometry (px-2, gap-2, 16px icon, regular weight) so its
232
+ // icon and name sit on the same axes as the rows it holds, while
233
+ // Pinned and the date headers stay the only labels.
234
+ 'group/section-header text-muted-foreground hover:bg-sidebar-row hover:text-sidebar-foreground relative flex cursor-pointer items-center gap-2 rounded-md px-2 text-sm', SESSION_ROW_HEIGHT_CLASS, drop.over === 'session' && 'bg-sidebar-row text-sidebar-foreground',
230
235
  // A group dropped here takes this place: a line marks the side it
231
236
  // lands on (below this group when it comes from above).
232
237
  drop.over === 'group' &&
233
238
  'before:bg-foreground/40 before:absolute before:inset-x-2 before:h-0.5 before:rounded-full', drop.over === 'group' &&
234
- (groupIds.indexOf(draggingGroupId ?? '') < index ? 'before:bottom-0' : 'before:top-0')), children: [_jsx(FolderSimpleIcon, { "aria-hidden": true, className: "size-3.5 shrink-0" }), _jsx("span", { className: "truncate", children: group.name }), _jsx(CaretRightIcon, { "aria-hidden": true, className: "duration-normal size-3 shrink-0 opacity-0 transition-transform ease-out group-hover/section-header:opacity-100 group-data-[state=open]/section:rotate-90" }), _jsx(SessionGroupMenu, { group: group, onRename: () => onRename(group), onMoveUp: moveGroupBy(groupIds, group.group_id, -1), onMoveDown: moveGroupBy(groupIds, group.group_id, 1), onReorder: (ids) => void actions.reorder(ids), projectId: projectId })] }) }), _jsxs(DisclosureContent, { contentClassName: "space-y-px", children: [rows.map(renderNode), query.data !== undefined && rows.length === 0 && !query.hasNextPage ? (_jsx("p", { className: "text-muted-foreground px-2 py-1 text-xs", children: tGroups('empty') })) : null, query.hasNextPage && (_jsx(ShowMoreButton, { loading: query.isFetchingNextPage, failed: query.isFetchNextPageError, label: t('loadMore'), onClick: () => query.fetchNextPage() }))] })] }) }));
239
+ (groupIds.indexOf(draggingGroupId ?? '') < index ? 'before:bottom-0' : 'before:top-0')), children: [open ? (_jsx(FolderOpenIcon, { "aria-hidden": true, className: "size-4 shrink-0" })) : (_jsx(FolderIcon, { "aria-hidden": true, className: "size-4 shrink-0" })), _jsx("span", { className: "min-w-0 truncate", children: group.name }), _jsx(CaretRightIcon, { "aria-hidden": true, className: "duration-normal size-3 shrink-0 opacity-0 transition-transform ease-out group-hover/section-header:opacity-100 group-data-[state=open]/section:rotate-90" }), _jsx(SessionGroupMenu, { group: group, onRename: () => onRename(group), onMoveUp: moveGroupBy(groupIds, group.group_id, -1), onMoveDown: moveGroupBy(groupIds, group.group_id, 1), onReorder: (ids) => void actions.reorder(ids), projectId: projectId })] }) }), _jsxs(DisclosureContent, { contentClassName: "space-y-px", children: [rows.map(renderNode), query.data !== undefined && rows.length === 0 && !query.hasNextPage ? (
240
+ // Indented to the name's x (px-2 + 16px icon + gap-2), one row tall,
241
+ // so the empty group reads as a folder with nothing in it yet.
242
+ _jsx("p", { className: "text-muted-foreground flex h-8 items-center pr-2 pl-8 text-xs", children: _jsx("span", { className: "truncate", children: tGroups('empty') }) })) : null, query.hasNextPage && (_jsx(ShowMoreButton, { loading: query.isFetchingNextPage, failed: query.isFetchNextPageError, label: t('loadMore'), onClick: () => query.fetchNextPage() }))] })] }) }));
235
243
  }
236
244
  /**
237
245
  * The group header's `⋯`: Rename, Move up, Move down, Delete. Hover-revealed
@@ -0,0 +1,13 @@
1
+ import type { ReactNode } from 'react';
2
+ /**
3
+ * Spaces on (`chat`): one group pinned at the bottom of the sidebar that
4
+ * holds everything that is not a space: Customize, Drive, Apps, Artifacts
5
+ * the session list (with its own "+", New session as before), and the
6
+ * connect and upgrade rows (`footer`). Closed by
7
+ * default; the choice persists per project. The header is a real button
8
+ * (`aria-expanded`), so the keyboard opens it.
9
+ */
10
+ export declare function SidebarMoreGroup({ projectId, footer }: {
11
+ projectId: string; /** Connect rows and the upgrade row, at the end of the group. */
12
+ footer?: ReactNode;
13
+ }): import("react").JSX.Element;
@@ -0,0 +1,27 @@
1
+ 'use client';
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import { CaretRightIcon, DotsThreeIcon } from '@phosphor-icons/react';
4
+ import { useTranslations } from '../../i18n/index.js';
5
+ import { selectExpandedIds, useSessionExpandedStore } from '../../internal/stores/session-expanded-store.js';
6
+ import { cn } from '../../lib/utils.js';
7
+ import { Disclosure, DisclosureContent, DisclosureTrigger } from '../../primitives/disclosure.js';
8
+ import { SidebarMenu, SidebarMenuButton, SidebarMenuItem } from '../../primitives/sidebar.js';
9
+ import { ProjectNavItems } from './project-nav-items.js';
10
+ import { ProjectSessionList } from './project-session-list.js';
11
+ /** Open state lives in the persisted expanded store (closed by default), beside Sessions. */
12
+ const MORE_SECTION_ID = 'section:sidebar-more';
13
+ /**
14
+ * Spaces on (`chat`): one group pinned at the bottom of the sidebar that
15
+ * holds everything that is not a space: Customize, Drive, Apps, Artifacts
16
+ * the session list (with its own "+", New session as before), and the
17
+ * connect and upgrade rows (`footer`). Closed by
18
+ * default; the choice persists per project. The header is a real button
19
+ * (`aria-expanded`), so the keyboard opens it.
20
+ */
21
+ export function SidebarMoreGroup({ projectId, footer }) {
22
+ const t = useTranslations('sidebar.spaces');
23
+ const expanded = useSessionExpandedStore(selectExpandedIds(projectId));
24
+ const toggleExpanded = useSessionExpandedStore((state) => state.toggleExpanded);
25
+ const open = expanded.includes(MORE_SECTION_ID);
26
+ return (_jsxs(Disclosure, { open: open, onOpenChange: () => toggleExpanded(projectId, MORE_SECTION_ID), className: cn('group/more flex min-h-0 flex-col', open ? 'max-h-1/2' : 'shrink-0'), transition: { duration: 0.15, ease: 'easeOut' }, children: [_jsx(SidebarMenu, { children: _jsx(SidebarMenuItem, { children: _jsx(DisclosureTrigger, { children: _jsxs(SidebarMenuButton, { className: "text-muted-foreground hover:text-sidebar-foreground", children: [_jsx(DotsThreeIcon, { weight: "bold" }), _jsx("span", { className: "min-w-0 flex-1 truncate", children: t('more') }), _jsx(CaretRightIcon, { "aria-hidden": true, className: cn('size-3! shrink-0 transition-transform duration-(--duration-fast) ease-out motion-reduce:transition-none', open && 'rotate-90') })] }) }) }) }), _jsxs(DisclosureContent, { className: "flex min-h-0 flex-1 flex-col", contentClassName: "flex min-h-0 flex-1 flex-col gap-2 overflow-y-auto pt-1", children: [_jsx(SidebarMenu, { children: _jsx(ProjectNavItems, { projectId: projectId }) }), _jsx(ProjectSessionList, { projectId: projectId, secondary: true }), footer] })] }));
27
+ }
@@ -17,7 +17,9 @@ import type { SpaceBlock } from '@kortix/sdk';
17
17
  *
18
18
  * Block renderers: `text` is markdown, `iframe` a sandboxed frame, `artifact`
19
19
  * opens the Files viewer, `app` the live pooled `AppPreview` for the resolved
20
- * slug, `chat` the project room named `room` (`SpaceRoom`, flag `agent_rooms`).
20
+ * slug. A `chat` block (a project room) renders nothing: Rooms were removed
21
+ * (2026-11), and the manifest still accepts the block so an old kortix.yaml
22
+ * stays valid.
21
23
  */
22
24
  export declare function SpaceBlocks({ projectId, blocks, }: {
23
25
  projectId: string;
@@ -10,7 +10,6 @@ import Loading from '../../primitives/loading.js';
10
10
  import { useFilePreviewStore } from '../../internal/stores/file-preview-store.js';
11
11
  import { framePolicy } from '../../files/viewer/preview-policy.js';
12
12
  import { cn } from '../../lib/utils.js';
13
- import { SpaceRoom } from './space-room.js';
14
13
  /**
15
14
  * A space's board tab, rendered as a simple responsive grid of blocks.
16
15
  *
@@ -29,12 +28,14 @@ import { SpaceRoom } from './space-room.js';
29
28
  *
30
29
  * Block renderers: `text` is markdown, `iframe` a sandboxed frame, `artifact`
31
30
  * opens the Files viewer, `app` the live pooled `AppPreview` for the resolved
32
- * slug, `chat` the project room named `room` (`SpaceRoom`, flag `agent_rooms`).
31
+ * slug. A `chat` block (a project room) renders nothing: Rooms were removed
32
+ * (2026-11), and the manifest still accepts the block so an old kortix.yaml
33
+ * stays valid.
33
34
  */
34
35
  export function SpaceBlocks({ projectId, blocks, }) {
35
36
  if (!blocks.length)
36
37
  return null;
37
- return (_jsx("div", { className: "grid w-full gap-4 sm:grid-cols-2", children: blocks.map((block, index) => (_jsx(SpaceBlockCard, { projectId: projectId, block: block }, index))) }));
38
+ return (_jsx("div", { className: "grid w-full gap-4 sm:grid-cols-2", children: blocks.map((block, index) => block.type === 'chat' ? null : _jsx(SpaceBlockCard, { projectId: projectId, block: block }, index)) }));
38
39
  }
39
40
  const TYPE_ICON = {
40
41
  chat: ChatCircleIcon,
@@ -57,10 +58,6 @@ function SpaceBlockCard({ projectId, block }) {
57
58
  const Icon = TYPE_ICON[block.type];
58
59
  const label = block.label?.trim() || TYPE_FALLBACK_LABEL[block.type];
59
60
  const t = useTranslations('spaces');
60
- // A chat block is a room: the host's room panel draws its own frame.
61
- if (block.type === 'chat') {
62
- return block.room?.trim() ? (_jsx(SpaceRoom, { projectId: projectId, roomName: block.room.trim(), className: "min-w-0" })) : (_jsxs("div", { className: PANEL, children: [_jsx("div", { className: "flex items-center gap-2 px-4 py-2.5", children: _jsx(BlockTitle, { icon: Icon, label: label }) }), _jsx(EmptyLine, { children: t('noRoom') })] }));
63
- }
64
61
  // A clickable artifact is its own `<button>` (whole card opens the file), so
65
62
  // the header is shared by the rest and skipped there.
66
63
  if (block.type === 'artifact') {
@@ -1,6 +1,4 @@
1
1
  import { type ManifestSpace, type SpaceTab } from '@kortix/sdk';
2
- /** The key of the room tab, always first. */
3
- export declare const ROOM_TAB = "room";
4
2
  /** The tabs a viewer sees, in order: a tab of a feature the project has off is hidden. */
5
3
  export declare function visibleSpaceTabs(space: ManifestSpace, flags: {
6
4
  goals: boolean;
@@ -13,10 +11,10 @@ export declare function visibleSpaceTabs(space: ManifestSpace, flags: {
13
11
  /**
14
12
  * /projects/[id]/spaces/[slug]: a space is a channel. One header block: the
15
13
  * title bar names it and shows what `spaces.<slug>.header` picks (its agents,
16
- * the people in its room, the sessions that wait on you, and the actions),
17
- * and the tabs sit directly under it. The first tab is always the room; the
18
- * tabs after it come from `spaces.<slug>.tabs`. `?tab=` deep links a tab.
19
- * The "+" menu and Edit tabs write the same manifest list.
14
+ * the sessions that wait on you, and the actions), and the tabs from
15
+ * `spaces.<slug>.tabs` sit directly under it. The first tab is the default;
16
+ * `?tab=` deep links another. A space with no tab shows its intro. The "+"
17
+ * menu and Edit tabs write the same manifest list.
20
18
  */
21
19
  export declare function SpacePage({ projectId, slug }: {
22
20
  projectId: string;
@@ -2,7 +2,7 @@
2
2
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
3
3
  import { MY_KORTIX_AGENT_NAME } from '../../_vendor/kortix-shared.js';
4
4
  import { agentsInSpace, listSpaces, spaceHeader, spaceTabKey, spaceTabs, } from '@kortix/sdk';
5
- import { sessionNeedsInputCount, useFeatureFlag, useProjectConfig, useProjectSessions, useRoom, useSessionsNeedingInput, useSpaceRoom, } from '@kortix/sdk/react';
5
+ import { sessionNeedsInputCount, useFeatureFlag, useProjectConfig, useProjectSessions, useSessionsNeedingInput, } from '@kortix/sdk/react';
6
6
  import { HashIcon, PlusIcon } from '@phosphor-icons/react';
7
7
  import { useConfigureThread } from '../../customize/use-configure-thread.js';
8
8
  import { useTranslations } from '../../i18n/index.js';
@@ -20,11 +20,8 @@ import { CountBadge } from '../../primitives/count-badge.js';
20
20
  import { EmptyState } from '../../primitives/empty-state.js';
21
21
  import { useOptionalSidebar } from '../../primitives/sidebar.js';
22
22
  import { Tabs, TabsList, TabsTrigger } from '../../primitives/tabs.js';
23
- import { UserAvatar } from '../../primitives/user-avatar.js';
24
23
  import { SpaceTabMenu } from './space-tab-menu.js';
25
24
  import { SpaceTabPanel, useTabLabel } from './space-tab-panels.js';
26
- /** The key of the room tab, always first. */
27
- export const ROOM_TAB = 'room';
28
25
  /** How many faces a pile shows before "+N". */
29
26
  const PILE = 4;
30
27
  /** The tabs a viewer sees, in order: a tab of a feature the project has off is hidden. */
@@ -42,10 +39,10 @@ export function visibleSpaceTabs(space, flags) {
42
39
  /**
43
40
  * /projects/[id]/spaces/[slug]: a space is a channel. One header block: the
44
41
  * title bar names it and shows what `spaces.<slug>.header` picks (its agents,
45
- * the people in its room, the sessions that wait on you, and the actions),
46
- * and the tabs sit directly under it. The first tab is always the room; the
47
- * tabs after it come from `spaces.<slug>.tabs`. `?tab=` deep links a tab.
48
- * The "+" menu and Edit tabs write the same manifest list.
42
+ * the sessions that wait on you, and the actions), and the tabs from
43
+ * `spaces.<slug>.tabs` sit directly under it. The first tab is the default;
44
+ * `?tab=` deep links another. A space with no tab shows its intro. The "+"
45
+ * menu and Edit tabs write the same manifest list.
49
46
  */
50
47
  export function SpacePage({ projectId, slug }) {
51
48
  const t = useTranslations('spaces');
@@ -64,11 +61,12 @@ export function SpacePage({ projectId, slug }) {
64
61
  }
65
62
  const tabs = visibleSpaceTabs(space, { goals: goalsOn, artifacts: artifactsOn });
66
63
  const requested = params.get('tab');
67
- const active = tabs.some((entry) => entry.key === requested) ? requested : ROOM_TAB;
64
+ const first = tabs[0]?.key ?? null;
65
+ const active = tabs.some((entry) => entry.key === requested) ? requested : first;
68
66
  const selectTab = (key) => {
69
- router.replace(key === ROOM_TAB ? pathname : `${pathname}?tab=${encodeURIComponent(key)}`);
67
+ router.replace(key === first ? pathname : `${pathname}?tab=${encodeURIComponent(key)}`);
70
68
  };
71
- return (_jsxs("div", { className: "flex h-svh flex-col overflow-hidden", children: [_jsx(SpaceHeader, { projectId: projectId, space: space }), _jsxs(Tabs, { value: active, onValueChange: selectTab, className: "flex min-h-0 flex-1 flex-col gap-0", children: [_jsxs(TabsList, { type: "underline", className: "w-full shrink-0 justify-start overflow-x-auto px-5", children: [_jsx(TabsTrigger, { value: ROOM_TAB, className: "w-fit flex-none", children: t('tabs.room') }), tabs.map((entry) => (_jsx(SpaceTabTrigger, { value: entry.key, tab: entry.tab }, entry.key))), canWrite ? (_jsx(SpaceTabMenu, { projectId: projectId, space: space, onAdded: selectTab, children: _jsx(Button, { size: "icon-xs", variant: "ghost", "aria-label": t('addTab'), className: "ml-1 shrink-0", children: _jsx(PlusIcon, {}) }) })) : null] }), _jsx("div", { className: "min-h-0 flex-1 overflow-y-auto", children: _jsx(SpaceTabPanel, { projectId: projectId, space: space, tab: active === ROOM_TAB ? null : (tabs.find((entry) => entry.key === active)?.tab ?? null) }) })] })] }));
69
+ return (_jsxs("div", { className: "flex h-svh flex-col overflow-hidden", children: [_jsx(SpaceHeader, { projectId: projectId, space: space }), _jsxs(Tabs, { value: active ?? '', onValueChange: selectTab, className: "flex min-h-0 flex-1 flex-col gap-0", children: [_jsxs(TabsList, { type: "underline", className: "w-full shrink-0 justify-start overflow-x-auto px-5", children: [tabs.map((entry) => (_jsx(SpaceTabTrigger, { value: entry.key, tab: entry.tab }, entry.key))), canWrite ? (_jsx(SpaceTabMenu, { projectId: projectId, space: space, onAdded: selectTab, children: _jsx(Button, { size: "icon-xs", variant: "ghost", "aria-label": t('addTab'), className: "ml-1 shrink-0", children: _jsx(PlusIcon, {}) }) })) : null] }), _jsx("div", { className: "min-h-0 flex-1 overflow-y-auto", children: _jsx(SpaceTabPanel, { projectId: projectId, space: space, tab: tabs.find((entry) => entry.key === active)?.tab ?? null }) })] })] }));
72
70
  }
73
71
  function SpaceTabTrigger({ value, tab }) {
74
72
  const label = useTabLabel(tab);
@@ -84,7 +82,6 @@ function SpaceTabTrigger({ value, tab }) {
84
82
  function SpaceHeader({ projectId, space }) {
85
83
  const config = useProjectConfig(projectId);
86
84
  const sidebar = useOptionalSidebar();
87
- const roomsOn = useFeatureFlag(projectId, 'agent_rooms').enabled;
88
85
  // My Kortix runs only with `builtin_agents.my_kortix: true`: no Ask button otherwise.
89
86
  const items = spaceHeader(space).filter((item) => item !== 'ask_my_kortix' || config?.builtin_agents?.my_kortix === true);
90
87
  const agents = agentsInSpace(space.name, config?.agents ?? []);
@@ -92,8 +89,7 @@ function SpaceHeader({ projectId, space }) {
92
89
  for (const item of items) {
93
90
  if (item === 'agents' && agents.length)
94
91
  strip.push(_jsx(SpaceAgents, { projectId: projectId, agents: agents }, item));
95
- if (item === 'members' && roomsOn)
96
- strip.push(_jsx(SpaceMembers, { projectId: projectId, slug: space.name }, item));
92
+ // `members` showed the people of the space's Room; Rooms were removed (2026-11), so it draws nothing.
97
93
  if (item === 'needs_you')
98
94
  strip.push(_jsx(SpaceNeedsYou, { projectId: projectId, agents: agents }, item));
99
95
  }
@@ -111,16 +107,6 @@ function SpaceAgents({ projectId, agents }) {
111
107
  function PileMore({ count }) {
112
108
  return (_jsxs("span", { className: "bg-muted text-muted-foreground ring-background relative flex h-6 min-w-6 items-center justify-center rounded-sm px-1 text-xs tabular-nums ring-2", children: ["+", count] }));
113
109
  }
114
- /** The people in the space's room, as a face pile. Nothing before the room exists. */
115
- function SpaceMembers({ projectId, slug }) {
116
- const t = useTranslations('spaces');
117
- const room = useSpaceRoom(projectId, slug);
118
- const detail = useRoom(projectId, room.data?.room_id ?? null);
119
- const people = (detail.data?.members ?? []).filter((member) => member.kind === 'person');
120
- if (!people.length)
121
- return null;
122
- return (_jsxs("span", { role: "group", "aria-label": t('members', { count: people.length }), className: "flex items-center -space-x-1", children: [people.slice(0, PILE).map((person) => (_jsx(UserAvatar, { name: person.label, email: person.user_id ?? person.label, size: "sm", ring: true, hint: person.label }, person.member_id))), people.length > PILE ? _jsx(PileMore, { count: people.length - PILE }) : null] }));
123
- }
124
110
  /** The sessions of the space's agents that wait on the viewer. Hidden at 0. */
125
111
  function SpaceNeedsYou({ projectId, agents }) {
126
112
  const t = useTranslations('spaces');