@atlaskit/rovo-triggers 5.34.0 → 5.35.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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,37 @@
1
1
  # @atlaskit/rovo-triggers
2
2
 
3
+ ## 5.35.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [`f24d781a1e620`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/f24d781a1e620) -
8
+ Create hierarchical menu for spaces in fullscreen side nav with dummy data
9
+
10
+ ## 5.34.1
11
+
12
+ ### Patch Changes
13
+
14
+ - [`5844c8aac60ea`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/5844c8aac60ea) -
15
+ Added proactive connector recommendation banner to Rovo Chat for Confluence page view mode.
16
+
17
+ When a user adds a Confluence page as context in Rovo Chat, and that page contains Smart Links to
18
+ unconnected third-party apps (e.g. GitHub, Google Drive), a non-intrusive banner is shown inside
19
+ the context banner prompting the user to connect the relevant app.
20
+
21
+ Changes:
22
+ - `@confluence/content-smartlinks`: Added `RovoSmartLinksContextPublisher` — a subscription-driven
23
+ component that fetches SmartLink URLs via direct GraphQL (bypassing Apollo cache) and publishes
24
+ connector context. Scoped to view mode only; edit mode and Live page support deferred to
25
+ follow-up.
26
+ - `@atlaskit/rovo-triggers`: Added `SmartlinksSubscriptionChangedPayload` and
27
+ `SmartlinksContextPayload` types with `openChat: false` enforced to prevent chat from reopening.
28
+ - `@atlassian/conversation-assistant-store`: Added `pageSmartLinks` state, `setPageSmartLinks`
29
+ action, and `useChatContextPageSmartLinks` selector. `ChatContextSubscriber` now handles
30
+ `smartlinks-context-payload` events.
31
+ - `@atlassian/conversation-assistant-chat-prompt-input`: Added `useSmartLinkConnectionTip` hook
32
+ and `SmartLinkContextBanner` component. Banner renders inside the shared context banner wrapper
33
+ with CSS slide-in animation and uses `useAppOAuth` for the connect flow.
34
+
3
35
  ## 5.34.0
4
36
 
5
37
  ### Minor Changes
package/compass.yml ADDED
@@ -0,0 +1,36 @@
1
+ configVersion: 1
2
+ id: 'ari:cloud:compass:a436116f-02ce-4520-8fbb-7301462a1674:component/c5751cc6-3513-4070-9deb-af31e86aed34/ca5b6629-85fe-442c-8946-01fc4e33a3d4'
3
+ name: platform/conversation-assistant
4
+ description: rovo-chat-fe
5
+ ownerId: 'ari:cloud:identity::team/14c97034-d86b-45c9-8a6e-872e0cbbd69b'
6
+ typeId: OTHER
7
+ fields:
8
+ tier: 3
9
+ lifecycle: Active
10
+ labels:
11
+ - ai-mate
12
+ - rovo-chat-fe
13
+ - conversation-assistant
14
+ customFields:
15
+ - name: Department
16
+ type: text
17
+ value: Eng - Rovo Chat
18
+ - name: Required Reviewers Opt In
19
+ type: boolean
20
+ value: true
21
+ - name: Reviewer Selection Mechanism
22
+ type: text
23
+ value: random(4)
24
+ - name: Required Reviewer Approvals
25
+ type: number
26
+ value: 1
27
+ links:
28
+ - name: Root Repository
29
+ type: REPOSITORY
30
+ url: https://bitbucket.org/atlassian/atlassian-frontend-monorepo/src/master
31
+ - name: Where to log bugs with template
32
+ type: PROJECT
33
+ url: 'https://product-fabric.atlassian.net/jira/software/projects/ROVOFE/boards/5135'
34
+ - name: Slack Channel
35
+ type: CHAT_CHANNEL
36
+ url: 'https://atlassian.enterprise.slack.com/archives/C0677M19GU9'
package/dist/cjs/main.js CHANGED
@@ -10,7 +10,12 @@ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/de
10
10
  var _react = require("react");
11
11
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
12
12
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
13
- var ignoredTriggerLatestEvents = new Set(['editor-context-payload', 'agent-changed']);
13
+ var ignoredTriggerLatestEvents = new Set(['editor-context-payload', 'agent-changed',
14
+ // Internal signals that must never overwrite the publish queue — they would
15
+ // cause `triggerLatest` subscribers (e.g. PubSubListener) to replay them
16
+ // instead of the real action event (e.g. open-browse-agent-modal) that
17
+ // originally opened the chat.
18
+ 'smartlinks-subscription-changed', 'smartlinks-context-payload']);
14
19
  var createPubSub = function createPubSub() {
15
20
  var subscribedEvents = {};
16
21
  var publishQueue = {};
package/dist/cjs/types.js CHANGED
@@ -54,4 +54,6 @@ var Topics = exports.Topics = {
54
54
  */
55
55
 
56
56
  // Not using PayloadCore because `data: type | undefined` is necessary
57
- // but `| undefined` will cause `data` to be removed by PayloadCore
57
+ // but `| undefined` will cause `data` to be removed by PayloadCore
58
+
59
+ /** Published by the consumer hook to notify the publisher whether it should fetch SmartLinks. */
@@ -1,5 +1,10 @@
1
1
  import { useCallback, useEffect, useLayoutEffect, useRef } from 'react';
2
- const ignoredTriggerLatestEvents = new Set(['editor-context-payload', 'agent-changed']);
2
+ const ignoredTriggerLatestEvents = new Set(['editor-context-payload', 'agent-changed',
3
+ // Internal signals that must never overwrite the publish queue — they would
4
+ // cause `triggerLatest` subscribers (e.g. PubSubListener) to replay them
5
+ // instead of the real action event (e.g. open-browse-agent-modal) that
6
+ // originally opened the chat.
7
+ 'smartlinks-subscription-changed', 'smartlinks-context-payload']);
3
8
  const createPubSub = () => {
4
9
  let subscribedEvents = {};
5
10
  let publishQueue = {};
@@ -48,4 +48,6 @@ export const Topics = {
48
48
  */
49
49
 
50
50
  // Not using PayloadCore because `data: type | undefined` is necessary
51
- // but `| undefined` will cause `data` to be removed by PayloadCore
51
+ // but `| undefined` will cause `data` to be removed by PayloadCore
52
+
53
+ /** Published by the consumer hook to notify the publisher whether it should fetch SmartLinks. */
package/dist/esm/main.js CHANGED
@@ -3,7 +3,12 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
3
3
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
4
4
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
5
5
  import { useCallback, useEffect, useLayoutEffect, useRef } from 'react';
6
- var ignoredTriggerLatestEvents = new Set(['editor-context-payload', 'agent-changed']);
6
+ var ignoredTriggerLatestEvents = new Set(['editor-context-payload', 'agent-changed',
7
+ // Internal signals that must never overwrite the publish queue — they would
8
+ // cause `triggerLatest` subscribers (e.g. PubSubListener) to replay them
9
+ // instead of the real action event (e.g. open-browse-agent-modal) that
10
+ // originally opened the chat.
11
+ 'smartlinks-subscription-changed', 'smartlinks-context-payload']);
7
12
  var createPubSub = function createPubSub() {
8
13
  var subscribedEvents = {};
9
14
  var publishQueue = {};
package/dist/esm/types.js CHANGED
@@ -48,4 +48,6 @@ export var Topics = {
48
48
  */
49
49
 
50
50
  // Not using PayloadCore because `data: type | undefined` is necessary
51
- // but `| undefined` will cause `data` to be removed by PayloadCore
51
+ // but `| undefined` will cause `data` to be removed by PayloadCore
52
+
53
+ /** Published by the consumer hook to notify the publisher whether it should fetch SmartLinks. */
@@ -95,8 +95,8 @@ export type EditorContextPayloadData = {
95
95
  startIndex?: number;
96
96
  endIndex?: number;
97
97
  fragmentAdf?: string;
98
- fullAdf?: any;
99
98
  };
99
+ dynamicUiType?: string;
100
100
  isViewMode?: boolean;
101
101
  useGenericEditorSkill?: boolean;
102
102
  additionalContext?: Record<string, unknown>;
@@ -374,6 +374,8 @@ export type OpenChatFeedbackModalPayload = PayloadCore<'open-chat-feedback-modal
374
374
  answerQuality: 'good' | 'bad' | 'general';
375
375
  }>;
376
376
  export type SmartLinksContextPayload = PayloadCore<'smartlinks-context-payload'> & {
377
+ /** Never opens chat — internal signal only. */
378
+ openChat: false;
377
379
  data?: Array<{
378
380
  /**
379
381
  * ORS auth key from meta.auth[0].key (e.g. 'gdrive', 'notion', 'miro').
@@ -385,7 +387,20 @@ export type SmartLinksContextPayload = PayloadCore<'smartlinks-context-payload'>
385
387
  count: number;
386
388
  }>;
387
389
  };
388
- export type Payload = MessageSendPayload | ChatClosePayload | SmartCreationModalOpenPayload | ChatNewPayload | ChatDraftPayload | EditorContextPayload | ChatOpenPayload | OpenBrowseAgentPayload | OpenBrowseAgentSidebarPayload | EditorSuggestionPayload | EditorAgentChangedPayload | BrowserContextPayload | WhiteboardContextPayload | JiraCreateContextPayload | DatabaseContextPayload | ForgeAppAuthSuccess | ForgeAppAuthFailure | JiraWorkflowWizardActionsPayload | InsertPromptPayload | DashboardInsightsActionsPayload | SetChatContextPayload | InsertUrlsPayload | SelectActionPayload | AddChartToDashboardPayload | GenericExternalActionErrorPayload | OpenChatDebugModalPayload | OpenChatFeedbackModalPayload | JsmJourneyBuilderActionsPayload | StudioAutomationBuildUpdatePayload | SolutionArchitectHandoffPayload | SolutionPlanStateUpdatePayload | SolutionDraftAgentUpdatePayload | SolutionArchitectAgentActivationPayload | UpdateAgentConfigurationPayload | StudioLandingPageRedirectPayload | UploadAndInsertMediaPayload | SmartLinksContextPayload;
390
+ /** Published by the consumer hook to notify the publisher whether it should fetch SmartLinks. */
391
+ export type SpaceSelectedPayload = PayloadCore<'space-selected', {
392
+ spaceId: string;
393
+ title: string;
394
+ emoji: string;
395
+ description?: string;
396
+ }>;
397
+ export type SpaceDeselectedPayload = PayloadCore<'space-deselected'>;
398
+ export type SmartlinksSubscriptionChangedPayload = PayloadCore<'smartlinks-subscription-changed'> & {
399
+ /** Never opens chat — internal signal only. */
400
+ openChat: false;
401
+ isActive: boolean;
402
+ };
403
+ export type Payload = MessageSendPayload | ChatClosePayload | SmartCreationModalOpenPayload | ChatNewPayload | ChatDraftPayload | EditorContextPayload | ChatOpenPayload | OpenBrowseAgentPayload | SmartlinksSubscriptionChangedPayload | OpenBrowseAgentSidebarPayload | EditorSuggestionPayload | EditorAgentChangedPayload | BrowserContextPayload | WhiteboardContextPayload | JiraCreateContextPayload | DatabaseContextPayload | ForgeAppAuthSuccess | ForgeAppAuthFailure | JiraWorkflowWizardActionsPayload | InsertPromptPayload | DashboardInsightsActionsPayload | SetChatContextPayload | InsertUrlsPayload | SelectActionPayload | AddChartToDashboardPayload | GenericExternalActionErrorPayload | OpenChatDebugModalPayload | OpenChatFeedbackModalPayload | JsmJourneyBuilderActionsPayload | StudioAutomationBuildUpdatePayload | SolutionArchitectHandoffPayload | SolutionPlanStateUpdatePayload | SolutionDraftAgentUpdatePayload | SolutionArchitectAgentActivationPayload | UpdateAgentConfigurationPayload | StudioLandingPageRedirectPayload | UploadAndInsertMediaPayload | SmartLinksContextPayload | SpaceSelectedPayload | SpaceDeselectedPayload;
389
404
  export type Callback = (payload: Payload) => void;
390
405
  export type TopicEvents = {
391
406
  [key in Topic]?: Array<{
@@ -95,8 +95,8 @@ export type EditorContextPayloadData = {
95
95
  startIndex?: number;
96
96
  endIndex?: number;
97
97
  fragmentAdf?: string;
98
- fullAdf?: any;
99
98
  };
99
+ dynamicUiType?: string;
100
100
  isViewMode?: boolean;
101
101
  useGenericEditorSkill?: boolean;
102
102
  additionalContext?: Record<string, unknown>;
@@ -374,6 +374,8 @@ export type OpenChatFeedbackModalPayload = PayloadCore<'open-chat-feedback-modal
374
374
  answerQuality: 'good' | 'bad' | 'general';
375
375
  }>;
376
376
  export type SmartLinksContextPayload = PayloadCore<'smartlinks-context-payload'> & {
377
+ /** Never opens chat — internal signal only. */
378
+ openChat: false;
377
379
  data?: Array<{
378
380
  /**
379
381
  * ORS auth key from meta.auth[0].key (e.g. 'gdrive', 'notion', 'miro').
@@ -385,7 +387,20 @@ export type SmartLinksContextPayload = PayloadCore<'smartlinks-context-payload'>
385
387
  count: number;
386
388
  }>;
387
389
  };
388
- export type Payload = MessageSendPayload | ChatClosePayload | SmartCreationModalOpenPayload | ChatNewPayload | ChatDraftPayload | EditorContextPayload | ChatOpenPayload | OpenBrowseAgentPayload | OpenBrowseAgentSidebarPayload | EditorSuggestionPayload | EditorAgentChangedPayload | BrowserContextPayload | WhiteboardContextPayload | JiraCreateContextPayload | DatabaseContextPayload | ForgeAppAuthSuccess | ForgeAppAuthFailure | JiraWorkflowWizardActionsPayload | InsertPromptPayload | DashboardInsightsActionsPayload | SetChatContextPayload | InsertUrlsPayload | SelectActionPayload | AddChartToDashboardPayload | GenericExternalActionErrorPayload | OpenChatDebugModalPayload | OpenChatFeedbackModalPayload | JsmJourneyBuilderActionsPayload | StudioAutomationBuildUpdatePayload | SolutionArchitectHandoffPayload | SolutionPlanStateUpdatePayload | SolutionDraftAgentUpdatePayload | SolutionArchitectAgentActivationPayload | UpdateAgentConfigurationPayload | StudioLandingPageRedirectPayload | UploadAndInsertMediaPayload | SmartLinksContextPayload;
390
+ /** Published by the consumer hook to notify the publisher whether it should fetch SmartLinks. */
391
+ export type SpaceSelectedPayload = PayloadCore<'space-selected', {
392
+ spaceId: string;
393
+ title: string;
394
+ emoji: string;
395
+ description?: string;
396
+ }>;
397
+ export type SpaceDeselectedPayload = PayloadCore<'space-deselected'>;
398
+ export type SmartlinksSubscriptionChangedPayload = PayloadCore<'smartlinks-subscription-changed'> & {
399
+ /** Never opens chat — internal signal only. */
400
+ openChat: false;
401
+ isActive: boolean;
402
+ };
403
+ export type Payload = MessageSendPayload | ChatClosePayload | SmartCreationModalOpenPayload | ChatNewPayload | ChatDraftPayload | EditorContextPayload | ChatOpenPayload | OpenBrowseAgentPayload | SmartlinksSubscriptionChangedPayload | OpenBrowseAgentSidebarPayload | EditorSuggestionPayload | EditorAgentChangedPayload | BrowserContextPayload | WhiteboardContextPayload | JiraCreateContextPayload | DatabaseContextPayload | ForgeAppAuthSuccess | ForgeAppAuthFailure | JiraWorkflowWizardActionsPayload | InsertPromptPayload | DashboardInsightsActionsPayload | SetChatContextPayload | InsertUrlsPayload | SelectActionPayload | AddChartToDashboardPayload | GenericExternalActionErrorPayload | OpenChatDebugModalPayload | OpenChatFeedbackModalPayload | JsmJourneyBuilderActionsPayload | StudioAutomationBuildUpdatePayload | SolutionArchitectHandoffPayload | SolutionPlanStateUpdatePayload | SolutionDraftAgentUpdatePayload | SolutionArchitectAgentActivationPayload | UpdateAgentConfigurationPayload | StudioLandingPageRedirectPayload | UploadAndInsertMediaPayload | SmartLinksContextPayload | SpaceSelectedPayload | SpaceDeselectedPayload;
389
404
  export type Callback = (payload: Payload) => void;
390
405
  export type TopicEvents = {
391
406
  [key in Topic]?: Array<{
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/rovo-triggers",
3
- "version": "5.34.0",
3
+ "version": "5.35.0",
4
4
  "description": "Provides various trigger events to drive Rovo Chat functionality, such as a publish-subscribe and URL parameter hooks",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "publishConfig": {
@@ -43,7 +43,7 @@
43
43
  "@atlaskit/css": "^0.19.0",
44
44
  "@atlaskit/primitives": "^18.1.0",
45
45
  "@atlaskit/ssr": "workspace:^",
46
- "@atlassian/a11y-jest-testing": "^0.10.0",
46
+ "@atlassian/a11y-jest-testing": "^0.11.0",
47
47
  "@atlassian/feature-flags-test-utils": "^1.0.0",
48
48
  "@testing-library/react": "^16.3.0",
49
49
  "react-dom": "^18.2.0",