Skip to content

Expert/scalability#6839

Merged
cstns merged 27 commits intomainfrom
expert/scalability
Mar 18, 2026
Merged

Expert/scalability#6839
cstns merged 27 commits intomainfrom
expert/scalability

Conversation

@cstns
Copy link
Copy Markdown
Contributor

@cstns cstns commented Mar 10, 2026

Description

This task refactors the Expert panel to make it more modular, scalable, and easier to extend. The existing monolithic implementation has been broken down into smaller focused Vue components for message rendering, mode switching, banners, context selection, and answer presentation.

The PR also introduces a more structured rendering model for AI responses, including dedicated components for:

  • human, AI, and system messages,
  • answer sections such as guides, resources, flows, packages, issues, and suggestions,
  • tool/MCP call rendering,
  • streaming-aware content presentation.

In addition to the architectural cleanup, the PR consolidates chat input behavior so it interacts more directly with the Expert store, improves loading-state handling, and simplifies scroll management

Related Issue(s)

closes #6597

Checklist

  • I have read the contribution guidelines
  • Suitable unit/system level tests have been added and they pass
  • Documentation has been updated
    • Upgrade instructions
    • Configuration details
    • Concepts
  • Changes flowforge.yml?
    • Issue/PR raised on FlowFuse/helm to update ConfigMap Template
    • Issue/PR raised on FlowFuse/CloudProject to update values for Staging/Production
  • Link to Changelog Entry PR, or note why one is not needed.

Labels

  • Includes a DB migration? -> add the area:migration label

cstns added 9 commits March 3, 2026 14:39
# Conflicts:
#	frontend/src/components/expert/Expert.vue
#	frontend/src/components/expert/components/ExpertChatInput.vue
#	frontend/src/store/modules/product/expert/index.js
…ed comment in product expert reset method.
…o-scroll behavior to use local component state.
…o-scroll behavior to use local component state.
…mponent and `useStreamingList` for streaming logic.
@cstns cstns self-assigned this Mar 10, 2026
@cstns cstns marked this pull request as draft March 10, 2026 08:04
@codecov
Copy link
Copy Markdown

codecov bot commented Mar 10, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 76.62%. Comparing base (8edba2b) to head (dcb83d6).
⚠️ Report is 5 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #6839   +/-   ##
=======================================
  Coverage   76.62%   76.62%           
=======================================
  Files         399      399           
  Lines       20165    20165           
  Branches     4856     4856           
=======================================
  Hits        15452    15452           
  Misses       4713     4713           
Flag Coverage Δ
backend 76.62% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

…nt components

- Refactor `should-stream` flag handling across multiple components to use unified `shouldStream` getter.
- Add `v-if` conditions to avoid rendering empty `GuideHeader` elements when `summary` is not present.
- Ensure `streaming-complete` events are emitted consistently in all relevant cases.
- Fix comparison logic for streaming order and component visibility in `AnswerWrapper`.
- Introduce `hasFinishedStreaming` ref in `StreamingListHelper` to track streaming completion.
- Update `String.js` to add `ff-link` class to links with `target="_blank"`.
@cstns cstns marked this pull request as ready for review March 16, 2026 08:44
cstns added 2 commits March 16, 2026 10:47
# Conflicts:
#	frontend/src/components/expert/components/ExpertChatInput.vue
Copy link
Copy Markdown
Contributor

@Steve-Mcl Steve-Mcl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bullet points in issues/suggestions are not rendered when containing markdown (see suggestions)

Issue with users prompt and enable/disable of input when query is posted: When I type my query, it remains in the input and the input area is not disabled while the query runs.

Lastly, conflicts need fixing.

cstns and others added 5 commits March 18, 2026 13:49
# Conflicts:
#	frontend/src/components/dialogs/device-group-management/AddDeviceToGroupDialog.vue
#	frontend/src/components/dialogs/device-group-management/components/device-list.vue
#	frontend/src/components/expert/Expert.vue
#	frontend/src/store/modules/product/expert/index.js
Co-authored-by: Stephen McLaughlin <44235289+Steve-Mcl@users.noreply.github.com>
…put` async logic to clear input when sending and not waiting for the response
@cstns cstns requested a review from Steve-Mcl March 18, 2026 12:26
@cstns
Copy link
Copy Markdown
Contributor Author

cstns commented Mar 18, 2026

touched on the review points, also addressed an abort controller issue that might have been due to the merge

@Steve-Mcl
Copy link
Copy Markdown
Contributor

testing now

…sanitization and markdown rendering logic
Copy link
Copy Markdown
Contributor

@Steve-Mcl Steve-Mcl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code review was a somewhat quick scan for obvious no-nos since extensive testing and iteration over last few days have flushed out issues. Happy to merge.

@cstns cstns merged commit b8758ac into main Mar 18, 2026
30 checks passed
@cstns cstns deleted the expert/scalability branch March 18, 2026 15:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Simplify/Standardize Expert Chat Vue components to render the payload to resolve scalability problems of current implementation

2 participants