|
| 1 | +--- |
| 2 | +description: "Task list for improving device status display" |
| 3 | +--- |
| 4 | + |
| 5 | +# Tasks: Improve Device Status Display |
| 6 | + |
| 7 | +**Feature**: Remove confusing Connection State and Last Status Update columns from device and gateway views |
| 8 | +**Input**: Design documents from `/specs/001-device-status/` |
| 9 | +**Prerequisites**: spec.md (user stories and requirements) |
| 10 | + |
| 11 | +**Tests**: Tests are included as this is a UI change that needs validation |
| 12 | + |
| 13 | +**Organization**: Tasks are grouped by user story to enable independent implementation and testing of each story. |
| 14 | + |
| 15 | +## Format: `[ID] [P?] [Story] Description` |
| 16 | + |
| 17 | +- **[P]**: Can run in parallel (different files, no dependencies) |
| 18 | +- **[Story]**: Which user story this task belongs to (e.g., US1, US2, US3) |
| 19 | +- Include exact file paths in descriptions |
| 20 | + |
| 21 | +## Path Conventions |
| 22 | + |
| 23 | +This is a Blazor web application with the following structure: |
| 24 | +- Frontend: `/src/IoTHub.Portal.Client/` |
| 25 | +- Shared Models: `/src/IoTHub.Portal.Shared/Models/` |
| 26 | +- Unit Tests: `/src/IoTHub.Portal.Tests.Unit/` |
| 27 | +- E2E Tests: `/src/IoTHub.Portal.Tests.E2E/` |
| 28 | + |
| 29 | +--- |
| 30 | + |
| 31 | +## Phase 1: Setup (Shared Infrastructure) |
| 32 | + |
| 33 | +**Purpose**: Project validation and preparation |
| 34 | + |
| 35 | +- [X] T001 Verify project builds successfully with `dotnet build src/IoTHub.Portal.sln` |
| 36 | +- [X] T002 Verify existing tests pass with `dotnet test src/IoTHub.Portal.sln` |
| 37 | + |
| 38 | +--- |
| 39 | + |
| 40 | +## Phase 2: Foundational (Blocking Prerequisites) |
| 41 | + |
| 42 | +**Purpose**: No foundational changes needed - this is a removal task with no blocking prerequisites |
| 43 | + |
| 44 | +**Checkpoint**: Setup complete - user story implementation can now begin in parallel |
| 45 | + |
| 46 | +--- |
| 47 | + |
| 48 | +## Phase 3: User Story 1 - View Device Status Without Confusion (Priority: P1) 🎯 MVP |
| 49 | + |
| 50 | +**Goal**: Remove the misleading "Connection State" column from the device list view so LoRaWAN devices don't appear as "disconnected" when functioning normally |
| 51 | + |
| 52 | +**Independent Test**: Navigate to `/devices` page and verify that: |
| 53 | +1. "Connection State" column is NOT present in the table headers |
| 54 | +2. Devices are displayed without connection state indicators in the list |
| 55 | +3. All other columns remain functional (Device, Allowed, Last activity time, See details, Delete) |
| 56 | +4. The page loads without errors |
| 57 | + |
| 58 | +### Tests for User Story 1 |
| 59 | + |
| 60 | +> **NOTE: Write these tests FIRST, ensure they FAIL before implementation** |
| 61 | +
|
| 62 | +- [X] T003 [P] [US1] Add test to verify Connection State column is not present in DeviceListPage in src/IoTHub.Portal.Tests.Unit/Client/Pages/Devices/DevicesListPageTests.cs |
| 63 | +- [X] T004 [P] [US1] Update existing DeviceListPage tests to not expect IsConnected property in src/IoTHub.Portal.Tests.Unit/Client/Pages/Devices/DevicesListPageTests.cs |
| 64 | + |
| 65 | +### Implementation for User Story 1 |
| 66 | + |
| 67 | +- [X] T005 [US1] Remove IsConnected property from DeviceListItem model in src/IoTHub.Portal.Shared/Models/v1.0/DeviceListItem.cs |
| 68 | +- [X] T006 [US1] Remove Connection State column header and data cells from DeviceListPage.razor in src/IoTHub.Portal.Client/Pages/Devices/DeviceListPage.razor |
| 69 | +- [X] T007 [US1] Update ColGroup column definitions in DeviceListPage.razor to reflect removed column in src/IoTHub.Portal.Client/Pages/Devices/DeviceListPage.razor |
| 70 | +- [X] T008 [US1] Run unit tests for DeviceListPage to verify changes with `dotnet test src/IoTHub.Portal.Tests.Unit/Client/Pages/Devices/DevicesListPageTests.cs` |
| 71 | +- [X] T009 [US1] Manual smoke test: Load `/devices` page and verify Connection State column is removed |
| 72 | + |
| 73 | +**Checkpoint**: At this point, User Story 1 should be fully functional - device list shows no Connection State column |
| 74 | + |
| 75 | +--- |
| 76 | + |
| 77 | +## Phase 4: User Story 2 - View Accurate Device Activity Timestamp (Priority: P2) |
| 78 | + |
| 79 | +**Goal**: Remove the "Last Status Update" column that shows Device Twin update time (misleading) and ensure activity information uses lastActivityTime |
| 80 | + |
| 81 | +**Independent Test**: Navigate to `/devices` page and verify that: |
| 82 | +1. "Last Status Update" column is NOT present in the table headers |
| 83 | +2. "Last activity time" column is present and displays accurate timestamps |
| 84 | +3. Activity timestamp reflects actual device communication, not Twin updates |
| 85 | +4. All other functionality remains intact |
| 86 | + |
| 87 | +### Tests for User Story 2 |
| 88 | + |
| 89 | +- [X] T010 [P] [US2] Add test to verify Last Status Update column is not present in DeviceListPage in src/IoTHub.Portal.Tests.Unit/Client/Pages/Devices/DevicesListPageTests.cs |
| 90 | +- [X] T011 [P] [US2] Add test to verify LastActivityTime is displayed correctly in DeviceListPage in src/IoTHub.Portal.Tests.Unit/Client/Pages/Devices/DevicesListPageTests.cs |
| 91 | +- [X] T012 [P] [US2] Update existing tests to not reference StatusUpdatedTime property in src/IoTHub.Portal.Tests.Unit/Client/Pages/Devices/DevicesListPageTests.cs |
| 92 | + |
| 93 | +### Implementation for User Story 2 |
| 94 | + |
| 95 | +- [X] T013 [US2] Remove StatusUpdatedTime property from DeviceListItem model in src/IoTHub.Portal.Shared/Models/v1.0/DeviceListItem.cs |
| 96 | +- [X] T014 [US2] Verify LastActivityTime property exists and is properly used in DeviceListPage.razor in src/IoTHub.Portal.Client/Pages/Devices/DeviceListPage.razor |
| 97 | +- [X] T015 [US2] Add null handling for LastActivityTime in DeviceListPage.razor to display "No activity recorded" when null in src/IoTHub.Portal.Client/Pages/Devices/DeviceListPage.razor |
| 98 | +- [X] T016 [US2] Run unit tests for DeviceListPage to verify changes with `dotnet test src/IoTHub.Portal.Tests.Unit/Client/Pages/Devices/DevicesListPageTests.cs` |
| 99 | +- [X] T017 [US2] Manual smoke test: Load `/devices` page and verify Last Status Update column is removed and LastActivityTime displays correctly |
| 100 | + |
| 101 | +**Checkpoint**: At this point, User Stories 1 AND 2 should both work - device list shows accurate activity time without confusing columns |
| 102 | + |
| 103 | +--- |
| 104 | + |
| 105 | +## Phase 5: User Story 3 - View Gateway Status Without Confusion (Priority: P2) |
| 106 | + |
| 107 | +**Goal**: Apply the same column removal to gateway list view for consistency across the platform |
| 108 | + |
| 109 | +**Independent Test**: Navigate to `/edge/devices` page and verify that: |
| 110 | +1. "Connection State" column is NOT present (Status column showing "Connected/Disconnected" should remain) |
| 111 | +2. Gateway list displays correctly with all other columns functional |
| 112 | +3. Activity information is accurate |
| 113 | +4. No errors occur when loading the page |
| 114 | + |
| 115 | +### Tests for User Story 3 |
| 116 | + |
| 117 | +- [X] T018 [P] [US3] Add test to verify gateway list displays correctly without Connection State issues in src/IoTHub.Portal.Tests.Unit/Client/Pages/EdgeDevices/EdgeDeviceListPageTests.cs |
| 118 | +- [X] T019 [P] [US3] Update existing EdgeDeviceListPage tests to verify correct Status field usage in src/IoTHub.Portal.Tests.Unit/Client/Pages/EdgeDevices/EdgeDeviceListPageTests.cs |
| 119 | + |
| 120 | +### Implementation for User Story 3 |
| 121 | + |
| 122 | +- [X] T020 [US3] Review IoTEdgeListItem model in src/IoTHub.Portal.Shared/Models/v1.0/IoTEdgeListItem.cs and verify Status field is correctly used (no changes needed - Status field is already correct) |
| 123 | +- [X] T021 [US3] Verify EdgeDeviceListPage.razor uses Status field correctly and doesn't have misleading columns in src/IoTHub.Portal.Client/Pages/EdgeDevices/EdgeDeviceListPage.razor |
| 124 | +- [X] T022 [US3] Review EdgeDeviceDetailPage.razor for any ConnectionState references that need clarification in src/IoTHub.Portal.Client/Pages/EdgeDevices/EdgeDeviceDetailPage.razor (found at line 311) |
| 125 | +- [X] T023 [US3] Add comment to EdgeDeviceDetailPage.razor explaining ConnectionState usage in detail page context in src/IoTHub.Portal.Client/Pages/EdgeDevices/EdgeDeviceDetailPage.razor |
| 126 | +- [X] T024 [US3] Run unit tests for EdgeDeviceListPage to verify no regressions with `dotnet test src/IoTHub.Portal.Tests.Unit/Client/Pages/EdgeDevices/EdgeDeviceListPageTests.cs` |
| 127 | +- [X] T025 [US3] Manual smoke test: Load `/edge/devices` page and verify gateway list displays correctly |
| 128 | + |
| 129 | +**Checkpoint**: All user stories should now be independently functional - both device and gateway lists show accurate information |
| 130 | + |
| 131 | +--- |
| 132 | + |
| 133 | +## Phase 6: Polish & Cross-Cutting Concerns |
| 134 | + |
| 135 | +**Purpose**: Improvements that affect multiple user stories and final validation |
| 136 | + |
| 137 | +- [X] T026 [P] Run full test suite to ensure no regressions with `dotnet test src/IoTHub.Portal.sln` |
| 138 | +- [X] T027 [P] Manual testing: Test device list with LoRaWAN devices (devices that send data infrequently) |
| 139 | +- [X] T028 [P] Manual testing: Test device list with devices that have never sent data (null lastActivityTime) |
| 140 | +- [X] T029 [P] Manual testing: Test gateway list with various gateway states |
| 141 | +- [X] T030 Update README or user documentation if device/gateway list columns were documented in docs/ |
| 142 | +- [X] T031 Code cleanup: Search for any remaining references to removed properties (IsConnected, StatusUpdatedTime) across the codebase |
| 143 | +- [X] T032 Final validation: Build and run application with `dotnet run` and verify all pages work correctly |
| 144 | + |
| 145 | +--- |
| 146 | + |
| 147 | +## Dependencies & Execution Order |
| 148 | + |
| 149 | +### Phase Dependencies |
| 150 | + |
| 151 | +- **Setup (Phase 1)**: No dependencies - can start immediately |
| 152 | +- **Foundational (Phase 2)**: No blocking work needed |
| 153 | +- **User Stories (Phase 3-5)**: Can proceed immediately after Setup |
| 154 | + - User stories can proceed in parallel (if staffed) |
| 155 | + - Or sequentially in priority order (US1 → US2 → US3) |
| 156 | +- **Polish (Phase 6)**: Depends on all user stories being complete |
| 157 | + |
| 158 | +### User Story Dependencies |
| 159 | + |
| 160 | +- **User Story 1 (P1)**: Can start after Setup - No dependencies on other stories |
| 161 | +- **User Story 2 (P2)**: Can start after Setup - Independent from US1, works on different model property |
| 162 | +- **User Story 3 (P3)**: Can start after Setup - Independent from US1/US2, works on different page/model |
| 163 | + |
| 164 | +### Within Each User Story |
| 165 | + |
| 166 | +- Tests MUST be written and FAIL before implementation |
| 167 | +- Model changes before UI changes |
| 168 | +- Unit tests before manual smoke tests |
| 169 | +- Story complete before moving to next priority |
| 170 | + |
| 171 | +### Parallel Opportunities |
| 172 | + |
| 173 | +- All Setup tasks marked [P] can run in parallel |
| 174 | +- All three user stories can start in parallel after Setup (if team capacity allows) |
| 175 | +- All tests for a user story marked [P] can run in parallel |
| 176 | +- Different user stories can be worked on in parallel by different team members |
| 177 | +- Polish tasks marked [P] can run in parallel |
| 178 | + |
| 179 | +--- |
| 180 | + |
| 181 | +## Parallel Example: All User Stories |
| 182 | + |
| 183 | +Since these stories work on different files, they can all be done in parallel: |
| 184 | + |
| 185 | +```bash |
| 186 | +# Developer A: User Story 1 (Device List - Connection State) |
| 187 | +Task: "Remove IsConnected property from DeviceListItem model" |
| 188 | +Task: "Remove Connection State column from DeviceListPage.razor" |
| 189 | + |
| 190 | +# Developer B: User Story 2 (Device List - Last Status Update) |
| 191 | +Task: "Remove StatusUpdatedTime property from DeviceListItem model" |
| 192 | +Task: "Add null handling for LastActivityTime in DeviceListPage.razor" |
| 193 | + |
| 194 | +# Developer C: User Story 3 (Gateway List) |
| 195 | +Task: "Review IoTEdgeListItem model and EdgeDeviceListPage.razor" |
| 196 | +Task: "Add clarification comments for ConnectionState in detail page" |
| 197 | +``` |
| 198 | + |
| 199 | +--- |
| 200 | + |
| 201 | +## Implementation Strategy |
| 202 | + |
| 203 | +### MVP First (User Story 1 Only) |
| 204 | + |
| 205 | +1. Complete Phase 1: Setup |
| 206 | +2. Complete Phase 3: User Story 1 (Remove Connection State from device list) |
| 207 | +3. **STOP and VALIDATE**: Test that device list works without Connection State column |
| 208 | +4. Deploy/demo if ready - This alone solves the critical user confusion issue |
| 209 | + |
| 210 | +### Incremental Delivery |
| 211 | + |
| 212 | +1. Complete Setup → Foundation ready (no blocking work) |
| 213 | +2. Add User Story 1 → Test independently → Deploy/Demo (MVP! - Removes main confusion) |
| 214 | +3. Add User Story 2 → Test independently → Deploy/Demo (Better info, removes second confusing column) |
| 215 | +4. Add User Story 3 → Test independently → Deploy/Demo (Consistency across platform) |
| 216 | +5. Each story adds value without breaking previous stories |
| 217 | + |
| 218 | +### Parallel Team Strategy |
| 219 | + |
| 220 | +With multiple developers: |
| 221 | + |
| 222 | +1. Team completes Setup together (quick - just verify builds) |
| 223 | +2. Once Setup is done: |
| 224 | + - Developer A: User Story 1 (Device Connection State) |
| 225 | + - Developer B: User Story 2 (Device Last Status Update) |
| 226 | + - Developer C: User Story 3 (Gateway consistency) |
| 227 | +3. Stories complete and integrate independently (different files, no conflicts) |
| 228 | + |
| 229 | +--- |
| 230 | + |
| 231 | +## Notes |
| 232 | + |
| 233 | +- [P] tasks = different files, no dependencies |
| 234 | +- [Story] label maps task to specific user story for traceability |
| 235 | +- Each user story should be independently completable and testable |
| 236 | +- Verify tests fail before implementing |
| 237 | +- Commit after each task or logical group |
| 238 | +- Stop at any checkpoint to validate story independently |
| 239 | +- This is primarily a **removal** task - we're making the UI simpler and less confusing |
| 240 | +- Focus on not breaking existing functionality while removing misleading information |
| 241 | +- The LastActivityTime field already exists - we're just ensuring it's the primary activity indicator |
0 commit comments