docs: add plugin state sync, time update logic, and component extraction
- Update initialization to sync with plugin state on mount (checks for pre-existing schedules)
- Add updateNotificationTime() method to update schedule when time changes (cancel old, schedule new)
- Extract DailyNotificationSection into dedicated component using vue-facing-decorator
- Update component architecture to show DailyNotificationSection.vue structure
- Update Phase 2 tasks to reflect component creation and AccountViewView integration
- Add acceptance criteria for plugin state sync and time update functionality
- Update verification checklist with new requirements
**Note**: Supporting components should only be created if AccountViewView exceeds reasonable length limits (>200 lines). Keep everything in AccountViewView if possible.
**Component Structure**: `DailyNotificationSection.vue` will use vue-facing-decorator with ES6 classes
this.notify.success("Notification time updated successfully", TIMEOUTS.SHORT);
this.showTimeEdit = false;
} catch (error) {
logger.error("Failed to update notification time:", error);
this.notify.error("Failed to update notification time. Please try again.", TIMEOUTS.LONG);
}
}
```
**Implementation Note**: HTML5 time input provides native mobile picker experience when shown inline, making it ideal for quick time adjustments in AccountViewView.
**Implementation Note**: HTML5 time input provides native mobile picker experience when shown inline, making it ideal for quick time adjustments. When the time changes, the notification schedule is immediately updated via PlatformService.
### Settings Schema
@ -643,39 +754,46 @@ interface Settings {
**Goals**: Integrate notification scheduling into AccountViewView with optional supporting components
#### Tasks
1. **Supporting Components (Optional)**
- [ ] Create supporting components only if AccountViewView exceeds length limits
2. **Supporting components** (if created): Must check support before rendering any scheduling UI
3. **Any component providing scheduling UI**: Must verify `getDailyNotificationStatus() !== null` before showing scheduling controls
1. **DailyNotificationSection.vue**: Daily Notifications section uses `v-if="notificationsSupported"` and checks `getDailyNotificationStatus()` on mount
2. **Any component providing scheduling UI**: Must verify `getDailyNotificationStatus() !== null` before showing scheduling controls
#### Verification Checklist
- [ ] AccountViewView notification section hidden via `v-if` on unsupported platforms
- [ ] Supporting components (if created) check and hide on unsupported platforms
- [ ] All components tested on Web/Electron to verify hiding works
- [ ] DailyNotificationSection checks platform support on mount and hides on unsupported platforms
- [ ] DailyNotificationSection syncs with plugin state on initialization (checks for pre-existing schedules)
- [ ] Component tested on Web/Electron to verify hiding works
- [ ] No console errors when components are hidden
- [ ] Time changes properly update notification schedule
### Code Quality Standards
- **Logging**: Use `logger` from `@/utils/logger`, not `console.*`