Repository navigation
Conversation
|
@xsthar 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! 🚀 |
|
@xsthar Thanks for the PR. It can't be merged yet. To unblock it: Merge conflicts: this branch conflicts with Push to this same branch and CI will re-run. Once it's green and conflict-free, it'll be reviewed for merge. |
DocForum#112-DocForum#115) Data routers (DocForum#112): createHashRouter, lazy route modules, React Query loader prefetch using the same keys/shapes pages read, loader guards that await the single-flight POST /auth/refresh restore, per-section RouteError and a hydration fallback; RequireAuth is gone. Mutation feedback (DocForum#113): toast store + accessible Toaster, useOptimisticMutation with snapshot rollback and error toasts (message mark-read, invite revoke) and useDeferredAction for delayed-commit undo (queue start/complete). Money movements are documented as excluded. Pickers (DocForum#114): WAI-ARIA DatePicker/TimePicker with keyboard grid/list navigation, typed entry, min/max, disabled dates, locale formatting, explicit IANA time zones and 44px targets; every native date input replaced. Upload (DocForum#115): drag-and-drop/camera Upload with per-file progress, cancel, retry, signature-based type sniffing, size limits, image downscaling and a new XHR apiUpload helper with credentials/progress/abort. Docs updated (ROADMAP W7 + changelog, ARCHITECTURE_ESSENTIALS assumptions).
c88bd1a to
5dfd4d2
Compare
|
@xsthar 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. |
Keep the data-router architecture from DocForum#112 and port upstream's additions into it: the flag-gated /settings/notifications route, the doctor messages heading, TimeZoneProvider, profile bootstrap on the patient layout, and the shared refresh() auth API. 🤖 Generated with Codebuff Co-Authored-By: Codebuff <noreply@codebuff.com>
The extra paragraph was added to make router tests distinguishable, but it is not part of the dashboard design and shifted the patient-dashboard visual baseline. Assert on the existing "What needs your attention" heading instead. 🤖 Generated with Codebuff Co-Authored-By: Codebuff <noreply@codebuff.com>
|
@xsthar 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. |
Upstream landed the rest of the W7 work (DocForum#151, DocForum#157) while this branch was open, so re-merge and keep both sides: - App.tsx keeps the data router and adopts I18nProvider, the app-level ErrorBoundary and UpdatePromptContainer around RouterProvider. - Test helpers keep the memory data router and adopt IntlProvider. - api-client keeps upstream's transport, retry and error envelope, with apiUploadFile as the branch's only addition on top. - QueuePanel keeps the shared toast undo instead of the inline undo bar, on top of upstream's localized labels and live-region announcements. - PatientDashboardPage stays the layout route; its hub moves to PatientHomePage with upstream's translations. - Date inputs keep DatePicker; the custom date range keeps upstream's labelled fieldset around them. All 161 unit-test files pass under the merged tree; the one failure is the pre-existing time-of-day flake in PatientDashboardPage.test.tsx, whose 26h offset crosses two midnights when the suite runs after 22:00 local. 🤖 Generated with Codebuff Co-Authored-By: Codebuff <noreply@codebuff.com>
|
@xsthar The Browser (journeys + accessibility + visual) job fails the visual regression check: the rendered page no longer matches the committed baseline: If the visual change is intentional, regenerate those baselines in the same Linux/Playwright setup CI uses (see the visual-testing notes in |
|
@xsthar 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. |
Closes #112
Closes #113
Closes #114
Closes #115
What changed and why
The W7 platform-quality track, built on top of
mainin one branch. No PRD §4 core-flow behaviour changes — this is shared platform work used by the patient (dependent date of birth), doctor (queue undo, insights range) and admin (audit date filters) screens.#112 — Data routers with loaders and route-level error elements
src/router.tsxreplaces the component tree with acreateHashRouterdata router (GitHub Pages#semantics kept). Every page is a lazy route module; each section has aRouteErrorelement and the root has aRouteLoadinghydration fallback.ensureQueryDatausing the exact keys and shapes the pages read (including infinite-queryInfiniteDatafor stuck referrals and the wrappedTimedReadinessshape for system health — mismatches here were caught and fixed during this work).RequireAuthand its test are deleted. Loader-based guards await the single-flightPOST /auth/refreshrestore (restoreSession()inauth-store.ts), so signed-out deep links redirect to/loginand wrong-role links redirect to the user's own dashboard without a login flash. The boot refresh is attempted once; login/logout reset that latch.src/router.test.tsx(restore wait, signed-out redirect, allowed role, role mismatch, loader prefetch) plus admin route tests updated to the real router.#113 — Mutation feedback: toasts, optimistic updates, undo
src/store/toast-store.ts+src/components/Toast.tsx: accessible viewport (role="status"for info/success,role="alert"for errors), dismissible, auto-timeout with pause on hover/focus, optional action button.src/hooks/useOptimisticMutation.ts: per-call cache snapshot, rollback on failure (including clearing an entry that did not exist before), error toast, optional refetch (invalidateOnSettle: falsefor read receipts).src/hooks/useDeferredAction.ts: delayed-commit undo pattern; Undo cancels the request and reverts the cache, a failed commit rolls back and toasts, and an unmount before the window reverts instead of leaving a phantom change.useOptimisticMutation.tsandARCHITECTURE_ESSENTIALS.md.Toast.test.tsx,useOptimisticMutation.test.tsx,useDeferredAction.test.tsx, plus the existing queue/messaging suites.#114 — Accessible date and time pickers
DatePickerimplements the WAI-ARIA date picker dialog pattern (grid, roving tabindex, arrows/PageUp/PageDown/Home/End, Enter/Escape, month header live region, focus trap and return).TimePickeris a listbox with the same keyboard guarantees.type="date"input: dependent date of birth, auditfrom/to, insights custom range.DatePicker.test.tsx,TimePicker.test.tsx; stories:DatePicker.stories.tsx,TimePicker.stories.tsx(plain CSF, Storybook wiring is [Platform] Storybook component library with interaction and accessibility tests #97).#115 — Shared file upload component
Uploadsupports drag-and-drop plus a file button, a separate mobile camera-capture input, per-file progress, cancel, retry and remove, with polite live-region announcements and accessible progress bars. File contents live only in component state.downscaleImageresizes large images with a configurable quality/max dimension.apiUploadinapi-client.tsis the only upload path: XHR multipart withcredentials: 'include', bearer token, progress and abort.Upload.test.tsx,upload-utilscovered through it,image-downscale.test.ts,api-client.test.ts; stories:Upload.stories.tsx.Docs / assumptions
ROADMAP.md: W7 items for [Platform] Migrate to React Router data routers with loaders and route-level error elements #112–[Platform] Shared file upload component with progress, retry and image downscaling #115 marked done, status paragraph and changelog updated; [Platform] Storybook component library with interaction and accessibility tests #97 notes the CSF story files already exist.ARCHITECTURE_ESSENTIALS.md: routing section updated to the data router, refresh gap closed behaviourally, and new assumed shapes recorded (refresh{user, accessToken},POST /uploadsmultipart returning{id?, url?}, picker date/time semantics, optimistic-money rule).Verification
Manual review notes: screenshots were not attached because this environment has no browser available (the same disclosed gap as previous UI PRs in this repo); keyboard paths are covered by the picker/upload tests.
Closes #9is intentionally not included: this PR implements the single-flight restore behaviour #9 depended on, but the issue stays open for an end-to-end check against the real backend.