feat!: pass request event to AIController.onRequest - #10020
Merged
Conversation
AIController.onRequest() now receives the same RequestListener.RequestEvent as the request listener. Implementations must update their override to onRequest(RequestListener.RequestEvent). Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
vaadin-review-bot
left a comment
Collaborator
There was a problem hiding this comment.
Reviewed the changes — left 1 comment.
| Finding | |
|---|---|
| 📝 | New public constructor omits the @throws NullPointerException tag its sibling documents |
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
|
ugur-vaadin
approved these changes
Sep 7, 2026
tomivirkki
added a commit
that referenced
this pull request
Sep 7, 2026
…3) (#10043) This PR cherry-picks changes from the original PR #10020 to branch 25.3. --- #### Original PR description > ## Description > > - Changed `AIController.onRequest()` to receive the `RequestListener.RequestEvent` of the turn, the same event the request listener gets, so a controller can read the user message, message id, and attachments > - Made the `RequestEvent` constructor public so applications can unit test controller implementations; it copies the attachment list and rejects `null` arguments > - Updated `FormAIController` and the field-marker test page to the new signature > - Added tests for the shared event and its unmodifiable attachment list > > ## Type of change > > - Feature > > > [!WARNING] > > Breaking change: custom `AIController` implementations that override `onRequest()` must change the signature to `onRequest(RequestListener.RequestEvent)`. Co-authored-by: Tomi Virkki <tomivirkki@users.noreply.github.com> Co-authored-by: Claude Fable 5.1 <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.



Description
AIController.onRequest()to receive theRequestListener.RequestEventof the turn, the same event the request listener gets, so a controller can read the user message, message id, and attachmentsRequestEventconstructor public so applications can unit test controller implementations; it copies the attachment list and rejectsnullargumentsFormAIControllerand the field-marker test page to the new signatureType of change
Warning
Breaking change: custom
AIControllerimplementations that overrideonRequest()must change the signature toonRequest(RequestListener.RequestEvent).