feat(progress): integrate real admin updates as a project journey timeline (#206)#212
Conversation
Pure, order-independent helper deriving the headline progress figures (total, milestones reached, latest activity, journey start) the Progress section shows above the timeline. Refs hrx01-dev#206
Cover totals, milestone counting, the date range (order-independent), the empty case, and timestamp-less updates. Refs hrx01-dev#206
Replace the Progress section's mock project-stage data with the real, admin-authored updates from useClientUpdates (issue hrx01-dev#167's projectUpdates system) — scoped to the signed-in client's own verified email and updating in real time. To stay distinct from the flat Updates feed, the Progress section is a progress-oriented "project journey": a gradient summary card (updates posted, milestones reached, latest activity, journey start, plus a milestone dot row) above a vertical, newest-first timeline with type-coloured nodes, milestone glow, relative + absolute timestamps, and staggered (reduced-motion-aware) animations. Loading / verify-email / error / empty states are all handled. Closes hrx01-dev#206
The resend handler swallowed errors, so a failed/rate-limited resend silently re-enabled the button with no feedback. Mirror UpdatesFeed: track a sendError, distinguish auth/too-many-requests, and render it in a role="alert". Refs hrx01-dev#206
The per-update timestamp used text-gray-400/dark:gray-500 (~2.5:1 / ~3.7:1), below the 4.5:1 AA threshold for small text. Bump to gray-500/dark:gray-400 (matching the summary stat labels), which passes AA in both themes. Refs hrx01-dev#206
|
@Harsh-goswami-103 is attempting to deploy a commit to the hrx01-dev's projects Team on Vercel. A member of the Team first needs to authorize it. |
|
Caution Review failedPull request was closed or merged during review 📝 WalkthroughWalkthroughThe dashboard progress view now uses client updates to show summary stats, newest-first timeline entries, loading/error/empty states, and email-verification resend handling. A new ChangesClient progress timeline
Sequence Diagram(s)sequenceDiagram
participant ProjectProgress
participant useClientUpdates
participant summarizeUpdates
participant sendEmailVerification
ProjectProgress->>useClientUpdates: fetch updates state
useClientUpdates-->>ProjectProgress: updates, loading, error, needsEmailVerification
ProjectProgress->>summarizeUpdates: aggregate updates
summarizeUpdates-->>ProjectProgress: total, milestones, latest, started
ProjectProgress->>sendEmailVerification: resend verification for auth.currentUser
sendEmailVerification-->>ProjectProgress: success or auth/too-many-requests
Estimated code review effort🎯 4 (Complex) | ⏱️ ~60 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
Summary
Replaces the mock project-stage data in the client dashboard's Progress section with the real, admin-authored updates already managed by the existing Updates system (
projectUpdates/useClientUpdates, from #167) — scoped to the signed-in client's own verified email and updating live.Closes #206
The creative bit
The dashboard already has a flat Updates feed, so rather than duplicate it, the Progress section is reimagined as a "project journey" — a progress-oriented view of the same real data:
A small, pure, unit-tested
summarizeUpdates()helper backs the summary.Acceptance criteria
project.stages/useProjects)useClientUpdates)projectUpdatessecurity rules — verified-email match)onSnapshot)Testing
typecheck,lint,test(213 passing, incl. 3 newsummarizeUpdatestests),build— all green.UpdatesFeed'sauth/too-many-requestshandling).No deploy steps needed (no rules or schema changes).
Summary by CodeRabbit
New Features
Bug Fixes