@kortix/ui 0.15.1 → 0.15.2

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 (56) hide show
  1. package/dist/_vendor/shared/index.d.ts +0 -2
  2. package/dist/artifacts/artifact-frame.d.ts +0 -1
  3. package/dist/artifacts/artifact-frame.js +4 -10
  4. package/dist/artifacts/artifact-session.js +2 -6
  5. package/dist/artifacts/frame-policy.d.ts +1 -1
  6. package/dist/artifacts/frame-policy.js +2 -2
  7. package/dist/customize/sections/view/agent-editor-catalog.js +0 -5
  8. package/dist/customize/triggers/schedule/trigger-list.d.ts +2 -2
  9. package/dist/customize/triggers/schedule/trigger-list.js +12 -18
  10. package/dist/i18n/en.d.ts +8 -185
  11. package/dist/i18n/en.js +13 -190
  12. package/dist/internal/components/agent-mark.js +6 -0
  13. package/dist/internal/components/clickable-path.d.ts +3 -0
  14. package/dist/internal/components/clickable-path.js +4 -1
  15. package/dist/internal/lib/browser-noise/rules/injected-scripts.js +11 -0
  16. package/dist/internal/lib/trigger-clock.d.ts +5 -0
  17. package/dist/internal/lib/trigger-clock.js +15 -0
  18. package/dist/internal/lib/turn-broadcast.d.ts +0 -3
  19. package/dist/internal/lib/use-project-feature-flags.d.ts +2 -0
  20. package/dist/internal/lib/use-project-feature-flags.js +2 -4
  21. package/dist/internal/lib/web-notifications.d.ts +1 -8
  22. package/dist/internal/lib/web-notifications.js +12 -53
  23. package/dist/internal/notifications/notification-bell.d.ts +13 -33
  24. package/dist/internal/notifications/notification-bell.js +14 -117
  25. package/dist/internal/notifications/notification-inbox.d.ts +45 -0
  26. package/dist/internal/notifications/notification-inbox.js +119 -0
  27. package/dist/internal/notifications/notification-rows.d.ts +3 -4
  28. package/dist/internal/notifications/notification-rows.js +1 -4
  29. package/dist/internal/notifications/use-inbox-summary.d.ts +13 -0
  30. package/dist/internal/notifications/use-inbox-summary.js +22 -0
  31. package/dist/internal/notifications/web-push.d.ts +9 -10
  32. package/dist/internal/notifications/web-push.js +9 -10
  33. package/dist/internal/stores/web-notification-store.d.ts +6 -9
  34. package/dist/internal/stores/web-notification-store.js +0 -4
  35. package/dist/lib/routes.d.ts +8 -0
  36. package/dist/lib/routes.js +4 -1
  37. package/dist/markdown/doc-editor/doc-menus.d.ts +1 -10
  38. package/dist/markdown/doc-editor/doc-menus.js +6 -69
  39. package/dist/markdown/file-links.js +21 -0
  40. package/dist/primitives/button.d.ts +1 -1
  41. package/dist/session/header/reminder-parts.d.ts +1 -1
  42. package/dist/session/header/session-site-header.js +2 -6
  43. package/dist/session/panel/session-reminders-panel.js +4 -15
  44. package/dist/session/tool/tools/session-spawn-tool.js +7 -4
  45. package/dist/session/tool/tools/task-tool.js +18 -4
  46. package/dist/styles.css +1 -1
  47. package/dist/workspace/home/access-requests-bell.d.ts +6 -9
  48. package/dist/workspace/home/access-requests-bell.js +8 -10
  49. package/dist/workspace/layout/project-home.js +1 -2
  50. package/dist/workspace/sidebar/project-sidebar.js +2 -6
  51. package/package.json +11 -7
  52. package/skills/kortix-ui/references/custom-dashboard.md +1 -1
  53. package/dist/_vendor/shared/artifact-annotations.d.ts +0 -311
  54. package/dist/_vendor/shared/artifact-comments.d.ts +0 -155
  55. package/dist/internal/hooks/use-notification-center.d.ts +0 -50
  56. package/dist/internal/hooks/use-notification-center.js +0 -151
package/dist/i18n/en.js CHANGED
@@ -799,10 +799,6 @@ const catalog = {
799
799
  "name": "US Region",
800
800
  "description": "Run this project's new sessions in the US East region. A running session keeps its region until it restarts."
801
801
  },
802
- "notification_center": {
803
- "name": "Notification Center",
804
- "description": "Tell the people a session concerns (its prompter, its creator and its followers) through a bell inbox, browser push and email, and alert on failing triggers and loops. Off: only the session creator's phone gets a session push, and an account owner's phone gets one when a trigger starts failing."
805
- },
806
802
  "event_triggers": {
807
803
  "name": "Composio event triggers",
808
804
  "description": "Start an agent when something happens in a connected app: a new email, a pull request, a calendar event. Events come from Composio. Kortix also checks your connected apps itself."
@@ -815,10 +811,6 @@ const catalog = {
815
811
  "name": "Stateless sandboxes",
816
812
  "description": "Every session keeps only /workspace, on its own volume. A sandbox stopped for an hour is deleted, and the next open starts a new one with the same files and conversation. Programs that ran in the old sandbox are not running. Kortix enables it per project."
817
813
  },
818
- "artifacts": {
819
- "name": "Artifacts",
820
- "description": "Share docs (Markdown) and HTML pages (decks, dashboards, mockups, tools) from Files with the project, chosen people or anyone with a link. Docs edit in place, every save is a version from the Files history, and docs export to PDF. Adds the Artifacts page and `kortix artifacts`."
821
- },
822
814
  "email_channel": {
823
815
  "name": "Email channel",
824
816
  "description": "Give the agent an email inbox on Resend: inbound mail starts and continues sessions, and the agent reads, replies and sends from the inbox. Bring your own Resend API key and domain."
@@ -831,10 +823,6 @@ const catalog = {
831
823
  "name": "Session groups",
832
824
  "description": "Group the sidebar's sessions into named folders that everyone in the project shares, for example one per store or client. Move a session into a group from its menu or by dragging it; reorder and collapse the groups."
833
825
  },
834
- "artifact_comments": {
835
- "name": "Artifact comments",
836
- "description": "Discuss docs and pages in threads with people and agents. Requires Artifacts."
837
- },
838
826
  "chrome": {
839
827
  "name": "Kortix in Chrome",
840
828
  "description": "Let a session use your connected Chrome browser. You can take over or stop it at any time."
@@ -2144,8 +2132,7 @@ const catalog = {
2144
2132
  "automation_failed": "Failure alert",
2145
2133
  "automation_recovered": "Recovery alert",
2146
2134
  "capture_device_down": "Capture computer stopped",
2147
- "capture_device_recovered": "Capture computer recording again",
2148
- "artifact_comment": "Artifact comments"
2135
+ "capture_device_recovered": "Capture computer recording again"
2149
2136
  },
2150
2137
  "kindDescription": {
2151
2138
  "turn_done": "A turn ends.",
@@ -2156,33 +2143,37 @@ const catalog = {
2156
2143
  "automation_failed": "A trigger or a loop starts failing.",
2157
2144
  "automation_recovered": "A failing trigger or loop works again.",
2158
2145
  "capture_device_down": "A Kortix Capture computer is not recording. Sent to people who manage Capture.",
2159
- "capture_device_recovered": "A Kortix Capture computer that stopped records again.",
2160
- "artifact_comment": "Feedback, mentions, and replies on Artifacts you can view."
2146
+ "capture_device_recovered": "A Kortix Capture computer that stopped records again."
2161
2147
  },
2162
- "bell": {
2163
- "label": "Notifications",
2164
- "unreadLabel": "Notifications: {count} unread",
2148
+ "inbox": {
2149
+ "title": "Inbox",
2150
+ "description": "Updates about the sessions, triggers, and artifacts that concern you, from every project.",
2151
+ "unreadLabel": "Inbox: {count} unread",
2152
+ "unreadCount": "{count} unread",
2165
2153
  "markAllRead": "Mark all as read",
2166
2154
  "tabAll": "All",
2167
2155
  "tabNeedsYou": "Needs you",
2168
2156
  "tabDone": "Done",
2169
2157
  "emptyNeedsYou": "Nothing needs you right now",
2158
+ "emptyNeedsYouDescription": "Questions, permission requests and failures show up in this tab.",
2170
2159
  "empty": "Notifications will show up here",
2160
+ "emptyDescription": "Kortix notifies you when a session finishes, needs your answer or fails.",
2171
2161
  "loadError": "Could not load notifications",
2172
2162
  "retry": "Try again",
2173
2163
  "unread": "Unread",
2174
2164
  "promptPush": "Get notified when Kortix is closed",
2175
2165
  "promptBackground": "Get notified when Kortix is in the background",
2176
2166
  "turnOn": "Turn on",
2177
- "dismiss": "Dismiss"
2167
+ "dismiss": "Dismiss",
2168
+ "settings": "Notification settings",
2169
+ "emailOptIn": "Email is off for most kinds until you turn it on."
2178
2170
  },
2179
2171
  "arrival": {
2180
2172
  "inProject": "{kind} in {project}",
2181
2173
  "openSession": "Open session",
2182
2174
  "openReminders": "Open loops",
2183
2175
  "openTriggers": "Open triggers",
2184
- "openConversation": "Open conversation",
2185
- "openArtifact": "Open Artifact"
2176
+ "openConversation": "Open conversation"
2186
2177
  },
2187
2178
  "session": {
2188
2179
  "mute": "Mute notifications",
@@ -8245,7 +8236,6 @@ const catalog = {
8245
8236
  },
8246
8237
  "artifacts": {
8247
8238
  "title": "Artifacts",
8248
- "gateDescription": "Share docs and HTML pages from Files with your team or anyone with a link. Docs edit in place; every save is a version.",
8249
8239
  "type": {
8250
8240
  "doc": "Doc",
8251
8241
  "html": "HTML"
@@ -8268,7 +8258,6 @@ const catalog = {
8268
8258
  "moveFailed": "Could not move the artifact",
8269
8259
  "updated": "Updated {time}",
8270
8260
  "pinned": "Pinned",
8271
- "openComments": "{count, plural, one {# open comment} other {# open comments}}",
8272
8261
  "visibility": {
8273
8262
  "private": "Private",
8274
8263
  "project": "Project",
@@ -8367,143 +8356,6 @@ const catalog = {
8367
8356
  "close": "Close",
8368
8357
  "conflictReload": "Reload theirs",
8369
8358
  "conflictKeepMine": "Keep mine",
8370
- "discussion": {
8371
- "comments": "Comments",
8372
- "activity": "Activity",
8373
- "open": "Open",
8374
- "resolved": "Resolved",
8375
- "outdated": "Outdated",
8376
- "outdatedHint": "This passage cannot be located in the current document.",
8377
- "newComment": "New comment",
8378
- "annotationMode": "Pin a comment",
8379
- "annotationModeHint": "Click an element to pin a comment. Drag to mark a region.",
8380
- "annotationLoading": "Loading annotations…",
8381
- "annotationUnavailable": "Annotations are unavailable. Choose {refresh} in {actions} to try again.",
8382
- "commentLabel": "Comment",
8383
- "commentPlaceholder": "Leave feedback or mention someone…",
8384
- "replyLabel": "Reply",
8385
- "replyPlaceholder": "Write a reply…",
8386
- "postComment": "Comment",
8387
- "postReply": "Reply",
8388
- "saveEdit": "Save changes",
8389
- "cancel": "Cancel",
8390
- "edit": "Edit",
8391
- "delete": "Delete",
8392
- "deleteTitle": "Delete comment?",
8393
- "deleteDescription": "Its text is removed for everyone, and “Comment deleted” stays in its place. This cannot be undone.",
8394
- "commentDeleted": "Comment deleted",
8395
- "threadDeleted": "This thread was deleted.",
8396
- "resolve": "Resolve",
8397
- "reopen": "Reopen",
8398
- "edited": "Edited",
8399
- "commentActions": "Comment actions",
8400
- "focusThread": "Show passage",
8401
- "quoteLabel": "Selected passage",
8402
- "waitingForPerson": "Waiting for a person",
8403
- "deliveryFailed": "Could not send feedback to the agent.",
8404
- "sendFailed": "Could not send these comments. Try again.",
8405
- "retrySend": "Retry send ({count})",
8406
- "discardSend": "Discard and use latest comments",
8407
- "sendRetryHint": "The previous request may have completed. Retry it to confirm, or discard it before starting a new request.",
8408
- "sendBatchHint": "This batch contains {count} of {total} threads.",
8409
- "commentFailed": "Could not save your comment. Try again.",
8410
- "statusFailed": "Could not change this thread. Try again.",
8411
- "deleteFailed": "Could not delete this comment. Try again.",
8412
- "commentsLoadError": "Could not load comments.",
8413
- "contextLoadError": "Could not load comment permissions.",
8414
- "activityLoadError": "Could not load activity.",
8415
- "retry": "Try again",
8416
- "sendAgainTo": "Send again to {agent}",
8417
- "noComments": "No open comments",
8418
- "noCommentsHint": "Select a passage to comment on it, or start a new comment.",
8419
- "noResolved": "No resolved comments",
8420
- "noResolvedHint": "Resolved threads appear here.",
8421
- "noActivity": "No activity yet",
8422
- "noActivityHint": "Saves and comments appear here.",
8423
- "loadMore": "Load more",
8424
- "olderSaves": "Older saves may be unavailable in this history.",
8425
- "historicalReadOnly": "Comments on this version are read-only.",
8426
- "mentionPeople": "People",
8427
- "mentionAgents": "Agents",
8428
- "sourceSession": "Artifact session",
8429
- "composerKeys": "Enter to send · Shift+Enter for a new line",
8430
- "closeSelection": "Discard selected passage",
8431
- "preparingSelection": "Preparing selected passage…",
8432
- "selectionCaptureFailed": "Could not prepare the selected passage. Discard it to leave a comment on the whole artifact.",
8433
- "commentSelection": "Comment",
8434
- "selectionTooLong": "This passage is too long to comment on. Select {max} characters or fewer.",
8435
- "selectionUnavailable": "This passage cannot be anchored. Select another passage.",
8436
- "snapshotChanged": "The document changed. Reload it before commenting.",
8437
- "commentSaveFailed": "Could not save the document. Try again before commenting.",
8438
- "events": {
8439
- "saved": "saved a version",
8440
- "published": "published the artifact",
8441
- "renamed": "renamed the artifact",
8442
- "visibility_changed": "changed visibility",
8443
- "shared_with_changed": "changed who can view",
8444
- "restored": "restored a version",
8445
- "thread_opened": "opened a thread",
8446
- "replied": "replied to a thread",
8447
- "resolved": "resolved a thread",
8448
- "reopened": "reopened a thread",
8449
- "comment_deleted": "deleted a comment",
8450
- "sent_to_agent": "sent feedback to an agent"
8451
- },
8452
- "person": "Person",
8453
- "deleteRootDescription": "Its text is removed for everyone, and the thread leaves the comments list. This cannot be undone.",
8454
- "showPanel": "Show comments",
8455
- "hidePanel": "Hide comments",
8456
- "panelTitle": "Comments and activity",
8457
- "resizePanel": "Resize comments panel",
8458
- "unshareComments": "{count, plural, one {# comment will be deleted.} other {# comments will be deleted.}}",
8459
- "systemActor": "System",
8460
- "draw": "Draw feedback",
8461
- "drawPen": "Pen",
8462
- "drawArrow": "Arrow",
8463
- "drawRectangle": "Rectangle",
8464
- "drawBlack": "Black",
8465
- "drawRed": "Red",
8466
- "drawBlue": "Blue",
8467
- "drawUndo": "Undo stroke",
8468
- "drawPageChanged": "The page changed. Cancel and draw again.",
8469
- "drawLimit": "Drawing limit reached. Undo a stroke to continue.",
8470
- "openScreenshot": "Open screenshot",
8471
- "drawingScreenshot": "Feedback screenshot",
8472
- "screenshotReadFailed": "Could not load the screenshot.",
8473
- "screenshotMissing": "Screenshot unavailable. The drawing is saved.",
8474
- "screenshotCaptureFailed": "Could not capture a screenshot. Your comment will include the drawing without an image.",
8475
- "sendScreenshotLimit": "Could not send these comments. Their screenshots exceed the limit for one request. Send fewer threads with drawings.",
8476
- "agentsUnavailable": "Could not load agents.",
8477
- "showMore": "Show more",
8478
- "showLess": "Show less",
8479
- "moreReplies": "{count, plural, one {# more reply} other {# more replies}}",
8480
- "resolvedBy": "Resolved by {name}",
8481
- "agent": "Agent",
8482
- "threadResolved": "Thread resolved",
8483
- "undo": "Undo",
8484
- "agentPending": "Sending to agent…",
8485
- "agentSent": "Sent to agent",
8486
- "openSession": "Open session",
8487
- "notDelivered": "Not delivered",
8488
- "sendThreads": "{count, plural, one {Send # open thread to {agent}} other {Send # open threads to {agent}}}",
8489
- "chooseAgent": "Choose agent",
8490
- "sentToAgent": "Comments sent to {agent}",
8491
- "newCommentFrom": "New comment from {name}",
8492
- "newComments": "{count, plural, one {# new comment} other {# new comments}}",
8493
- "pagePinLabel": "Comment {number}",
8494
- "showPanelCount": "Show comments, {count} open",
8495
- "hidePanelCount": "Hide comments, {count} open",
8496
- "commentSelectionHint": "Comment on the selection",
8497
- "threadReopened": "Thread reopened",
8498
- "noCommentsReadOnlyHint": "Comments on this artifact appear here.",
8499
- "commentTooLong": "A comment can be up to {max} characters. Remove {over}.",
8500
- "discardDrawingTitle": "Discard this drawing?",
8501
- "discardDrawingHint": "Your strokes are not saved. This cannot be undone.",
8502
- "discardDrawing": "Discard",
8503
- "keepDrawing": "Keep drawing",
8504
- "activityLine": "<name>{actor}</name> <action>{verb}</action>",
8505
- "activityLabel": "{actor} {verb}"
8506
- },
8507
8359
  "insertMedia": "Image or video…",
8508
8360
  "diagram": "Diagram",
8509
8361
  "blockMenu": "Blocks",
@@ -8528,35 +8380,6 @@ const catalog = {
8528
8380
  "embedDelete": "Delete",
8529
8381
  "spaceEmpty": "No artifacts in {space} yet",
8530
8382
  "showAll": "Show all",
8531
- "live": {
8532
- "here": "Here now",
8533
- "hereLabel": "On this artifact now: {names}",
8534
- "reconnecting": "Reconnecting…",
8535
- "you": "You",
8536
- "agents": "Agents",
8537
- "agentsHere": "Agents in this thread",
8538
- "status": {
8539
- "viewing": "Viewing",
8540
- "reading": "Reading",
8541
- "editing": "Editing",
8542
- "writing": "Writing"
8543
- },
8544
- "hideCursor": "Hide my cursor",
8545
- "hideCursorHint": "Others still see your avatar.",
8546
- "typingOne": "{name} is typing…",
8547
- "typingTwo": "{first} and {second} are typing…",
8548
- "typingMany": "{count, plural, one {# person is typing…} other {# people are typing…}}",
8549
- "writing": "{name} is writing…"
8550
- },
8551
- "coedit": {
8552
- "offLarge": "Live co-editing is off: this doc is too large. Changes save as you type.",
8553
- "offLineEndings": "Live co-editing is off: this doc mixes two kinds of line breaks. Changes save as you type.",
8554
- "offShape": "Live co-editing is off: the editor cannot keep part of this doc exactly as written. Changes save as you type.",
8555
- "stoppedLarge": "Live co-editing stopped: one change was too large to share. Changes save as you type.",
8556
- "stoppedFailed": "Live co-editing stopped: the connection failed. Changes save as you type.",
8557
- "stoppedHistory": "Live co-editing stopped: this doc's edit history is too large. Changes save as you type.",
8558
- "offFailed": "Live co-editing is off: it could not connect. Changes save as you type."
8559
- },
8560
8383
  "conflictTitle": "Someone else changed this doc",
8561
8384
  "conflictReloadTitle": "Reload the newer version?",
8562
8385
  "conflictReloadHint": "Your edits since the last save are discarded. This cannot be undone.",
@@ -59,6 +59,12 @@ export function AgentMark({ slug, size = 14, tile = TILE[size], label, className
59
59
  export function agentDisplayName(slug) {
60
60
  if (isMyKortixAgentName(slug))
61
61
  return MY_KORTIX_DISPLAY_NAME;
62
+ // Model tool input and event data reach this through `as string` casts, so the
63
+ // slug is `unknown` at runtime. A truthy non-string degrades to its string
64
+ // form instead of crashing the render tree (KRTX-4511: `e.replace is not a
65
+ // function` took down the session page).
66
+ if (typeof slug !== 'string')
67
+ return String(slug);
62
68
  const words = slug.replace(/[-_]+/g, ' ').trim();
63
69
  return words.charAt(0).toUpperCase() + words.slice(1);
64
70
  }
@@ -15,6 +15,9 @@ import React from 'react';
15
15
  * A path that resolves but doesn't exist is not this function's problem — the
16
16
  * viewer reports "couldn't be opened", the same as any dead absolute path, and
17
17
  * that beats refusing to try.
18
+ *
19
+ * A session drive path (`/drives/me/…`) is outside /workspace and stays as it
20
+ * is: the file client reads it through the drive API (`session-drive-files`).
18
21
  */
19
22
  export declare function resolveOpenablePath(filePath: string): string | null;
20
23
  interface ClickablePathProps {
@@ -24,12 +24,15 @@ import React, { useCallback, useMemo } from 'react';
24
24
  * A path that resolves but doesn't exist is not this function's problem — the
25
25
  * viewer reports "couldn't be opened", the same as any dead absolute path, and
26
26
  * that beats refusing to try.
27
+ *
28
+ * A session drive path (`/drives/me/…`) is outside /workspace and stays as it
29
+ * is: the file client reads it through the drive API (`session-drive-files`).
27
30
  */
28
31
  export function resolveOpenablePath(filePath) {
29
32
  const trimmed = filePath.trim();
30
33
  if (!trimmed)
31
34
  return null;
32
- return toSandboxAbsolutePath(trimmed);
35
+ return trimmed.startsWith('/drives/') ? trimmed : toSandboxAbsolutePath(trimmed);
33
36
  }
34
37
  export function ClickablePath({ filePath, children, lineNumber, column, className, variant = 'inline', }) {
35
38
  const openPreview = useFilePreviewStore((s) => s.openPreview);
@@ -259,4 +259,15 @@ export const INJECTED_SCRIPT_RULES = [
259
259
  { id: 'googletag-undefined', appliesTo: 'both', match: isGoogletagUndefinedNoise },
260
260
  { id: 'redeclared-injected-identifier', appliesTo: 'both', match: isRedeclaredInjectedIdentifierNoise },
261
261
  { id: 'vercel-live-feedback', appliesTo: 'both', match: isVercelLiveFeedbackNoise },
262
+ {
263
+ // KRTX-4387: an injected `tracking_script.js` (no Kortix code, GTM tag or
264
+ // vendor loads it) asks Closure's jsloader for the gapi client. The CSP
265
+ // blocks apis.google.com and the loader throws `CustomError`. Require the
266
+ // exact message and the injected frame; keep any first-party frame.
267
+ id: 'injected-gapi-jsloader',
268
+ appliesTo: 'sentry',
269
+ match: ({ message, frames }) => /^Jsloader error \(code #\d+\): Error while loading script https:\/\/apis\.google\.com\//.test(normalizeString(message)) &&
270
+ !frames.some((frame) => isFirstPartyResolvedSource(frame.filename)) &&
271
+ frames.some((frame) => frame.filename === 'app:///tracking_script.js'),
272
+ },
262
273
  ];
@@ -40,3 +40,8 @@ export declare const CLOCK_TONE: {
40
40
  };
41
41
  /** "2d ago", "9h ago", "3w ago" in the viewer's locale, or "Never run". */
42
42
  export declare function lastRunLabel(trigger: Pick<ProjectTrigger, 'last_fired_at' | 'event'>, t: UiTranslator, locale: string, now?: number): string;
43
+ /**
44
+ * A future run in whole minutes, hours or days, worded by `rtf`: "in 25m"
45
+ * (narrow), "in 25 minutes" (long). A past time reads as now; "—" with no time.
46
+ */
47
+ export declare function nextRunIn(iso: string | null, rtf: Intl.RelativeTimeFormat, now?: number): string;
@@ -32,3 +32,18 @@ export function lastRunLabel(trigger, t, locale, now = Date.now()) {
32
32
  return rtf.format(-Math.floor(min / (24 * 60)), 'day');
33
33
  return rtf.format(-Math.floor(min / (7 * 24 * 60)), 'week');
34
34
  }
35
+ /**
36
+ * A future run in whole minutes, hours or days, worded by `rtf`: "in 25m"
37
+ * (narrow), "in 25 minutes" (long). A past time reads as now; "—" with no time.
38
+ */
39
+ export function nextRunIn(iso, rtf, now = Date.now()) {
40
+ const at = iso ? Date.parse(iso) : Number.NaN;
41
+ if (!Number.isFinite(at))
42
+ return '—';
43
+ const min = Math.max(0, Math.round((at - now) / 60_000));
44
+ if (min < 60)
45
+ return rtf.format(min, 'minute');
46
+ if (min < 24 * 60)
47
+ return rtf.format(Math.round(min / 60), 'hour');
48
+ return rtf.format(Math.round(min / (24 * 60)), 'day');
49
+ }
@@ -19,9 +19,6 @@ export interface TurnCompleteMsg {
19
19
  /** Project the session belongs to, captured on the publishing tab's URL —
20
20
  * a receiving tab may be on a page where the project is not in the path. */
21
21
  projectId?: string | null;
22
- /** That project's `notification_center` flag in the publishing tab's cache.
23
- * A receiving tab often never loaded the project. Absent: no answer. */
24
- notificationCenter?: boolean;
25
22
  at: number;
26
23
  }
27
24
  export declare function noteTurnCompleteShown(sessionId: string, at?: number): void;
@@ -17,6 +17,8 @@ import type { FeatureFlagKey } from '@kortix/sdk';
17
17
  * The map is `Partial` because `FeatureFlagKey` still carries deprecated
18
18
  * graduated keys that the API no longer serves; they have no member here, and
19
19
  * `requiresFlag` may only name a served key (pinned by the same test).
20
+ * `volumes`, `drives` and `artifacts` graduated but are still served: each
21
+ * reads whether the platform stores Files (Platinum).
20
22
  *
21
23
  * Fail-closed: every member is `false` until the project detail resolves.
22
24
  */
@@ -17,6 +17,8 @@ import { useFeatureFlag } from '@kortix/sdk/react';
17
17
  * The map is `Partial` because `FeatureFlagKey` still carries deprecated
18
18
  * graduated keys that the API no longer serves; they have no member here, and
19
19
  * `requiresFlag` may only name a served key (pinned by the same test).
20
+ * `volumes`, `drives` and `artifacts` graduated but are still served: each
21
+ * reads whether the platform stores Files (Platinum).
20
22
  *
21
23
  * Fail-closed: every member is `false` until the project detail resolves.
22
24
  */
@@ -27,7 +29,6 @@ export function useProjectFeatureFlags(projectId) {
27
29
  const pooledProviderSecrets = useFeatureFlag(projectId, 'pooled_provider_secrets');
28
30
  const usRegion = useFeatureFlag(projectId, 'us_region');
29
31
  const eventTriggers = useFeatureFlag(projectId, 'event_triggers');
30
- const notificationCenter = useFeatureFlag(projectId, 'notification_center');
31
32
  const volumes = useFeatureFlag(projectId, 'volumes');
32
33
  const drives = useFeatureFlag(projectId, 'drives');
33
34
  const sessionLog = useFeatureFlag(projectId, 'session_log');
@@ -35,7 +36,6 @@ export function useProjectFeatureFlags(projectId) {
35
36
  const sharedDrives = useFeatureFlag(projectId, 'shared_drives');
36
37
  const goals = useFeatureFlag(projectId, 'goals');
37
38
  const artifacts = useFeatureFlag(projectId, 'artifacts');
38
- const artifactComments = useFeatureFlag(projectId, 'artifact_comments');
39
39
  const emailChannel = useFeatureFlag(projectId, 'email_channel');
40
40
  const workspaceVolume = useFeatureFlag(projectId, 'workspace_volume');
41
41
  const sessionGroups = useFeatureFlag(projectId, 'session_groups');
@@ -53,7 +53,6 @@ export function useProjectFeatureFlags(projectId) {
53
53
  pooled_provider_secrets: pooledProviderSecrets.enabled,
54
54
  us_region: usRegion.enabled,
55
55
  event_triggers: eventTriggers.enabled,
56
- notification_center: notificationCenter.enabled,
57
56
  volumes: volumes.enabled,
58
57
  drives: drives.enabled,
59
58
  session_log: sessionLog.enabled,
@@ -61,7 +60,6 @@ export function useProjectFeatureFlags(projectId) {
61
60
  shared_drives: sharedDrives.enabled,
62
61
  goals: goals.enabled,
63
62
  artifacts: artifacts.enabled,
64
- artifact_comments: artifactComments.enabled,
65
63
  email_channel: emailChannel.enabled,
66
64
  workspace_volume: workspaceVolume.enabled,
67
65
  session_groups: sessionGroups.enabled,
@@ -50,13 +50,6 @@ export interface WebNotificationPayload {
50
50
  };
51
51
  /** Localized "{count} tasks finished" for the stack several turns collapse into. */
52
52
  stackTitle?: (count: number) => string;
53
- /** A row of the notification inbox. Inbox rows exist only for projects with `notification_center` on. */
54
- fromInbox?: boolean;
55
- /**
56
- * The project's `notification_center` flag as the tab that raised the event
57
- * knew it (a relayed completion). Absent: this tab's query cache decides.
58
- */
59
- notificationCenter?: boolean;
60
53
  }
61
54
  export declare function setServerPushPreferences(kinds: NotificationPreferences['kinds'] | null | undefined): void;
62
55
  /**
@@ -191,7 +184,7 @@ extra?: {
191
184
  * shape the broadcast receiver runs so a relayed completion cannot re-broadcast
192
185
  * and loop. It takes the relayed message whole, so no field gets lost.
193
186
  */
194
- export declare function notifyTaskCompleteFor({ sessionId, sessionTitle, projectId, notificationCenter }: Omit<TurnCompleteMsg, 'at'>, tI18nComplete: UiTranslator): void;
187
+ export declare function notifyTaskCompleteFor({ sessionId, sessionTitle, projectId }: Omit<TurnCompleteMsg, 'at'>, tI18nComplete: UiTranslator): void;
195
188
  /**
196
189
  * Notify that a session encountered an error.
197
190
  */
@@ -14,21 +14,17 @@ import { createElement } from 'react';
14
14
  * 1. Browser support for the Notification API
15
15
  * 2. Permission is granted
16
16
  * 3. Master enable toggle is on
17
- * 4. The kind: for a notification-center payload (an inbox row, or a
18
- * session of a project with `notification_center` on), the person's
19
- * server-side Push choice; otherwise the per-browser kind switch
17
+ * 4. The kind: the person's server-side Push choice for it
20
18
  * 5. Optionally skips if tab is visible (onlyWhenHidden preference)
21
19
  *
22
20
  * Every OS notification carries the tag of the Web Push message for the same
23
21
  * event: `<type>:<sessionId>`, or `<type>:<projectId>:<triggerSlug>` for an
24
22
  * alert (`notificationTag`). Only two service-worker notifications with one
25
23
  * tag replace each other: a `new Notification` never replaces one. So while
26
- * this browser holds a Web Push subscription, the service worker shows a
27
- * notification-center payload's copy too, and whichever copy arrives second
28
- * replaces the first. Any other payload stays a `new Notification`, as before
29
- * the notification center (KRTX-1742).
24
+ * this browser holds a Web Push subscription, the service worker shows this
25
+ * page's copy too, and whichever copy arrives second replaces the first
26
+ * (KRTX-1742).
30
27
  */
31
- import { cachedNotificationCenter, cachedNotificationCenterAnswer, } from '../hooks/use-notification-center.js';
32
28
  import { hasWebPushSubscription } from '../notifications/web-push.js';
33
29
  import { customToast, dismissToast, ToastCard, toastIcon, errorToast, infoToast, successToast, warningToast, } from '../../primitives/toast.js';
34
30
  import { ClockIcon, GitPullRequestIcon } from '@phosphor-icons/react';
@@ -75,27 +71,6 @@ export function setServerPushPreferences(kinds) {
75
71
  function serverPushAllows(type) {
76
72
  return serverPush[TYPE_TO_KIND[type]] !== false;
77
73
  }
78
- /**
79
- * The per-browser switch of each session kind: the kind gate for a payload of
80
- * a project with `notification_center` off. The other kinds come only from
81
- * the inbox.
82
- */
83
- const TYPE_TO_PREF = {
84
- completion: 'onCompletion',
85
- error: 'onError',
86
- question: 'onQuestion',
87
- permission: 'onPermission',
88
- };
89
- /**
90
- * An inbox row, or a session of a project with `notification_center` on: by
91
- * the raising tab's answer, else by this tab's cached detail or project list.
92
- * Fail-closed: no project id or nothing cached takes the path from before
93
- * the notification center.
94
- */
95
- function fromNotificationCenter(payload) {
96
- return (payload.fromInbox === true ||
97
- (payload.notificationCenter ?? cachedNotificationCenter(getSharedQueryClient(), payload.projectId)));
98
- }
99
74
  /** Map notification types to sound events */
100
75
  const TYPE_TO_SOUND = {
101
76
  completion: 'completion',
@@ -318,7 +293,6 @@ export function sendWebNotification(payload,
318
293
  /** Skip all preference/permission gates (used for test notifications) */
319
294
  force = false) {
320
295
  const { preferences } = useWebNotificationStore.getState();
321
- const notificationCenter = fromNotificationCenter(payload);
322
296
  // `force` (the settings test button) never counts as on screen, focused or
323
297
  // another project: it exists to prove the channels work.
324
298
  const { sessionId } = payload;
@@ -357,16 +331,9 @@ force = false) {
357
331
  // Preferences check
358
332
  if (!preferences.enabled)
359
333
  return null;
360
- // Kind check: the person's Push choice, or this browser's switch.
361
- if (notificationCenter) {
362
- if (!serverPushAllows(payload.type))
363
- return null;
364
- }
365
- else {
366
- const prefKey = TYPE_TO_PREF[payload.type];
367
- if (prefKey && !preferences[prefKey])
368
- return null;
369
- }
334
+ // Kind check: the person's Push choice, the same one the phone obeys.
335
+ if (!serverPushAllows(payload.type))
336
+ return null;
370
337
  // On-screen and other-project check: see `notificationChannels`.
371
338
  if (!channels.os)
372
339
  return null;
@@ -378,9 +345,8 @@ force = false) {
378
345
  }
379
346
  // With Web Push on, the service worker also shows this event's push, and a
380
347
  // `new Notification` would never replace it: hand this copy to the worker.
381
- // `force` (the settings test button) keeps the in-page notification. A
382
- // project with the flag off gets no push, so its copy stays in the page.
383
- if (!force && notificationCenter && hasWebPushSubscription() && 'serviceWorker' in navigator) {
348
+ // `force` (the settings test button) keeps the in-page notification.
349
+ if (!force && hasWebPushSubscription() && 'serviceWorker' in navigator) {
384
350
  void showWorkerNotification(payload);
385
351
  return null;
386
352
  }
@@ -730,15 +696,9 @@ extra) {
730
696
  if (since !== undefined && turnCompleteShownSince(sessionId, since))
731
697
  return;
732
698
  // Resolved here and relayed whole: a receiving tab may be on a page whose
733
- // path holds no project id, and may never have loaded the project's
734
- // `notification_center` flag.
699
+ // path holds no project id.
735
700
  const projectId = extra?.projectId ?? currentProjectId();
736
- const msg = {
737
- sessionId,
738
- sessionTitle,
739
- projectId,
740
- notificationCenter: cachedNotificationCenterAnswer(getSharedQueryClient(), projectId),
741
- };
701
+ const msg = { sessionId, sessionTitle, projectId };
742
702
  broadcastTurnComplete(msg);
743
703
  notifyTaskCompleteFor(msg, tI18nComplete);
744
704
  }
@@ -747,7 +707,7 @@ extra) {
747
707
  * shape the broadcast receiver runs so a relayed completion cannot re-broadcast
748
708
  * and loop. It takes the relayed message whole, so no field gets lost.
749
709
  */
750
- export function notifyTaskCompleteFor({ sessionId, sessionTitle, projectId, notificationCenter }, tI18nComplete) {
710
+ export function notifyTaskCompleteFor({ sessionId, sessionTitle, projectId }, tI18nComplete) {
751
711
  noteTurnCompleteShown(sessionId);
752
712
  // On a channel or DM page the turn is a thread: it says "thread" and opens
753
713
  // in the page's panel. A default title ("New session - <time>") names nothing.
@@ -775,7 +735,6 @@ export function notifyTaskCompleteFor({ sessionId, sessionTitle, projectId, noti
775
735
  // page — reinterpreting it as THIS tab's project would build a wrong
776
736
  // deep link (the same rule the click-time path documents above).
777
737
  projectId,
778
- notificationCenter,
779
738
  };
780
739
  if (!projectId) {
781
740
  sendWebNotification(payload);