Show onboarding guidance when no model is loaded on Home view#22
Show onboarding guidance when no model is loaded on Home view#22mohityadav8 wants to merge 3 commits intoEAPD-DRB:mainfrom
Conversation
|
@autibet take a look |
autibet
left a comment
There was a problem hiding this comment.
Findings
P1: Error masking regression in shared error renderer
In PR #22, Message.isInitialEmptyState treats any message containing "undefined" or "null" as “no case loaded”, and both Message.danger and Message.dangerOsy use it.
These methods are used across many controllers/routes for real failures, so legitimate runtime/backend errors can be replaced with a misleading onboarding notice, hiding the actual problem.
References
WebAPP/Classes/Message.Class.js:4WebAPP/Classes/Message.Class.js:54WebAPP/Classes/Message.Class.js:93
P2: Onboarding message logic is not aligned with actual session flow
PR adds onboarding display in Home.onLoad based on localStorage.getItem("osycase") (line 17), but app session state is fetched from backend via Base.getSession(), not localStorage.
Also, the same PR clears messages again in initPage (line 52), which can immediately wipe the onboarding message in the normal load path.
References
WebAPP/App/Controller/Home.js:17WebAPP/Classes/Base.Class.js:44WebAPP/App/Controller/Home.js:52
Change summary
PR #22 is small and focused, but the current implementation introduces:
- A broad error-handling regression
- A brittle onboarding trigger path
|
@autibet Thanks for the detailed review. I have addressed the issues you pointed out:
P2 – Onboarding logic and session flow
These changes ensure that:
Please let me know if any further adjustments are needed. |
Summary
What changed:
Added a user-friendly onboarding message in the Home view when no model (case) is loaded.
Why:
On first launch, the interface appeared blank or confusing if no case was selected.
This change provides clear guidance to users on what action to take.
Related issues
Issue exists and is linked
Closes #21
Related #21
Validation
Tests added/updated (or not applicable)
Validation steps documented
Evidence attached (logs/screenshots/output as relevant)
Validation steps:
Start backend (python API/app.py)
Open http://localhost:5000
Ensure no osycase exists in localStorage
Confirm that an informational onboarding message appears
Load/select a model → message no longer appears
Documentation
Docs updated in this PR (or not applicable)
Any setup/workflow changes reflected in repo docs
(No documentation changes required — behavior improvement only.)
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)