Skip to content

[ZEPPELIN-6742] Connect the AI Assistant frontend to conversation REST and WebSocket APIs - #5563

Open
voidmatcha wants to merge 5 commits into
apache:branch-seung-00-assistant-transport-clean-tempfrom
voidmatcha:voidmatcha/assistant-v2-6-transport
Open

voidmatcha wants to merge 5 commits into
apache:branch-seung-00-assistant-transport-clean-tempfrom
voidmatcha:voidmatcha/assistant-v2-6-transport

Conversation

@voidmatcha

@voidmatcha voidmatcha commented Oct 9, 2026 •

Copy link
Copy Markdown
Member

What is this PR for?

Connect the Assistant frontend to the conversation REST and WebSocket APIs. The transport provides conversation creation and retrieval, message sending, and response delivery for the UI.

Server PR #5547 has merged. This PR still depends on shared prerequisites #5558 and UI contracts #5561; its temporary base contains those changes for review.

What type of PR is it?

Feature

Todos

What is the Jira issue?

ZEPPELIN-6742

How should this be tested?

Run from zeppelin-web-angular/:

npm run build-project:sdk
npm run typecheck:react
npm --prefix projects/zeppelin-react test -- src/entities/assistant/model/assistantTransport.spec.ts

Also verify the REST and WebSocket integration against the final API contract from server PR #5547.

Screenshots (if appropriate)

N/A

Questions:

  • Does the license files need to update? No
  • Is there breaking changes for older versions? No
  • Does this needs documentation? No

@voidmatcha
voidmatcha changed the base branch from temp/seung-00/assistant-transport-base to branch-seung-00-assistant-transport-base-temp October 9, 2026 01:35
@voidmatcha voidmatcha closed this Oct 9, 2026
@voidmatcha voidmatcha reopened this Oct 9, 2026
@voidmatcha
voidmatcha force-pushed the voidmatcha/assistant-v2-6-transport branch 2 times, most recently from 2aaa236 to b75de05 Compare October 9, 2026 09:09
@voidmatcha
voidmatcha changed the base branch from branch-seung-00-assistant-transport-base-temp to branch-seung-00-assistant-transport-clean-temp October 9, 2026 09:09
@voidmatcha
voidmatcha force-pushed the voidmatcha/assistant-v2-6-transport branch from b75de05 to c470802 Compare October 9, 2026 09:13
@voidmatcha

voidmatcha commented Oct 9, 2026 •

Copy link
Copy Markdown
Member Author

This PR connects the frontend to the conversation REST API and WebSocket run events.

The current diff is +1,527/-1 across four files. Excluding 869 lines in *.spec.* tests, the review diff is +658/-1. There is no lockfile change.

Server PR #5547 has merged. This PR still depends on #5558 and #5561, which are included in its temporary base for review. After those prerequisites merge, I will rebase and retarget the PR to master, then verify the final API contract and CI before merging. CI passes on the current PR head; I will rerun it after the final rebase.

@voidmatcha
voidmatcha force-pushed the branch-seung-00-assistant-transport-clean-temp branch from b772a8d to 9f119fc Compare October 10, 2026 00:50
@voidmatcha
voidmatcha force-pushed the voidmatcha/assistant-v2-6-transport branch from 0c3b303 to c41de73 Compare October 10, 2026 00:50
@voidmatcha
voidmatcha force-pushed the branch-seung-00-assistant-transport-clean-temp branch from 9f119fc to b0b71a0 Compare October 10, 2026 08:27
@voidmatcha
voidmatcha force-pushed the voidmatcha/assistant-v2-6-transport branch from c41de73 to 3af8991 Compare October 10, 2026 08:27
@voidmatcha
voidmatcha force-pushed the branch-seung-00-assistant-transport-clean-temp branch from b0b71a0 to fc57755 Compare October 10, 2026 08:37
@voidmatcha
voidmatcha force-pushed the voidmatcha/assistant-v2-6-transport branch from 3af8991 to 3bcb8e2 Compare October 10, 2026 08:37
@voidmatcha
voidmatcha force-pushed the branch-seung-00-assistant-transport-clean-temp branch from fc57755 to 404c586 Compare October 10, 2026 13:40
@voidmatcha
voidmatcha force-pushed the voidmatcha/assistant-v2-6-transport branch from 3bcb8e2 to e3e2119 Compare October 10, 2026 13:40
@voidmatcha
voidmatcha force-pushed the branch-seung-00-assistant-transport-clean-temp branch from 404c586 to e345f98 Compare October 10, 2026 15:44
@voidmatcha
voidmatcha force-pushed the voidmatcha/assistant-v2-6-transport branch from e3e2119 to c221c82 Compare October 10, 2026 15:45
@voidmatcha voidmatcha changed the title [ZEPPELIN-6742] Connect the Assistant frontend to conversation REST and WebSocket APIs [ZEPPELIN-6742] Connect the AI Assistant frontend to conversation REST and WebSocket APIs Oct 10, 2026
@voidmatcha
voidmatcha force-pushed the voidmatcha/assistant-v2-6-transport branch from c221c82 to e4880f9 Compare October 11, 2026 04:28

@miinhho miinhho left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Transport-level review. I reproduced the reported sequences by loading the module and controlling HTTP responses and socket events. I have not verified them against a live server or the notebook UI. The authentication comment is a contract question, not a confirmed integration defect.

// ACKs belong to the connection, even if the note or conversation that sent the request has unmounted.
const trackPendingRun = (socket: AssistantSocket, conversationId: string, tracking: RunTracking): PendingRun => {
const pending: PendingRun = { abandoned: false };
tracking.disconnected.delete(conversationId);

@miinhho miinhho Oct 11, 2026 •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This removes the previous disconnected marker before the new request has been accepted.

I reproduced this sequence: run A starts, its connection closes, and a retry is sent without reloading history. When that retry receives run.failed with status 409, the transport reports idle, even though A's history has not been recovered. The failure message itself says the conversation is still answering.

This conflicts with the documented behavior of retaining the lost-connection state until history is reloaded. Please preserve that uncertainty when the retry is rejected, and cover the disconnect → retry → 409 sequence in a regression test.

@voidmatcha voidmatcha Oct 11, 2026 •

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Thanks for catching this. The disconnected state now remains until the retry is accepted by the server. I also added a regression test for disconnect -> retry -> 409.

Fixed in 7ad64ff.

{},
onAuthError
);
if (!before && runs.disconnected.delete(conversationId)) notifyRunState(runs, conversationId);

@miinhho miinhho Oct 11, 2026 •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

A successful latest-page response clears the current disconnected marker without checking whether the request predates that disconnect.

I reproduced this with an accepted run: start getMessages(), delay its response, close the socket, then release the history response. The state changes from disconnected to idle, although no history request was started after the connection loss.

Please ensure that a request spanning a newer disconnect cannot clear that disconnect's recovery state, and add a regression test for this ordering.

@voidmatcha voidmatcha Oct 11, 2026 •

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Thanks for catching the race. A history response requested before a disconnect can no longer clear that disconnect state. I added a regression test for this response ordering as well.

Fixed in 6de3a98.

@voidmatcha
voidmatcha force-pushed the branch-seung-00-assistant-transport-clean-temp branch from 7b16eb1 to 3e95adf Compare October 11, 2026 11:31
@voidmatcha
voidmatcha force-pushed the voidmatcha/assistant-v2-6-transport branch from e4880f9 to 6de3a98 Compare October 11, 2026 11:31

This branch has not been deployed

No deployments
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.

2 participants