@kortix/ui 0.15.10 → 0.16.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 (469) hide show
  1. package/dist/_vendor/kortix-shared.js +769 -76
  2. package/dist/_vendor/shared/app-config.d.ts +6 -30
  3. package/dist/_vendor/shared/channel-descriptors.d.ts +0 -34
  4. package/dist/_vendor/shared/channel-header.d.ts +2 -1
  5. package/dist/_vendor/shared/connector-sections.d.ts +0 -25
  6. package/dist/_vendor/shared/file-tags.d.ts +2 -1
  7. package/dist/_vendor/shared/my-kortix-agent.d.ts +5 -3
  8. package/dist/_vendor/shared/pasted-content.d.ts +0 -4
  9. package/dist/_vendor/shared/pixel-mark.d.ts +0 -17
  10. package/dist/_vendor/shared/project-glyphs.d.ts +0 -1
  11. package/dist/_vendor/shared/session/attachment-tile.d.ts +8 -0
  12. package/dist/_vendor/shared/workspace-settings.d.ts +3 -0
  13. package/dist/access/access/copy-row.d.ts +7 -1
  14. package/dist/access/access/copy-row.js +2 -2
  15. package/dist/animated-copy-icon.js +2 -1
  16. package/dist/browser/sandbox-browser-chrome.d.ts +2 -1
  17. package/dist/browser/sandbox-browser-chrome.js +1 -1
  18. package/dist/customize/agents/agent-cover-card.d.ts +1 -1
  19. package/dist/customize/agents/agent-cover-card.js +10 -2
  20. package/dist/customize/agents/agent-filter.js +3 -1
  21. package/dist/customize/agents/agent-model-view.d.ts +11 -1
  22. package/dist/customize/agents/agent-model-view.js +12 -1
  23. package/dist/customize/agents/agent-overview.d.ts +10 -0
  24. package/dist/customize/agents/agent-overview.js +5 -4
  25. package/dist/customize/agents/agent-page-chrome.d.ts +5 -6
  26. package/dist/customize/agents/agent-page-chrome.js +16 -13
  27. package/dist/customize/agents/agent-page.js +25 -34
  28. package/dist/customize/agents/agent-tabs.d.ts +3 -0
  29. package/dist/customize/agents/agent-tabs.js +3 -0
  30. package/dist/customize/agents/agents-page.js +3 -3
  31. package/dist/customize/agents/create-agent-modal.d.ts +9 -0
  32. package/dist/customize/agents/create-agent-modal.js +21 -3
  33. package/dist/customize/agents/use-default-agent.js +2 -2
  34. package/dist/customize/connectors/connector-identity.d.ts +11 -2
  35. package/dist/customize/connectors/connector-identity.js +16 -4
  36. package/dist/customize/connectors/connectors-page.js +10 -6
  37. package/dist/customize/connectors/detail/app-page.js +2 -2
  38. package/dist/customize/connectors/detail/connector-triggers.js +1 -1
  39. package/dist/customize/connectors/install/install-dialog.d.ts +2 -0
  40. package/dist/customize/connectors/install/install-dialog.js +6 -1
  41. package/dist/customize/connectors/use-agent-access.d.ts +2 -0
  42. package/dist/customize/evals/eval-compare-view.d.ts +10 -0
  43. package/dist/customize/evals/eval-compare-view.js +68 -0
  44. package/dist/customize/evals/eval-dataset-view.d.ts +20 -0
  45. package/dist/customize/evals/eval-dataset-view.js +81 -0
  46. package/dist/customize/evals/eval-datasets-page.d.ts +25 -0
  47. package/dist/customize/evals/eval-datasets-page.js +91 -0
  48. package/dist/customize/evals/eval-job-view.d.ts +12 -0
  49. package/dist/customize/evals/eval-job-view.js +360 -0
  50. package/dist/customize/evals/eval-jobs-page.d.ts +4 -0
  51. package/dist/customize/evals/eval-jobs-page.js +69 -0
  52. package/dist/customize/evals/eval-meta.d.ts +97 -0
  53. package/dist/customize/evals/eval-meta.js +228 -0
  54. package/dist/customize/evals/eval-task-view.d.ts +13 -0
  55. package/dist/customize/evals/eval-task-view.js +123 -0
  56. package/dist/customize/evals/eval-tasks-page.d.ts +8 -0
  57. package/dist/customize/evals/eval-tasks-page.js +56 -0
  58. package/dist/customize/evals/eval-ui.d.ts +97 -0
  59. package/dist/customize/evals/eval-ui.js +153 -0
  60. package/dist/customize/evals/evals-page.d.ts +10 -0
  61. package/dist/customize/evals/evals-page.js +56 -0
  62. package/dist/customize/evals/run-eval-modal.d.ts +28 -0
  63. package/dist/customize/evals/run-eval-modal.js +167 -0
  64. package/dist/customize/project-settings/project-admin-sections.d.ts +3 -2
  65. package/dist/customize/project-settings/project-admin-sections.js +6 -1
  66. package/dist/customize/providers/provider-connect.d.ts +13 -0
  67. package/dist/customize/providers/provider-connect.js +29 -5
  68. package/dist/customize/providers/provider-sheet.js +5 -4
  69. package/dist/customize/sections/component/teams-byo-wizard.js +4 -1
  70. package/dist/customize/sections/view/gateway/gateway-overview.d.ts +5 -0
  71. package/dist/customize/sections/view/gateway/gateway-overview.js +32 -6
  72. package/dist/customize/sections/view/gateway/routing-parts.d.ts +6 -0
  73. package/dist/customize/sections/view/gateway/routing-parts.js +21 -13
  74. package/dist/customize/sections/view/git-view.d.ts +19 -1
  75. package/dist/customize/sections/view/git-view.js +7 -3
  76. package/dist/customize/sections/view/manifest-issue-list.d.ts +16 -0
  77. package/dist/customize/sections/view/manifest-issue-list.js +41 -0
  78. package/dist/customize/sections/view/manifest-issues-row.d.ts +24 -0
  79. package/dist/customize/sections/view/manifest-issues-row.js +39 -0
  80. package/dist/customize/sections/view/sandbox-provider-coverage.d.ts +7 -1
  81. package/dist/customize/sections/view/sandbox-provider-coverage.js +7 -5
  82. package/dist/customize/sections/view/secrets-view.d.ts +13 -0
  83. package/dist/customize/sections/view/secrets-view.js +10 -6
  84. package/dist/customize/sections/view/subscription-usage.d.ts +2 -7
  85. package/dist/customize/sections/view/subscription-usage.js +4 -8
  86. package/dist/customize/settings/settings-tab-header.js +12 -3
  87. package/dist/customize/settings/tabs/experimental-tab.d.ts +16 -5
  88. package/dist/customize/settings/tabs/experimental-tab.js +36 -11
  89. package/dist/customize/settings/tabs/general-tab.js +1 -1
  90. package/dist/customize/settings/tabs/sandbox-tab.d.ts +10 -0
  91. package/dist/customize/settings/tabs/sandbox-tab.js +27 -4
  92. package/dist/customize/settings/tabs/snapshots-tab.d.ts +31 -0
  93. package/dist/customize/settings/tabs/snapshots-tab.js +61 -5
  94. package/dist/customize/settings/tabs/workspace-keys.js +6 -3
  95. package/dist/customize/shared/capability-page-shell.js +9 -1
  96. package/dist/customize/shared/catalog/catalog-card.d.ts +1 -1
  97. package/dist/customize/shared/catalog/catalog-card.js +15 -5
  98. package/dist/customize/shared/customize-tab-bar.js +1 -1
  99. package/dist/customize/shared/new-entity-menu.d.ts +1 -1
  100. package/dist/customize/shared/new-entity-menu.js +38 -1
  101. package/dist/customize/triggers/runtime-triggers.d.ts +4 -0
  102. package/dist/customize/triggers/runtime-triggers.js +33 -3
  103. package/dist/customize/triggers/schedule/event-trigger-copy.js +1 -1
  104. package/dist/customize/triggers/schedule/post-to-field.js +2 -2
  105. package/dist/customize/triggers/schedule/schedule-detail-sheet.js +5 -4
  106. package/dist/customize/triggers/schedule/then-fields.d.ts +5 -1
  107. package/dist/customize/triggers/schedule/then-fields.js +23 -3
  108. package/dist/customize/triggers/schedule/trigger-callouts.js +1 -1
  109. package/dist/customize/triggers/schedule/trigger-composer-logic.d.ts +27 -0
  110. package/dist/customize/triggers/schedule/trigger-composer-logic.js +51 -5
  111. package/dist/customize/triggers/schedule/trigger-composer.js +19 -13
  112. package/dist/customize/triggers/schedule/trigger-edit-logic.js +25 -5
  113. package/dist/customize/triggers/schedule/trigger-filter.d.ts +10 -3
  114. package/dist/customize/triggers/schedule/trigger-filter.js +7 -6
  115. package/dist/customize/triggers/schedule/trigger-readonly.js +1 -1
  116. package/dist/customize/triggers/schedule/trigger-runs-panel.js +1 -1
  117. package/dist/customize/triggers/schedule/when-event.js +1 -1
  118. package/dist/customize/triggers/schedule/when-schedule.d.ts +5 -1
  119. package/dist/customize/triggers/schedule/when-schedule.js +16 -1
  120. package/dist/customize/triggers/schedule-view.js +6 -3
  121. package/dist/files/project/components/drive-explorer.js +33 -70
  122. package/dist/files/project/components/drive-grid-view.d.ts +2 -31
  123. package/dist/files/project/components/drive-grid-view.js +12 -22
  124. package/dist/files/project/components/drive-list-view.d.ts +3 -30
  125. package/dist/files/project/components/drive-list-view.js +8 -18
  126. package/dist/files/project/components/drive-selection-bar.d.ts +4 -5
  127. package/dist/files/project/components/drive-selection-bar.js +13 -20
  128. package/dist/files/project/components/explorer-listing.d.ts +48 -0
  129. package/dist/files/project/components/explorer-listing.js +64 -0
  130. package/dist/files/project/components/file-explorer-page.js +7 -204
  131. package/dist/files/project/components/file-thumbnail.js +3 -1
  132. package/dist/files/project/components/manifest-issue-mark.d.ts +9 -0
  133. package/dist/files/project/components/manifest-issue-mark.js +26 -0
  134. package/dist/files/project/hooks/use-change-requests.d.ts +10 -0
  135. package/dist/files/project/hooks/use-change-requests.js +17 -0
  136. package/dist/files/project/manifest-annotations.d.ts +16 -0
  137. package/dist/files/project/manifest-annotations.js +19 -0
  138. package/dist/files/project/store/version-store.d.ts +1 -1
  139. package/dist/files/project/upload-batch.d.ts +20 -0
  140. package/dist/files/project/upload-batch.js +20 -0
  141. package/dist/files/runtime/hooks/use-binary-blob.js +3 -2
  142. package/dist/files/runtime/hooks/use-file-content.js +3 -2
  143. package/dist/files/runtime/hooks/use-file-list.js +1 -2
  144. package/dist/files/runtime/hooks/use-file-mutations.js +69 -6
  145. package/dist/files/runtime/hooks/use-file-refresh.d.ts +4 -0
  146. package/dist/files/runtime/hooks/use-file-refresh.js +6 -0
  147. package/dist/files/tree/components/file-tree-item.js +1 -4
  148. package/dist/files/viewer/file-annotations.d.ts +18 -0
  149. package/dist/files/viewer/file-annotations.js +21 -0
  150. package/dist/files/viewer/file-content-renderer.js +1 -1
  151. package/dist/files/viewer/file-viewer.js +2 -1
  152. package/dist/files/viewer/index.d.ts +1 -0
  153. package/dist/files/viewer/index.js +1 -0
  154. package/dist/files/viewer/use-file-content-state.js +8 -1
  155. package/dist/i18n/en.d.ts +544 -46
  156. package/dist/i18n/en.js +593 -95
  157. package/dist/i18n/ui-catalog/remaining-ui-translation-keys.generated.js +0 -4
  158. package/dist/icons/caret-right-solid.d.ts +11 -0
  159. package/dist/icons/caret-right-solid.js +15 -0
  160. package/dist/internal/auth/auth-art.d.ts +12 -0
  161. package/dist/internal/auth/auth-art.js +118 -0
  162. package/dist/internal/auth/auth-card-shell.d.ts +14 -10
  163. package/dist/internal/auth/auth-card-shell.js +20 -31
  164. package/dist/internal/auth/auth-consent.d.ts +3 -1
  165. package/dist/internal/auth/auth-consent.js +2 -2
  166. package/dist/internal/auth/auth-primitives.d.ts +26 -1
  167. package/dist/internal/auth/auth-primitives.js +37 -8
  168. package/dist/internal/connector-logo/connector-logo.d.ts +2 -1
  169. package/dist/internal/connector-logo/connector-logo.js +11 -2
  170. package/dist/internal/files/file-read-retry.d.ts +18 -2
  171. package/dist/internal/files/file-read-retry.js +42 -4
  172. package/dist/internal/hooks/projects/use-new-project-session.js +5 -10
  173. package/dist/internal/hooks/use-auto-scroll-physics.d.ts +1 -1
  174. package/dist/internal/hooks/use-auto-scroll-physics.js +2 -10
  175. package/dist/internal/hooks/use-reduced-motion.d.ts +4 -0
  176. package/dist/internal/hooks/use-reduced-motion.js +12 -0
  177. package/dist/internal/hooks/use-save-shortcut.d.ts +8 -0
  178. package/dist/internal/hooks/use-save-shortcut.js +28 -0
  179. package/dist/internal/layout/connect-mcp-modal.d.ts +1 -1
  180. package/dist/internal/layout/connect-mcp-modal.js +9 -4
  181. package/dist/internal/layout/panel-chrome.d.ts +28 -0
  182. package/dist/internal/layout/panel-chrome.js +27 -0
  183. package/dist/internal/layout/project-page-header.js +5 -1
  184. package/dist/internal/layout/project-settings-nav.d.ts +17 -0
  185. package/dist/internal/layout/project-settings-nav.js +24 -0
  186. package/dist/internal/lib/browser-noise/rules/webview.js +16 -0
  187. package/dist/internal/lib/capability-tab-routes.d.ts +8 -0
  188. package/dist/internal/lib/capability-tab-routes.js +11 -0
  189. package/dist/internal/lib/manifest-health.d.ts +25 -1
  190. package/dist/internal/lib/manifest-health.js +56 -0
  191. package/dist/internal/lib/project-preamble.js +1 -1
  192. package/dist/internal/lib/web-notifications.d.ts +1 -1
  193. package/dist/internal/lib/web-notifications.js +3 -0
  194. package/dist/internal/notifications/notification-inbox.js +2 -1
  195. package/dist/internal/notifications/notification-rows.d.ts +1 -1
  196. package/dist/internal/notifications/notification-rows.js +15 -1
  197. package/dist/internal/selection/selection-bar.d.ts +2 -8
  198. package/dist/internal/selection/selection-bar.js +15 -38
  199. package/dist/internal/stores/active-space-store.d.ts +1 -1
  200. package/dist/internal/stores/browser-recents-store.d.ts +1 -1
  201. package/dist/internal/stores/composer-prefill-store.d.ts +7 -0
  202. package/dist/internal/stores/composer-prefill-store.js +1 -0
  203. package/dist/internal/stores/current-account-store.d.ts +1 -1
  204. package/dist/internal/stores/first-chat-store.d.ts +1 -1
  205. package/dist/internal/stores/mobile-app-promo-store.d.ts +1 -1
  206. package/dist/internal/stores/session-browser-store.d.ts +1 -1
  207. package/dist/internal/stores/session-expanded-store.d.ts +1 -1
  208. package/dist/internal/stores/session-filter-store.d.ts +1 -1
  209. package/dist/internal/stores/session-history-view-store.d.ts +1 -1
  210. package/dist/internal/stores/session-panel-memory-store.d.ts +1 -1
  211. package/dist/internal/stores/sound-store.d.ts +1 -1
  212. package/dist/internal/stores/tab-store.d.ts +1 -1
  213. package/dist/internal/stores/user-preferences-store.d.ts +9 -1
  214. package/dist/internal/stores/user-preferences-store.js +2 -0
  215. package/dist/internal/stores/web-notification-store.d.ts +1 -1
  216. package/dist/lib/base-ui-compat.js +28 -1
  217. package/dist/lib/dotmatrix-hooks.d.ts +1 -0
  218. package/dist/lib/dotmatrix-hooks.js +3 -13
  219. package/dist/lib/reduced-motion.d.ts +10 -0
  220. package/dist/lib/reduced-motion.js +104 -0
  221. package/dist/lib/routes.d.ts +9 -0
  222. package/dist/lib/routes.js +7 -4
  223. package/dist/markdown/artifact-link.d.ts +11 -0
  224. package/dist/markdown/artifact-link.js +62 -0
  225. package/dist/markdown/code/index.d.ts +1 -1
  226. package/dist/markdown/code/index.js +1 -1
  227. package/dist/markdown/code/inline-code.d.ts +1 -1
  228. package/dist/markdown/code/inline-code.js +1 -1
  229. package/dist/markdown/genui/components/map-canvas.js +2 -1
  230. package/dist/markdown/index.d.ts +3 -1
  231. package/dist/markdown/index.js +2 -1
  232. package/dist/markdown/{code/inline-chip.js → inline-chip.js} +2 -2
  233. package/dist/markdown/inline-code-text.d.ts +34 -0
  234. package/dist/markdown/inline-code-text.js +68 -0
  235. package/dist/markdown/setup-links/approval-decision.js +3 -3
  236. package/dist/markdown/soft-breaks.d.ts +21 -0
  237. package/dist/markdown/soft-breaks.js +33 -0
  238. package/dist/markdown/unified-markdown.d.ts +9 -1
  239. package/dist/markdown/unified-markdown.js +31 -9
  240. package/dist/primitives/action-bar.d.ts +50 -0
  241. package/dist/primitives/action-bar.js +87 -0
  242. package/dist/primitives/calendar.js +4 -2
  243. package/dist/primitives/inline-meta.js +2 -2
  244. package/dist/primitives/kortix-loader.js +2 -1
  245. package/dist/primitives/modal.d.ts +1 -1
  246. package/dist/primitives/paper-wallpaper-shaders.d.ts +1 -0
  247. package/dist/primitives/paper-wallpaper-shaders.js +6 -0
  248. package/dist/primitives/resizable.d.ts +1 -1
  249. package/dist/primitives/resize-seam.d.ts +3 -2
  250. package/dist/primitives/resize-seam.js +4 -3
  251. package/dist/primitives/settings-section-header.d.ts +30 -1
  252. package/dist/primitives/settings-section-header.js +37 -0
  253. package/dist/primitives/sliding-tab-indicator.js +2 -1
  254. package/dist/primitives/switch.js +15 -8
  255. package/dist/primitives/text-shimmer.js +6 -0
  256. package/dist/primitives/toast-clearance.d.ts +52 -0
  257. package/dist/primitives/toast-clearance.js +116 -0
  258. package/dist/primitives/toast.d.ts +3 -1
  259. package/dist/primitives/toast.js +2 -0
  260. package/dist/primitives/typed-title.js +1 -1
  261. package/dist/primitives/wallpaper-shaders.js +1 -1
  262. package/dist/session/actions/project-session-list-helpers.d.ts +16 -0
  263. package/dist/session/actions/project-session-list-helpers.js +18 -0
  264. package/dist/session/actions/session-label.js +2 -2
  265. package/dist/session/agents/agent-model.d.ts +1 -0
  266. package/dist/session/agents/agent-model.js +2 -1
  267. package/dist/session/agents/agent-strip.d.ts +10 -5
  268. package/dist/session/agents/agent-strip.js +49 -15
  269. package/dist/session/agents/held-messages.d.ts +6 -2
  270. package/dist/session/agents/held-messages.js +6 -3
  271. package/dist/session/agents/workflow-run-controls.d.ts +27 -4
  272. package/dist/session/agents/workflow-run-controls.js +63 -10
  273. package/dist/session/composer/ComposerCard.js +7 -1
  274. package/dist/session/composer/agent-selector.d.ts +2 -0
  275. package/dist/session/composer/agent-selector.js +11 -4
  276. package/dist/session/composer/animated-placeholder.js +2 -1
  277. package/dist/session/composer/attachment-tile.d.ts +2 -2
  278. package/dist/session/composer/attachment-tile.js +25 -3
  279. package/dist/session/composer/composer-agent-access.d.ts +10 -1
  280. package/dist/session/composer/composer-agent-access.js +18 -4
  281. package/dist/session/composer/composer-chat-input.d.ts +1 -0
  282. package/dist/session/composer/composer-chat-input.js +7 -2
  283. package/dist/session/composer/composer-logic.d.ts +7 -0
  284. package/dist/session/composer/composer-logic.js +18 -0
  285. package/dist/session/composer/composer-reset.d.ts +8 -14
  286. package/dist/session/composer/composer-toolbar.d.ts +3 -1
  287. package/dist/session/composer/composer-toolbar.js +3 -3
  288. package/dist/session/composer/composer.d.ts +9 -2
  289. package/dist/session/composer/composer.js +24 -9
  290. package/dist/session/composer/editor/composer-editor.js +6 -4
  291. package/dist/session/composer/hooks/use-file-search.d.ts +12 -2
  292. package/dist/session/composer/hooks/use-file-search.js +71 -7
  293. package/dist/session/composer/menus/menu-items.js +6 -2
  294. package/dist/session/composer/menus/menu-shell.d.ts +3 -1
  295. package/dist/session/composer/menus/menu-shell.js +2 -2
  296. package/dist/session/composer/menus/slash-menu.d.ts +7 -0
  297. package/dist/session/composer/menus/slash-menu.js +48 -1
  298. package/dist/session/composer/use-instant-session-send.js +7 -1
  299. package/dist/session/header/session-reminders-indicator.js +3 -2
  300. package/dist/session/header/session-site-header.d.ts +3 -1
  301. package/dist/session/header/session-site-header.js +27 -8
  302. package/dist/session/media/sandbox-url-detector.js +1 -1
  303. package/dist/session/models/connect-model-step.d.ts +29 -0
  304. package/dist/session/models/connect-model-step.js +50 -0
  305. package/dist/session/models/model-connection-gate.js +2 -1
  306. package/dist/session/models/model-selector.js +1 -1
  307. package/dist/session/models/subscription-switcher.d.ts +7 -0
  308. package/dist/session/models/subscription-switcher.js +52 -10
  309. package/dist/session/models/subscription-windows.d.ts +2 -0
  310. package/dist/session/models/subscription-windows.js +2 -0
  311. package/dist/session/models/use-workspace-model-gate.d.ts +11 -0
  312. package/dist/session/models/use-workspace-model-gate.js +62 -0
  313. package/dist/session/models/workspace-model-gate.d.ts +46 -0
  314. package/dist/session/models/workspace-model-gate.js +66 -0
  315. package/dist/session/outcomes/session-outcomes-provider.js +14 -7
  316. package/dist/session/panel/action-panel.js +8 -19
  317. package/dist/session/panel/easy/app-preview.d.ts +4 -1
  318. package/dist/session/panel/easy/app-preview.js +95 -33
  319. package/dist/session/panel/easy/apps-card.js +6 -11
  320. package/dist/session/panel/easy/change-requests-card.js +1 -1
  321. package/dist/session/panel/easy/changes-card.d.ts +14 -0
  322. package/dist/session/panel/easy/changes-card.js +60 -0
  323. package/dist/session/panel/easy/context-card.d.ts +5 -1
  324. package/dist/session/panel/easy/context-card.js +13 -28
  325. package/dist/session/panel/easy/context-meter.d.ts +18 -0
  326. package/dist/session/panel/easy/context-meter.js +73 -0
  327. package/dist/session/panel/easy/detail-view.d.ts +1 -1
  328. package/dist/session/panel/easy/detail-view.js +24 -21
  329. package/dist/session/panel/easy/easy-panel.js +7 -5
  330. package/dist/session/panel/easy/file-preview.js +3 -1
  331. package/dist/session/panel/easy/frame-history.d.ts +91 -0
  332. package/dist/session/panel/easy/frame-history.js +198 -0
  333. package/dist/session/panel/easy/outputs-card.d.ts +10 -0
  334. package/dist/session/panel/easy/outputs-card.js +28 -31
  335. package/dist/session/panel/easy/panel-card.d.ts +1 -3
  336. package/dist/session/panel/easy/panel-card.js +24 -8
  337. package/dist/session/panel/easy/plan-card.js +2 -2
  338. package/dist/session/panel/easy/step-icon.d.ts +4 -1
  339. package/dist/session/panel/easy/step-icon.js +2 -2
  340. package/dist/session/panel/session-action-panel-column.d.ts +5 -0
  341. package/dist/session/panel/session-action-panel-column.js +198 -101
  342. package/dist/session/panel/session-desktop.js +5 -1
  343. package/dist/session/panel/session-diff-viewer.d.ts +3 -1
  344. package/dist/session/panel/session-diff-viewer.js +7 -4
  345. package/dist/session/panel/session-panel-provider.js +29 -5
  346. package/dist/session/panel/shared/derive-panels.js +64 -4
  347. package/dist/session/prompts/session-connect-card.d.ts +63 -0
  348. package/dist/session/prompts/{session-connect-prompt.js → session-connect-card.js} +53 -42
  349. package/dist/session/status/session-busy-indicator.js +2 -1
  350. package/dist/session/status/session-error-banner.js +1 -1
  351. package/dist/session/thread/chat-minimap.js +2 -1
  352. package/dist/session/thread/session-body.js +4 -1
  353. package/dist/session/thread/session-chat.js +311 -300
  354. package/dist/session/thread/session-turn-meta-rows.d.ts +13 -5
  355. package/dist/session/thread/session-turn-meta-rows.js +33 -5
  356. package/dist/session/thread/transcript.d.ts +3 -3
  357. package/dist/session/thread/transcript.js +33 -27
  358. package/dist/session/thread/typing-indicator.d.ts +2 -2
  359. package/dist/session/thread/typing-indicator.js +10 -3
  360. package/dist/session/tool/tool-part-renderer.js +7 -2
  361. package/dist/session/tool/tools/kortix-action-tool.js +10 -2
  362. package/dist/session/tool/tools/session-spawn-tool.js +3 -3
  363. package/dist/session/tool/tools/workflow-run-card.d.ts +11 -1
  364. package/dist/session/tool/tools/workflow-run-card.js +31 -7
  365. package/dist/session/tool/tools/workflow-run-cost.d.ts +29 -0
  366. package/dist/session/tool/tools/workflow-run-cost.js +75 -0
  367. package/dist/session/tool/tools/workflow-tool.d.ts +1 -1
  368. package/dist/session/tool/tools/workflow-tool.js +40 -15
  369. package/dist/session/turn/peer-message-row.js +1 -1
  370. package/dist/session/turn/queued-prompt-bubbles.d.ts +3 -2
  371. package/dist/session/turn/queued-prompt-bubbles.js +1 -1
  372. package/dist/session/turn/throttled-markdown.js +1 -1
  373. package/dist/session/turn/turn-viewport.d.ts +66 -10
  374. package/dist/session/turn/turn-viewport.js +92 -12
  375. package/dist/session/turn/user-message.js +7 -5
  376. package/dist/styles/theme.css +68 -0
  377. package/dist/styles.css +1 -1
  378. package/dist/terminal/pty-terminal.js +1 -1
  379. package/dist/terminal/session-terminal-connect-bar.js +2 -1
  380. package/dist/test-utils/intl.d.ts +544 -46
  381. package/dist/workspace/admin/project-admin-dashboard.js +23 -11
  382. package/dist/workspace/admin/settings-search-landing.js +2 -1
  383. package/dist/workspace/calendar/calendar-dates.d.ts +31 -0
  384. package/dist/workspace/calendar/calendar-dates.js +64 -0
  385. package/dist/workspace/calendar/calendar-new-item.d.ts +11 -0
  386. package/dist/workspace/calendar/calendar-new-item.js +47 -0
  387. package/dist/workspace/calendar/calendar-page.d.ts +3 -0
  388. package/dist/workspace/calendar/calendar-page.js +177 -0
  389. package/dist/workspace/calendar/calendar-panel.d.ts +13 -0
  390. package/dist/workspace/calendar/calendar-panel.js +103 -0
  391. package/dist/workspace/calendar/calendar-people.d.ts +52 -0
  392. package/dist/workspace/calendar/calendar-people.js +117 -0
  393. package/dist/workspace/calendar/calendar-scheduled.d.ts +29 -0
  394. package/dist/workspace/calendar/calendar-scheduled.js +118 -0
  395. package/dist/workspace/calendar/calendar-views.d.ts +32 -0
  396. package/dist/workspace/calendar/calendar-views.js +124 -0
  397. package/dist/workspace/calendar/calendar-when.d.ts +14 -0
  398. package/dist/workspace/calendar/calendar-when.js +81 -0
  399. package/dist/workspace/calendar/mention-textarea.d.ts +19 -0
  400. package/dist/workspace/calendar/mention-textarea.js +84 -0
  401. package/dist/workspace/home/access-requests-bell.js +2 -1
  402. package/dist/workspace/home/existing-repo-setup-prompt.d.ts +5 -8
  403. package/dist/workspace/home/existing-repo-setup-prompt.js +16 -42
  404. package/dist/workspace/home/no-agent-home.d.ts +3 -1
  405. package/dist/workspace/home/no-agent-home.js +2 -2
  406. package/dist/workspace/inbox/workspace-inbox.d.ts +1 -1
  407. package/dist/workspace/inbox/workspace-inbox.js +1 -1
  408. package/dist/workspace/layout/project-files-view.js +2 -1
  409. package/dist/workspace/layout/project-home.js +16 -9
  410. package/dist/workspace/memory/memory-page-list.js +1 -1
  411. package/dist/workspace/new/workspace-handoff.js +2 -1
  412. package/dist/workspace/projects/modal/project-icon-field.js +2 -1
  413. package/dist/workspace/session-workspace.js +13 -12
  414. package/dist/workspace/setup/setup-steps.d.ts +43 -0
  415. package/dist/workspace/setup/setup-steps.js +38 -0
  416. package/dist/workspace/setup/workspace-setup-page.d.ts +10 -0
  417. package/dist/workspace/setup/workspace-setup-page.js +124 -0
  418. package/dist/workspace/sidebar/footer/project-artifacts-nav.js +5 -1
  419. package/dist/workspace/sidebar/footer/project-calendar-nav.d.ts +8 -0
  420. package/dist/workspace/sidebar/footer/project-calendar-nav.js +31 -0
  421. package/dist/workspace/sidebar/footer/project-chrome-nav.d.ts +14 -6
  422. package/dist/workspace/sidebar/footer/project-chrome-nav.js +37 -25
  423. package/dist/workspace/sidebar/footer/project-computer-nav.d.ts +17 -9
  424. package/dist/workspace/sidebar/footer/project-computer-nav.js +36 -26
  425. package/dist/workspace/sidebar/footer/project-download-app-nav.d.ts +7 -7
  426. package/dist/workspace/sidebar/footer/project-download-app-nav.js +25 -13
  427. package/dist/workspace/sidebar/footer/project-inbox-nav.d.ts +8 -0
  428. package/dist/workspace/sidebar/footer/project-inbox-nav.js +29 -0
  429. package/dist/workspace/sidebar/footer/project-manifest-issues-alert.d.ts +3 -13
  430. package/dist/workspace/sidebar/footer/project-manifest-issues-alert.js +6 -48
  431. package/dist/workspace/sidebar/footer/project-mcp-nav.d.ts +7 -7
  432. package/dist/workspace/sidebar/footer/project-mcp-nav.js +31 -13
  433. package/dist/workspace/sidebar/footer/project-phone-app-nav.d.ts +10 -0
  434. package/dist/workspace/sidebar/footer/project-phone-app-nav.js +61 -0
  435. package/dist/workspace/sidebar/footer/project-promo-cards.d.ts +21 -0
  436. package/dist/workspace/sidebar/footer/project-promo-cards.js +33 -0
  437. package/dist/workspace/sidebar/footer/promo-card.d.ts +41 -0
  438. package/dist/workspace/sidebar/footer/promo-card.js +47 -0
  439. package/dist/workspace/sidebar/project-nav-items.d.ts +3 -1
  440. package/dist/workspace/sidebar/project-nav-items.js +12 -4
  441. package/dist/workspace/sidebar/project-session-list.js +58 -26
  442. package/dist/workspace/sidebar/project-sidebar.js +2 -5
  443. package/dist/workspace/sidebar/project-spaces-nav.js +2 -1
  444. package/dist/workspace/sidebar/session-brief-hover-card.d.ts +24 -0
  445. package/dist/workspace/sidebar/session-brief-hover-card.js +4 -3
  446. package/dist/workspace/sidebar/session-group-sections.d.ts +26 -7
  447. package/dist/workspace/sidebar/session-group-sections.js +121 -41
  448. package/dist/workspace/sidebar/session-grouping.d.ts +1 -1
  449. package/dist/workspace/sidebar/session-grouping.js +1 -1
  450. package/dist/workspace/sidebar/sidebar-drill.js +6 -0
  451. package/dist/workspace/sidebar/sidebar-more-group.js +3 -2
  452. package/dist/workspace/sidebar/use-workspace-list.d.ts +7 -0
  453. package/dist/workspace/sidebar/use-workspace-list.js +11 -1
  454. package/dist/workspace/sidebar/workspace-settings-sidebar-nav.d.ts +14 -0
  455. package/dist/workspace/sidebar/workspace-settings-sidebar-nav.js +46 -2
  456. package/dist/workspace/space/space-tab-panels.js +1 -1
  457. package/dist/workspace/spaces/space-details-panel.js +2 -2
  458. package/dist/workspace/spaces/space-timeline.js +2 -2
  459. package/dist/workspace/spaces/space-triggers.js +2 -2
  460. package/dist/workspace/spaces/space-view.js +11 -5
  461. package/package.json +79 -10
  462. package/skills/kortix-ui/SKILL.md +2 -2
  463. package/skills/kortix-ui/references/modules.md +5 -3
  464. package/dist/session/prompts/session-connect-prompt.d.ts +0 -40
  465. package/dist/session/thread/turn-share.d.ts +0 -16
  466. package/dist/session/thread/turn-share.js +0 -161
  467. package/dist/workspace/sidebar/footer/promo-nav-row.d.ts +0 -11
  468. package/dist/workspace/sidebar/footer/promo-nav-row.js +0 -7
  469. /package/dist/markdown/{code/inline-chip.d.ts → inline-chip.d.ts} +0 -0
@@ -0,0 +1,9 @@
1
+ /**
2
+ * A file card's mark for open issues in that file (`FileAnnotationsProvider`):
3
+ * the warning colour with an error, muted with warnings only, the same tones as
4
+ * the sidebar row. The tooltip says what the file has. Nothing without issues.
5
+ */
6
+ export declare function ManifestIssueMark({ path, name }: {
7
+ path: string;
8
+ name: string;
9
+ }): import("react").JSX.Element | null;
@@ -0,0 +1,26 @@
1
+ 'use client';
2
+ import { jsx as _jsx } from "react/jsx-runtime";
3
+ import { WarningIcon } from '@phosphor-icons/react';
4
+ import { useTranslations } from '../../../i18n/index.js';
5
+ import { cn } from '../../../lib/utils.js';
6
+ import Hint from '../../../primitives/hint.js';
7
+ import { useFileAnnotations } from '../../viewer/file-annotations.js';
8
+ /**
9
+ * A file card's mark for open issues in that file (`FileAnnotationsProvider`):
10
+ * the warning colour with an error, muted with warnings only, the same tones as
11
+ * the sidebar row. The tooltip says what the file has. Nothing without issues.
12
+ */
13
+ export function ManifestIssueMark({ path, name }) {
14
+ const t = useTranslations('sidebar.manifestIssues');
15
+ const diagnostics = useFileAnnotations(path);
16
+ if (diagnostics.length === 0)
17
+ return null;
18
+ const errors = diagnostics.filter((d) => d.severity === 1).length;
19
+ const warnings = diagnostics.length - errors;
20
+ const label = t(warnings === 0 ? 'titleErrors' : errors === 0 ? 'titleWarnings' : 'title', {
21
+ file: name,
22
+ errors,
23
+ warnings,
24
+ });
25
+ return (_jsx(Hint, { label: label, side: "top", children: _jsx("span", { role: "img", "aria-label": label, "data-slot": "manifest-issue-mark", className: "inline-flex shrink-0", children: _jsx(WarningIcon, { className: cn('size-3.5', errors > 0 ? 'text-kortix-orange' : 'text-muted-foreground') }) }) }));
26
+ }
@@ -13,6 +13,8 @@ export declare const changeRequestKeys: {
13
13
  /** One session's change requests, every status. Nested under `listScope`,
14
14
  * so each project and list invalidation reaches it as well. */
15
15
  sessionList: (projectId: string, sessionId: string) => readonly ["project-files", "change-requests", string, "list", "session", string];
16
+ /** The sidebar's newest change requests (every status), nested under `listScope`. */
17
+ sidebarRecent: (projectId: string) => readonly ["project-files", "change-requests", string, "list", "recent"];
16
18
  detail: (projectId: string, crId: string) => readonly ["project-files", "change-requests", string, string];
17
19
  diff: (projectId: string, crId: string) => readonly ["project-files", "change-requests", string, string, "diff"];
18
20
  preview: (projectId: string, crId: string) => readonly ["project-files", "change-requests", string, string, "merge-preview"];
@@ -127,6 +129,14 @@ export declare function useChangeRequestMergePreview(crId: string | null, enable
127
129
  * API and the browser is not told (KRTX-3009, KRTX-3010).
128
130
  */
129
131
  export declare function invalidateChangeRequestReads(qc: QueryClient, projectId: string): void;
132
+ /**
133
+ * What one session's turn can change: that session's change requests (its
134
+ * outcome cards), the sidebar's recent list and the review summary. Not the
135
+ * project's other lists, details or diffs: a turn-end read of the whole
136
+ * project prefix, twice per busy -> idle edge, read the sidebar's 36 KB list
137
+ * 12-17 times a turn.
138
+ */
139
+ export declare function invalidateTurnChangeRequestReads(qc: QueryClient, projectId: string, sessionId: string | undefined): void;
130
140
  /**
131
141
  * Invalidates every CR query for the active project — used after open / merge
132
142
  * / close / reopen so all panels and detail views re-fetch.
@@ -19,6 +19,8 @@ export const changeRequestKeys = {
19
19
  /** One session's change requests, every status. Nested under `listScope`,
20
20
  * so each project and list invalidation reaches it as well. */
21
21
  sessionList: (projectId, sessionId) => ['project-files', 'change-requests', projectId, 'list', 'session', sessionId],
22
+ /** The sidebar's newest change requests (every status), nested under `listScope`. */
23
+ sidebarRecent: (projectId) => ['project-files', 'change-requests', projectId, 'list', 'recent'],
22
24
  detail: (projectId, crId) => ['project-files', 'change-requests', projectId, crId],
23
25
  diff: (projectId, crId) => ['project-files', 'change-requests', projectId, crId, 'diff'],
24
26
  preview: (projectId, crId) => ['project-files', 'change-requests', projectId, crId, 'merge-preview'],
@@ -239,6 +241,21 @@ export function invalidateChangeRequestReads(qc, projectId) {
239
241
  qc.invalidateQueries({ queryKey: changeRequestKeys.project(projectId) });
240
242
  qc.invalidateQueries({ queryKey: qk.project.reviewSummary(projectId) });
241
243
  }
244
+ /**
245
+ * What one session's turn can change: that session's change requests (its
246
+ * outcome cards), the sidebar's recent list and the review summary. Not the
247
+ * project's other lists, details or diffs: a turn-end read of the whole
248
+ * project prefix, twice per busy -> idle edge, read the sidebar's 36 KB list
249
+ * 12-17 times a turn.
250
+ */
251
+ export function invalidateTurnChangeRequestReads(qc, projectId, sessionId) {
252
+ if (!projectId)
253
+ return;
254
+ if (sessionId)
255
+ qc.invalidateQueries({ queryKey: changeRequestKeys.sessionList(projectId, sessionId), exact: true });
256
+ qc.invalidateQueries({ queryKey: changeRequestKeys.sidebarRecent(projectId), exact: true });
257
+ qc.invalidateQueries({ queryKey: qk.project.reviewSummary(projectId) });
258
+ }
242
259
  /**
243
260
  * Invalidates every CR query for the active project — used after open / merge
244
261
  * / close / reopen so all panels and detail views re-fetch.
@@ -0,0 +1,16 @@
1
+ /**
2
+ * The repository view's `kortix.yaml` issues, as file annotations: the open
3
+ * manifest gets a gutter marker and a hover message on each flagged line, and
4
+ * its card a warning mark. The same `attentionHealth` filter as the sidebar
5
+ * row, so an issue shows or hides the same everywhere.
6
+ *
7
+ * The server validates the default branch's manifest, so another version of
8
+ * the repository (a change request, a checkpoint) shows none.
9
+ */
10
+ import { type ReactNode } from 'react';
11
+ export declare function ManifestAnnotationsProvider({ projectId, onDefaultBranch, children, }: {
12
+ projectId: string;
13
+ /** False while the view shows another ref than the default branch. */
14
+ onDefaultBranch: boolean;
15
+ children: ReactNode;
16
+ }): import("react").JSX.Element;
@@ -0,0 +1,19 @@
1
+ 'use client';
2
+ import { jsx as _jsx } from "react/jsx-runtime";
3
+ /**
4
+ * The repository view's `kortix.yaml` issues, as file annotations: the open
5
+ * manifest gets a gutter marker and a hover message on each flagged line, and
6
+ * its card a warning mark. The same `attentionHealth` filter as the sidebar
7
+ * row, so an issue shows or hides the same everywhere.
8
+ *
9
+ * The server validates the default branch's manifest, so another version of
10
+ * the repository (a change request, a checkpoint) shows none.
11
+ */
12
+ import { useCallback } from 'react';
13
+ import { manifestLspDiagnostics, useProjectManifestHealth } from '../../internal/lib/manifest-health.js';
14
+ import { FileAnnotationsProvider } from '../viewer/file-annotations.js';
15
+ export function ManifestAnnotationsProvider({ projectId, onDefaultBranch, children, }) {
16
+ const health = useProjectManifestHealth(projectId);
17
+ const diagnosticsFor = useCallback((filePath) => (onDefaultBranch ? manifestLspDiagnostics(health, filePath) : []), [health, onDefaultBranch]);
18
+ return _jsx(FileAnnotationsProvider, { diagnosticsFor: diagnosticsFor, children: children });
19
+ }
@@ -2,7 +2,7 @@ interface VersionStore {
2
2
  selectedByProject: Record<string, string | undefined>;
3
3
  setVersion: (projectId: string, ref: string | null) => void;
4
4
  }
5
- export declare const useVersionStore: import("zustand").UseBoundStore<Omit<import("zustand").StoreApi<VersionStore>, "persist" | "setState"> & {
5
+ export declare const useVersionStore: import("zustand").UseBoundStore<Omit<import("zustand").StoreApi<VersionStore>, "setState" | "persist"> & {
6
6
  setState(partial: VersionStore | Partial<VersionStore> | ((state: VersionStore) => VersionStore | Partial<VersionStore>), replace?: false | undefined): unknown;
7
7
  setState(state: VersionStore | ((state: VersionStore) => VersionStore), replace: true): unknown;
8
8
  persist: {
@@ -106,4 +106,24 @@ export declare function rowDragIntent(types: readonly string[], options: {
106
106
  /** The explorer's internal drag MIME (`DRAG_MIME`). */
107
107
  moveMime: string;
108
108
  }): RowDragIntent;
109
+ /**
110
+ * Paths of listing rows the server does not have yet: uploads queued or
111
+ * running, and files still being created (a pending row the server has not
112
+ * confirmed, i.e. without `seen`). The grid shows a spinner on these and
113
+ * defers their live preview: a preview read before the write lands is a 404,
114
+ * and that 404 is what kept a new file on "File not found" (D-08).
115
+ */
116
+ export declare function inFlightPaths(uploads: readonly {
117
+ status: string;
118
+ targetPath?: string;
119
+ file: {
120
+ name: string;
121
+ };
122
+ }[], pending: readonly {
123
+ node: {
124
+ path: string;
125
+ type: 'file' | 'directory';
126
+ };
127
+ seen?: unknown;
128
+ }[]): Set<string>;
109
129
  export {};
@@ -119,3 +119,23 @@ export function rowDragIntent(types, options) {
119
119
  return options.canUpload ? 'upload' : null;
120
120
  return null;
121
121
  }
122
+ /**
123
+ * Paths of listing rows the server does not have yet: uploads queued or
124
+ * running, and files still being created (a pending row the server has not
125
+ * confirmed, i.e. without `seen`). The grid shows a spinner on these and
126
+ * defers their live preview: a preview read before the write lands is a 404,
127
+ * and that 404 is what kept a new file on "File not found" (D-08).
128
+ */
129
+ export function inFlightPaths(uploads, pending) {
130
+ const paths = new Set();
131
+ for (const u of uploads) {
132
+ if (u.status !== 'queued' && u.status !== 'uploading')
133
+ continue;
134
+ paths.add(u.targetPath ? `${u.targetPath.replace(/\/+$/, '')}/${u.file.name}` : u.file.name);
135
+ }
136
+ for (const p of pending) {
137
+ if (p.node.type === 'file' && !('seen' in p))
138
+ paths.add(p.node.path);
139
+ }
140
+ return paths;
141
+ }
@@ -6,7 +6,7 @@ import { useEffect, useMemo, useState } from 'react';
6
6
  import { readRuntimeFileWithRetry } from '../../../internal/files/runtime-file-read.js';
7
7
  import { readFileAsBlob } from '../../../internal/files/runtime-files.js';
8
8
  import { keepBlobIfUnchanged } from './blob-identity.js';
9
- import { clearMissingFileRead, imageWaitedOut, imageWakingRefetchInterval, missingFileReadError, missingFileSuppressed, noteMissingFileRead, sandboxWakingRefetchInterval, } from '../../../internal/files/file-read-retry.js';
9
+ import { clearMissingFileRead, imageWaitedOut, imageWakingRefetchInterval, missingFileReadError, missingFileSuppressed, missingFileReadEpoch, noteMissingFileRead, sandboxWakingRefetchInterval, } from '../../../internal/files/file-read-retry.js';
10
10
  import { useServerHealth } from './use-server-health.js';
11
11
  // ── Query keys ─────────────────────────────────────────────────────────────
12
12
  // Keyed by the SDK factory: the live event stream invalidates it on
@@ -60,6 +60,7 @@ export function useBinaryBlob(filePath, options) {
60
60
  // gate in internal/files/file-read-retry.
61
61
  if (missingFileSuppressed(serverUrl, filePath))
62
62
  throw missingFileReadError();
63
+ const startedAt = missingFileReadEpoch();
63
64
  const blob = await readRuntimeFileWithRetry(filePath, async () => {
64
65
  const blob = await readFileAsBlob(filePath);
65
66
  if (blob.size === 0) {
@@ -67,7 +68,7 @@ export function useBinaryBlob(filePath, options) {
67
68
  }
68
69
  return blob;
69
70
  }, undefined, signal).catch((error) => {
70
- noteMissingFileRead(serverUrl, filePath, error);
71
+ noteMissingFileRead(serverUrl, filePath, error, startedAt);
71
72
  throw error;
72
73
  });
73
74
  clearMissingFileRead(serverUrl, filePath);
@@ -3,7 +3,7 @@ import { fileContentKeys, useRuntimeStore } from '@kortix/sdk/react';
3
3
  import { useQuery, useQueryClient } from '@tanstack/react-query';
4
4
  import { readRuntimeFileWithRetry } from '../../../internal/files/runtime-file-read.js';
5
5
  import { readFile } from '../../../internal/files/runtime-files.js';
6
- import { clearMissingFileRead, missingFileReadError, missingFileSuppressed, noteMissingFileRead, sandboxWakingRefetchInterval, } from '../../../internal/files/file-read-retry.js';
6
+ import { clearMissingFileRead, missingFileReadError, missingFileSuppressed, missingFileReadEpoch, noteMissingFileRead, sandboxWakingRefetchInterval, } from '../../../internal/files/file-read-retry.js';
7
7
  import { useServerHealth } from './use-server-health.js';
8
8
  import { isSystemDirectoryPath } from './system-dir.js';
9
9
  // Keyed by the SDK factory: the live event stream invalidates it on
@@ -28,13 +28,14 @@ export function useFileContent(filePath, options) {
28
28
  queryFn: ({ signal }) => {
29
29
  if (missingFileSuppressed(serverUrl, filePath))
30
30
  throw missingFileReadError();
31
+ const startedAt = missingFileReadEpoch();
31
32
  return readRuntimeFileWithRetry(filePath, () => readFile(filePath), undefined, signal)
32
33
  .then((content) => {
33
34
  clearMissingFileRead(serverUrl, filePath);
34
35
  return content;
35
36
  })
36
37
  .catch((error) => {
37
- noteMissingFileRead(serverUrl, filePath, error);
38
+ noteMissingFileRead(serverUrl, filePath, error, startedAt);
38
39
  throw error;
39
40
  });
40
41
  },
@@ -36,13 +36,12 @@ export function useFileList(dirPath, options) {
36
36
  retryDelay: (attempt) => Math.min(1000 * Math.pow(2, attempt), 5000),
37
37
  });
38
38
  // Filter hidden files client-side so the cache stays complete.
39
- // .kortix is always shown — it is the elevated system dir.
40
39
  const data = useMemo(() => {
41
40
  if (!query.data)
42
41
  return query.data;
43
42
  if (showHidden)
44
43
  return query.data;
45
- return query.data.filter((node) => !node.name.startsWith('.') || node.name === '.kortix');
44
+ return query.data.filter((node) => !node.name.startsWith('.'));
46
45
  }, [query.data, showHidden]);
47
46
  return { ...query, data };
48
47
  }
@@ -1,18 +1,69 @@
1
1
  'use client';
2
- import { useRuntimeStore } from '@kortix/sdk/react';
2
+ import { binaryBlobKeys, useRuntimeStore } from '@kortix/sdk/react';
3
3
  import { useMutation, useQueryClient } from '@tanstack/react-query';
4
- import { copyFile, createFile, deleteFile, mkdirFile, renameFile, uploadFile, } from '../../../internal/files/runtime-files.js';
4
+ import { clearMissingFileReadsUnder } from '../../../internal/files/file-read-retry.js';
5
+ import { copyFile, createFile, deleteFile, mkdirFile, renameFile, toDaemonPath, uploadFile, } from '../../../internal/files/runtime-files.js';
5
6
  import { fileContentKeys } from './use-file-content.js';
6
7
  import { fileListKeys } from './use-file-list.js';
7
8
  import { gitStatusKeys } from './use-git-status.js';
8
9
  // ---------------------------------------------------------------------------
10
+ // Written paths
11
+ // ---------------------------------------------------------------------------
12
+ /**
13
+ * A write brought `paths` into existence: forget the missing-file marks at and
14
+ * under them, then re-read the open viewers and previews of those paths.
15
+ *
16
+ * Without this, a path read before its write (the New file row's card reads
17
+ * the path before the create chain runs) kept its 404: the missing-file gate
18
+ * answered every refetch with "File not found" for 5 minutes (D-08). The
19
+ * marks clear first, so the invalidation below reaches the daemon. Only the
20
+ * written paths re-read: a 500-file upload must not re-read every open file
21
+ * 500 times.
22
+ */
23
+ function settleWrittenPaths(queryClient, serverUrl, paths, options = {}) {
24
+ for (const path of paths)
25
+ clearMissingFileReadsUnder(serverUrl, path);
26
+ if (options.refetchContent === false || paths.length === 0)
27
+ return;
28
+ const written = paths.map(toDaemonPath);
29
+ const touches = (queryKey) => {
30
+ const keyPath = queryKey[3];
31
+ if (typeof keyPath !== 'string')
32
+ return false;
33
+ // Same runtime server only: the path on another box is another file.
34
+ if (typeof serverUrl === 'string' && typeof queryKey[2] === 'string' && queryKey[2] !== serverUrl)
35
+ return false;
36
+ const path = toDaemonPath(keyPath);
37
+ return written.some((w) => w === '' || path === w || path.startsWith(`${w}/`));
38
+ };
39
+ for (const root of [fileContentKeys.all, binaryBlobKeys.all]) {
40
+ const filters = { queryKey: root, predicate: (query) => touches(query.queryKey) };
41
+ // A read in flight began before the write: its 404 is stale. Cancel it
42
+ // first, or invalidation would reuse that request and still show "File
43
+ // not found" (a query with no data dedups onto its pending fetch).
44
+ void queryClient
45
+ .cancelQueries(filters)
46
+ .catch(() => undefined)
47
+ .then(() => queryClient.invalidateQueries(filters));
48
+ }
49
+ }
50
+ const joinUploadPath = (targetPath, name) => targetPath ? `${targetPath.replace(/\/+$/, '')}/${name}` : name;
51
+ // ---------------------------------------------------------------------------
9
52
  // Upload
10
53
  // ---------------------------------------------------------------------------
11
54
  export function useFileUpload() {
12
55
  const queryClient = useQueryClient();
56
+ const serverUrl = useRuntimeStore((s) => s.getActiveServerUrl());
13
57
  return useMutation({
14
58
  mutationFn: ({ file, targetPath }) => uploadFile(file, targetPath),
15
- onSuccess: () => {
59
+ onSuccess: (results, { file, targetPath }) => {
60
+ // The requested path, plus the one the daemon reports (it suffixes a
61
+ // name that is taken).
62
+ const name = file.name;
63
+ const written = (results ?? []).map((r) => r.path).filter(Boolean);
64
+ if (name)
65
+ written.push(joinUploadPath(targetPath, name));
66
+ settleWrittenPaths(queryClient, serverUrl, written);
16
67
  queryClient.invalidateQueries({ queryKey: fileListKeys.all });
17
68
  queryClient.invalidateQueries({ queryKey: gitStatusKeys.all });
18
69
  },
@@ -37,9 +88,12 @@ export function useFileDelete() {
37
88
  // ---------------------------------------------------------------------------
38
89
  export function useFileMkdir() {
39
90
  const queryClient = useQueryClient();
91
+ const serverUrl = useRuntimeStore((s) => s.getActiveServerUrl());
40
92
  return useMutation({
41
93
  mutationFn: ({ dirPath }) => mkdirFile(dirPath),
42
- onSuccess: () => {
94
+ onSuccess: (_ok, { dirPath }) => {
95
+ // A new folder holds no file yet: clear the marks, read nothing now.
96
+ settleWrittenPaths(queryClient, serverUrl, [dirPath], { refetchContent: false });
43
97
  queryClient.invalidateQueries({ queryKey: fileListKeys.all });
44
98
  queryClient.invalidateQueries({ queryKey: gitStatusKeys.all });
45
99
  },
@@ -86,6 +140,11 @@ export function useFileRename() {
86
140
  queryClient.setQueryData(ctx.queryKey, ctx.previousData);
87
141
  }
88
142
  },
143
+ onSuccess: (_ok, { to }) => {
144
+ // The target, and everything a moved folder carried, now exists. Its
145
+ // previews (images, PDFs) re-read; other open previews do not.
146
+ settleWrittenPaths(queryClient, serverUrl, [to]);
147
+ },
89
148
  onSettled: () => {
90
149
  // Always refetch to ensure consistency with server
91
150
  queryClient.invalidateQueries({ queryKey: fileListKeys.all });
@@ -99,9 +158,11 @@ export function useFileRename() {
99
158
  // ---------------------------------------------------------------------------
100
159
  export function useFileCreate() {
101
160
  const queryClient = useQueryClient();
161
+ const serverUrl = useRuntimeStore((s) => s.getActiveServerUrl());
102
162
  return useMutation({
103
163
  mutationFn: ({ filePath }) => createFile(filePath),
104
- onSuccess: () => {
164
+ onSuccess: (results, { filePath }) => {
165
+ settleWrittenPaths(queryClient, serverUrl, [filePath, ...(results ?? []).map((r) => r.path).filter(Boolean)]);
105
166
  queryClient.invalidateQueries({ queryKey: fileListKeys.all });
106
167
  queryClient.invalidateQueries({ queryKey: gitStatusKeys.all });
107
168
  },
@@ -112,9 +173,11 @@ export function useFileCreate() {
112
173
  // ---------------------------------------------------------------------------
113
174
  export function useFileCopy() {
114
175
  const queryClient = useQueryClient();
176
+ const serverUrl = useRuntimeStore((s) => s.getActiveServerUrl());
115
177
  return useMutation({
116
178
  mutationFn: ({ sourcePath, destPath }) => copyFile(sourcePath, destPath),
117
- onSuccess: () => {
179
+ onSuccess: (results, { destPath }) => {
180
+ settleWrittenPaths(queryClient, serverUrl, [destPath, ...(results ?? []).map((r) => r.path).filter(Boolean)]);
118
181
  queryClient.invalidateQueries({ queryKey: fileListKeys.all });
119
182
  queryClient.invalidateQueries({ queryKey: gitStatusKeys.all });
120
183
  },
@@ -8,6 +8,10 @@
8
8
  * so renderers that read their own bytes (xlsx, sqlite, the HTML frame)
9
9
  * remount — a user who pressed Refresh asked for a reload, even of bytes that
10
10
  * look the same.
11
+ *
12
+ * Refresh always reads. The missing-file gate answers a refetch of a fresh
13
+ * 404 without a request, so the mark clears first: a file created from a
14
+ * terminal after a 404 shows on the next Refresh (P-F08).
11
15
  */
12
16
  export declare function useFileRefresh(filePath: string | null | undefined): {
13
17
  refresh: () => void;
@@ -2,6 +2,7 @@
2
2
  import { binaryBlobKeys, fileContentKeys, useRuntimeStore } from '@kortix/sdk/react';
3
3
  import { useQueryClient } from '@tanstack/react-query';
4
4
  import { useCallback, useState } from 'react';
5
+ import { clearMissingFileReadsUnder } from '../../../internal/files/file-read-retry.js';
5
6
  /**
6
7
  * The viewer's manual Refresh — the safety net under the automatic one.
7
8
  *
@@ -12,6 +13,10 @@ import { useCallback, useState } from 'react';
12
13
  * so renderers that read their own bytes (xlsx, sqlite, the HTML frame)
13
14
  * remount — a user who pressed Refresh asked for a reload, even of bytes that
14
15
  * look the same.
16
+ *
17
+ * Refresh always reads. The missing-file gate answers a refetch of a fresh
18
+ * 404 without a request, so the mark clears first: a file created from a
19
+ * terminal after a 404 shows on the next Refresh (P-F08).
15
20
  */
16
21
  export function useFileRefresh(filePath) {
17
22
  const queryClient = useQueryClient();
@@ -23,6 +28,7 @@ export function useFileRefresh(filePath) {
23
28
  return;
24
29
  setRefreshing(true);
25
30
  setReloadKey((n) => n + 1);
31
+ clearMissingFileReadsUnder(serverUrl, filePath);
26
32
  void Promise.all([
27
33
  queryClient.invalidateQueries({ queryKey: fileContentKeys.file(serverUrl, filePath) }),
28
34
  queryClient.invalidateQueries({ queryKey: binaryBlobKeys.file(serverUrl, filePath) }),
@@ -153,10 +153,7 @@ export function FileTreeItem({ node, onClick, onDownload, onRename, onDelete, on
153
153
  confirmRename();
154
154
  else
155
155
  cancelRename();
156
- }, className: cn('bg-card focus:ring-primary/50 selection:bg-primary/15 selection:text-foreground h-7 w-full rounded-2xl border px-3 text-sm outline-none focus:ring-2', nameConflict && 'border-destructive focus:ring-destructive/30') }), nameConflict && (_jsx("p", { className: "text-destructive text-xs", children: tHardcodedUi.raw('featuresProjectFilesComponentsFileTreeItem.line229JsxTextAFileOrFolderWithThatNameAlready') }))] })] })) : (_jsxs("button", { draggable: !isRenaming, onDragStart: handleDragStart, onDragEnd: handleDragEnd, onDragOver: handleDragOver, onDragEnter: handleDragEnter, onDragLeave: handleDragLeave, onDrop: handleDrop, onClick: onClick, className: cn('flex w-full cursor-pointer items-center gap-2 rounded-lg px-3 py-1.5 text-left text-sm transition-colors', 'hover:bg-muted/80', node.ignored && 'opacity-50', isCut && 'opacity-40', isDragging && 'opacity-30', isDragOver && 'bg-primary/15 ring-primary/40 ring-1'), children: [getNodeIcon(node), _jsx("span", { className: cn('flex-1 truncate', gitStatus && gitStatusTextColor[gitStatus], !gitStatus &&
157
- node.name.startsWith('.') &&
158
- node.name !== '.kortix' &&
159
- 'opacity-50'), children: node.name }), (gitStatus ||
156
+ }, className: cn('bg-card focus:ring-primary/50 selection:bg-primary/15 selection:text-foreground h-7 w-full rounded-2xl border px-3 text-sm outline-none focus:ring-2', nameConflict && 'border-destructive focus:ring-destructive/30') }), nameConflict && (_jsx("p", { className: "text-destructive text-xs", children: tHardcodedUi.raw('featuresProjectFilesComponentsFileTreeItem.line229JsxTextAFileOrFolderWithThatNameAlready') }))] })] })) : (_jsxs("button", { draggable: !isRenaming, onDragStart: handleDragStart, onDragEnd: handleDragEnd, onDragOver: handleDragOver, onDragEnter: handleDragEnter, onDragLeave: handleDragLeave, onDrop: handleDrop, onClick: onClick, className: cn('flex w-full cursor-pointer items-center gap-2 rounded-lg px-3 py-1.5 text-left text-sm transition-colors', 'hover:bg-muted/80', node.ignored && 'opacity-50', isCut && 'opacity-40', isDragging && 'opacity-30', isDragOver && 'bg-primary/15 ring-primary/40 ring-1'), children: [getNodeIcon(node), _jsx("span", { className: cn('flex-1 truncate', gitStatus && gitStatusTextColor[gitStatus], !gitStatus && node.name.startsWith('.') && 'opacity-50'), children: node.name }), (gitStatus ||
160
157
  (diagnosticCounts && (diagnosticCounts.errors > 0 || diagnosticCounts.warnings > 0))) && (_jsxs("span", { className: "inline-flex shrink-0 items-center gap-1.5", children: [diagnosticCounts && diagnosticCounts.errors > 0 && (_jsxs("span", { className: "text-destructive inline-flex items-center gap-0.5", children: [_jsx(CircleAlert, { className: "h-3 w-3" }), _jsx("span", { className: "text-xs leading-none font-semibold", children: diagnosticCounts.errors })] })), diagnosticCounts && diagnosticCounts.warnings > 0 && (_jsxs("span", { className: "inline-flex items-center gap-0.5 text-yellow-500", children: [_jsx(AlertTriangle, { className: "h-3 w-3" }), _jsx("span", { className: "text-xs leading-none font-semibold", children: diagnosticCounts.warnings })] })), gitStatus && (_jsx("span", { className: cn('text-xs leading-none font-semibold', gitStatusBadgeColor[gitStatus]), children: gitStatusLabel[gitStatus] }))] })), node.type === 'directory' && (_jsx(ChevronRight, { className: "text-muted-foreground h-3.5 w-3.5 shrink-0" }))] }));
161
158
  if (!hasContextMenu) {
162
159
  return content;
@@ -0,0 +1,18 @@
1
+ /**
2
+ * Diagnostics a surface knows about a file that the LSP store does not: the
3
+ * repository view passes the server's `kortix.yaml` issues here, so the open
4
+ * manifest marks the flagged line and its card carries a warning mark.
5
+ *
6
+ * Outside a provider every file has none, so the viewer, its thumbnails and
7
+ * every other surface render exactly as before.
8
+ */
9
+ import { type ReactNode } from 'react';
10
+ import type { LspDiagnostic } from '../../internal/stores/diagnostics-store.js';
11
+ type DiagnosticsFor = (filePath: string) => LspDiagnostic[];
12
+ export declare function FileAnnotationsProvider({ diagnosticsFor, children, }: {
13
+ diagnosticsFor: DiagnosticsFor;
14
+ children: ReactNode;
15
+ }): import("react").JSX.Element;
16
+ /** The surface's diagnostics for one file. Stable while the provider and path are. */
17
+ export declare function useFileAnnotations(filePath: string | null | undefined): LspDiagnostic[];
18
+ export {};
@@ -0,0 +1,21 @@
1
+ 'use client';
2
+ import { jsx as _jsx } from "react/jsx-runtime";
3
+ /**
4
+ * Diagnostics a surface knows about a file that the LSP store does not: the
5
+ * repository view passes the server's `kortix.yaml` issues here, so the open
6
+ * manifest marks the flagged line and its card carries a warning mark.
7
+ *
8
+ * Outside a provider every file has none, so the viewer, its thumbnails and
9
+ * every other surface render exactly as before.
10
+ */
11
+ import { createContext, useContext, useMemo } from 'react';
12
+ const NONE = [];
13
+ const FileAnnotationsContext = createContext(() => NONE);
14
+ export function FileAnnotationsProvider({ diagnosticsFor, children, }) {
15
+ return _jsx(FileAnnotationsContext.Provider, { value: diagnosticsFor, children: children });
16
+ }
17
+ /** The surface's diagnostics for one file. Stable while the provider and path are. */
18
+ export function useFileAnnotations(filePath) {
19
+ const diagnosticsFor = useContext(FileAnnotationsContext);
20
+ return useMemo(() => (filePath ? diagnosticsFor(filePath) : NONE), [diagnosticsFor, filePath]);
21
+ }
@@ -13,7 +13,7 @@ import { cn } from '../../lib/utils.js';
13
13
  import { toSandboxAbsolutePath } from '@kortix/sdk';
14
14
  import { GitDiffIcon as FileDiff, FileXIcon as FileWarning, FileXIcon as FileX, } from '@phosphor-icons/react';
15
15
  import { lazy, Suspense, useCallback, useMemo, useState } from 'react';
16
- import { useReducedMotion } from 'motion/react';
16
+ import { useReducedMotion } from '../../internal/hooks/use-reduced-motion.js';
17
17
  import { Disclosure, DisclosureContent } from '../../primitives/disclosure.js';
18
18
  // Direct module import, not the feature barrel: the barrel re-exports THIS file.
19
19
  import { HtmlPreview } from './html-preview.js';
@@ -37,6 +37,7 @@ import { CodeSimpleIcon as Code2, EyeIcon as Eye } from '@phosphor-icons/react';
37
37
  import { useEffect, useState } from 'react';
38
38
  import { CloseButton, DetailSidebarToggle } from './viewer-chrome.js';
39
39
  import { PanelWidthButton, RefreshButton, ViewerActions, ViewerDownloadAction, ViewerPathPill, fileShareInput, } from './viewer-actions.js';
40
+ import { SESSION_BAR_CLASS } from '../../internal/layout/panel-chrome.js';
40
41
  function extensionOf(fileName) {
41
42
  const dot = fileName.lastIndexOf('.');
42
43
  return dot >= 0 ? fileName.slice(dot + 1).toLowerCase() : '';
@@ -86,7 +87,7 @@ export function FileViewer({ content, fileName, path, shareContext, onClose, ref
86
87
  const renders = html || svg || mermaid;
87
88
  const [view, setView] = useState('preview');
88
89
  const isMobile = useIsMobile();
89
- return (_jsxs("div", { className: cn('flex h-full min-h-0 min-w-0 flex-col', className), children: [_jsxs("div", { className: "flex shrink-0 items-center gap-1 border-b px-2.5 py-2", children: [_jsx(DetailSidebarToggle, { className: "size-7" }), _jsxs(ViewerPathPill, { icon: renders ? (_jsxs("span", { role: "radiogroup", className: "flex items-center gap-px", children: [_jsx(ViewSwitchButton, { active: view === 'preview', label: tI18nComplete.raw('text324b134f57c7'), onSelect: () => setView('preview'), children: _jsx(Eye, { className: "size-3.5" }) }), _jsx(ViewSwitchButton, { active: view === 'source', label: tI18nComplete.raw('text0e570ca6fabe'), onSelect: () => setView('source'), children: _jsx(Code2, { className: "size-3.5" }) })] })) : (getFileIcon(fileName, { className: 'size-4', variant: 'monochrome' })), path: path, fileName: fileName, children: [refresh && (_jsx(RefreshButton, { onRefresh: refresh.onRefresh, refreshing: refresh.refreshing })), _jsx(ViewerActions, { copy: {
90
+ return (_jsxs("div", { className: cn('flex h-full min-h-0 min-w-0 flex-col', className), children: [_jsxs("div", { className: cn(SESSION_BAR_CLASS, 'gap-1 px-2.5'), children: [_jsx(DetailSidebarToggle, { className: "size-7" }), _jsxs(ViewerPathPill, { icon: renders ? (_jsxs("span", { role: "radiogroup", className: "flex items-center gap-px", children: [_jsx(ViewSwitchButton, { active: view === 'preview', label: tI18nComplete.raw('text324b134f57c7'), onSelect: () => setView('preview'), children: _jsx(Eye, { className: "size-3.5" }) }), _jsx(ViewSwitchButton, { active: view === 'source', label: tI18nComplete.raw('text0e570ca6fabe'), onSelect: () => setView('source'), children: _jsx(Code2, { className: "size-3.5" }) })] })) : (getFileIcon(fileName, { className: 'size-4', variant: 'monochrome' })), path: path, fileName: fileName, children: [refresh && (_jsx(RefreshButton, { onRefresh: refresh.onRefresh, refreshing: refresh.refreshing })), _jsx(ViewerActions, { copy: {
90
91
  run: () => navigator.clipboard.writeText(content),
91
92
  ariaLabel: tI18nComplete.raw('textb3278e5f53cc'),
92
93
  }, shareContext: shareContext, shareInput: fileShareInput(path, fileName) })] }), _jsxs(ButtonGroup, { className: "shrink-0 *:size-8", children: [markdown && (_jsx(SaveAsPdfButton, { variant: "secondary", fileName: fileName, content: content, iconClassName: "size-3.5" })), _jsx(ViewerDownloadAction, { download: path ? { path, fileName } : undefined }), _jsx(PanelWidthButton, { isMobile: isMobile }), onClose && _jsx(CloseButton, { onClose: onClose })] })] }), _jsx("div", { className: cn('min-h-0 min-w-0 flex-1', renders && view === 'preview' ? 'overflow-hidden' : 'overflow-auto'), children: _jsx(FileBody, { content: content, fileName: fileName, path: path, html: html, svg: svg, mermaid: mermaid, markdown: markdown, view: view, reloadKey: reloadKey, onShowSource: () => setView('source') }) })] }));
@@ -10,6 +10,7 @@ export type { FileContentRendererProps } from './file-content-renderer.js';
10
10
  export { FilePreviewModal } from './file-preview-modal.js';
11
11
  export type { FilePreviewModalProps, FilePreviewState } from './file-preview-modal.js';
12
12
  export { FileSourceProvider, useFileSource } from './file-source.js';
13
+ export { FileAnnotationsProvider, useFileAnnotations } from './file-annotations.js';
13
14
  export type { BinaryBlobResult, FileContent, FileContentResult, FilePatch, FilePatchHunk, FileSource, } from './file-source.js';
14
15
  export { HTML_PREVIEW_IFRAME_CLASS, HtmlPreview } from './html-preview.js';
15
16
  export { PreviewFitProvider, isUsableIntrinsicSize } from './preview-fit.js';
@@ -8,6 +8,7 @@
8
8
  export { FileContentRenderer } from './file-content-renderer.js';
9
9
  export { FilePreviewModal } from './file-preview-modal.js';
10
10
  export { FileSourceProvider, useFileSource } from './file-source.js';
11
+ export { FileAnnotationsProvider, useFileAnnotations } from './file-annotations.js';
11
12
  export { HTML_PREVIEW_IFRAME_CLASS, HtmlPreview } from './html-preview.js';
12
13
  export { PreviewFitProvider, isUsableIntrinsicSize } from './preview-fit.js';
13
14
  export { SaveAsPdfButton } from './save-as-pdf-button.js';
@@ -8,6 +8,7 @@ import { isRuntimeStartingError } from '@kortix/sdk';
8
8
  import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
9
9
  import { useFileSource } from './file-source.js';
10
10
  import { useFileCaption } from '../../internal/stores/file-preview-store.js';
11
+ import { useFileAnnotations } from './file-annotations.js';
11
12
  import { getFileCategory, getLanguageFromExt } from './preview-policy.js';
12
13
  import { usePreviewFit } from './preview-fit.js';
13
14
  import { useContentRevision } from './use-content-revision.js';
@@ -127,7 +128,13 @@ export function useFileContentState({ filePath, onUnsavedChange, onSaved, readOn
127
128
  // LSP diagnostics for this file from the global diagnostics store
128
129
  // Uses suffix-matching because LSP stores absolute paths but we use relative paths
129
130
  const diagByFile = useDiagnosticsStore((s) => s.byFile);
130
- const fileDiagnostics = useMemo(() => findDiagnosticsForFile(diagByFile, filePath), [diagByFile, filePath]);
131
+ // Plus what the surface knows about this file (`FileAnnotationsProvider`):
132
+ // the repository view's kortix.yaml issues.
133
+ const annotations = useFileAnnotations(filePath);
134
+ const fileDiagnostics = useMemo(() => {
135
+ const lsp = findDiagnosticsForFile(diagByFile, filePath);
136
+ return annotations.length > 0 ? [...(lsp ?? []), ...annotations] : lsp;
137
+ }, [diagByFile, filePath, annotations]);
131
138
  const fileDiagErrorCount = useMemo(() => fileDiagnostics?.filter((d) => d.severity === 1).length ?? 0, [fileDiagnostics]);
132
139
  const fileDiagWarningCount = useMemo(() => fileDiagnostics?.filter((d) => d.severity === 2).length ?? 0, [fileDiagnostics]);
133
140
  // Binary blob for DOCX, video, audio, PPTX, XLSX — AND HEIC images.