Have the Expert open the onboarding conversation - #8467
Conversation
93f5f11 to
c96e33a
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## 8383-suppress-tour #8467 +/- ##
===================================================
Coverage 76.88% 76.88%
===================================================
Files 460 460
Lines 24778 24778
Branches 6609 6609
===================================================
Hits 19051 19051
Misses 5727 5727
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
c96e33a to
24f80de
Compare
24f80de to
283706e
Compare
283706e to
af69b91
Compare
af69b91 to
3933fad
Compare
3933fad to
4da32d6
Compare
4da32d6 to
a2f3c15
Compare
andypalmi
left a comment
There was a problem hiding this comment.
One inline note on the opening-turn error path.
| if (!this.shouldUseMqtt) { | ||
| console.error('Expert API error:', error) | ||
| } | ||
| this.addPredefinedAiMessage('Sorry, I could not get started. Please refresh to try again.', { isError: true }) |
There was a problem hiding this comment.
Over MQTT _onMqttError already adds an error bubble on a failed publish, so this line adds a second one on top of it. handleQuery keeps its message inside the !shouldUseMqtt guard for that reason. Moving it in matches that and avoids the double bubble:
| if (!this.shouldUseMqtt) { | |
| console.error('Expert API error:', error) | |
| } | |
| this.addPredefinedAiMessage('Sorry, I could not get started. Please refresh to try again.', { isError: true }) | |
| if (!this.shouldUseMqtt) { | |
| console.error('Expert API error:', error) | |
| this.addPredefinedAiMessage('Sorry, I could not get started. Please refresh to try again.', { isError: true }) | |
| } |
There was a problem hiding this comment.
| if (!this.shouldUseMqtt) { | |
| console.error('Expert API error:', error) | |
| } | |
| this.addPredefinedAiMessage('Sorry, I could not get started. Please refresh to try again.', { isError: true }) | |
| if (!this.shouldUseMqtt) { | |
| console.error('Expert API error:', error) | |
| this.addPredefinedAiMessage('Sorry, I could not get started. Please refresh to try again.', { isError: true }) | |
| } |
64925df to
62f9be4
Compare
|
Minor: the >
Set it up myself
</ff-button> |
The Expert speaks first on the onboarding page, so the frontend needs a way to start a turn the user has not typed. openConversation sends a turn with an empty query, the same shape resumeToolApprovals already uses, and the agent tells onboarding apart from ordinary support by the onboarding flag now carried on the context object. Two things it deliberately does not do. No user message is added, since the user has not said anything. And the session clock is left unstarted, so the 25 minute warning and 28 minute expiry begin when the user first replies rather than while they are still reading the opening question. The onboarding flag goes on both branches of the context getter: they build their objects separately, so a field added to one goes missing depending on load timing. It tracks the conversation rather than the deployment, staying true after the Expert moves the user into the editor and going false once onboarding is finished or skipped. Drops the hardcoded placeholder transcript that stood in while this was missing. A transcript holding only canned messages still counts as empty and gets cleared, so arriving from the drawer does not leave its greeting in the way, while a real conversation is left alone and picked up where it stopped.
8f0b67a to
b7b3c3d
Compare
The Expert speaks first on the onboarding page, so the frontend needs a way to start a turn the user has not typed.
Heads up for whoever reviews this
This is the first PR in the stack whose behaviour cannot be verified from the frontend side. It sends the opening turn and renders whatever comes back. Whether the Expert actually produces a sensible first turn for an empty query is the other half, and that lives in the expert flows (#8371), not here.
If the agent is not ready for it, nothing errors.
Verify inputaccepts an empty string, the fast-reply switch does not match it, and the turn goes to the LLM as an empty user message. So the page opens, the request goes out, a reply comes back and renders. It reads as working right up until you look at what the Expert actually said. A blank or confused first message is the failure mode, not a stack trace.So testing this means reading the opening turn, not just checking that one appears.
What it does
openConversationsends a turn with an empty query. That is not a new protocol:resumeToolApprovalsalready does exactly this, described in its own comment as "an ordinary chat request with no query". Worth noting the expert-sideVerify inputcheck turns out to be looser than #8371 assumed, it requiresqueryto be a string rather than to be non-empty, so an empty string already passes it today.Two things it deliberately does not do:
handleQueryalready starts the clock on the first turn where it is unset, so the user's first reply picks it up naturally.The
onboardingflag is added to both branches of the context getter. They build their objects separately, so a field added to one goes missing depending on load timing. It is sourced fromux.isOnboarding, which tracks the conversation rather than the deployment: it stays true after the Expert moves the user into the editor, and goes false once onboarding is finished or skipped, so a later ordinary chat is not treated as one. That settles the open question on #8370.Also drops
onboardingFixture.js, the hardcoded placeholder transcript that stood in while this was missing, along with its seeding call and the stale TEMPORARY comment. The drawer's canned welcome was already suppressed on this surface, so nothing else was hardcoded. The old guard is kept: a transcript holding only canned messages counts as empty and gets cleared, so arriving from the drawer does not leave its greeting in the way, while a real conversation is left alone, which is what makes the page resumable.Closes #8369
Closes #8370
Closes #8371