Skip to content

Unmount wizard board pollers when the dialog closes - #4438

Merged
patrickelectric merged 1 commit into
bluerobotics:masterfrom
joaoantoniocardoso:frontend/wizard-unmount-board-pollers
Sep 14, 2026
Merged

patrickelectric merged 1 commit into
bluerobotics:masterfrom
joaoantoniocardoso:frontend/wizard-unmount-board-pollers

Conversation

@joaoantoniocardoso

@joaoantoniocardoso joaoantoniocardoso commented Sep 14, 2026

Copy link
Copy Markdown
Member

Helps #4434

Summary

  • Follow-up to frontend goes vroom #4436: disposeWith: this is now the Vue instance, but closing the wizard does not destroy ScriptLoader / DefaultParamLoader (Vuetify 2 dialog stays booted; stepper content is v-show). The 10s fetchCurrentBoard tasks kept running after Close.
  • Mount those loaders with v-if="should_open" so Close actually destroys them and the existing OneMoreTime watcher stops the pollers.

Test plan

  • Open the setup wizard, skip it, Close. Confirm GET /ardupilot-manager/v1.0/board stops (no pair every ~10s) while staying on home / another page that does not poll the board.
  • Re-open the wizard (Remind me later) and confirm Customize still loads scripts/params.
  • Continue through Customize while the dialog is open; Continue still validates via param_loader.

Tested on smoke-catalog (192.168.0.124) with this branch served at localhost:8080. After Close, loaders were gone and /board stayed at 0 hits for 37s (was a pair every 10s before). Re-open + ROV on Customize showed Scripts/Parameter Sets for Navigator64 Sub 4.7.1. validateParams() was false until a set was chosen, then true via $refs.param_loader; Continue was not clicked so firmware was not applied.

Vuetify keeps dialog content after the first open, so disposeWith never
saw _isDestroyed. v-if on should_open destroys the loaders on Close.
@joaoantoniocardoso joaoantoniocardoso added the move-to-stable Needs to be cherry-picked and move to stable label Sep 14, 2026
@joaoantoniocardoso
joaoantoniocardoso marked this pull request as ready for review September 14, 2026 15:21
@github-actions

Copy link
Copy Markdown

Automated PR Review

0. Summary

  • Verdict: LGTM :shipit:

Adds v-if="should_open" to ScriptLoader and DefaultParamLoader inside core/frontend/src/components/wizard/Wizard.vue (step 3). The wizard uses a persistent v-dialog and stepper v-show, so those loaders stayed mounted after Close and their OneMoreTime({ delay: 10000, disposeWith: this }) fetchCurrentBoard pollers kept firing. Gating on should_open lets Vue destroy them, which trips the disposeWith cleanup path — the intended OneMoreTime idiom per AGENTS.md (Common Pitfalls > Frontend > Forgetting cleanup). The ref="param_loader" used by validateParams() on Continue is still available, since Continue only fires while the dialog is open.

No further comments, nice job 👍

Generated by PR Review Bot. This is advisory, a human reviewer must still approve.

@patrickelectric
patrickelectric merged commit d228a17 into bluerobotics:master Sep 14, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

move-to-stable Needs to be cherry-picked and move to stable

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants