Conversation
There was a problem hiding this comment.
Pull request overview
This PR addresses a UI synchronization issue in the schedule management component where the displayed charge level percentage was not reflecting local edits made by the user. The change introduces a computed property to ensure the UI displays the locally edited value rather than the stale prop value.
Changes:
- Introduced a
scheduleLevelcomputed property to sync the displayed level withlocalScheduleedits - Updated the template to render
scheduleLevelinstead ofschedule.level - Simplified initialization logic by removing fallback to
vehicle.maximumLevelin multiple places
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- v-menu for level is now gated by localSchedule.level !== null, so “manual stop” shows no % or slider. - Added guards in cancelLevel/setLevel to no-op when level is null. - levelSlider initializes with this.schedule.level || 0 to ensure it's always a number. Signed-off-by: Fredrik Lidström <fredli74@gmail.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 1 out of 1 changed files in this pull request and generated 6 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 1 out of 1 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Motivation
schedule.levelwhile edits were applied tolocalSchedule, causing the displayed percentage to be stale.Description
app/src/components/schedule-item.vueto render the computedscheduleLevelinstead ofschedule.level, wherescheduleLevelreturnsthis.localSchedule.level || this.vehicle.maximumLevelso locally edited values are shown immediately.Testing
Codex Task