Skip to content

Conversation

@fredli74
Copy link
Owner

Motivation

  • Prevent a UI mismatch for new schedules where the template displayed the prop schedule.level while edits were applied to localSchedule, causing the displayed percentage to be stale.

Description

  • Update app/src/components/schedule-item.vue to render the computed scheduleLevel instead of schedule.level, where scheduleLevel returns this.localSchedule.level || this.vehicle.maximumLevel so locally edited values are shown immediately.

Testing

  • No automated tests were run for this change; the update was validated by static inspection and committed to the branch.

Codex Task

Copy link

Copilot AI left a 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 scheduleLevel computed property to sync the displayed level with localSchedule edits
  • Updated the template to render scheduleLevel instead of schedule.level
  • Simplified initialization logic by removing fallback to vehicle.maximumLevel in 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>
Copy link

Copilot AI left a 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.

Copy link
Contributor

Copilot AI commented Jan 31, 2026

@fredli74 I've opened a new pull request, #947, to work on those changes. Once the pull request is ready, I'll request review from you.

Copy link
Contributor

Copilot AI commented Jan 31, 2026

@fredli74 I've opened a new pull request, #948, to work on those changes. Once the pull request is ready, I'll request review from you.

Copy link
Contributor

Copilot AI commented Jan 31, 2026

@fredli74 I've opened a new pull request, #949, to work on those changes. Once the pull request is ready, I'll request review from you.

Copy link

Copilot AI left a 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.

Copy link

Copilot AI left a 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.

@fredli74 fredli74 marked this pull request as ready for review January 31, 2026 17:57
@fredli74 fredli74 merged commit 2ee2d4a into master Jan 31, 2026
1 check passed
@fredli74 fredli74 deleted the mo78yh-codex/github-mention-fix-schedule-creation-ui-time-defaults,-pic branch January 31, 2026 17:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants