Skip to content

Conversation

@renovate
Copy link
Contributor

@renovate renovate bot commented Sep 22, 2025

Note

Mend has cancelled the proposed renaming of the Renovate GitHub app being renamed to mend[bot].

This notice will be removed on 2025-10-07.


This PR contains the following updates:

Package Type Update Change
flutter_riverpod (source) dependencies major ^2.6.1 -> ^3.0.0

Warning

Some dependencies could not be looked up. Check the Dependency Dashboard for more information.


Release Notes

rrousselGit/riverpod (flutter_riverpod)

v3.0.1

Compare Source

v3.0.0

Compare Source


Configuration

📅 Schedule: Branch creation - "every 2 weeks on Monday" (UTC), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@renovate renovate bot requested a review from ricab September 22, 2025 03:09
@ricab
Copy link
Collaborator

ricab commented Sep 22, 2025

Nah, this won't just work like that:

caution

This version contains a few life-cycle changes. Those could break your app in subtle ways. Upgrade carefully.
For the migration guide, please refer to the migration page.

See https://riverpod.dev/docs/whats_new.

We should probably update at some point, but this is new and I wonder if we should wait a little. OTOH

This major version is a transition version, to unblock the development of the project. It is quite possible that a 4.0.0 will be released relatively soon in the future [...]

So maybe we shouldn't wait too long. @levkropp opinions?

@ricab
Copy link
Collaborator

ricab commented Sep 22, 2025

I asked for support plans: rrousselGit/riverpod#4319

@ricab
Copy link
Collaborator

ricab commented Sep 22, 2025

The owner replied:

It's not supported anymore.

So I guess we need to adapt...

@renovate renovate bot force-pushed the renovate/flutter_riverpod-3.x branch from 8ef03af to 91a31dc Compare September 30, 2025 20:29
@codecov
Copy link

codecov bot commented Oct 1, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 89.39%. Comparing base (96a02d6) to head (e85fe23).
⚠️ Report is 33 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #4380   +/-   ##
=======================================
  Coverage   89.39%   89.39%           
=======================================
  Files         253      253           
  Lines       16457    16457           
=======================================
  Hits        14711    14711           
  Misses       1746     1746           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@levkropp levkropp force-pushed the renovate/flutter_riverpod-3.x branch 4 times, most recently from d600e97 to c4afca2 Compare October 1, 2025 19:42
@renovate
Copy link
Contributor Author

renovate bot commented Oct 1, 2025

Edited/Blocked Notification

Renovate will not automatically rebase this PR, because it does not recognize the last commit author and assumes somebody else may have edited the PR.

You can manually request rebase by checking the rebase/retry box above.

⚠️ Warning: custom changes will be lost.

@levkropp levkropp force-pushed the renovate/flutter_riverpod-3.x branch from 8b7def1 to 5296a3b Compare October 2, 2025 17:03
@levkropp levkropp force-pushed the renovate/flutter_riverpod-3.x branch from 6efadd5 to 247c0fd Compare October 2, 2025 18:40
@sharder996 sharder996 requested a review from xmkg October 9, 2025 13:30
sharder996
sharder996 previously approved these changes Oct 14, 2025
Copy link
Collaborator

@sharder996 sharder996 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a few little nitpicks 😄

Also, I think a dart pub upgrade could be run. Building the GUI locally creates a diff in pubspec.lock Also also, had to rebase on main in order to get the GUI working on macOS.

@levkropp levkropp force-pushed the renovate/flutter_riverpod-3.x branch from 247c0fd to 65e0df2 Compare October 15, 2025 01:38
@levkropp levkropp force-pushed the renovate/flutter_riverpod-3.x branch from 6699cd4 to e1ee3c0 Compare October 15, 2025 02:45
sharder996
sharder996 previously approved these changes Oct 15, 2025
Copy link
Collaborator

@sharder996 sharder996 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome! Thanks, @levkropp

renovate bot and others added 9 commits October 15, 2025 13:04
networksProvider was a synchronous Provider that
triggered an async operation and then called
ref.invalidateSelf() when it completed.
This created an infinite loop:

Provider builds → triggers network request
Request completes → calls invalidateSelf()
Provider rebuilds triggers another network request
And so on...

Solution: Changed networksProvider from a Provider
 to a FutureProvider that properly handles async
Updated virtualization_settings.dart to handle the
 async result with valueOrNull ?? const <String>{}
The recommended way to update StateProviders to
riverpod v3 is to create a Notifier that is
provided by a NotifierProvider

This also removes the dependency on legacy.dart
When closing a terminal, the Ref of NotifierProvider<TerminalNotifier>
was being read after it has been disposed. This change checks
if the ref is mounted or not before attempting to read it
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR updates the flutter_riverpod dependency from version 2.6.1 to 3.0.1, along with related dependency updates (fl_chart and vector_math). The main changes involve migrating state management code to be compatible with Riverpod v3's new API patterns.

Key changes:

  • Migration from StateProvider to NotifierProvider with explicit Notifier classes
  • Migration from AutoDisposeFamily notifiers to Notifier with explicit constructor parameters
  • Updates to async provider handling using .when() instead of .valueOrNull

Reviewed Changes

Copilot reviewed 29 out of 30 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
pubspec.yaml Updated flutter_riverpod to ^3.0.1, fl_chart to ^1.1.1, and added vector_math ^2.2.0 dependency override
lib/vm_table/vms.dart Converted StateProvider to NotifierProvider with RunningOnlyNotifier and SelectedVmsNotifier classes
lib/vm_table/vm_table_headers.dart Updated state mutations to use new notifier methods
lib/vm_table/search_box.dart Converted SearchNameNotifier to use NotifierProvider pattern
lib/vm_table/header_selection.dart Migrated EnabledHeadersNotifier to NotifierProvider
lib/vm_details/*.dart Updated all VM details components to use .when() for async state and new notifier patterns
lib/tray_menu.dart Converted DaemonVersionNotifier to NotifierProvider
lib/sidebar.dart Migrated sidebar state notifiers to NotifierProvider pattern
lib/settings/*.dart Updated settings components to handle async state with .when()
lib/providers.dart Major refactoring of provider definitions to use Riverpod v3 patterns, including SharedPreferences provider
lib/notifications/notifications_provider.dart Converted NotificationsNotifier to use new Notifier base class
lib/main.dart Updated provider overrides to use new SharedPreferences provider pattern
lib/extensions.dart Migrated HoveredLinkNotifier to NotifierProvider
lib/catalogue/*.dart Updated image launching and catalogue providers to Riverpod v3 patterns

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment on lines +19 to +20
VmScreenLocationNotifier(this.arg);
final String arg;
Copy link

Copilot AI Oct 21, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] The constructor parameter naming is inconsistent with other notifiers in the codebase. Consider renaming arg to a more descriptive name like name to match the semantic meaning (it represents a VM name) and improve code readability.

Suggested change
VmScreenLocationNotifier(this.arg);
final String arg;
VmScreenLocationNotifier(this.name);
final String name;

Copilot uses AI. Check for mistakes.
errorReceiver.close();
exitReceiver.close();
stop();
// Don't call stop() here - it will be handled by dispose
Copy link

Copilot AI Oct 21, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The comment mentions a stop() method that doesn't appear to exist in the visible code. This could be referring to removed code or a method defined elsewhere. Consider clarifying what cleanup is being deferred to dispose, or update the comment if the method no longer exists.

Suggested change
// Don't call stop() here - it will be handled by dispose
// Don't perform cleanup here - it will be handled by _dispose via ref.onDispose

Copilot uses AI. Check for mistakes.
ref.state = networks.map((n) => n.name).toBuiltSet();
}).ignore();
final networks = await ref.watch(grpcClientProvider).networks();
return BuiltSet<String>(networks);
Copy link

Copilot AI Oct 21, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The networks variable is a list of network objects with a name property, but this code attempts to create a BuiltSet<String> directly from that list. The .map((n) => n.name) transformation that existed in the old code is missing, which will cause a type error. Should be: return networks.map((n) => n.name).toBuiltSet();

Suggested change
return BuiltSet<String>(networks);
return networks.map((n) => n.name).toBuiltSet();

Copilot uses AI. Check for mistakes.
ref
.read(driverProvider.notifier)
.set(value!)
.set(value as String)
Copy link

Copilot AI Oct 21, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using a type cast with as String is risky here. Since the null check if (value == driver) return; already ensures value is not null at this point, consider using the null assertion operator value! instead for clarity, or better yet, add a null check before the if statement to avoid the cast entirely.

Suggested change
.set(value as String)
.set(value!)

Copilot uses AI. Check for mistakes.
final currentSize = ref.read(sessionTerminalFontSizeProvider);
final newSize = min(currentSize + fontSizeStep, maxFontSize);
ref.read(sessionTerminalFontSizeProvider.notifier).set(newSize);
return null;
Copy link

Copilot AI Oct 21, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] The CallbackAction.onInvoke callback now requires an explicit null return for Riverpod v3 compatibility. While this is correct for the migration, consider documenting why null is returned or if there's a more semantic return value that could be used.

Copilot uses AI. Check for mistakes.
Copy link
Member

@xmkg xmkg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM (secondary). Built and tested the GUI in Ubuntu 24.04, found no regressions.

@sharder996 sharder996 added this pull request to the merge queue Oct 21, 2025
Merged via the queue into main with commit 00a9da4 Oct 21, 2025
23 checks passed
@sharder996 sharder996 deleted the renovate/flutter_riverpod-3.x branch October 21, 2025 20:12
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.

4 participants