M6 dashboard: page shell + stat cards#37
Merged
Conversation
- Time-of-day greeting using `getGreeting` with display name
derived from the current user's email.
- Three `StatCard`s wired through TanStack Query:
`Time to reconnect` (orange) from `/api/dashboard/reconnect`,
`Coming up soon` from `/api/dashboard/upcoming`,
`In your circle` from `/api/people`.
- New API modules `api/dashboard.ts` and `api/people.ts`;
query hooks live in `dashboard/hooks.ts` next to the route.
- MSW handlers stub the three dashboard endpoints so the
auth-shell smoke test still passes; assertion now keys off
`Time to reconnect` since the dashboard heading is now the
greeting.
- ESLint: skip `react-refresh/only-export-components` for
vendored `src/components/ui/**` (shadcn `Button` co-exports
`buttonVariants`).
Lands piece 1 of three for M6 Dashboard. Next pieces are the
reconnect card list and its expand-to-log interactions.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Time to reconnect,Coming up soon,In your circle) wired to/api/dashboard/{reconnect,upcoming}and/api/peoplevia TanStack Querydashboardheadingcomponents/ui/**(Button+buttonVariantsco-export)This lands piece 1 of three for M6. Next: reconnect card list, then expand-to-log interactions.
Test plan
npm --prefix client run lintcleannpm --prefix client run testgreen (3 tests)npm --prefix client run buildsucceeds (tsc + vite)http://localhost:5173, greeting + three stat cards render with seed-data counts