Skip to content

Migrate setup_wizard to the new resource layer - #15182

Open
rtibblesbot wants to merge 3 commits into
learningequality:developfrom
rtibblesbot:issue-15063-2e6867
Open

Migrate setup_wizard to the new resource layer#15182
rtibblesbot wants to merge 3 commits into
learningequality:developfrom
rtibblesbot:issue-15063-2e6867

Conversation

@rtibblesbot

@rtibblesbot rtibblesbot commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

Summary

  • TaskResource.{cancel,restart,clearAll} call sites now use the _v2 methods.
  • SetupWizardResource and FacilityImportResource are plugin-local, so their four custom methods are rewritten in place onto request rather than paired with a _v2.
  • Three of them now resolve with the response body rather than the response, so LodJoinFacility.vue destructures one level up; facilityadmins already did.
  • Deleted FacilityImportResource.listfacilitylearners — uncalled, and a duplicate of FacilityUserResource.listRemoteFacilityLearners.

References

Closes #15063. Recipe: #15057. _v2 methods: #15162.

Reviewer guidance

  • The rewritten methods route failures through Resource.logError, which accessListEndpoint never called. A wrong password on SelectSuperAdminAccountForm.vue:175 now emits a Request error: group — confirm that is acceptable.
  • No useList conversion: the three TaskResource.list sites are setTimeout polling loops, and useList wraps a single list() with no polling.

AI usage

Used Claude Code to apply the shared migration recipe across the plugin and to write the resource spec covering the four rewritten methods. Verified with the setup_wizard Jest suite and prek.


@rtibblesbot's comments are generated by an LLM, and should be evaluated accordingly

How was this generated?
  • Ran pre-flight CI checks (lint, format, tests) and verified all pass
  • Rebased onto the target branch and resolved any conflicts
  • Reorganized commit history into clean, logical commits
  • Audited the diff to ensure only issue-relevant files are changed
  • Built PR body from the repository's PR template with evidence blocks
@rtibblesbot

🟡 Waiting for feedback

Last updated: 2026-08-12 18:20 UTC

cancel/restart/clearAll are wire-identical to their _v2 pairs; every call
site discards the resolved value, so the envelope-to-body change is invisible.
@github-actions github-actions Bot added APP: Setup Wizard Re: Setup Wizard (facility import, superuser creation, settings, etc.) DEV: frontend SIZE: medium labels Aug 12, 2026
@github-actions

github-actions Bot commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

@rtibblesbot
rtibblesbot marked this pull request as ready for review August 12, 2026 16:24
Both resources are plugin-local, so the recipe's in-place rewrite applies
rather than a _v2 pair. The four methods now resolve with the response body,
which LodJoinFacility destructures one level up.
No caller anywhere in kolibri/ or packages/, and a line-for-line duplicate of
FacilityUserResource.listRemoteFacilityLearners, which ImportIndividualUserForm
already calls. Its removal takes the last client/urls imports with it.
@rtibblesbot

Copy link
Copy Markdown
Contributor Author

The red Android smoke test (API 24) leg is a runner-local flake, not a diff issue: make maestro-install died with curl: (56) fetching the pinned maestro.zip from GitHub releases, before the emulator booted. API 30 and API 35 installed and passed on the same commit in the same run.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

APP: Setup Wizard Re: Setup Wizard (facility import, superuser creation, settings, etc.) DEV: frontend SIZE: medium

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Migrate setup_wizard to the new Resource-layer methods

2 participants