Skip to content

fix(template): Harmonia personal (my) pages call the wrong API object#6263

Merged
delchev merged 1 commit into
masterfrom
fix/harmonia-my-pages-api-object
Jul 11, 2026
Merged

fix(template): Harmonia personal (my) pages call the wrong API object#6263
delchev merged 1 commit into
masterfrom
fix/harmonia-my-pages-api-object

Conversation

@delchev

@delchev delchev commented Jul 11, 2026

Copy link
Copy Markdown
Contributor

Problem

Every generated personal ("my") surface in the Harmonia Java runtime was broken. Opening e.g. the My shell route

/services/web/my/index.html#/app/kf-mod-vacations-my-VacationRequest/my/VacationRequest

rendered the page's error state with:

Cannot read properties of undefined (reading 'get')

Cause

The personal list/form page templates called App.api.get/put/post/del, but the shared Harmonia runtime exposes its fetch client as App.services.api (and the delete method is delete(), not del()). App.api is undefined, so App.api.get(...) throws on load.

Every non-personal generated page already uses App.services.api.* — and the loadOptions() call in the same form template used App.services.api.getAll correctly — so these were copy typos in the two ui/my/ templates only.

Fix

Point my-list-page.js.template and my-form-page.js.template at App.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

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>
@delchev delchev merged commit cfdc1be into master Jul 11, 2026
10 checks passed
@delchev delchev deleted the fix/harmonia-my-pages-api-object branch July 11, 2026 19:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant