Migrate user_profile to the new resource-layer methods - #15183
Open
rtibblesbot wants to merge 5 commits into
Open
Migrate user_profile to the new resource-layer methods#15183rtibblesbot wants to merge 5 commits into
rtibblesbot wants to merge 5 commits into
Conversation
Contributor
Build Artifacts
Smoke test screenshot |
rtibblesbot
force-pushed
the
issue-15064-fba872
branch
from
August 12, 2026 15:23
02adddd to
70dcce6
Compare
rtibblesbot
marked this pull request as ready for review
August 12, 2026 18:34
Contributor
Author
|
|
`NetworkLocationResource` is also imported by `device` and `learn`, so the legacy `fetchFacilities` body stays in place. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The read and the writes move together: `fetchModel` is what marked the model
synced, which is what made `saveModel(..., { exists: true })` PATCH a diff
rather than the whole cached object.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
`force: true` has no successor — the cache it bypassed is gone. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The spec factory drops `clear` rather than keeping it, so a missed call site throws instead of passing silently. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
rtibblesbot
force-pushed
the
issue-15064-fba872
branch
from
August 12, 2026 18:43
70dcce6 to
8df7091
Compare
Contributor
Author
|
Resolved without intervention: a fresh run on the same SHA (31629087140) built the EXE green. No re-run needed. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
retrieve/list, the two profile writes becomeupdate, the profile page's user read becomesuseRetrieve.NetworkLocationResourceis shared withdeviceandlearn, sofetchFacilitiesgains a_v2sibling rather than an in-place rewrite.References
user_profileto the new Resource-layer methods #15064. Recipe Migrate all plugins and shared packages to the new Resource-layer methods #15057, methods Add new simplified Resource-layer methods (additive, non-breaking) #15056.fetchFacilities_v2is byte-identical to the copy in the still-open Migrate kolibri-common to the new resource methods #15163, which also deletes the doc-only stubs it is inserted after. Resolve that conflict by keeping Migrate kolibri-common to the new resource methods #15163's hunk, not both copies.Reviewer guidance
NetworkLocationResource.js:48— the_v2is registered onNetworkLocationResourcealone, becauserequestresolvesnetworklocation_facilities_detailfor that name only. Confirm noStatic/Dynamiccaller wants it.actions.js:13—updategets nobaselinebecauseProfileEditPage.getUpdates()(:181) already diffs against the loaded user.ProfilePage.spec.js:35— the resource automock stubsuseRetrieveas well, so the spec rebinds the real one offResource.prototype.Behaviour deltas:
MergeFacilitypoll tick overlapping a slow GET coalesces onto it, where legacyModel.fetchqueued behind it.force(useCurrentUser,ProfileEditPage.vue:173) now always hit the network — theModelcache is gone.useCurrentUserno longer leavesisLoadingstuck true on a failed fetch.clear_v2resolvesresponse.datawherepostDetailEndpointresolved the whole axios response. All three call sites discard it.useRetrieve, after a full-name savefetchFacilities_v2PATCH /api/auth/facilityuser/<id>/→ 200, same shape as before, read back on reload.GET /api/discovery/networklocation_facilities/<id>/→ 200 against a self-registered peer.MergeFacility.spec.jsis its only cover.AI usage
Claude Code applied the shared migration recipe and rewrote the two specs whose mocks named the replaced methods. Verified with Jest, prek, and manual QA in a browser against a local server.
@rtibblesbot's comments are generated by an LLM, and should be evaluated accordingly
How was this generated?
🟡 Waiting for feedback
Last updated: 2026-08-12 21:41 UTC