Skip to content

Desktop shell UI: wire toggle persistence, live dashboard data, deduplicate PrivacyToggle, fix lint#15

Draft
Copilot wants to merge 3 commits intomainfrom
copilot/add-desktop-shell-ui
Draft

Desktop shell UI: wire toggle persistence, live dashboard data, deduplicate PrivacyToggle, fix lint#15
Copilot wants to merge 3 commits intomainfrom
copilot/add-desktop-shell-ui

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 31, 2026

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-infos CI blocker.

Changes

Bug Fixes (from Bugbot review on PR #13)

  • High — Toggle switches silently discard state: Added onChanged callback + didUpdateWidget sync to _ToggleSwitch; new AppSettingsNotifier persists biometric/server/MCP toggles through PreferencesService
  • Medium — Dashboard cards ignore async data: _VaultStatusCardConsumerWidget watching live providers; _ConnectedAgentsCard renders real agents with computed TTL
  • Low — Duplicate _PrivacyToggle: Extracted to shared lib/core/ui/privacy_toggle.dart as public PrivacyToggleWidget

CI Fix

  • use_null_aware_elements lint: if (trailing != null) trailing!?trailing
  • Unused ui.dart import no longer triggers — now needed for PrivacyToggleWidget

New Files

  • lib/providers/app_settings_provider.dartAppSettings model + AppSettingsNotifier
  • lib/providers/preferences_provider.dartAsyncNotifierProvider<List<Preference>>
  • lib/core/ui/privacy_toggle.dart — shared toggle widget

Desktop Shell UI (from PR #13 base)

  • AppShell with persistent sidebar navigation
  • DashboardView with grid layout: Vault Status, Redaction Stats, Connected Agents, Recent Activity, Audit Trail
  • SettingsView with Privacy, Server, and Data sections
  • ContextVaultView, PreferencesView, AgentsView, AuditLogView

Copilot AI and others added 3 commits March 31, 2026 18:33
- 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>
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.

2 participants