Skip to content

test(session): cover invoke replies after control removal - #7028

Closed
mayuriphad wants to merge 1 commit into
flet-dev:flet-1.1.0from
mayuriphad:fix/invoke-reply-removed-control
Closed

mayuriphad wants to merge 1 commit into
flet-dev:flet-1.1.0from
mayuriphad:fix/invoke-reply-removed-control

Conversation

@mayuriphad

@mayuriphad mayuriphad commented Oct 31, 2026 •

Copy link
Copy Markdown

Fixes #6941

Late client-method replies must resolve their pending call after the target control is removed without interrupting the session. Add regression tests for successful and error replies after actual control removal, unmatched replies, and replies for registered controls. The removal cases also verify that a subsequent invocation completes.

The flet-1.1.0 implementation already handles these replies, including preserving successful results. Keep that behavior and add the issue, PR link, and contributor credit to the existing 1.1.0 changelog entry.

Validation: all 4 focused pytest cases pass; ruff check and ruff format --check pass.

Copilot AI balanced review requested due to automatic review settings October 31, 2026 07:59
@CLAassistant

CLAassistant commented Oct 31, 2026 •

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

Copilot AI 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.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

@sourcery-ai sourcery-ai Bot 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.

Hey - I've reviewed your changes and they look great!


Sourcery is free for open source - if you like our reviews please consider sharing them ✨

@FeodorFitsner
FeodorFitsner changed the base branch from main to flet-1.1.0 October 31, 2026 19:28
Adapt the removed-control regression tests to flet-1.1.0, which already
resolves pending calls without terminating the receive loop. Preserve
successful replies and client errors after a mounted control is removed,
and verify that a subsequent invocation still completes.

Record issue flet-dev#6941 and PR flet-dev#7028 in the existing 1.1.0 changelog entry.
@FeodorFitsner
FeodorFitsner force-pushed the fix/invoke-reply-removed-control branch from ab653b9 to 6efe2ab Compare October 31, 2026 19:35
@FeodorFitsner FeodorFitsner changed the title fix(session): fail the pending call when its control was removed before the invoke reply test(session): cover invoke replies after control removal Oct 31, 2026
@FeodorFitsner

Copy link
Copy Markdown
Contributor

Thanks for the contribution! This issue is already fixed on flet-1.1.0 by #6928.

The existing implementation resolves pending calls even after control removal, preserving the client’s result or error without terminating the session.

Closing this PR as already addressed.

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.

bug: invoke_method on a removed control: the client's late error reply raises into the websocket receive loop and closes the session

4 participants