Skip to content

Fix cross-platform runtime assumptions in API startup and frontend API resolution#28

Merged
SeaCelo merged 1 commit intoEAPD-DRB:mac-portfrom
Puja-Rachchh:bug-fixes
Feb 26, 2026
Merged

Fix cross-platform runtime assumptions in API startup and frontend API resolution#28
SeaCelo merged 1 commit intoEAPD-DRB:mac-portfrom
Puja-Rachchh:bug-fixes

Conversation

@Puja-Rachchh
Copy link
Copy Markdown
Contributor

Summary

  • What changed:

    • Updated frontend API base URL resolution to use runtime origin in local/dev mode, improving compatibility in Codespaces and preview URLs.
    • Removed the missing Wijmo license script include from the web entry page to prevent 404 + MIME console failures.
    • Replaced vague backend startup debug prints with clear startup info showing server, mode, host, port, and open URL.
    • Files touched: [app.py], [Base.Class.js], [index.html]
  • Why:

    • The previous runtime configuration relied on environment-specific assumptions (e.g., localhost API binding and implicit runtime dependencies), which reduced portability and created onboarding friction.
    • These improvements ensure platform-independent startup behavior, improve runtime observability, and support the cross-platform goals of the MUIO refactoring effort.
    • To reduce platform-dependent runtime assumptions and improve cross-platform contributor experience, aligned with platform-independence goals.

Related issues

Validation

  • Validation steps documented

    1. Start API: python app.py
    2. Confirm startup output includes host/port/open URL.
    3. Open app in browser and verify page loads without missing licence.js console errors.
    4. Verify API calls resolve from current origin (no hardcoded localhost dependency in frontend runtime path).
  • Evidence attached (logs/screenshots/output as relevant)
    Before:

Screenshot 2026-02-23 192214 image

After:
image
image

Scope check

  • No unrelated refactors
  • Implemented from a feature branch
  • Change is deliverable without upstream OSeMOSYS/MUIO dependency
  • Base repo/branch is EAPD-DRB/MUIOGO:main (not upstream)

Can you please review these changes and merge it @SeaCelo @autibet @NyeinChan85 ?

@SeaCelo SeaCelo changed the base branch from main to mac-port February 25, 2026 17:57
@SeaCelo
Copy link
Copy Markdown
Collaborator

SeaCelo commented Feb 25, 2026

Retargeted to mac-port per the macOS integration track: #51.
We are validating Mac/cross-platform changes in mac-port first, then merging mac-port -> main.

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.

[Enhancement] Improve cross-platform runtime configuration for frontend/backend startup and API connectivity

2 participants