@kortix/ui 0.14.19 → 0.15.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 (414) hide show
  1. package/README.md +1 -1
  2. package/dist/_vendor/kortix-shared.js +956 -73
  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/index.d.ts +0 -1
  6. package/dist/_vendor/shared/peer-message-prompt.d.ts +7 -1
  7. package/dist/_vendor/shared/project-glyphs.d.ts +103 -20
  8. package/dist/_vendor/shared/webhook-signing.d.ts +3 -1
  9. package/dist/access/access/access-dialog-share.d.ts +3 -28
  10. package/dist/access/access/access-dialog-share.js +3 -75
  11. package/dist/artifacts/artifact-frame.js +26 -2
  12. package/dist/artifacts/artifact-session.js +6 -2
  13. package/dist/artifacts/frame-policy.d.ts +2 -9
  14. package/dist/artifacts/frame-policy.js +2 -25
  15. package/dist/customize/agents/agents-page.js +1 -1
  16. package/dist/customize/agents/create-agent-modal.js +1 -1
  17. package/dist/customize/connectors/connector-filter.d.ts +2 -1
  18. package/dist/customize/connectors/connector-filter.js +2 -3
  19. package/dist/customize/connectors/connectors-page.js +15 -24
  20. package/dist/customize/connectors/detail/connector-status.d.ts +3 -24
  21. package/dist/customize/connectors/detail/connector-status.js +2 -42
  22. package/dist/customize/connectors/detail/use-connector-detail.d.ts +2 -6
  23. package/dist/customize/connectors/detail/use-connector-detail.js +3 -13
  24. package/dist/customize/connectors/install/install.d.ts +2 -6
  25. package/dist/customize/connectors/install/install.js +2 -16
  26. package/dist/customize/connectors/provider-label.d.ts +4 -17
  27. package/dist/customize/connectors/provider-label.js +4 -37
  28. package/dist/customize/providers/provider-connect.d.ts +6 -15
  29. package/dist/customize/providers/provider-connect.js +5 -36
  30. package/dist/customize/sections/connector-connection-form.d.ts +3 -7
  31. package/dist/customize/sections/connector-connection-form.js +2 -33
  32. package/dist/customize/sections/connector-oauth2-auto.d.ts +3 -33
  33. package/dist/customize/sections/connector-oauth2-auto.js +2 -64
  34. package/dist/customize/sections/gateway-view.d.ts +6 -5
  35. package/dist/customize/sections/gateway-view.js +31 -13
  36. package/dist/customize/sections/llm-provider/constants.d.ts +1 -2
  37. package/dist/customize/sections/llm-provider/constants.js +1 -2
  38. package/dist/customize/sections/llm-provider/utils.d.ts +1 -41
  39. package/dist/customize/sections/llm-provider/utils.js +1 -52
  40. package/dist/customize/sections/view/account-secret-resources-panel.js +4 -1
  41. package/dist/customize/sections/view/agent-editor-catalog.js +0 -5
  42. package/dist/customize/sections/view/channel-settings-patch.js +1 -1
  43. package/dist/customize/sections/view/channels-view.js +8 -8
  44. package/dist/customize/sections/view/connector-connections.d.ts +5 -85
  45. package/dist/customize/sections/view/connector-connections.js +5 -99
  46. package/dist/customize/sections/view/gateway/gateway-logs.d.ts +42 -3
  47. package/dist/customize/sections/view/gateway/gateway-logs.js +212 -15
  48. package/dist/customize/sections/view/gateway/gateway-overview.js +1 -1
  49. package/dist/customize/sections/view/gateway/gateway-routing.d.ts +3 -3
  50. package/dist/customize/sections/view/gateway/gateway-routing.js +81 -200
  51. package/dist/customize/sections/view/gateway/routing-parts.d.ts +101 -0
  52. package/dist/customize/sections/view/gateway/routing-parts.js +154 -0
  53. package/dist/customize/sections/view/gateway/routing-sentence-layout.d.ts +2 -0
  54. package/dist/customize/sections/view/gateway/routing-sentence-layout.js +82 -0
  55. package/dist/customize/sections/view/review-center-connected.js +17 -15
  56. package/dist/customize/sections/view/review-view.d.ts +7 -0
  57. package/dist/customize/sections/view/review-view.js +11 -0
  58. package/dist/customize/sections/view/secret-delivery.js +1 -1
  59. package/dist/customize/sections/view/secrets-view.js +1 -1
  60. package/dist/customize/sections/view/subscription-usage-tab.d.ts +14 -0
  61. package/dist/customize/sections/view/subscription-usage-tab.js +122 -0
  62. package/dist/customize/sections/view/subscription-usage.d.ts +34 -0
  63. package/dist/customize/sections/view/subscription-usage.js +98 -0
  64. package/dist/customize/settings/tabs/experimental-tab.js +3 -3
  65. package/dist/customize/settings/tabs/general-tab.js +65 -10
  66. package/dist/customize/shared/catalog/catalog-card.d.ts +9 -4
  67. package/dist/customize/shared/catalog/catalog-card.js +3 -3
  68. package/dist/customize/shared/channels-switch-dialog.d.ts +1 -1
  69. package/dist/customize/shared/channels-switch-dialog.js +1 -1
  70. package/dist/customize/shared/feature-gate-screen.js +1 -1
  71. package/dist/customize/triggers/schedule/post-to-field.d.ts +1 -1
  72. package/dist/customize/triggers/schedule/post-to-field.js +2 -2
  73. package/dist/customize/triggers/schedule/trigger-composer-logic.d.ts +1 -1
  74. package/dist/files/drives/conflict-marks.d.ts +28 -0
  75. package/dist/files/drives/conflict-marks.js +39 -0
  76. package/dist/files/drives/session-drives-chip.js +15 -10
  77. package/dist/files/viewer/index.d.ts +1 -1
  78. package/dist/files/viewer/index.js +1 -1
  79. package/dist/i18n/en.d.ts +451 -203
  80. package/dist/i18n/en.js +543 -295
  81. package/dist/index.d.ts +1 -1
  82. package/dist/index.js +1 -1
  83. package/dist/internal/account-hub/sections.d.ts +1 -1
  84. package/dist/internal/capture/use-capture-area.d.ts +5 -1
  85. package/dist/internal/capture/use-capture-area.js +16 -9
  86. package/dist/internal/goals/goal-meta.d.ts +50 -3
  87. package/dist/internal/goals/goal-meta.js +144 -9
  88. package/dist/internal/hooks/connectors/use-add-account.d.ts +3 -9
  89. package/dist/internal/hooks/connectors/use-add-account.js +3 -18
  90. package/dist/internal/hooks/connectors/use-connect-link.d.ts +3 -2
  91. package/dist/internal/hooks/connectors/use-connect-link.js +15 -24
  92. package/dist/internal/hooks/connectors/use-pipedream-connect-project.d.ts +3 -56
  93. package/dist/internal/hooks/connectors/use-pipedream-connect-project.js +3 -87
  94. package/dist/internal/hooks/projects/use-new-project-session.d.ts +3 -2
  95. package/dist/internal/hooks/projects/use-new-project-session.js +4 -3
  96. package/dist/internal/hooks/projects/use-project-can-run.d.ts +7 -0
  97. package/dist/internal/hooks/projects/use-project-can-run.js +12 -5
  98. package/dist/internal/hooks/projects/use-restart-project-session.d.ts +0 -1
  99. package/dist/internal/hooks/projects/use-restart-project-session.js +0 -1
  100. package/dist/internal/layout/project-capability-nav.js +6 -2
  101. package/dist/internal/layout/project-page-header.d.ts +3 -1
  102. package/dist/internal/layout/project-page-header.js +2 -2
  103. package/dist/internal/lib/account-secret-access.d.ts +1 -41
  104. package/dist/internal/lib/account-secret-access.js +3 -46
  105. package/dist/internal/lib/browser-error-noise.d.ts +1 -1
  106. package/dist/internal/lib/browser-error-noise.js +1 -1
  107. package/dist/internal/lib/browser-noise/rules/expected-states.d.ts +2 -15
  108. package/dist/internal/lib/browser-noise/rules/expected-states.js +5 -55
  109. package/dist/internal/lib/capability-tab-routes.d.ts +3 -3
  110. package/dist/internal/lib/capability-tab-routes.js +11 -3
  111. package/dist/internal/lib/llm-providers.d.ts +4 -110
  112. package/dist/internal/lib/llm-providers.js +5 -102
  113. package/dist/internal/lib/navigation/message-link.d.ts +32 -0
  114. package/dist/internal/lib/navigation/message-link.js +51 -0
  115. package/dist/internal/lib/navigation/session-href.d.ts +11 -0
  116. package/dist/internal/lib/navigation/session-href.js +20 -0
  117. package/dist/internal/lib/navigation/session-spawn-urls.d.ts +17 -0
  118. package/dist/internal/lib/navigation/session-spawn-urls.js +26 -0
  119. package/dist/internal/lib/space-scope.d.ts +3 -3
  120. package/dist/internal/lib/space-scope.js +3 -3
  121. package/dist/internal/lib/use-project-feature-flags.js +7 -7
  122. package/dist/internal/lib/web-notifications.d.ts +1 -1
  123. package/dist/internal/lib/web-notifications.js +0 -3
  124. package/dist/internal/notifications/notification-bell.js +1 -3
  125. package/dist/internal/notifications/notification-rows.d.ts +2 -2
  126. package/dist/internal/notifications/notification-rows.js +2 -3
  127. package/dist/internal/session-types/index.d.ts +5 -7
  128. package/dist/internal/session-types/index.js +5 -7
  129. package/dist/internal/stores/active-space-store.d.ts +1 -1
  130. package/dist/internal/stores/active-space-store.js +1 -1
  131. package/dist/internal/stores/kortix-computer-store.d.ts +15 -0
  132. package/dist/internal/stores/kortix-computer-store.js +12 -0
  133. package/dist/lib/routes.d.ts +17 -7
  134. package/dist/lib/routes.js +18 -2
  135. package/dist/markdown/app-link-icons.d.ts +7 -0
  136. package/dist/markdown/app-link-icons.js +20 -0
  137. package/dist/markdown/app-links.d.ts +9 -0
  138. package/dist/markdown/app-links.js +112 -0
  139. package/dist/markdown/doc-editor/doc-attrs.d.ts +28 -0
  140. package/dist/markdown/doc-editor/doc-attrs.js +156 -0
  141. package/dist/markdown/doc-editor/doc-embed.d.ts +6 -0
  142. package/dist/markdown/doc-editor/doc-embed.js +26 -8
  143. package/dist/markdown/doc-editor/doc-extensions.d.ts +10 -0
  144. package/dist/markdown/doc-editor/doc-extensions.js +55 -8
  145. package/dist/markdown/doc-editor/doc-fidelity.d.ts +72 -0
  146. package/dist/markdown/doc-editor/doc-fidelity.js +135 -0
  147. package/dist/markdown/doc-editor/doc-node-view.d.ts +9 -0
  148. package/dist/markdown/doc-editor/doc-node-view.js +29 -0
  149. package/dist/markdown/doc-editor/markdown.d.ts +20 -0
  150. package/dist/markdown/doc-editor/markdown.js +455 -18
  151. package/dist/markdown/unified-markdown.d.ts +1 -1
  152. package/dist/markdown/unified-markdown.js +129 -10
  153. package/dist/primitives/emoji-picker.js +16 -100
  154. package/dist/primitives/emoji-tint.js +12 -12
  155. package/dist/primitives/entity-avatar.js +14 -9
  156. package/dist/primitives/glyph-face.d.ts +19 -12
  157. package/dist/primitives/glyph-face.js +59 -20
  158. package/dist/primitives/glyph-paths-source.d.ts +7 -0
  159. package/dist/primitives/glyph-paths-source.js +14 -6
  160. package/dist/primitives/glyph-paths.generated.d.ts +1 -1
  161. package/dist/primitives/glyph-paths.generated.js +947 -204
  162. package/dist/primitives/glyph-picker.d.ts +6 -10
  163. package/dist/primitives/glyph-picker.js +147 -98
  164. package/dist/primitives/glyph-registry.js +1604 -1
  165. package/dist/primitives/glyph-tint.d.ts +28 -3
  166. package/dist/primitives/glyph-tint.js +41 -83
  167. package/dist/primitives/kortix-glyphs.d.ts +32 -0
  168. package/dist/primitives/kortix-glyphs.js +157 -0
  169. package/dist/primitives/project-icon-picker.d.ts +8 -1
  170. package/dist/primitives/project-icon-picker.js +13 -5
  171. package/dist/primitives/user-avatar.d.ts +8 -1
  172. package/dist/primitives/user-avatar.js +2 -2
  173. package/dist/providers/ui-provider.d.ts +1 -8
  174. package/dist/session/actions/project-session-list-helpers.js +1 -1
  175. package/dist/session/agents/agent-model.js +4 -0
  176. package/dist/session/agents/agent-state-mark.d.ts +12 -7
  177. package/dist/session/agents/agent-state-mark.js +37 -15
  178. package/dist/session/agents/agent-strip.js +8 -2
  179. package/dist/session/agents/agent-surface.d.ts +81 -0
  180. package/dist/session/agents/agent-surface.js +97 -0
  181. package/dist/session/agents/held-messages.js +7 -4
  182. package/dist/session/agents/legacy-subagent-chat.js +1 -1
  183. package/dist/session/agents/session-peek.js +24 -12
  184. package/dist/session/agents/steer-session.d.ts +2 -0
  185. package/dist/session/agents/steer-session.js +3 -2
  186. package/dist/session/agents/subagent-dialog-content.d.ts +30 -1
  187. package/dist/session/agents/subagent-dialog-content.js +147 -33
  188. package/dist/session/agents/subagent-view.d.ts +15 -5
  189. package/dist/session/agents/subagent-view.js +28 -6
  190. package/dist/session/agents/tasks-panel.js +2 -12
  191. package/dist/session/agents/workflow-run-controls.d.ts +3 -1
  192. package/dist/session/agents/workflow-run-controls.js +12 -7
  193. package/dist/session/composer/ComposerCard.d.ts +7 -1
  194. package/dist/session/composer/ComposerCard.js +74 -9
  195. package/dist/session/composer/agent-selector.d.ts +16 -0
  196. package/dist/session/composer/agent-selector.js +19 -11
  197. package/dist/session/composer/chat-input/chat-input-control.d.ts +64 -0
  198. package/dist/session/composer/chat-input/chat-input-control.js +578 -0
  199. package/dist/session/composer/chat-input/chat-input-overrides.d.ts +76 -0
  200. package/dist/session/composer/chat-input/chat-input-overrides.js +40 -0
  201. package/dist/session/composer/chat-input/chat-input-panes.d.ts +56 -0
  202. package/dist/session/composer/chat-input/chat-input-panes.js +148 -0
  203. package/dist/session/composer/chat-input/chat-input-summary.d.ts +67 -0
  204. package/dist/session/composer/chat-input/chat-input-summary.js +67 -0
  205. package/dist/session/composer/chat-queue-lines.d.ts +20 -0
  206. package/dist/session/composer/chat-queue-lines.js +20 -0
  207. package/dist/session/composer/composer-chat-input.d.ts +8 -1
  208. package/dist/session/composer/composer-chat-input.js +12 -4
  209. package/dist/session/composer/composer-focus-context.d.ts +7 -0
  210. package/dist/session/composer/composer-focus-context.js +9 -0
  211. package/dist/session/composer/composer-toolbar.d.ts +3 -1
  212. package/dist/session/composer/composer-toolbar.js +3 -3
  213. package/dist/session/composer/composer-underbar.d.ts +10 -1
  214. package/dist/session/composer/composer-underbar.js +10 -2
  215. package/dist/session/composer/composer.d.ts +12 -0
  216. package/dist/session/composer/composer.js +55 -1
  217. package/dist/session/composer/editor/composer-editor.d.ts +10 -2
  218. package/dist/session/composer/editor/composer-editor.js +22 -6
  219. package/dist/session/composer/editor/first-visual-line.d.ts +2 -0
  220. package/dist/session/composer/editor/first-visual-line.js +9 -0
  221. package/dist/session/composer/editor/mention-node.js +2 -0
  222. package/dist/session/composer/editor/serialize.js +9 -1
  223. package/dist/session/composer/hooks/use-file-search.d.ts +1 -1
  224. package/dist/session/composer/hooks/use-file-search.js +1 -1
  225. package/dist/session/composer/menus/mention-controller.d.ts +3 -11
  226. package/dist/session/composer/menus/mention-controller.js +56 -16
  227. package/dist/session/composer/menus/mention-menu.d.ts +7 -2
  228. package/dist/session/composer/menus/mention-menu.js +17 -9
  229. package/dist/session/composer/menus/menu-items.d.ts +9 -0
  230. package/dist/session/composer/menus/space-mentions.d.ts +48 -0
  231. package/dist/session/composer/menus/space-mentions.js +83 -0
  232. package/dist/session/composer/prompt-history.d.ts +9 -0
  233. package/dist/session/composer/prompt-history.js +45 -0
  234. package/dist/session/composer/queue-projection.d.ts +2 -0
  235. package/dist/session/composer/queue-projection.js +1 -0
  236. package/dist/session/composer/queued-prompt-list.js +53 -4
  237. package/dist/session/composer/reasoning-effort-selector.d.ts +20 -0
  238. package/dist/session/composer/reasoning-effort-selector.js +3 -3
  239. package/dist/session/composer/types.d.ts +2 -1
  240. package/dist/session/header/session-site-header.js +7 -3
  241. package/dist/session/header/subagent-hover-card.d.ts +7 -4
  242. package/dist/session/header/subagent-hover-card.js +62 -11
  243. package/dist/session/list/session-status-mark.d.ts +42 -0
  244. package/dist/{workspace/sidebar → session/list}/session-status-mark.js +37 -2
  245. package/dist/session/models/model-selector.d.ts +7 -2
  246. package/dist/session/models/model-selector.js +39 -31
  247. package/dist/session/overrides/provider-secret-pool-editor.d.ts +11 -0
  248. package/dist/session/overrides/provider-secret-pool-editor.js +17 -0
  249. package/dist/session/overrides/session-overrides-control.d.ts +5 -0
  250. package/dist/session/overrides/session-overrides-toolbar.js +147 -7
  251. package/dist/session/panel/model-switch-event.d.ts +8 -0
  252. package/dist/session/panel/model-switch-event.js +19 -0
  253. package/dist/session/panel/session-audit-panel.js +3 -2
  254. package/dist/session/panel/session-desktop.js +5 -1
  255. package/dist/session/panel/session-panel-provider.js +1 -1
  256. package/dist/session/panel/shared/use-panel-handoffs.d.ts +2 -2
  257. package/dist/session/panel/shared/use-panel-handoffs.js +21 -2
  258. package/dist/session/prompts/ask-deck.d.ts +21 -0
  259. package/dist/session/prompts/ask-deck.js +253 -0
  260. package/dist/session/prompts/session-permission-prompt.d.ts +7 -1
  261. package/dist/session/prompts/session-permission-prompt.js +3 -3
  262. package/dist/session/status/session-load-state.d.ts +0 -1
  263. package/dist/session/status/session-load-state.js +2 -4
  264. package/dist/session/thread/message-parsing.d.ts +0 -1
  265. package/dist/session/thread/message-parsing.js +0 -1
  266. package/dist/session/thread/session-chat.d.ts +3 -1
  267. package/dist/session/thread/session-chat.js +459 -310
  268. package/dist/session/thread/session-context-metrics.d.ts +0 -1
  269. package/dist/session/thread/session-context-metrics.js +1 -1
  270. package/dist/session/thread/session-context-sub-sessions.js +3 -1
  271. package/dist/session/thread/show-work.d.ts +38 -0
  272. package/dist/session/thread/show-work.js +115 -0
  273. package/dist/session/thread/thread-boot-rows.d.ts +2 -1
  274. package/dist/session/thread/thread-boot-rows.js +7 -3
  275. package/dist/session/thread/transcript-rows.d.ts +36 -0
  276. package/dist/session/thread/transcript.d.ts +46 -2
  277. package/dist/session/thread/transcript.js +226 -34
  278. package/dist/session/thread/typing-indicator.d.ts +21 -0
  279. package/dist/session/thread/typing-indicator.js +46 -0
  280. package/dist/session/tool/shared/infrastructure-contexts.d.ts +12 -0
  281. package/dist/session/tool/shared/infrastructure-contexts.js +6 -0
  282. package/dist/session/tool/tool-part-renderer.d.ts +2 -0
  283. package/dist/session/tool/tool-part-renderer.js +16 -2
  284. package/dist/session/tool/tools/kortix-action-tool.js +8 -1
  285. package/dist/session/tool/tools/multi-agent-tool-bodies.d.ts +19 -0
  286. package/dist/session/tool/tools/multi-agent-tool-bodies.js +34 -13
  287. package/dist/session/tool/tools/session-spawn-urls.d.ts +1 -16
  288. package/dist/session/tool/tools/session-spawn-urls.js +4 -26
  289. package/dist/session/tool/tools/task-tool.d.ts +5 -18
  290. package/dist/session/tool/tools/task-tool.js +47 -86
  291. package/dist/session/tool/tools/workflow-progress.d.ts +14 -18
  292. package/dist/session/tool/tools/workflow-progress.js +24 -179
  293. package/dist/session/tool/tools/workflow-result-text.d.ts +15 -0
  294. package/dist/session/tool/tools/workflow-result-text.js +34 -0
  295. package/dist/session/tool/tools/workflow-run-card.d.ts +35 -0
  296. package/dist/session/tool/tools/workflow-run-card.js +157 -0
  297. package/dist/session/tool/tools/workflow-tool.js +45 -58
  298. package/dist/session/turn/activity-burst.d.ts +2 -2
  299. package/dist/session/turn/activity-burst.js +11 -5
  300. package/dist/session/turn/answered-question-step.d.ts +29 -0
  301. package/dist/session/turn/answered-question-step.js +48 -3
  302. package/dist/session/turn/notice-batch-group.d.ts +4 -4
  303. package/dist/session/turn/notice-batch-group.js +5 -8
  304. package/dist/session/turn/peer-message-row.d.ts +15 -0
  305. package/dist/session/turn/peer-message-row.js +38 -47
  306. package/dist/session/turn/subagent-notice-row.d.ts +16 -1
  307. package/dist/session/turn/subagent-notice-row.js +47 -35
  308. package/dist/session/turn/throttled-markdown.js +4 -1
  309. package/dist/session/turn/turn-work-accordion.d.ts +10 -3
  310. package/dist/session/turn/turn-work-accordion.js +18 -11
  311. package/dist/session/turn/user-message.js +16 -42
  312. package/dist/session/turn/voice-turn.d.ts +22 -0
  313. package/dist/session/turn/voice-turn.js +32 -0
  314. package/dist/session/voice/call-ring.d.ts +10 -0
  315. package/dist/session/voice/call-ring.js +52 -0
  316. package/dist/session/voice/use-voice-call.d.ts +4 -4
  317. package/dist/session/voice/use-voice-call.js +6 -9
  318. package/dist/session/voice/voice-call-card.d.ts +6 -0
  319. package/dist/session/voice/voice-call-card.js +113 -0
  320. package/dist/session/voice/voice-call-state.d.ts +3 -0
  321. package/dist/session/voice/voice-call-state.js +2 -1
  322. package/dist/session/voice/voice-call-store.d.ts +16 -6
  323. package/dist/session/voice/voice-call-store.js +5 -5
  324. package/dist/session/voice/voice-call.d.ts +4 -8
  325. package/dist/session/voice/voice-call.js +33 -36
  326. package/dist/styles/components.css +33 -0
  327. package/dist/styles/theme.css +26 -0
  328. package/dist/styles.css +1 -1
  329. package/dist/workspace/admin/project-admin-dashboard.d.ts +1 -1
  330. package/dist/workspace/admin/project-admin-dashboard.js +12 -9
  331. package/dist/workspace/index.d.ts +3 -2
  332. package/dist/workspace/index.js +2 -1
  333. package/dist/workspace/layout/use-project-home-send.d.ts +2 -0
  334. package/dist/workspace/layout/use-project-home-send.js +5 -3
  335. package/dist/workspace/memory/company-memory-page.d.ts +1 -1
  336. package/dist/workspace/memory/company-memory-page.js +1 -1
  337. package/dist/workspace/new/use-creatable-accounts.js +13 -4
  338. package/dist/workspace/projects/modal/project-icon-field.js +49 -34
  339. package/dist/workspace/review/review-center.d.ts +4 -1
  340. package/dist/workspace/review/review-center.js +6 -3
  341. package/dist/workspace/sessions/project-sessions-helpers.js +1 -1
  342. package/dist/workspace/sessions/project-sessions-view.js +1 -1
  343. package/dist/workspace/sessions/session-row.js +6 -4
  344. package/dist/workspace/sessions/sessions-toolbar.d.ts +1 -1
  345. package/dist/workspace/sessions/sessions-toolbar.js +4 -4
  346. package/dist/workspace/sidebar/footer/project-memory-nav.d.ts +1 -1
  347. package/dist/workspace/sidebar/footer/project-memory-nav.js +1 -1
  348. package/dist/workspace/sidebar/project-nav-items.js +2 -5
  349. package/dist/workspace/sidebar/project-session-list.d.ts +7 -1
  350. package/dist/workspace/sidebar/project-session-list.js +63 -24
  351. package/dist/workspace/sidebar/project-sidebar.js +10 -7
  352. package/dist/workspace/sidebar/project-spaces-nav.d.ts +7 -3
  353. package/dist/workspace/sidebar/project-spaces-nav.js +77 -46
  354. package/dist/workspace/sidebar/session-brief-hover-card.d.ts +4 -2
  355. package/dist/workspace/sidebar/session-brief-hover-card.js +47 -28
  356. package/dist/workspace/sidebar/session-group-sections.js +12 -4
  357. package/dist/workspace/sidebar/sidebar-more-group.d.ts +13 -0
  358. package/dist/workspace/sidebar/sidebar-more-group.js +27 -0
  359. package/dist/workspace/space/space-blocks.d.ts +3 -1
  360. package/dist/workspace/space/space-blocks.js +4 -7
  361. package/dist/workspace/space/space-page.d.ts +4 -6
  362. package/dist/workspace/space/space-page.js +10 -24
  363. package/dist/workspace/space/space-tab-panels.d.ts +14 -1
  364. package/dist/workspace/space/space-tab-panels.js +12 -21
  365. package/dist/workspace/space/space-templates.d.ts +4 -5
  366. package/dist/workspace/space/space-templates.js +2 -7
  367. package/dist/workspace/space/use-space-filter.d.ts +1 -1
  368. package/dist/workspace/space/use-space-filter.js +1 -1
  369. package/dist/workspace/spaces/channels-onboarding.d.ts +2 -2
  370. package/dist/workspace/spaces/channels-onboarding.js +4 -3
  371. package/dist/workspace/spaces/create-channel-dialog.js +4 -2
  372. package/dist/workspace/spaces/principal-card.d.ts +71 -0
  373. package/dist/workspace/spaces/principal-card.js +246 -0
  374. package/dist/workspace/spaces/space-auto-open.d.ts +8 -0
  375. package/dist/workspace/spaces/space-auto-open.js +18 -0
  376. package/dist/workspace/spaces/space-avatar.d.ts +44 -0
  377. package/dist/workspace/spaces/space-avatar.js +41 -0
  378. package/dist/workspace/spaces/space-details-panel.d.ts +26 -0
  379. package/dist/workspace/spaces/space-details-panel.js +119 -0
  380. package/dist/workspace/spaces/space-identity.d.ts +49 -0
  381. package/dist/workspace/spaces/space-identity.js +104 -0
  382. package/dist/workspace/spaces/space-members.js +1 -1
  383. package/dist/workspace/spaces/space-mention-source.d.ts +12 -0
  384. package/dist/workspace/spaces/space-mention-source.js +78 -0
  385. package/dist/workspace/spaces/space-people.d.ts +29 -0
  386. package/dist/workspace/spaces/space-people.js +87 -0
  387. package/dist/workspace/spaces/space-roster.d.ts +3 -2
  388. package/dist/workspace/spaces/space-roster.js +7 -4
  389. package/dist/workspace/spaces/space-tab-list.d.ts +37 -0
  390. package/dist/workspace/spaces/space-tab-list.js +82 -0
  391. package/dist/workspace/spaces/space-tabs.d.ts +74 -0
  392. package/dist/workspace/spaces/space-tabs.js +199 -0
  393. package/dist/workspace/spaces/space-threads-tab.js +1 -1
  394. package/dist/workspace/spaces/space-timeline-view.js +126 -17
  395. package/dist/workspace/spaces/space-timeline.d.ts +44 -9
  396. package/dist/workspace/spaces/space-timeline.js +120 -12
  397. package/dist/workspace/spaces/space-view.d.ts +19 -12
  398. package/dist/workspace/spaces/space-view.js +201 -67
  399. package/dist/workspace/spaces/use-personal-space-name.d.ts +2 -0
  400. package/dist/workspace/spaces/use-personal-space-name.js +10 -0
  401. package/package.json +11 -7
  402. package/skills/kortix-ui/SKILL.md +1 -1
  403. package/skills/kortix-ui/references/custom-dashboard.md +2 -3
  404. package/skills/kortix-ui/references/modules.md +4 -4
  405. package/dist/_vendor/shared/room-prompt.d.ts +0 -66
  406. package/dist/session/voice/voice-call-bar.d.ts +0 -4
  407. package/dist/session/voice/voice-call-bar.js +0 -39
  408. package/dist/workspace/sidebar/footer/project-rooms-nav.d.ts +0 -9
  409. package/dist/workspace/sidebar/footer/project-rooms-nav.js +0 -32
  410. package/dist/workspace/sidebar/session-status-mark.d.ts +0 -19
  411. package/dist/workspace/space/space-room.d.ts +0 -20
  412. package/dist/workspace/space/space-room.js +0 -27
  413. /package/dist/{workspace/sidebar → session/list}/session-list-chrome.d.ts +0 -0
  414. /package/dist/{workspace/sidebar → session/list}/session-list-chrome.js +0 -0
@@ -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');
@@ -1,9 +1,22 @@
1
+ import { type ReactNode } from 'react';
1
2
  import { type ManifestSpace, type SpaceTab } from '@kortix/sdk';
2
3
  /** A tab's name: its `label`, else its target, else its type. */
3
4
  export declare function useTabLabel(tab: SpaceTab): string;
4
- /** The content of one tab; `tab` null is the room. */
5
+ /** The content of one tab; `tab` null (a space with no tab) is the space's intro. */
5
6
  export declare function SpaceTabPanel({ projectId, space, tab, }: {
6
7
  projectId: string;
7
8
  space: ManifestSpace;
8
9
  tab: SpaceTab | null;
9
10
  }): import("react").JSX.Element;
11
+ /** A pinned App, live and interactive, filling the tab. `missingAction`: shown under "not in this project" (a Space's "Remove tab"). */
12
+ export declare function AppTab({ projectId, slug, missingAction }: {
13
+ projectId: string;
14
+ slug: string;
15
+ missingAction?: ReactNode;
16
+ }): import("react").JSX.Element;
17
+ /** A pinned Artifact, its current state in a sandboxed frame. `missingAction`: shown under "gone" (a Space's "Remove tab"). */
18
+ export declare function ArtifactTab({ projectId, artifactId, missingAction }: {
19
+ projectId: string;
20
+ artifactId: string;
21
+ missingAction?: ReactNode;
22
+ }): import("react").JSX.Element;
@@ -3,7 +3,7 @@ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-run
3
3
  import { useState } from 'react';
4
4
  import { useQuery } from '@tanstack/react-query';
5
5
  import { agentsInSpace, bindingSpace, listProjectDirectory, } from '@kortix/sdk';
6
- import { qk, useAppAccess, useArtifact, useArtifacts, useFeatureFlag, useProjectApps, useProjectConfig, useProjectGoals, } from '@kortix/sdk/react';
6
+ import { qk, useAppAccess, useArtifact, useArtifacts, useProjectApps, useProjectConfig, useProjectGoals, } from '@kortix/sdk/react';
7
7
  import { ArrowSquareOutIcon, FileTextIcon, FolderSimpleIcon } from '@phosphor-icons/react';
8
8
  import { AppPreview } from '../../apps/app-preview.js';
9
9
  import { appCan, appStatus } from '../../apps/app-shared.js';
@@ -20,7 +20,6 @@ import { ErrorState } from '../../primitives/error-state.js';
20
20
  import { Skeleton } from '../../primitives/skeleton.js';
21
21
  import { framePolicy } from '../../files/viewer/preview-policy.js';
22
22
  import { SpaceBlocks } from './space-blocks.js';
23
- import { SpaceRoom } from './space-room.js';
24
23
  /** Same sandbox as the Artifacts viewer: the content server's CSP decides the rest. */
25
24
  const ARTIFACT_SANDBOX = 'allow-scripts allow-same-origin allow-forms allow-popups allow-popups-to-escape-sandbox allow-modals allow-downloads';
26
25
  /** A tab's name: its `label`, else its target, else its type. */
@@ -44,10 +43,10 @@ function hostOf(url) {
44
43
  return url;
45
44
  }
46
45
  }
47
- /** The content of one tab; `tab` null is the room. */
46
+ /** The content of one tab; `tab` null (a space with no tab) is the space's intro. */
48
47
  export function SpaceTabPanel({ projectId, space, tab, }) {
49
48
  if (!tab)
50
- return _jsx(RoomTab, { projectId: projectId, space: space });
49
+ return _jsx(SpaceIntro, { projectId: projectId, space: space });
51
50
  switch (tab.type) {
52
51
  case 'goals':
53
52
  return _jsx(GoalsTab, { projectId: projectId, slug: space.name });
@@ -67,21 +66,13 @@ export function SpaceTabPanel({ projectId, space, tab, }) {
67
66
  return _jsx(LinkTab, { tab: tab });
68
67
  }
69
68
  }
70
- function RoomTab({ projectId, space }) {
71
- const t = useTranslations('spaces');
72
- const rooms = useFeatureFlag(projectId, 'agent_rooms');
73
- if (!rooms.isLoading && !rooms.enabled) {
74
- return (_jsx(Centered, { children: _jsx(EmptyState, { size: "sm", title: t('roomsOff'), description: t('roomsOffHint') }) }));
75
- }
76
- return (_jsx(SpaceRoom, { projectId: projectId, roomName: space.name, topic: space.description, fill: true, intro: _jsx(RoomIntro, { projectId: projectId, space: space }), className: "h-full" }));
77
- }
78
- /** The top of the room: what the space is for, who posts in it, and how to bring someone in. */
79
- function RoomIntro({ projectId, space }) {
69
+ /** A space with no tab: what it is for, its agents, and how to add a tab. */
70
+ function SpaceIntro({ projectId, space }) {
80
71
  const t = useTranslations('spaces');
81
72
  const locale = useLocale();
82
73
  const agents = agentsInSpace(space.name, useProjectConfig(projectId)?.agents ?? []);
83
74
  const names = new Intl.ListFormat(locale, { type: 'conjunction' }).format(agents.map(agentDisplayName));
84
- return (_jsxs("div", { className: "flex max-w-2xl flex-col gap-3 px-5 pb-2", children: [agents.length ? (_jsx("span", { className: "flex -space-x-1", children: agents.map((name) => (_jsx(AgentMark, { slug: name, size: 21, className: "ring-background ring-2" }, name))) })) : null, _jsxs("div", { className: "flex flex-col gap-1.5", children: [_jsx("h2", { className: "text-foreground text-xl font-medium text-balance", children: t('room.introTitle', { name: space.label || space.name }) }), _jsx("p", { className: "text-muted-foreground text-sm text-pretty", children: space.description?.trim() || t('room.introBody') })] }), _jsxs("p", { className: "text-muted-foreground text-xs text-pretty", children: [agents.length ? t('room.introAgents', { count: agents.length, names }) : t('room.introNoAgents'), ' ', t('room.introMention')] })] }));
75
+ return (_jsxs("div", { className: "flex max-w-2xl flex-col gap-3 px-5 py-5", children: [agents.length ? (_jsx("span", { className: "flex -space-x-1", children: agents.map((name) => (_jsx(AgentMark, { slug: name, size: 21, className: "ring-background ring-2" }, name))) })) : null, _jsxs("div", { className: "flex flex-col gap-1.5", children: [_jsx("h2", { className: "text-foreground text-xl font-medium text-balance", children: t('intro.title', { name: space.label || space.name }) }), _jsx("p", { className: "text-muted-foreground text-sm text-pretty", children: space.description?.trim() || t('intro.body') })] }), _jsxs("p", { className: "text-muted-foreground text-xs text-pretty", children: [agents.length ? t('intro.agents', { count: agents.length, names }) : t('intro.noAgents'), ' ', t('intro.addTab')] })] }));
85
76
  }
86
77
  /** A list tab's frame: one column on the header's gutter, so rows line up with the tabs. */
87
78
  function ListFrame({ children }) {
@@ -163,8 +154,8 @@ function BoardTab({ projectId, tab }) {
163
154
  }
164
155
  return (_jsx("div", { className: "w-full max-w-6xl px-5 py-5 pb-20", children: _jsx(SpaceBlocks, { projectId: projectId, blocks: blocks }) }));
165
156
  }
166
- /** A pinned App, live and interactive, filling the tab. */
167
- function AppTab({ projectId, slug }) {
157
+ /** A pinned App, live and interactive, filling the tab. `missingAction`: shown under "not in this project" (a Space's "Remove tab"). */
158
+ export function AppTab({ projectId, slug, missingAction }) {
168
159
  const t = useTranslations('spaces');
169
160
  const apps = useProjectApps(projectId);
170
161
  const app = apps.data?.find((candidate) => candidate.slug === slug);
@@ -173,19 +164,19 @@ function AppTab({ projectId, slug }) {
173
164
  if (apps.isLoading)
174
165
  return _jsx(Centered, { children: _jsx(Skeleton, { className: "h-64 w-full max-w-4xl rounded-md" }) });
175
166
  if (!app) {
176
- return (_jsx(Centered, { children: _jsx(EmptyState, { size: "sm", title: t('missing.app', { slug }) }) }));
167
+ return (_jsx(Centered, { children: _jsx(EmptyState, { size: "sm", title: t('missing.app', { slug }), action: missingAction }) }));
177
168
  }
178
169
  return (_jsx(AppPreview, { app: app, url: access.session.data?.url ?? null, accessError: access.session.isError, interactive: true, className: "h-full" }));
179
170
  }
180
- /** A pinned Artifact, its current state in a sandboxed frame. */
181
- function ArtifactTab({ projectId, artifactId }) {
171
+ /** A pinned Artifact, its current state in a sandboxed frame. `missingAction`: shown under "gone" (a Space's "Remove tab"). */
172
+ export function ArtifactTab({ projectId, artifactId, missingAction }) {
182
173
  const t = useTranslations('spaces');
183
174
  const artifact = useArtifact(projectId, artifactId);
184
175
  const href = uiRoutes().artifacts(projectId);
185
176
  if (artifact.isLoading)
186
177
  return _jsx(Centered, { children: _jsx(Skeleton, { className: "h-64 w-full max-w-4xl rounded-md" }) });
187
178
  if (!artifact.data) {
188
- return (_jsx(Centered, { children: _jsx(EmptyState, { size: "sm", title: t('missing.artifact') }) }));
179
+ return (_jsx(Centered, { children: _jsx(EmptyState, { size: "sm", title: t('missing.artifact'), action: missingAction }) }));
189
180
  }
190
181
  return (_jsxs("div", { className: "flex h-full flex-col", children: [_jsxs("div", { className: "border-border flex shrink-0 items-center gap-2 border-b px-5 py-1.5", children: [_jsx("span", { className: "text-foreground min-w-0 flex-1 truncate text-sm font-medium", children: artifact.data.title }), href ? (_jsx(Button, { asChild: true, size: "sm", variant: "ghost", children: _jsxs(Link, { href: `${href}/${artifact.data.artifact_id}`, children: [_jsx(ArrowSquareOutIcon, {}), t('openArtifact')] }) })) : null] }), _jsx("iframe", { src: artifact.data.view_url, title: artifact.data.title, sandbox: ARTIFACT_SANDBOX, className: "bg-background min-h-0 w-full flex-1" })] }));
191
182
  }
@@ -8,16 +8,15 @@
8
8
  import { type SpaceTab } from '@kortix/sdk';
9
9
  export interface SpaceTemplate {
10
10
  /** Also the catalog key of its name and hint: `spaces.templates.<id>`. */
11
- id: 'standard' | 'room' | 'board';
12
- /** The tabs after the room. */
11
+ id: 'standard' | 'board';
12
+ /** The starting tabs. */
13
13
  tabs: SpaceTab[];
14
14
  }
15
15
  /** The presets the New space dialog offers, in order. The first is the default. */
16
16
  export declare function spaceTemplates(t: (key: 'tabs.board' | 'templates.board.brief' | 'templates.board.text') => string): SpaceTemplate[];
17
17
  export declare const SPACE_TEMPLATES: SpaceTemplate[];
18
- /** Turn a space name into a `spaces:` key. The result is also a valid room
19
- * name (the space's room is the room with its slug): at most 63 characters,
20
- * starting with a letter or a digit. */
18
+ /** Turn a space name into a `spaces:` key: at most 63 characters, starting
19
+ * with a letter or a digit. */
21
20
  export declare function slugifySpace(name: string): string;
22
21
  /** Add `spaces.<slug>` to a `kortix.yaml` text. Returns the new text. */
23
22
  export declare function addSpaceToManifest(yamlText: string, input: {
@@ -16,10 +16,6 @@ export function spaceTemplates(t) {
16
16
  id: 'standard',
17
17
  tabs: [...DEFAULT_SPACE_TABS],
18
18
  },
19
- {
20
- id: 'room',
21
- tabs: [],
22
- },
23
19
  {
24
20
  id: 'board',
25
21
  tabs: [
@@ -30,9 +26,8 @@ export function spaceTemplates(t) {
30
26
  ];
31
27
  }
32
28
  export const SPACE_TEMPLATES = spaceTemplates(createTranslator({ locale: 'en', messages: defaultUiMessages, namespace: 'spaces' }));
33
- /** Turn a space name into a `spaces:` key. The result is also a valid room
34
- * name (the space's room is the room with its slug): at most 63 characters,
35
- * starting with a letter or a digit. */
29
+ /** Turn a space name into a `spaces:` key: at most 63 characters, starting
30
+ * with a letter or a digit. */
36
31
  export function slugifySpace(name) {
37
32
  const trim = (value) => value.replace(/^[-_]+|[-_]+$/g, '');
38
33
  return (trim(trim(name
@@ -5,6 +5,6 @@
5
5
  * still stored as active) is `ALL_SPACES`. `PROJECT_WIDE_SPACE` selects
6
6
  * the project-wide items. Choosing one makes it the active space and drops
7
7
  * the param, so the sidebar, the home and the page agree. With the spaces
8
- * flag off (`project_channels`) it is always `ALL_SPACES`.
8
+ * flag off (`chat`) it is always `ALL_SPACES`.
9
9
  */
10
10
  export declare function useSpaceFilter(projectId: string): [string, (value: string) => void];
@@ -12,7 +12,7 @@ import { useSpacesEnabled } from '../../internal/lib/space-scope.js';
12
12
  * still stored as active) is `ALL_SPACES`. `PROJECT_WIDE_SPACE` selects
13
13
  * the project-wide items. Choosing one makes it the active space and drops
14
14
  * the param, so the sidebar, the home and the page agree. With the spaces
15
- * flag off (`project_channels`) it is always `ALL_SPACES`.
15
+ * flag off (`chat`) it is always `ALL_SPACES`.
16
16
  */
17
17
  export function useSpaceFilter(projectId) {
18
18
  const [active, setActive] = useActiveSpace(projectId);
@@ -1,6 +1,6 @@
1
1
  /**
2
- * The member intro, once per member and project: the first channel or DM page
3
- * after Channels was turned on. Any close ("Got it", Escape, outside) records
2
+ * The member intro ("Welcome to Spaces"), once per member and project: the
3
+ * first space or DM page after `chat` was turned on. Any close ("Got it", Escape, outside) records
4
4
  * `channels_intro`, so it never comes back. Turning Channels on again records
5
5
  * it for every member, so a second switch shows nothing.
6
6
  */
@@ -1,14 +1,14 @@
1
1
  'use client';
2
2
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
3
  import { useChannelsOnboarding, useMarkChannelsOnboarding, useProjectSpaceGeneralNotice } from '@kortix/sdk/react';
4
- import { ChatCircleIcon, HashIcon, SunDimIcon } from '@phosphor-icons/react';
4
+ import { ChatCircleIcon, HashIcon, SquaresFourIcon, SunDimIcon } from '@phosphor-icons/react';
5
5
  import { useState } from 'react';
6
6
  import { useTranslations } from '../../i18n/index.js';
7
7
  import { Button } from '../../primitives/button.js';
8
8
  import { Modal, ModalBody, ModalContent, ModalDescription, ModalFooter, ModalHeader, ModalTitle } from '../../primitives/modal.js';
9
9
  /**
10
- * The member intro, once per member and project: the first channel or DM page
11
- * after Channels was turned on. Any close ("Got it", Escape, outside) records
10
+ * The member intro ("Welcome to Spaces"), once per member and project: the
11
+ * first space or DM page after `chat` was turned on. Any close ("Got it", Escape, outside) records
12
12
  * `channels_intro`, so it never comes back. Turning Channels on again records
13
13
  * it for every member, so a second switch shows nothing.
14
14
  */
@@ -26,6 +26,7 @@ export function ChannelsIntro({ projectId }) {
26
26
  { icon: HashIcon, text: t('channels') },
27
27
  { icon: ChatCircleIcon, text: t('threads') },
28
28
  { icon: SunDimIcon, text: t('memory') },
29
+ { icon: SquaresFourIcon, text: t('tabs') },
29
30
  ];
30
31
  return (_jsx(Modal, { open: open, onOpenChange: (next) => !next && close(), children: _jsxs(ModalContent, { className: "lg:max-w-md", children: [_jsxs(ModalHeader, { children: [_jsx(ModalTitle, { children: t('title') }), _jsx(ModalDescription, { className: "sr-only", children: t('title') })] }), _jsx(ModalBody, { children: _jsx("ul", { className: "flex flex-col gap-3", children: lines.map(({ icon: Glyph, text }) => (_jsxs("li", { className: "flex items-start gap-3 text-sm", children: [_jsx(Glyph, { "aria-hidden": true, className: "text-muted-foreground mt-0.5 size-4 shrink-0" }), _jsx("span", { children: text })] }, text))) }) }), _jsx(ModalFooter, { children: _jsx(Button, { autoFocus: true, onClick: close, children: t('gotIt') }) })] }) }));
31
32
  }