Skip to content

feat(platform): complete W7 API client, errors, PWA, and i18n - #157

Merged
afeezorobsco-cyber merged 4 commits into
DocForum:mainfrom
SantanFeli:feat/w7-platform-api-client-errors-pwa-i18n
Oct 25, 2026
Merged

afeezorobsco-cyber merged 4 commits into
DocForum:mainfrom
SantanFeli:feat/w7-platform-api-client-errors-pwa-i18n

Conversation

@SantanFeli

Copy link
Copy Markdown
Contributor

What changed

Closes #83
Closes #84
Closes #86
Closes #87

This completes the W7 platform quality work:

  • Added the generated @docforum/api-client workspace package from the OpenAPI fixture. Every service now routes through the typed client, src/types/models.ts re-exports generated schemas, and payment BigInt values remain strings.
  • Kept src/services/api-client.ts as the single transport boundary for base URL, credentials, auth headers, response parsing, and typed error envelopes. Added a warn-only client-versus-backend spec version check to CI.
  • Added centralized error-code mapping with safe localized copy, request-id references for unknown errors, route and feature-section error boundaries, and retry fallbacks.
  • Added an installable HashRouter-compatible PWA with static app-shell precaching only, no API runtime caching, logout cache cleanup, and an explicit update prompt.
  • Added lazy ICU locale bundles, the language preference switcher, extracted catalogues, and CI validation for missing, unused, and invalid messages.
  • Updated ROADMAP.md and ARCHITECTURE_ESSENTIALS.md; stale assumed endpoint contracts are replaced by the generated contract record.

The changed screens continue the existing PRD §4 core flows for patient care continuity, doctor consultation/queue work, facility fulfillment, and custodial payment administration. The new platform UI is limited to the language switcher, error fallback, and PWA update prompt.

Validation

  • npm ci --ignore-scripts --offline
  • npm run check:api-client — warn-only because the configured Render spec endpoint was unavailable in this environment
  • npm run check:i18n
  • npm run typecheck
  • npm test — 29 files, 134 tests
  • npm run build — production build and dist/sw.js generated
  • git diff --check

UI screenshots were not captured because this workspace has no browser or screenshot runtime available; the changed UI paths are covered by component tests and the production build.

@SantanFeli
SantanFeli force-pushed the feat/w7-platform-api-client-errors-pwa-i18n branch from ade5ad5 to aeffdb2 Compare October 19, 2026 12:03
@drips-wave

drips-wave Bot commented Oct 19, 2026

Copy link
Copy Markdown

@SantanFeli 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! 🚀

Learn more about application limits

@afeezorobsco-cyber

Copy link
Copy Markdown
Contributor

@SantanFeli Thanks for the PR. It can't be merged yet. To unblock it:

Merge conflicts: this branch conflicts with main. Please rebase onto the latest main (git fetch upstream && git rebase upstream/main), resolve the conflicts (often ROADMAP.md, ARCHITECTURE*.md or prisma/schema.prisma), and force-push.

Push to this same branch and CI will re-run. Once it's green and conflict-free, it'll be reviewed for merge.

@github-actions github-actions Bot added the needs-rebase Has merge conflicts with main; the author needs to rebase label Oct 20, 2026
@github-actions

github-actions Bot commented Oct 20, 2026 •

Copy link
Copy Markdown

Malware scan: passed, with notes for the reviewer

Nothing malicious was detected in fbd52e0. These changes touch sensitive areas and should get a careful look before CI is approved:

Where Rule Why
.github/workflows/ci.yml:22 workflow-change Changes a CI workflow; a maintainer must review before approving runs.
.npmrc:1 npm-config Changes npm/yarn config.
package.json:29 dependency-source @docforum/api-client is a local package (file:packages/api-client); check that path is part of this PR's reviewed code.

- Merge upstream/main (f2f9b57) into feat/w7-platform-api-client-errors-pwa-i18n
- Keep typed @docforum/api-client with error envelope, timeouts, GET dedupe, abort wiring
- Keep i18n (useT, react-intl, lazy locale bundles), PWA, error boundaries, useErrorMessage
- Resolve component/page conflicts: prefer upstream feature structure, re-apply i18n ids
- Update ARCHITECTURE_ESSENTIALS.md: take upstream hard rule 1 + API client behaviour; keep Generated contract + Privacy sections
- Update ROADMAP.md: merge both changelogs
- Fix typecheck, test, check:i18n, build, check:dist, check:stellar-boundary
@github-actions github-actions Bot removed the needs-rebase Has merge conflicts with main; the author needs to rebase label Oct 25, 2026
- Move UpdatePromptContainer inside I18nProvider to fix React Intl crash
- Wrap DeleteAccountSection policy items in <li> for axe compliance
- Update journey test to expect localized recoverable error message
- Add mobile header responsive wrap (≤639px) to prevent horizontal overflow
- Regenerate all visual snapshots for desktop and mobile

All 79 Playwright tests pass; unit tests, typecheck, i18n check green.
@afeezorobsco-cyber
afeezorobsco-cyber merged commit ff6a6bb into DocForum:main Oct 25, 2026
3 checks passed
freebuff-web Bot pushed a commit to Rafiat30/docforum-web that referenced this pull request Oct 26, 2026
…search-with-autocomplete

Resolve conflicts with upstream's W7 i18n work (DocForum#157, DocForum#151): keep the PR's
Find-a-doctor nav item and dashboard link, adopt upstream's t()/messageId
convention for both, and register nav.findADoctor and patient.nav.findDoctor
in the en and es catalogues so check:i18n stays green.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants