Skip to content

feat(expert): grouped clarifying questions UI + render robustness#7556

Open
andypalmi wants to merge 2 commits into
mainfrom
feat/407-expert-quick-replies
Open

feat(expert): grouped clarifying questions UI + render robustness#7556
andypalmi wants to merge 2 commits into
mainfrom
feat/407-expert-quick-replies

Conversation

@andypalmi

Copy link
Copy Markdown
Contributor

Summary

Frontend for the Expert "ask before acting" UX (FlowFuse/product#407) plus render-robustness fixes.

  • Grouped clarifying questions: the Expert can ask 1-4 questions in a single turn, each rendered as its own option card (single- or multi-select), and all answers are collected before the turn is submitted.
  • Per-section error containment: each answer section (rich content, guide, resources, flows, packages, questions, suggestions) now renders inside an ErrorBoundary, so a failure in one section degrades only that section instead of blanking the entire message. A backstop boundary wraps each answer item.
  • Resource card crash fix: guarded the optional streamable chain in StandardResourceCard that previously threw on a null value and took down the whole message.

Testing

  • Manual: grouped questions render and collect answers across the H-category prompts (asset tracking, machine alerting, etc.); single missing value renders a single question.
  • Lint passes (eslint + colors) via pre-commit.

Relates to FlowFuse/product#407

andypalmi added 2 commits June 18, 2026 11:50
Replace the flat quick-replies renderer with QuestionsList, which renders
1-4 grouped clarifying questions, each with 2-4 options. Single-select
questions show radio indicators, multi-select show checkboxes, with a
Select one / Select all that apply hint. A Send button (enabled once
every question is answered) submits the composed reply; a pencil button
sends it to the input for editing first.

- New QuestionsList.vue (themed with FlowFuse accent tokens)
- AnswerWrapper wired to render questions and handle submit/edit
- pendingInput store state + setPendingInput action for edit-first flow
- ExpertChatInput watches pendingInput to prefill the textarea
…crash

Add ErrorBoundary component and wrap each answer section so a failure in one section (e.g. a malformed resource) degrades only that section instead of blanking the whole message. Guard the optional streamable chain in StandardResourceCard that previously threw on null.
@codecov

codecov Bot commented Jun 18, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 76.95%. Comparing base (525a175) to head (7675e56).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #7556   +/-   ##
=======================================
  Coverage   76.95%   76.95%           
=======================================
  Files         410      410           
  Lines       21002    21002           
  Branches     5117     5117           
=======================================
  Hits        16162    16162           
  Misses       4840     4840           
Flag Coverage Δ
backend 76.95% <ø> (ø)

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

☔ View full report in Codecov by Harness.
📢 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.

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.

1 participant