From b87cd2dedd18c2388f7ff4f130d91afe57ea07d5 Mon Sep 17 00:00:00 2001 From: dab246 Date: Tue, 27 Oct 2026 17:14:29 +0700 Subject: [PATCH] TF-5022 Name RiverpodActiveAccountSource, ActiveAccountSource and ActiveAccountWriter in the ADR-0092 exception and drop the fixed call-site count --- docs/adr/0092-upgrade-flutter-riverpod-3.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/adr/0092-upgrade-flutter-riverpod-3.md b/docs/adr/0092-upgrade-flutter-riverpod-3.md index c2e1cba88..e2490e4dd 100644 --- a/docs/adr/0092-upgrade-flutter-riverpod-3.md +++ b/docs/adr/0092-upgrade-flutter-riverpod-3.md @@ -203,9 +203,9 @@ notifier = container.read(composerAutoSaveProvider('test-id').notifier); `appProviderContainer` is frozen. No new `.read()` / `.listen()` / `.invalidate()` calls may be added to it. New features that need Riverpod state must use `ConsumerWidget` + `ref.watch/read` against the widget tree scope. -One exception is recorded by [ADR-0114](./0114-delegated-mailbox-access.md). `DelegationBindings` hands the container once to `ActiveAccountBridge`, the only GetX access to the shown account. Its readers are GetX controllers with no `WidgetRef`, and the dashboard must write each session synchronously before any of them runs, which a delegate mounted by a view cannot guarantee. +One exception is recorded by [ADR-0114](./0114-delegated-mailbox-access.md). `DelegationBindings` hands the container once to `RiverpodActiveAccountSource`, registered as `ActiveAccountSource` and `ActiveAccountWriter`, the only GetX access to the shown account. Its readers are GetX controllers with no `WidgetRef`, and the dashboard must write each session synchronously before any of them runs, which a delegate mounted by a view cannot guarantee. -### Six existing call sites to migrate +### Existing call sites to migrate | File | Operation | Migration target | |---|---|---| @@ -215,9 +215,9 @@ One exception is recorded by [ADR-0114](./0114-delegated-mailbox-access.md). `De | `SearchEmailController` | `.read(localSettingsProvider)` | Migrate to `ConsumerWidget` + `ref.watch` | | `HandleMobileAutoSaveExtension` | `.read(composerAutoSaveProvider(id).notifier)` + `.invalidate(...)` | Migrate composer to `ConsumerStatefulWidget` | | `HandleComposerRestoreOnMobileExtension` | `.read(resolveComposerCacheForRestoreProvider)` | Migrate to `ref.read` within a `ConsumerWidget` | -| `DelegationBindings` | Container handed to `ActiveAccountBridge` (`.read` / `.listen(activeAccountProvider)`) | Move each `ActiveAccountReader` to `ref.watch(activeAccountProvider)`, then delete the bridge | +| `DelegationBindings` | Container handed to `RiverpodActiveAccountSource` (`.read` / `.listen(activeAccountProvider)`) | Move each `ActiveAccountReader` to `ref.watch(activeAccountProvider)`, then delete `ActiveAccountSource` and `ActiveAccountWriter` | -Each migration will be covered by a dedicated ADR and eliminates one `appProviderContainer` call site. When all six are gone: +Each migration will be covered by a dedicated ADR and eliminates one `appProviderContainer` call site. When all of them are gone: 1. Replace `UncontrolledProviderScope` with plain `ProviderScope` in `main.dart` 2. Delete `appProviderContainer` from `app_provider_container.dart`