From 16dc17df4481ba1a380666d96a972e0fa4262fea Mon Sep 17 00:00:00 2001 From: cstns Date: Mon, 7 Sep 2026 17:36:42 +0300 Subject: [PATCH 1/3] [8381] Add the onboarding surface variant to the expert components --- frontend/src/components/expert/Expert.vue | 15 +- .../expert/components/ExpertChatInput.vue | 13 +- .../expert/components/ExpertMessages.vue | 28 ++- .../messages/CollapsedQuestionTurn.vue | 188 ++++++++++++++++++ .../expert/composables/collapseTranscript.js | 71 +++++++ .../expert/CollapsedQuestionTurn.spec.js | 106 ++++++++++ .../expert/collapseTranscript.spec.js | 98 +++++++++ 7 files changed, 512 insertions(+), 7 deletions(-) create mode 100644 frontend/src/components/expert/components/messages/CollapsedQuestionTurn.vue create mode 100644 frontend/src/components/expert/composables/collapseTranscript.js create mode 100644 test/unit/frontend/components/expert/CollapsedQuestionTurn.spec.js create mode 100644 test/unit/frontend/components/expert/collapseTranscript.spec.js diff --git a/frontend/src/components/expert/Expert.vue b/frontend/src/components/expert/Expert.vue index ae82a1b764..20c430ac92 100644 --- a/frontend/src/components/expert/Expert.vue +++ b/frontend/src/components/expert/Expert.vue @@ -8,7 +8,7 @@ :class="{ 'has-mode-switcher': isInsightsModeEnabled && isEditorContext }" @scroll="handleScroll" > - + @@ -50,6 +50,10 @@ export default { togglePinWithWidth: { from: 'togglePinWithWidth', default: () => () => {} // No-op function when not provided + }, + expertSurface: { + from: 'expert-surface', + default: 'drawer' } }, props: { @@ -85,6 +89,11 @@ export default { // In editor context, the route name includes 'editor' return this.$route?.name?.includes('editor') || false }, + isOnboardingSurface () { + // In onboarding, the Expert opens the conversation itself, so the + // canned welcome message and the support banner stay out of it. + return this.expertSurface === 'onboarding' + }, isInsightsModeEnabled () { return !!this.featuresCheck?.isExpertInsightsFeatureEnabled }, @@ -109,7 +118,9 @@ export default { if (this.isInsightsAgent) { await this.getCapabilities() } - this.addWelcomeMessageIfNeeded() + if (!this.isOnboardingSurface) { + this.addWelcomeMessageIfNeeded() + } } }, 'instance.meta.state': { diff --git a/frontend/src/components/expert/components/ExpertChatInput.vue b/frontend/src/components/expert/components/ExpertChatInput.vue index a485e64d76..3a8f519ab8 100644 --- a/frontend/src/components/expert/components/ExpertChatInput.vue +++ b/frontend/src/components/expert/components/ExpertChatInput.vue @@ -5,8 +5,10 @@ direction="horizontal" @mousedown="onStartResize" /> - -
+ +