Allow reseting individual settings#2805
Conversation
Automated PR Review (Claude)0. SummaryVerdict: IMPORTANT FIXES REQUIRED Critical items to address: 1.1 This PR adds the ability to reset individual v2 settings in the Cockpit settings manager. It introduces a 1. Correctness & Implementation Bugs1.1
The user-facing dialog says "The variable was reset" with no caveat that it will reappear. Either:
( 1.2 The check if (localSettings[userId!]?.[vehicleId!]?.[key] !== undefined) {
delete localSettings[userId!][vehicleId!][key]This is actually what the code does — re-reading, this is safe because 1.2
( 1.3 If the user clicks the reset button on multiple settings in quick succession, each click calls ( 2. AGENTS.md Adherence — ✅3. Security — ✅4. Performance — ✅5. UI / UX5.1 The reset-button ( 6. Code Quality & Style6.1 const restartCockpit = (): void => {
reloadCockpitAndWarnUser()
}This adds an indirection that doesn't carry its weight. ( 6.2 7. Commit Hygiene — ✅Two clean, logically separated commits: one for the backend 8. Tests — ✅9. Documentation — ✅10. Nitpicks / Optional10.1 10.2 Generated by Claude. This is advisory; a human reviewer must still approve. |
…nore Allow deleting an individual setting from local storage and ignoring its vehicle value on the next sync only, so a locally-deleted setting is not restored from the vehicle. Subsequent boots sync the key normally again.
Add a delete action next to the edit button for synced settings rows that removes the variable and explains, via a dialog, that a restart is needed for the reset to take effect since the value remains in runtime memory.
98b6556 to
023bcb6
Compare
Review follow-up — round 1Done
Won't change (with reasoning)
Questions for reviewers
|
|
/review |
Automated PR Re-review 2 (Claude)Comparing Previous findings status
Discussion since last review@rafaellehmkuhl provided a detailed follow-up explaining the resolution of each finding:
New findings0. SummaryVerdict: MINOR SUGGESTIONS The previous major finding (1.1 — reset not permanent) is fully addressed: 1. Correctness & Implementation Bugs1.4 When This is low-risk because the vehicle read happens synchronously before the merge in the same sync cycle, but worth noting in case the timing assumptions change. ( 2. AGENTS.md Adherence — ✅3. Security — ✅4. Performance — ✅5. UI / UX — ✅6. Code Quality & Style — ✅7. Commit Hygiene — ✅8. Tests — ✅9. Documentation — ✅10. Nitpicks / Optional — ✅Generated by Claude. This is advisory; a human reviewer must still approve. |
Review follow-up — round 2Round-1 items are confirmed addressed (1.1, 1.3, 10.2) or withdrawn (1.2, 6.1, 6.2). Only the items below remain, and neither needs a code change. Won't change (with reasoning)
|
Fix #2804