Commit f082bb9
authored
docs: translate documentation and test data to English (#612)
* feat: encapsulate conditional exports with entry points
- Create entry point files for 7 modules:
- ip_getter, url_helper, export_selector, get_log_selector,
client_type, assign_ip (new entry points)
- Add mobile_assign_ip.dart (no-op implementation for native)
- Update 17 consumer files to use clean single imports
- Add platform-conditional-exports-audit.md documentation
This eliminates exposed conditional imports in consumer files.
Consumers now only need to import the entry point file.
Modules encapsulated:
1. ip_getter (5 consumers)
2. url_helper (5 consumers)
3. export_selector (2 consumers)
4. get_log_selector (1 consumer)
5. client_type (1 consumer)
6. assign_ip (3 consumers)
* feat(dashboard): decompose widgets into atomic components for Bento Grid
- Add 6 new atomic widgets for Custom Layout:
- DashboardInternetStatus (internet status only)
- DashboardMasterNodeInfo (router details)
- DashboardPorts (LAN/WAN port status)
- DashboardSpeedTest (speed test results)
- DashboardNetworkStats (nodes/devices count)
- DashboardTopology (mesh tree view)
- Update DashboardWidgetSpecs:
- Add specs for all 6 atomic widgets
- Add standardWidgets and customWidgets lists
- Update DashboardLayoutContext:
- Add atomic widget fields
- Add _allAtomicWidgets map
- Add orderedVisibleCustomSpecs getter
- Update CustomDashboardLayoutStrategy:
- Use orderedVisibleCustomSpecs for Custom Layout
- Update DashboardLayoutSettingsPanel:
- Show only atomic widgets in Custom mode (no VPN, no composites)
- Add reorderCustomWidget for proper ordering
- Fix WiFi Grid truncation:
- Add SingleChildScrollView for overflow handling
- Increase HeightStrategy to 5.0 for 2-row default height
* feat(dashboard): refine constraints, lock topology, fix internet status ui
- Implement resize lock for Topology in Expanded mode (8x5 fixed).
- Update Internet Status constraints: Compact MinHeight=1, Normal/Expanded MinHeight=2.
- Fix Internet Status Compact UI: Remove location info, reduce padding (cleaner look).
- Fix SliverDashboardView mapping: Use correct InternetConnectionWidget for internet_status item.
* feat(dashboard): Refactor Topology interaction, localize comments, and improve layout stability
* feat(dashboard): Enhance widget metadata, IoC support, and cancel edit functionality
- Metadata: Added description and requirements to WidgetSpec
- IoC: Implemented WidgetRequirement enum for data-driven feature checks (e.g. VPN)
- Layout: Enabled composite widgets (port_and_speed, networks) in custom layout
- Edit Mode: Added 'Cancel' button with full state restoration (layout positions + view modes)
- Settings: Updated Hidden Widgets panel to respect requirements
* feat: enhance dashboard interactivity and visual consistency
- Refactor WiFi Grid Compact View to use AppSurface for unified styling
- Replace InkWell with AppInkWell in Topology, Master Node, and WiFi Grid for consistent interaction feedback
- Enable navigation for Topology Compact View and Master Node
- Implement WiFi band toggling in WiFi Grid Compact View
- Update Internet Status refresh icon color
- Optimize dashboard layout and item heights
* feat(dashboard): improve custom layout dynamic constraints and UX
- Add dynamic Ports widget constraints based on hardware state (hasLanPort, isHorizontalLayout)
- Add minHeightRows/maxHeightRows to Ports constraints for resize validation
- Update LayoutItemFactory to use IoC pattern with WidgetSpecResolver
- Auto-optimize layout on first use and reset
- Add Optimize button to edit toolbar (uses optimizeLayout())
- Reset button only enabled when custom layout is active
- Reset only resets layout positions and display modes, preserves custom layout toggle
- Fix edit mode state sync bugs when resetting or toggling custom layout
- Update default layout positioning to match target design
- Adjust widget constraints: QuickPanel(h=3), MasterNode(h=4), Topology(w=4,h=4)
* feat(dashboard): isolate standard layout widgets into fixed_layout and decouple custom widget IDs
* refactor(dashboard): improve SliverDashboardView layout architecture
- Use DashboardOverlay + SliverDashboard + CustomScrollView for proper scroll behavior
- Fix grid background to only appear in dashboard area (not TopBar/Title)
- Add SliverPadding for correct horizontal margins
- Fix WiFi Grid default height (use spec value instead of hardcoded h:2)
- Simplify DashboardHomeView custom layout branch
- TopBar, Edit Toolbar, Title fixed at top with dashboard grid scrollable
* feat(dashboard): refine Expanded Mode layouts (Quick Panel, Speed Test, etc.)
* feat(dashboard): add custom layout and localization
- Add custom_layout parameter to deploy-demo workflow
- Add 13 new localization keys for dashboard custom layout
- Replace hardcoded strings with loc(context) calls
- Fix localization tests for dashboard and speed test views
- Fix unused imports and deprecated debugState usage in tests
- Update UI Kit dependency to v2.10.6
* fix: use systemStatsState for cpuLoad/memoryLoad in dashboard service
* fix: address PR review issues
- Fix saveLayout() not called after constraint violation correction in resize
- Add empty children guard to prevent crash in InternetConnectionWidget
- Change .then() to .whenComplete() for error resilience in refresh action
* Refactor NodeLightSettings to Clean Architecture
This commit refactors the NodeLightSettings feature to follow Clean Architecture principles, decoupling the UI from JNAP data models.
Changes:
- Introduce NodeLightState UI model
- Update NodeLightSettingsService for Model-State conversion
- Update NodeLightSettingsProvider to expose NodeLightState
- Update consumers (NodeDetailView, QuickPanel) to use NodeLightState
- Update Unit and Widget Tests
* refactor(core): resolve P1 cross-page dependencies and fix test regressions
- Move to shared
- Refactor to depend on
- Fix regressions in and
- Fix mocks in
* refactor: fix P0 and P1 architecture violations
P0 Fixes:
- P0-1: prepare_dashboard_view.dart - Use SessionProvider instead of direct RouterRepository access
- P0-2: pnp_no_internet_connection_view.dart - Add isLoggedIn getter to PnpNotifier, move defaultAdminPassword to shared constants
- P0-3: local_network_settings_view.dart - Use getLocalIp helper with ProviderReader pattern
- P0-4: router_assistant_view.dart - Move provider definition to dedicated provider file
P1 Fixes:
- P1-1: select_network_provider.dart - Create NetworkAvailabilityService to encapsulate router check logic
- P1-2: channelfinder_provider.dart - Move service provider definition to service file
New files:
- lib/constants/defaults.dart - Shared default constants
- lib/page/ai_assistant/providers/router_command_provider.dart
- lib/page/select_network/services/network_availability_service.dart
- test/core/utils/ip_getter_test.dart - Tests for IP getter refactoring
- test/page/instant_setup/providers/pnp_auth_test.dart - Tests for PnP auth logic
Updated architecture violations report to reflect fixed items.
* refactor: separate DeviceInfo into UI and JNAP protocol models
- Create JnapDeviceInfoRaw for JNAP protocol layer (with services field)
- Refactor NodeDeviceInfo as pure UI model (moved to core/models/)
- Add fetchDeviceInfoAndInitializeServices() to encapsulate buildBetterActions
- Remove services parameter from getAdminPasswordAuthStatus()
- Fix login error display by rethrowing JNAPError for countdown data
- Update all related imports and tests
* fix(firmware-views): remove direct JNAP model imports from Views
- Remove FirmwareUpdateState import from firmware_update_process_view.dart
- Remove TimeSettings import from instant_admin_view.dart
- Update firmware_update_provider to expose UI-friendly properties
- Clean up firmware_update_state for proper encapsulation
Resolves P2 architecture violations per architecture-violations-detail.md
* feat(dashboard): Implement A2UI widget extension with async loading and settings integration
Completed tasks T027-T029. Implemented JSON-based widget loading, fixed async rebuild issues, and integrated A2UI widgets into the Settings Panel with proper badges.
* feat(a2ui): implement DBC assertions, remove hardcoded layouts, and refactor architecture
* feat: Enhance A2UI dashboard system with new widgets, actions, and validation
- Added new A2UI widget assets: guest_network, network_traffic, quick_actions, router_control, system_health.
- Implemented robust Action handling system (ActionManager, ActionHandler).
- Enhanced TemplateBuilder with better rendering capabilities.
- Added A2UIConstraintValidator for widget validation.
- Extensive test coverage added for actions, assets, integration, and rendering.
- Refactored JNAP data resolver and updated Dashboard factory.
* docs: translate documentation and test data to English
- Translated project documentation, specs, and architectural analysis to English
- Translated all Chinese content in test/test_data/
- Consolidated AI Assistant documentation into single architecture file
- Cleaned up redundant documentation and temporary scripts
- Updated pubspec.yaml dependencies and formatted code
* fix: address PR compliance issues (raw error exposure, HTML injection)
- Refactored to hide raw error details from UI (Generic: Robust Error Handling)
- Updated to escape HTML in dynamic fields (Generic: XSS Prevention)
- Addressed const lint error
* docs: translate accessibility examples to English
* refactor: address PR code suggestions (security, logic, cleanup)
* fix: resolve RenderFlex overflow in wifi_card.dart for small screens
* fix: final cleanup (remove duplicate calls, fix syntax, revert import)1 parent dfaa782 commit f082bb9
96 files changed
Lines changed: 18522 additions & 5760 deletions
File tree
- assets
- a2ui/widgets
- resources
- doc
- accessibility
- history
- ai_assistant
- archive
- audit
- lib
- ai/registry
- demo
- page
- ai_assistant/views
- dashboard
- a2ui
- actions
- loader
- models
- presets
- registry
- renderer
- resolver
- validator
- factories
- models
- providers
- views
- components
- fixed_layout
- settings
- widgets/atomic
- support/widgets
- specs/017-a2ui-dashboard-widgets
- test
- accessibility
- examples
- page/dashboard/a2ui
- actions
- assets
- catalog
- integration
- loader
- models
- registry
- renderer
- resolver
- validator
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
6 | 6 | | |
7 | | - | |
8 | | - | |
9 | | - | |
10 | | - | |
11 | | - | |
12 | | - | |
13 | | - | |
14 | | - | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
15 | 15 | | |
16 | | - | |
| 16 | + | |
17 | 17 | | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | | - | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
22 | 22 | | |
23 | | - | |
24 | | - | |
25 | | - | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
26 | 26 | | |
27 | | - | |
28 | | - | |
29 | | - | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
30 | 30 | | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
35 | 35 | | |
36 | | - | |
37 | | - | |
38 | | - | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
39 | 39 | | |
40 | | - | |
| 40 | + | |
41 | 41 | | |
42 | | - | |
| 42 | + | |
43 | 43 | | |
44 | 44 | | |
45 | | - | |
| 45 | + | |
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
49 | | - | |
| 49 | + | |
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
54 | | - | |
| 54 | + | |
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
59 | | - | |
60 | | - | |
61 | | - | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
62 | 62 | | |
63 | | - | |
| 63 | + | |
64 | 64 | | |
65 | 65 | | |
66 | 66 | | |
67 | | - | |
| 67 | + | |
68 | 68 | | |
69 | 69 | | |
70 | 70 | | |
71 | 71 | | |
72 | | - | |
| 72 | + | |
73 | 73 | | |
74 | | - | |
| 74 | + | |
75 | 75 | | |
76 | | - | |
| 76 | + | |
77 | 77 | | |
78 | 78 | | |
79 | 79 | | |
80 | 80 | | |
81 | 81 | | |
82 | | - | |
| 82 | + | |
83 | 83 | | |
84 | | - | |
85 | | - | |
86 | | - | |
87 | | - | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
88 | 88 | | |
89 | 89 | | |
90 | | - | |
| 90 | + | |
91 | 91 | | |
92 | | - | |
| 92 | + | |
93 | 93 | | |
94 | 94 | | |
95 | 95 | | |
96 | 96 | | |
97 | 97 | | |
98 | | - | |
| 98 | + | |
99 | 99 | | |
100 | | - | |
| 100 | + | |
101 | 101 | | |
102 | | - | |
| 102 | + | |
103 | 103 | | |
104 | 104 | | |
105 | | - | |
| 105 | + | |
106 | 106 | | |
107 | 107 | | |
108 | 108 | | |
109 | | - | |
| 109 | + | |
110 | 110 | | |
111 | | - | |
| 111 | + | |
112 | 112 | | |
113 | 113 | | |
114 | | - | |
| 114 | + | |
115 | 115 | | |
116 | 116 | | |
117 | 117 | | |
118 | 118 | | |
119 | | - | |
| 119 | + | |
120 | 120 | | |
121 | | - | |
122 | | - | |
123 | | - | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
124 | 124 | | |
125 | 125 | | |
126 | | - | |
| 126 | + | |
127 | 127 | | |
128 | | - | |
129 | | - | |
130 | | - | |
131 | | - | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
132 | 132 | | |
133 | | - | |
| 133 | + | |
134 | 134 | | |
135 | 135 | | |
136 | | - | |
| 136 | + | |
137 | 137 | | |
138 | 138 | | |
139 | | - | |
| 139 | + | |
140 | 140 | | |
141 | 141 | | |
142 | | - | |
| 142 | + | |
143 | 143 | | |
144 | 144 | | |
145 | | - | |
| 145 | + | |
146 | 146 | | |
147 | 147 | | |
148 | 148 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
115 | 115 | | |
116 | 116 | | |
117 | 117 | | |
| 118 | + | |
118 | 119 | | |
119 | 120 | | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
120 | 125 | | |
121 | 126 | | |
122 | 127 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
0 commit comments