Skip to content

[API] Refactor UserInputEventData into UserInputEvent, add validation for uniqueness of event type - #512

Open
ArielG-NV wants to merge 3 commits into
NVIDIA:mainfrom
ArielG-NV:refactor-UserInputEvent
Open

[API] Refactor UserInputEventData into UserInputEvent, add validation for uniqueness of event type#512
ArielG-NV wants to merge 3 commits into
NVIDIA:mainfrom
ArielG-NV:refactor-UserInputEvent

Conversation

@ArielG-NV

Copy link
Copy Markdown
Collaborator

Resolves: #501

Goal: clean up UserInputEvent and shim UserInputEventData
Changes:

  • Remove UserInputEventData in-favor for UserInputEvent
  • Add validation that a UserInputEvent class-type is unique

Remove UserInputEventData infavor for UserInputEvent with validation that the class-type is unique
@copy-pr-bot

copy-pr-bot Bot commented Aug 25, 2026

Copy link
Copy Markdown

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@ArielG-NV ArielG-NV changed the title Refactor UserInputEvent [API] Refactor UserInputEventData into UserInputEvent, add validation for uniqueness of event Aug 25, 2026
@ArielG-NV ArielG-NV changed the title [API] Refactor UserInputEventData into UserInputEvent, add validation for uniqueness of event [API] Refactor UserInputEventData into UserInputEvent, add validation for uniqueness of event type Aug 25, 2026
@greptile-apps

greptile-apps Bot commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

The PR replaces wrapped UserInputEventData values with timestamped concrete UserInputEvent subclasses and validates event-type-name uniqueness during subclass creation.

  • Migrates runtime, WebRTC, UI routing, integrations, and tests to concrete event objects.
  • Moves timestamp assignment into concrete WebRTC event construction.
  • Renames the internal SlangPy renderer module and updates its consumers.

Confidence Score: 5/5

The PR appears safe to merge because no blocking failure remains.

No blocking failure remains.

Important Files Changed

Filename Overview
flashdreams/flashdreams/api_v2/user_input_event.py Introduces the timestamped abstract event base and process-wide event-type-name uniqueness validation.
flashdreams/flashdreams/runtime_v2/user_input_event.py Converts each runtime event-data class into a concrete timestamped event subclass.
flashdreams/flashdreams/runtime_v2/serving/webrtc_server.py Constructs and timestamps concrete browser events before buffering them.
flashdreams/flashdreams/runtime_v2/session_runner.py Updates lifecycle-event detection to inspect concrete event instances.
flashdreams/flashdreams/runtime_v2/slangpy_ui_renderer.py Renames the renderer module and routes keyboard and mouse fields directly from concrete events.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart LR
    B[Browser or client input] --> C[Concrete UserInputEvent with timestamp]
    C --> E[EventBuffer]
    E --> U[UI event routing]
    E --> M[Model session step]
    C --> L{Close or reset event?}
    L -->|Close| S[Stop session]
    L -->|Reset| R[Reset session generation]
Loading

Reviews (2): Last reviewed commit: "pre commit" | Re-trigger Greptile

Comment thread flashdreams/flashdreams/api_v2/user_input_event.py
@ArielG-NV

Copy link
Copy Markdown
Collaborator Author

/ok to test 5aa15a9

@NVIDIA NVIDIA deleted a comment from copy-pr-bot Bot Aug 25, 2026
@ArielG-NV

Copy link
Copy Markdown
Collaborator Author

/ok to test 19b47c6

@ArielG-NV
ArielG-NV enabled auto-merge August 25, 2026 20:28
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.

[API] UserInputEvent cleanup

1 participant