Skip to content

Fix WebSocket HITL Response Schema and Update UI Submodule#1079

Merged
rapids-bot[bot] merged 2 commits intoNVIDIA:release/1.3from
ericevans-nv:ui-ws-fix-submodule-update
Oct 22, 2025
Merged

Fix WebSocket HITL Response Schema and Update UI Submodule#1079
rapids-bot[bot] merged 2 commits intoNVIDIA:release/1.3from
ericevans-nv:ui-ws-fix-submodule-update

Conversation

@ericevans-nv
Copy link
Contributor

@ericevans-nv ericevans-nv commented Oct 22, 2025

Description

This change adds the missing parent_id and conversation_id fields to the WebSocketUserInteractionResponseMessage schema.

Previously, the schema only included thread_id, which was insufficient for correctly routing Human-in-the-Loop (HITL) responses back to their originating conversations and workflow sessions. Without these fields, HITL responses could be dropped or misrouted in multi-conversation scenarios, causing workflows to hang while waiting for user input.

The update includes:

  • changes to the backend schema definition
  • test data validation
  • WebSocket message documentation to ensure consistency across the codebase

The UI submodule has also been updated to include these fields when sending HITL responses, ensuring synchronization between the frontend and backend for accurate message routing. This fix restores proper bidirectional communication between the UI and backend for HITL workflows by providing the necessary conversation context for user interaction prompts.

By Submitting this PR I confirm:

  • I am familiar with the Contributing Guidelines.
  • We require that all contributors "sign-off" on their commits. This certifies that the contribution is your original work, or you have rights to submit it under the same license, or a compatible license.
    • Any contribution which contains commits that are not Signed-Off will not be accepted.
  • When the PR is ready for review, new or existing tests cover these changes.
  • When the PR is ready for review, the documentation is up to date with these changes.

Summary by CodeRabbit

  • New Features

    • WebSocket user interaction messages now support conversation tracking with conversation_id and parent_id fields for improved context management.
  • Documentation

    • Updated WebSocket API schema documentation to reflect new conversation tracking capabilities.
  • Chores

    • Updated external dependencies.

Signed-off-by: Eric Evans <194135482+ericevans-nv@users.noreply.github.com>
@ericevans-nv ericevans-nv self-assigned this Oct 22, 2025
@ericevans-nv ericevans-nv requested a review from a team as a code owner October 22, 2025 20:13
@coderabbitai
Copy link

coderabbitai bot commented Oct 22, 2025

Walkthrough

The changes introduce two new fields (parent_id and conversation_id) to the WebSocket user interaction message schema across the API data model, documentation, and tests. These fields enable tracking of message hierarchy and conversation context in user interaction messages.

Changes

Cohort / File(s) Summary
Data Model Updates
src/nat/data_models/api_server.py
Added parent_id: str = "default" and `conversation_id: str
Documentation Updates
docs/source/reference/websockets.md
Added conversation_id field to User Interaction Message schema definition and sample JSON; removed trailing comma in nested content.messages object
Test Updates
tests/nat/server/test_unified_api_server.py
Updated user_interaction_message test payload to include new parent_id and conversation_id fields
Submodule Reference
external/nat-ui
Updated commit hash reference from 1c0ee1be... to 8b91a7e8...

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~15 minutes

The changes follow a consistent, repetitive pattern of adding two new fields across related files (data model, documentation, and tests). The edits are straightforward field declarations and schema updates with no complex logic or architectural modifications. The submodule pointer update adds minimal review scope.

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Title Check ✅ Passed The title “Fix WebSocket HITL Response Schema and Update UI Submodule” clearly summarizes the primary changes by describing both the schema correction and the submodule update. It uses the imperative mood appropriately and is concise at 58 characters, fitting within the recommended 72-character limit. The title directly reflects the modifications to the WebSocket response message schema and the UI submodule update as detailed in the PR objectives and raw file summaries.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@ericevans-nv ericevans-nv added non-breaking Non-breaking change improvement Improvement to existing functionality labels Oct 22, 2025
Copy link
Member

@willkill07 willkill07 left a comment

Choose a reason for hiding this comment

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

Exhaustively tested all modes and HITL examples.

LGTM 👍

@willkill07
Copy link
Member

/merge

@rapids-bot rapids-bot bot merged commit 7dda818 into NVIDIA:release/1.3 Oct 22, 2025
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

improvement Improvement to existing functionality non-breaking Non-breaking change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants