Repository navigation
feat(ux): first-run onboarding for new patients and doctors (#121) - #188
lightnoor890 wants to merge 3 commits into
Conversation
…#121) Role-specific checklists on both dashboards, driven entirely by the server's onboarding summary (profile/health/first search; documents/ specialties/availability) so completion survives a new device. Adds an optional, skippable, non-modal guided tour (labelled region, aria-live step announcements, Escape to close) shown only while setup is unfinished; a failed summary degrades to a non-blocking notice. Includes mock handlers/fixtures, query-key factory entries, assumed API shapes in ARCHITECTURE_ESSENTIALS.md, ROADMAP status + changelog, tests and desktop/mobile screenshots.
…-run-onboarding # Conflicts: # src/mocks/handlers.test.ts # src/types/models.ts
|
@lightnoor890 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
2 similar comments
|
@lightnoor890 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
|
@lightnoor890 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
|
@lightnoor890 This PR now has merge conflicts with git fetch upstream # upstream = https://github.com/DocForum/docforum-web.git
git rebase upstream/main
# resolve the conflicts, re-run the tests, then:
git push --force-with-leaseThe usual culprits are shared files like Automated message. It won't repeat unless the PR conflicts again after your next push. |
|
@lightnoor890 This PR now has merge conflicts with git fetch upstream # upstream = https://github.com/DocForum/docforum-web.git
git rebase upstream/main
# resolve the conflicts, re-run the tests, then:
git push --force-with-leaseThe usual culprits are shared docs like Automated message. It won't repeat unless the PR conflicts again after your next push. |
|
@lightnoor890 CI is failing on this branch against the latest Frontend (typecheck + test + build) Remove the unused This PR also conflicts with |
Closes #121
What changed and why
New patients landed on an empty care hub and new doctors on a dashboard with no idea what was missing. This adds a first-run onboarding section to both dashboards, built in
src/features/onboarding/:Done/To dopill (not colour alone), remaining items link to the screen that does the work where one exists, and arole="progressbar"witharia-valuenow/aria-valuetextsays “2 of 3 steps complete”.src/services/onboarding-service.tscalls the assumedGET /patients/me/onboarding/GET /doctors/me/onboardingsummaries; hooks use typedonboardingKeysfactories. There is nolocalStorage/sessionStoragecompletion flag and no “dismissed” flag, so a new device shows the same state.dialog, noaria-modal, no focus trap, no backdrop) appears only while setup is unfinished. It is a labelled region with normal buttons,aria-live="polite"step announcements, Back/Next/Done and Skip tour, and Escape closes it. The page remains fully usable underneath.role="status"notice appears and the rest of the dashboard works unchanged. Once the server reports every step complete, the checklist and tour disappear.Doctor documents/specialties/availability have no self-serve screen in this repo yet, so those checklist items track and explain the state but do not link; this is documented rather than faking destinations.
API shapes are assumed (docforum-core has no onboarding endpoint yet) and recorded in
ARCHITECTURE_ESSENTIALS.md→ “Known assumptions — First-run onboarding”. Mock handlers/fixtures were added sonpm run dev:mockshows the feature for both roles.PRD flow: implements the first-run step of the patient and doctor onboarding flows (PRD §4 account setup → health profile → first search for patients; verification → specialties → availability for doctors). No backend contract change.
Tests
New tests: server-driven progress on both roles,
Done/To dotext and links for remaining work, checklist hidden when complete, tour Next/Back/Skip/Done and Escape, non-modal (no dialog role / aria-modal) assertions, non-blocking error notice, “no request without a session”, mock handler coverage, and query-key factory coverage. The patient dashboard test also asserts the hub stays usable while onboarding is unfinished.Screenshots (desktop 1280×900, mobile 390×844)
screenshots/onboarding-patient-desktop.pngscreenshots/onboarding-patient-mobile.pngscreenshots/onboarding-doctor-desktop.pngscreenshots/onboarding-doctor-mobile.png(These are full-page mock-mode captures; the pre-existing dev panel was hidden. The patient care-hub “could not be loaded” banner in the patient shots is a pre-existing mock coverage gap —
GET /appointments/minehas no handler — unrelated to this change.)