Repository navigation
Conversation
631f77b to
1b6333d
Compare
|
Could you please check these two cases?
I’ve prepared suggested fixes and regression tests for reference only. |
There was a problem hiding this comment.
If a question is sent before the initial history finishes loading, a pagination boundary case can cause the previous failed answer to appear above its original question when the next message is sent.
reproduction-plain.mp4
Would it make sense to disable sending until the initial history has loaded successfully? Could you also check whether this belongs in this PR or should be handled in ZEPPELIN-6749? This is a non-blocking comment, as it does not reproduce with the current fixture.
The recording uses the PR’s model and message renderer connected to a real Zeppelin server, with locally controlled LLM responses.
This is not an issue with the server returning history in the wrong order. It is a boundary case in the current panel model, which allows sending before the initial history request finishes. If a question is sent before the initial history loads, the run can fail. The subsequent history request can return only the answer, with the question on the previous page. On the next send, the model moves the failed answer into the message list and places it before its question. I reproduced this by supplying those page responses through the existing REST adapter to the current model. Following your suggestion, can we allow sending in an existing conversation only after the latest history page loads successfully once? Users can still edit their draft, the unsent question, while history loads, but they cannot submit it. If loading fails, the panel keeps the draft and offers a retry for the history request. I propose enforcing this condition in both the UI and the model’s send method. The first send in a new local conversation will remain available. This restriction will not apply to later history reloads or requests for older pages after the initial load succeeds. This approach defines when sending is allowed, rather than adding more history reconciliation logic to handle this case. Can we apply this policy in this PR and make sure that the same rule works with a real server in ZEPPELIN-6749? |
There was a problem hiding this comment.
I agree with the proposed approach. (My approval means I have no further comments on the rest of the changes; please go ahead and apply the proposed fix)
Applying the initial-history send guard in both the UI and the model in this PR, then verifying it against a real server in ZEPPELIN-6749, makes sense. I've added the corresponding verification criteria to ZEPPELIN-6749 and ZEPPELIN-6750.
voidmatcha
left a comment
There was a problem hiding this comment.
LGTM 👍
Just noting for future reference that submittedQuestion may be useful for follow-up work such as ZEPPELIN-6755.
What is this PR for?
Assemble the existing Assistant components into a fixture-backed conversation panel, available in Storybook and in notebooks with
?reactAssistant=true.The panel supports:
Conversation state, run-event accumulation, history reconciliation, and React subscription have separate owners. The fixture accepts explicit seed data, a reference clock, and failure scenarios independently of Storybook.
What type of PR is it?
Feature
What is the Jira issue?
How should this be tested?
Unit and component tests
From zeppelin-web-angular/projects/zeppelin-react:
npm test -- \ src/pages/assistant-workspace \ src/entities/assistant/ui/AssistantAnswer.spec.tsx \ --maxWorkers=1 --no-file-parallelism npm run typecheck npm run lintThese tests cover run-event handling, conversation switching, stale responses, history reconciliation, fixture behavior, deletion confirmation, and answer rendering across state transitions.
Notebook E2E tests
Start the Zeppelin backend on localhost:8080, then run from zeppelin-web-angular:
The conversation scenarios check:
Manual verification
To open the stories, run from zeppelin-web-angular/projects/zeppelin-react:
Open Assistant / ConversationPanel.
Screenshots (if appropriate)
Questions: