fix(template): Harmonia personal (my) pages call the wrong API object#6263
Merged
Conversation
The generated personal ("my") list/form pages invoked App.api.get/put/post/del,
but the shared Harmonia runtime exposes the fetch client as App.services.api (and
the delete method is delete(), not del()). App.api is undefined, so every personal
surface threw "Cannot read properties of undefined (reading 'get')" on load and
rendered its error state instead of the records.
Point the my-list/my-form templates at App.services.api.{get,put,post,delete},
matching every other generated page (the loadOptions() call in the same form
template already used App.services.api.getAll correctly - these were copy typos).
Verified on a running instance: the My shell route
#/app/kf-mod-vacations-my-VacationRequest/my/VacationRequest now loads the list and
the create form without error.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.
Problem
Every generated personal ("my") surface in the Harmonia Java runtime was broken. Opening e.g. the My shell route
rendered the page's error state with:
Cause
The personal list/form page templates called
App.api.get/put/post/del, but the shared Harmonia runtime exposes its fetch client asApp.services.api(and the delete method isdelete(), notdel()).App.apiisundefined, soApp.api.get(...)throws on load.Every non-personal generated page already uses
App.services.api.*— and theloadOptions()call in the same form template usedApp.services.api.getAllcorrectly — so these were copy typos in the twoui/my/templates only.Fix
Point
my-list-page.js.templateandmy-form-page.js.templateatApp.services.api.{get,put,post,delete}. Six call sites across the two templates; no behavioural change beyond hitting the object that actually exists.Verification
Driven on a running instance (Chrome, form-login):
#/app/kf-mod-vacations-my-VacationRequest/my/VacationRequest→ list renders (empty-state "No records yet."), no console error..../my/VacationRequest/create→ form renders all fields, no console error.Confirmed the served generated JS now emits
App.services.api.get(...).🤖 Generated with Claude Code