Desktop shell UI: wire toggle persistence, live dashboard data, deduplicate PrivacyToggle, fix lint#15
Draft
Desktop shell UI: wire toggle persistence, live dashboard data, deduplicate PrivacyToggle, fix lint#15
Conversation
- Fix Issue 1 (High): Add onChanged callback to _ToggleSwitch + new appSettingsProvider to persist biometric/server settings via PreferencesService; wire all three toggles in SettingsView - Fix Issue 2 (Medium): Make _VaultStatusCard a ConsumerWidget watching live agent + preference counts; _ConnectedAgentsCard renders real agents from agentsAsync with loading/error states and TTL formatting - Fix Issue 3 (Low): Extract shared PrivacyToggleWidget to lib/core/ui/privacy_toggle.dart; remove duplicate from both dashboard_view.dart and settings_view.dart - Add preferencesProvider for live preference counts - Apply PR files: app_shell, dashboard_view, settings_view, 5 shell views Agent-Logs-Url: https://github.com/AdamsLocal/trulana/sessions/f269d909-fc2f-4a60-8d92-74db881251bb Co-authored-by: machine-squelch <172148352+machine-squelch@users.noreply.github.com>
- Replace fallback _ToggleSwitch(isOn: true) with _ToggleLoading indicator while appSettingsProvider is loading (prevents silent data loss) - Make _parseBool in AppSettingsNotifier case-insensitive and handle '0'/'1' - Show '+N more' when ConnectedAgentsCard has more than 5 agents - Use ContextVault.instance.entryCount via _vaultEntryCountProvider instead of hardcoded '6' - Add debugPrint error logging in preferencesProvider catch block Agent-Logs-Url: https://github.com/AdamsLocal/trulana/sessions/f269d909-fc2f-4a60-8d92-74db881251bb Co-authored-by: machine-squelch <172148352+machine-squelch@users.noreply.github.com>
Agent-Logs-Url: https://github.com/AdamsLocal/trulana/sessions/86710b97-8660-4e51-bd61-17323fbd2224 Co-authored-by: machine-squelch <172148352+machine-squelch@users.noreply.github.com>
Adam Gurley (machine-squelch)
approved these changes
Apr 2, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Implements the complete desktop application shell and primary UI views (originally from PR #13), plus fixes for all Cursor Bugbot review issues and the
flutter analyze --fatal-infosCI blocker.Changes
Bug Fixes (from Bugbot review on PR #13)
onChangedcallback +didUpdateWidgetsync to_ToggleSwitch; newAppSettingsNotifierpersists biometric/server/MCP toggles throughPreferencesService_VaultStatusCard→ConsumerWidgetwatching live providers;_ConnectedAgentsCardrenders real agents with computed TTL_PrivacyToggle: Extracted to sharedlib/core/ui/privacy_toggle.dartas publicPrivacyToggleWidgetCI Fix
use_null_aware_elementslint:if (trailing != null) trailing!→?trailingui.dartimport no longer triggers — now needed forPrivacyToggleWidgetNew Files
lib/providers/app_settings_provider.dart—AppSettingsmodel +AppSettingsNotifierlib/providers/preferences_provider.dart—AsyncNotifierProvider<List<Preference>>lib/core/ui/privacy_toggle.dart— shared toggle widgetDesktop Shell UI (from PR #13 base)