Skip to content

Update assistant package#1321

Merged
mikahanninen merged 6 commits into
robocorp:masterfrom
raivolink:fix-assistan-package
Apr 26, 2026
Merged

Update assistant package#1321
mikahanninen merged 6 commits into
robocorp:masterfrom
raivolink:fix-assistan-package

Conversation

@raivolink
Copy link
Copy Markdown
Contributor

Summary

Migrate rpaframework-assistant from robocorp-flet==0.4.2.3 (fork of flet 0.4.2) to official flet>=0.82.0,<1.0.0.

Breaking changes

  • Python minimum version bumped from >=3.9.1 to >=3.10 (flet 0.82+ requirement)

Core changes

  • background_flet.py — Full rewrite. Replaced removed flet internals (__connect_internal_sync, open_flet_view, close_flet_view) with
    ft.app() in a daemon thread, threading.Event for close detection, and signal.signal patching. Added 30-second startup timeout.
  • flet_client.py — Window API migration (page.window_height → page.window.height etc.), thread-safe page mutations via
    _run_on_flet_thread(), FilePicker service registration via page._services.register_service(), Dropdown on_change → on_select,
    AppBar.actions null-safety.
  • library.py — Import paths (flet_core → flet), async FilePicker (await pick_files()), async page.launch_url(), Icon enum conversion
    for add_flet_icon, state cleanup between dialogs (date_inputs, _required_fields, _open_layouting, validation_errors), empty date input
    returns None instead of ValueError.
  • callback_runner.py — Import path update only.
  • types.py — Import path update, alignment constants replaced with explicit Alignment(x, y) values.

Bug fixes found during testing

  • Button click then submit caused timeout — page.update() from wrong thread corrupted flet state
  • Icons rendered as blank white area — string names must be converted to Icons enum
  • FilePicker crashed with "'coroutine' object is not iterable" — pick_files() is now async
  • FilePicker error "Control must be added to page first" — page.services.append() doesn't mount controls
  • State leaked between sequential dialogs — date_inputs, _required_fields, _open_layouting not cleared
  • Empty date field crashed with ValueError: Invalid isoformat string: ''
  • Link click warning about unawaited coroutine — page.launch_url() is now async

Tests

  • Added tests/robot/test_elements.robot with 31 manual test cases covering all UI keywords with Pass/Fail buttons for tester verdict

Docs

  • Added docs/Change-to-flet.md with full migration reference

raivolink and others added 4 commits March 15, 2026 18:05
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Replace deprecated ft.app() with ft.run()
- Add colored visual cues to Stack test for positioning verification
- Add Pass/Fail buttons to all manual tests
- Document future considerations: error handling, private API usage,
  unexposed flet layout properties with links

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@raivolink raivolink marked this pull request as draft March 16, 2026 08:43
Add flet-desktop package and tighter restrict on flet packages.
@mikahanninen mikahanninen linked an issue Mar 23, 2026 that may be closed by this pull request
@raivolink raivolink marked this pull request as ready for review March 25, 2026 05:37
- Add SYSTEM/LIGHT/DARK theme parameter to Assistant.__init__ and
  display_flet_window, applied via flet.ThemeMode on the page
- Expose BackgroundFlet._loop as a public event_loop property
- Minor cleanups: move Alignment import to top level, add pylint
  disables for private-access and unexpected-keyword-arg

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@mikahanninen mikahanninen merged commit aada174 into robocorp:master Apr 26, 2026
2 checks passed
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.

Compatibility with latest "flet" package

2 participants