fix(node): confirm before clearing a node's position track - #6745
fix(node): confirm before clearing a node's position track#6745jamesarich wants to merge 2 commits into
Conversation
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
|
Important Review skippedNo new commits to review since the last review. ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (3)
Included review availability: Your plan includes up to 4 reviews per rolling hour; 3 remain after this review. 📝 WalkthroughWalkthroughThe position-log screen now shows a localized confirmation dialog before it clears a node’s recorded GPS position track. The deletion callback runs only after confirmation, and the dialog closes after confirmation or cancellation. ChangesPosition track confirmation
Estimated code review effort: 2 (Simple) | ~10 minutes Merge Risk: ⚪ Minimal · up to The change adds an explicit confirmation before permanently clearing a node’s position track, with no actionable merge-blocking risk remaining after normal checks and review. Sequence Diagram(s)sequenceDiagram
actor User
participant ClearPositionTrackButton
participant ResourceDialog
participant ViewModel
User->>ClearPositionTrackButton: Tap clear
ClearPositionTrackButton->>ResourceDialog: Show localized confirmation
User->>ResourceDialog: Confirm deletion
ResourceDialog->>ViewModel: Invoke clearPosition()
Suggested reviewers: 🚥 Pre-merge checks | ✅ 7 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (7 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
…dialog Use rememberSaveable instead of remember for the dialog visibility state, matching the codebase's established pattern for destructive- action confirmation dialogs (Logcat.kt, Debug.kt). Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
|
Follow-up commit b9612b2: the confirmation dialog's visibility state now uses |
|
@coderabbitai review |
|
@coderabbitai full review |
✅ Action performedFull review finished. |
|
Fixes #6741
The trash-can button on the Position Log screen deleted a node's entire recorded GPS track immediately, with no confirmation — and it sits directly next to the GPX export button, making accidental taps easy and irreversible.
This change gates the delete behind a confirmation dialog using the existing
MeshtasticResourceDialogcomponent: "Clear position track?" with an explicit warning that the deletion is permanent, plus Cancel/Delete actions.viewModel.clearPosition()only runs on explicit confirmation.ClearPositionTrackButtoncomposable inPositionLogScreens.ktowning the dialog-visible stateclear_position_track_title,clear_position_track_message);scripts/sort-strings.pyrunValidated with the full baseline:
spotlessApply spotlessCheck detekt assembleDebug test allTests— BUILD SUCCESSFUL.Summary by CodeRabbit
New Features
Bug Fixes