feat(form-builder): show thinking spinner while LLM streams#8135
Open
Kelsey-Ethyca wants to merge 3 commits intodemo/aprilfrom
Open
feat(form-builder): show thinking spinner while LLM streams#8135Kelsey-Ethyca wants to merge 3 commits intodemo/aprilfrom
Kelsey-Ethyca wants to merge 3 commits intodemo/aprilfrom
Conversation
The chat composer disabled its input and swapped Send for Stop while streaming, but gave no visual feedback that the model was working on a response. Add an antd Spin row labelled "Thinking…" at the bottom of the messages list while status is "streaming", with two unit tests covering the visible/hidden states.
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub.
1 Skipped Deployment
|
Contributor
Author
Screen.Recording.2026-05-08.at.4.48.58.PM.mov |
Replace the visible "Thinking…" text with an ARIA status region (role="status", aria-live="polite", aria-label) so screen readers still announce the streaming state, and tighten the test to assert both the accessible region and the spinner's aria-busy attribute. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Ticket []
Description Of Changes
While the privacy center form builder's chat is streaming a response from the LLM, the input disabled and Send swapped to Stop, but there was no visual indication that the model was actually working. This PR adds a small antd
Spinrow labelled "Thinking…" at the bottom of the messages list, visible only whilestatus === "streaming".The spinner uses
Spinfromfidesui(the project's shared antdSpinwrapper, already used in ~12 places across admin-ui).Code Changes
clients/admin-ui/src/features/properties/privacy-center-config/form-builder/ChatPane.tsx— importSpinfromfidesui; render a<Spin size="small" /> Thinking…row at the bottom of the messages list while streaming. Reuses the existing auto-scrolluseEffect(isStreamingis already in its dep array).clients/admin-ui/src/features/properties/privacy-center-config/form-builder/__tests__/ChatPane.test.tsx— two new test cases asserting the indicator is visible whilestatus="streaming"and absent whenstatus="idle".Steps to Confirm
nox -s "dev(slim)" -- fides-pkg fides-admin-ui).default_access_policy).Thinking…row with an animated antd spinner appears at the bottom of the messages list while the LLM streams.Pre-Merge Checklist
CHANGELOG.mdupdatedmaindowngrade()migration is correct and works