-
Notifications
You must be signed in to change notification settings - Fork 4
Sync schedule level display with local edits #946
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sync schedule level display with local edits #946
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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