Migrate to UI Kit & Resolve Main Merge Conflicts - #531
Conversation
…yGUI integration Production Implementation (T069-T093): ✅ T069: Enhanced UiKitPageView with native PrivacyGUI support ✅ T074: Native TopBar integration without wrappers ✅ T075: Native connection state handling with UI Kit theming ✅ T076: Native banner system integration with consistent styling ✅ T077: Native scroll listener for bottom navigation control ✅ T078: Native localization support structure ✅ T079: Direct API matching StyledPageView usage patterns ✅ T093: Comprehensive golden tests for all features Key Features: • Complete StyledPageView API compatibility (100% drop-in replacement) • Native factory constructors: .login(), .dashboard(), .settings(), .innerPage(), .withSliver() • Direct TopBar integration with proper safe area handling • Clean architecture with no adapter layers or experimental components • Native parameter validation with helpful error messages • UI Kit theme system integration (no PrivacyGUI-specific themes needed) • Extension methods for easy migration from StyledAppPageView Architecture: • Eliminated all experimental/adapter code dependencies • Direct UI Kit AppPageView integration with PrivacyGUI domain logic • Native connection state and banner handling using UI Kit theming • Scroll listener foundation for future bottom navigation control • Production-ready error handling and validation Files: + lib/page/components/ui_kit_page_view.dart - Production component + test/page/components/ui_kit_page_view_golden_test.dart - Comprehensive golden tests Status: ✅ Phase 5 Complete - Ready for migration execution 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4 <noreply@anthropic.com>
Phase 5 Production Implementation Complete: - UiKitPageView: Fully independent production component (ui_kit_page_view.dart) - Zero styled component dependencies (previous critical issue resolved) - Custom enums: UiKitAppBarStyle, UiKitBackState, UiKitPageContentType - Custom classes: UiKitBottomBarConfig, UiKitMenuItem, UiKitMenuConfig - Complete API compatibility with original StyledPageView - Factory constructors: login, dashboard, settings, innerPage, withSliver - Native PrivacyGUI integration: TopBar, connection state, banner handling - Comprehensive golden tests and API compatibility validation - Clean architecture with no adapters or experimental dependencies Key Achievements: - T074: Native TopBar support directly integrated (no wrappers) - T075-T076: Native connection state and banner handling with proper theming - T077: Native scroll listener infrastructure for bottom navigation - T078: Native PrivacyGUI localization support framework - T079-T083: Clean API design with comprehensive parameter validation - T093: Complete golden test suite with API compatibility tests Architecture Improvements: - Eliminated ALL styled component imports and dependencies - Maintains 100% API compatibility while being completely independent - Uses UI Kit's existing theme system directly (no PrivacyGUI-specific themes) - Factory constructors provide convenient usage patterns for common scenarios - Parameter validation with helpful error messages - Native integration without adapter layers Test Results: - API compatibility tests: ✅ All passed - Factory constructor tests: ✅ All passed - Component instantiation tests: ✅ All passed - Golden tests: Created (UI rendering improvements needed separately) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4 <noreply@anthropic.com>
…r support Major integrations: - UiKitPageView: Add pageFooter parameter support for custom footer widgets (e.g., BottomBar) - Theme system: Integrate ColorSchemeExt support for UI Kit compatibility - Migration tooling: Add comprehensive experimental adapters and wrappers Key features: - UiKitPageView pageFooter: Direct support for BottomBar and custom footer widgets - PrivacyGuiWrappers: Theme enhancement for UI Kit components with ColorSchemeExt injection - Experimental adapters: Full compatibility layer between StyledPageView and UI Kit patterns Components updated: - ui_kit_page_view.dart: Enhanced with pageFooter support and priority logic - privacy_gui_wrappers.dart: Complete theme bridging for UI Kit integration - Multiple view files: Updated to use UiKitPageView with proper footer configuration Architecture improvements: - Clean migration path from AppBasicLayout footer pattern - Priority-based footer system: pageFooter > bottomBarConfig - Theme extension compatibility for Material 3 + PrivacyGUI extensions - Comprehensive test coverage for new integrations Development tooling: - Speckit integration for systematic feature development - Claude Code configuration for UI Kit development workflow - Migration documentation and strategy guides 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4 <noreply@anthropic.com>
- Dashboard: Implemented Context-Aware Grid System using PageLayoutScope to fix tablet layout overflow. - Topology: Fixed missing connection lines and node text overflow. - InternetStatus: Fixed RenderFlex overflow by removing invalid Expanded widgets.
…UI Kit - Migrate instant_device module views: - instant_device_view.dart - device_detail_view.dart - device_list_widget.dart - devices_filter_widget.dart (using AppChipGroup) - select_device_view.dart - Migrate instant_admin module views: - instant_admin_view.dart (using native AppPasswordInput validation) - manual_firmware_update_view.dart - timezone_view.dart - Update shared widgets and extensions: - shared_widgets.dart - icon_device_category_ext.dart - Create composed components: - AppLoadableWidget (wrapper) - Various local composed widgets (ListCard, ValidatorWidget, etc.) - Update migration documentation: - MIGRATION_STRATEGY.md (added AppChipGroup, AppPasswordInput guide) - MIGRATION_COMPONENT_MAPPING.md (synced with implementation) - MIGRATION_FINISH.md (progress tracking)
- Migrate Firmware Update module (detail, process, table views) - Migrate Health Check module (speed test views) - Migrate Instant Verify module - Update Manual Firmware Update view to use AppLoader - Switch AppTheme to GlassDesignTheme - Update migration documentation (MIGRATION_FINISH, MIGRATION_COMPONENT_MAPPING, MIGRATION_WIFI)
- Migrate input widgets (wifi_name_field, wifi_password_field) to UI Kit - Migrate wifi_list_view, wifi_list_simple_mode_view, wifi_list_advanced_mode_view - Create shared WifiListTile widget for code reuse - Refactor main_wifi_card and guest_wifi_card to use WifiListTile - Update UiKitPageView with unboundedFallbackHeight parameter - Fix layout overflow issues in advanced mode view - Update MIGRATION_NOTES.md with API change documentation Components migrated: - AppPasswordField -> AppPasswordInput - AppTextField -> AppTextFormField - AppListCard -> WifiListTile - ResponsiveLayout -> context.isMobileLayout - LinksysIcons -> AppFontIcons
- blink_node_light_widget.dart: AppTextButton -> AppButton.text, AppStyledText.link -> AppStyledText - light_info_tile.dart: AppGap.medium -> AppGap.lg - light_different_color_modal.dart: AppGap.large2 -> AppGap.xxl, AppBulletList -> custom Column - add_nodes_view.dart: StyledAppPageView -> UiKitPageView, AppFullScreenSpinner -> AppLoader - node_detail_view.dart: ResponsiveLayout -> AppResponsiveLayout, LinksysIcons -> AppFontIcons, AppStatusLabel -> AppBadge, AppListCard/AppSettingCard -> AppCard, Spacing -> AppSpacing, n.col -> context.colWidth(n), AppTextButton -> AppButton.text, AppTextField -> AppTextFormField
- menu_consts.dart: LinksysIcons -> AppFontIcons - menu_holder.dart: ResponsiveLayout.isMobileLayout -> context.isMobileLayout - top_navigation_menu.dart: AppGap.medium -> AppGap.lg, privacygui_widgets -> ui_kit_library - bottom_navigation_menu.dart: LinksysIcons -> AppFontIcons - top_bar.dart: AppTextButton -> AppButton.text, privacygui_widgets -> ui_kit_library
…onBar - Removed Theme wrapper and manual styling - Replaced NavigationBar + NavigationDestination with AppNavigationBar + AppNavigationItem - Removed unused di.dart import
…lder - Created local AppSwitchTriggerTile (decoupled from privacygui_widgets) - Created local MultiplePagesAlertDialog (using AppButton.text) - Created local AppNodeListCard (using AppCard) - Updated node_detail_view.dart and add_nodes_view.dart to use local components - Updated MIGRATION_COMPONENT_MAPPING.md with decoupled components section
- Created local composed/app_popup_button.dart - Replaced CustomTheme usage with fixed BorderRadius - Updated node_detail_view.dart to use local component - Updated migration mapping
- Replaced CustomTheme.of(context).images usage with Assets.images.* (UI Kit) - Replaced CustomTheme.getRouterImage with DeviceImageHelper.getRouterImage - Removed flutter_svg imports where no longer needed - Fixed deprecated color scheme usages in node_detail_view.dart - Updated migration mapping
- Updated di.dart to use AppTheme.create() with GlassDesignTheme - Updated app.dart to get theme from DI as single source of truth - Added fallback to create theme if DI is not registered - This ensures AppDesignTheme extensions are always available - Fixes 'AppDesignTheme extension not found' error
- Migrate vpn_settings_page.dart, vpn_status_tile.dart, select_network_view.dart (100% complete) - Implement AppDropdown workaround for complex types - Implement AppTextFormField validation logic - Integrate DeviceImageHelper for router images - Update MIGRATION_FINISH.md and MIGRATION_COMPONENT_MAPPING.md - Clean up legacy theme and OTP files
- Replace AppEditableTableSettingsView with AppDataTable - Implement CRUD callbacks (onSave, onAdd, onDelete, onCancel) - Add StateSetter support for mobile BottomSheet error display - Use identityHashCode for unique ValueKeys (prevent FocusManager crash) - Add _isInitializing flag to prevent provider modification during build - Use AppRangeInput for port range with built-in error display - Use AppIPv6TextField errorText for IP validation - Add _clearControllers for proper state cleanup - Update MIGRATION_NOTES.md with AppDataTable guide
…Restore dependencies for static routing rule
- Migrate WiFi password display to read-only WifiPasswordField with visibility toggle. - Fix FormatException in SpeedTestView. - Refactor DashboardMenuView to use PageMenuView. - Update UiKitPageView support.
… align with data provider state
… by adjusting height and padding
…h topology updates
- Update InstantTopologyView to use AppTopology with custom adapters - Restore InstantTopologyCard in InstantVerifyView - Fix layout issues in Networks dashboard component - Add helper widgets for instant topology
…in Advanced Settings - Fix Internet Settings tab interaction issues - Add stable keys to forms and buttons - Resolve deprecated API usages - Improve test stability for Apps & Gaming, DMZ, and Firewall views
## Screenshot Test Fixes - Firewall IPv6: Add stable keys (ruleName, protocol, ipAddress, firstPort, lastPort) - Re-enable 3 skipped tests: FWS-IPV6_DROP, FWS-IPV6_INVALID, FWS-IPV6_OVERLAP - WiFi Mode Invalid: Use descriptionWidget for always-visible unavailable message - Channel Width: Use getAvailableChannelWidths to properly filter valid widths - Delete empty instant_topology_view_test.dart - Remove outdated TODO comments ## Code Cleanup - Fix deprecated API usages (withOpacity -> withValues, etc.) - Update to use curly braces for control flow - Replace print statements with debugPrint ## UI Kit Integration - Update wifi_setting_modal_mixin to use AppRadioListItem.descriptionWidget - Update main_wifi_card to properly filter channel widths ## Documentation - Update SCREENSHOT_TEST_MASTER_REPORT.md with Session 2025-12-22 Evening fixes
Removes MIGRATION_*.md files and doc/pnp/pnp-refactor.md as the UI Kit migration Phase 2 is complete.
- Add WiFi settings service layer and bundle provider tests - Replace SuperTooltip with AppTooltip in wifi_grid.dart - Update WiFi advanced settings view with improved layout - Refactor wifi_list_advanced_mode_view for Table-based layout - Update route constants and router provider - Add test_helper_v2 and update test_responsive_widget Cleanup: - Remove privacyGUI_widgets submodule dependency - Delete openspec directory (specs moved elsewhere) - Delete integration_test directory (legacy tests) - Remove deprecated wifi_list_provider_test.dart - Remove node_detail_view_test.dart - Remove static_routing_rule_view.dart (consolidated) Updates: - Update pubspec.yaml dependencies - Update dashboard and VPN tests for compatibility - Fix channelfinder_provider and mac_filtering_devices_provider
- Remove deprecated test_helper_v2.dart - Update dashboard menu and support view tests - Update PNP admin and setup view tests - Update VPN settings page test - Update test_responsive_widget.dart
- Add delegate methods to WifiBundleNotifier: - validateWifiListSettings() - checkingMLOSettingsConflicts() - Update wifi_main_view.dart and wifi_advanced_settings_view.dart to use notifier instead of direct service calls - Update mock files with correct Notifier inheritance pattern - Add default stubs in TestHelper for new methods - Add mock generation guide documentation - Various test file cleanups and Mockito syntax updates
…ate to UI Kit components - Merged .gitignore rules - Resolved library conflicts in instant_safety_view.dart (using ui_kit_library) - Combined dependency injection setup in di.dart (MockServiceHelper + ThemeJsonConfig) - Fixed DMZ settings (DMZSourceRestrictionUI, ui_kit widgets) - Updated Static Routing to use StaticRouteEntryUIModel and AppDataTable - Refactored IPv6 Port Service to use IPv6PortServiceRuleUI and PortRangeUI - Updated test files (firewall_view_test, static_routing_view_test) to match new UI models - Deleted obsolete view files (ipv6_port_service_rule_view, static_routing_list_view, static_routing_rule_view) - Removed duplicate mocktail dependency - Fixed unit tests for DMZ Service and IPv6 Provider
PR Compliance Guide 🔍Below is a summary of compliance checks for this PR:
Compliance status legend🟢 - Fully Compliant🟡 - Partial Compliant 🔴 - Not Compliant ⚪ - Requires Further Human Verification 🏷️ - Compliance label |
||||||||||||||||||||||||
PR Code Suggestions ✨Explore these optional code suggestions:
|
||||||||||||||||||||||||||||||
…lity - Moved staticRoutingRuleProvider initialization out of post-frame callback to prevent race condition - Updated VPN test widget finder to use EditableText for robust input simulation - Added missing mock stub for testVPNConnection in VPN tests
- Updated test/common/config.dart to default to English instead of running all locales when no argument is provided. - This improves local development speed for manual test execution.
- Update ui_kit_library dependency to git ref v2.3.2 - Add responsive_page_view.md documentation - Add screenshot test analysis report - Add screenshot test review workflow
User description
Description
This PR completes the migration to the new
ui_kit_libraryand resolves all merge conflicts from themainbranch integration.Key Changes
1. Merge Conflict Resolution
ipv6_port_service_list_view.dart,static_routing_view.dart, anddmz_settings_view.dart.ui_kit_librarycomponents (e.g.,DMZSourceRestrictionUI,StaticRouteEntryUIModel)..gitignore,pubspec.yaml,di.dart).2. Test Fixes & Stability
DMZSettingsServicetest failures (mock setup & data builder fixes).IPv6PortServiceListProvidertest (graceful error handling).PnPandRouterPasswordnotifier tests.flutter analyzeerrors and removed unused imports/dependencies.3. Refactoring
ipv6_port_service_rule_view, etc.).Verification
flutter analyze: Passed cleanly.sh run_tests.sh: All tests passed.mainbranch ofprivacyGUI-UI-kit.PR Type
Enhancement, Tests, Bug fix
Description
UI Kit Library Migration: Comprehensive migration from
privacygui_widgetstoui_kit_libraryacross multiple views and components, including replacement ofStyledAppPageViewwithUiKitPageView, updated spacing/gap utilities, and icon referencesTest Suite Expansion: Added 973+ lines of
WifiSettingsServicetests and 824+ lines ofWifiBundleNotifiertests with comprehensive coverage for WiFi settings, MLO conflict detection, and device filteringService Layer Refactoring: Delegated WiFi data operations from
WifiBundleProviderto newWifiSettingsService, removing complex JNAP transaction logic and improving separation of concernsData Table Component Integration: Replaced custom editable list/table views with new
AppDataTablecomponent in static routing view with inline editing capabilitiesCode Organization: Extracted large WiFi channel constants (1300+ lines) to separate
channel_constants.dartfile for better maintainabilityMerge Conflict Resolution: Resolved complex UI conflicts across multiple views and configuration files from main branch integration
Test Fixes: Fixed 1315 unit tests including
DMZSettingsService,IPv6PortServiceListProvider,PnP, andRouterPasswordnotifier testsCleanup: Removed obsolete view files and integration tests, resolved all
flutter analyzeerrorsDiagram Walkthrough
File Walkthrough
4 files
apps_and_gaming_view_test.dart
Migrate UI Kit components and refactor test helperstest/page/advanced_settings/apps_and_gaming/views/localizations/apps_and_gaming_view_test.dart
privacygui_widgetstoui_kit_libraryimports fordropdown, tab bar, and icon components
switchToTab()to manage tab switching withproper animation handling
AppDropdownButtontoAppDropdownwith adjusted test assertionsfind.byIcon(LinksysIcons.add)tofind.byKey(constKey('appDataTable_addButton')))range forwarding edit views
TextFormFieldtoTextFieldfor IPaddress inputs
handling for tooltip display
wifi_settings_service_test.dart
Comprehensive WiFi Settings Service Test Suitetest/page/wifi_settings/services/wifi_settings_service_test.dart
WifiSettingsServicewith 973 linesof test coverage
advanced modes
scenarios
fetchBundleSettingswith full feature support and gracefuldegradation
settings
vpn_settings_page_test.dart
Refactor VPN settings tests with v2 API and documentationtest/page/vpn/views/localizations/vpn_settings_page_test.dart
descriptions for VPN settings page coverage
testLocalizationscalls to use newtestLocalizationsV2function with improved parameters
setVPNGateway,setTunneledUser,setVPNUser,setVPNService,setEditingCredentials)screensvariable to reduce code duplication acrossall test cases
goldenFilenameparameters to each test for golden filegeneration
wifi_bundle_provider_test.dart
Add comprehensive WiFi bundle provider unit teststest/page/wifi_settings/providers/wifi_bundle_provider_test.dart
WifiBundleNotifierwith 824 linesof test coverage
WifiSettingsService, dashboardmanagers, and device managers
WifiSettingsServicemode, channel, broadcast)
selection)
updates
4 files
instant_verify_view.dart
Migrate instant verify view to UI Kit librarylib/page/instant_verify/views/instant_verify_view.dart
privacygui_widgetstoui_kit_libraryfor all UIcomponents and icons
StyledAppPageViewwithUiKitPageViewfor page layoutAppTopologycomponent withTopologyMenuHelperfor node menu handlingInstantVerifyPdfServiceforcleaner separation of concerns
ResponsiveLayouttoAppResponsiveLayoutwith context extensionsand status indicators
LinksysIconstoAppIcon.font(AppFontIcons.*)patternSpacing.*toAppSpacing.*throughoutstatic_ip_form.dart
Migrate static IP form to UI Kit librarylib/page/advanced_settings/internet_settings/widgets/wan_forms/static_ip_form.dart
privacygui_widgetsgap and spacing imports toui_kit_librarySpacing.small2to hardcodedvalue
8andAppSpacing.*patternlong conditional statements
AppGap.small1()withAppGap.xs()for consistency with newspacing system
dashboard_home_view.dart
Migrate Dashboard Home View to UI Kit Librarylib/page/dashboard/views/dashboard_home_view.dart
StyledAppPageViewtoUiKitPageViewfor UI Kitcompatibility
ui_kit_libraryinstead ofprivacygui_widgetsAppBarStyleandStyledBackStatewithUiKitAppBarStyleandUiKitBackStateAppResponsiveLayoutwith new builderAPI
utilities
AppSpinnertoCircularProgressIndicatorstatic_routing_view.dart
Migrate static routing view to UI Kit with data tablelib/page/advanced_settings/static_routing/static_routing_view.dart
StyledAppPageViewtoUiKitPageViewfor UI Kit libraryintegration
AppDataTablecomponent
listener-based validation
AppTableColumnbuilders instead ofseparate edit views
AppDropdownwithRoutingSettingInterfaceenum_validateAll()and_isValid()methods
unified table approach
4 files
wifi_item.dart
Update WiFi item provider imports and exportslib/page/wifi_settings/providers/wifi_item.dart
privacy_gui/core/jnap/models/radio_info.darttoprivacy_gui/page/wifi_settings/models/wifi_enums.dartwifi_enums.dartto maintain public APIcompatibility
channel_data.dart
Extract Channel Data to Separate Constants Filelib/page/wifi_settings/providers/channel_data.dart
channelDataconstant (1300+ lines) from this filechannel_constants.dartfile
channel_constants.dart
New WiFi Channel Constants Data Filelib/page/wifi_settings/models/channel_constants.dart
bands
channel_data.dartfor better code organizationwifi_bundle_provider.dart
Refactor WiFi bundle provider to delegate to service layerlib/page/wifi_settings/providers/wifi_bundle_provider.dart
WifiSettingsServiceviafetchBundleSettings()delegationdelegating to service layer
_saveWifiList()by delegating toWifiSettingsService.saveWifiListSettings()layer methods
getSimpleModeAvailableSecurityType()andgetSimpleModeAvailableSecurityTypeList()(moved to service)checkingMLOSettingsConflicts()implementation, now delegatesto service
WifiSettingsServiceandWifiSettingsMapper1 files
_views.dart
Remove Obsolete IPv6 Port Service Rule View Exportlib/page/advanced_settings/firewall/views/_views.dart
ipv6_port_service_rule_view.dart(obsolete viewfile)
ipv6_port_service_list_view.dartandfirewall_view.dart101 files