Skip to content

fix: remove restoreFieldSource from FormAIController (#10099) (CP: 25.3) - #10120

Merged
tomivirkki merged 1 commit into
25.3from
cherry-pick-10099-to-25.3-1789387372370
Sep 14, 2026
Merged

tomivirkki merged 1 commit into
25.3from
cherry-pick-10099-to-25.3-1789387372370

Conversation

@vaadin-bot

Copy link
Copy Markdown
Collaborator

This PR cherry-picks changes from the original PR #10099 to branch 25.3.

Original PR description

Description

Fixes #10078

Making the method also mark the field was considered and rejected. The value from before the fill is not part of the restored data, so the revert control would have had nothing to restore, and applications without source tracking would still have had no way to bring a mark back at all.

  • Removed restoreFieldSource(HasValue, ValueSource) from FormAIController, along with its tests and Javadoc mentions
    • A form rebuilt from application data loses its field marks together with the sources, and only the source could be put back, so a restored value looked like user input with nothing to show for the restore. Restoring sources and marks will be designed as one round trip, together with an API for putting marks back.
  • Changed AIFieldMarkerPage to write the quantity field through the fill_form tool with a source envelope, the way a real fill reports a source

Type of change

  • Bugfix

[!NOTE]
The method shipped in the 25.3 betas, so this needs a pick to the 25.3 branch before GA.

## Description

Fixes #10078

Making the method also mark the field was considered and rejected. The
value from before the fill is not part of the restored data, so the
revert control would have had nothing to restore, and applications
without source tracking would still have had no way to bring a mark back
at all.

- Removed `restoreFieldSource(HasValue, ValueSource)` from
`FormAIController`, along with its tests and Javadoc mentions
- A form rebuilt from application data loses its field marks together
with the sources, and only the source could be put back, so a restored
value looked like user input with nothing to show for the restore.
Restoring sources and marks will be designed as one round trip, together
with an API for putting marks back.
- Changed `AIFieldMarkerPage` to write the quantity field through the
`fill_form` tool with a source envelope, the way a real fill reports a
source

## Type of change

- Bugfix

> [!NOTE]
> The method shipped in the 25.3 betas, so this needs a pick to the 25.3
branch before GA.

Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
@tomivirkki
tomivirkki enabled auto-merge (squash) September 14, 2026 12:04
@sonarqubecloud

Copy link
Copy Markdown

@tomivirkki
tomivirkki merged commit ebf19aa into 25.3 Sep 14, 2026
17 checks passed
@tomivirkki
tomivirkki deleted the cherry-pick-10099-to-25.3-1789387372370 branch September 14, 2026 12:12
@vaadin-bot

Copy link
Copy Markdown
Collaborator Author

This ticket/PR has been released with Vaadin 25.3.0-rc1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants