-
Notifications
You must be signed in to change notification settings - Fork 0
✨ Dashboard, Sleep CRUD, Day View (SvelteKit) + Backend list endpoints #11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…idation; add SleepListItem model and repo fns; document in OpenAPI; add integration tests
…ings, ConfirmDialog; CRUD routes (/sleep/new, /sleep/[id]/edit); day view; API helpers and stores
…segments and CSRF token reader
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR implements a comprehensive dashboard and sleep CRUD functionality for both the backend (Axum) and frontend (SvelteKit), adding essential list endpoints and visualization components.
Key Changes
- Added new read-only endpoints for sleep data (
/sleep/recentand/sleep/range) with session authentication - Implemented complete dashboard with week view, sleep visualization bars, and CRUD operations
- Added comprehensive test coverage including Playwright e2e tests and Vitest unit tests
Reviewed Changes
Copilot reviewed 25 out of 26 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| sleep-api/src/app.rs | Adds GET endpoints for recent and range sleep queries with parameter validation |
| sleep-api/src/repository.rs | Implements database queries for listing sleep entries with proper ordering |
| sleep-api/src/models/sleep.rs | Defines SleepListItem struct for API responses |
| sleep-ui/src/lib/api.ts | Adds helper functions and types for sleep/exercise API interactions |
| sleep-ui/src/lib/components/ | Creates reusable components for sleep visualization, forms, and confirmations |
| sleep-ui/src/routes/ | Implements dashboard, create/edit/delete flows, and day view pages |
| sleep-ui/tests/ | Adds comprehensive unit and e2e test coverage |
| sleep-ui/vitest.config.ts | Configures Vitest for unit testing |
Files not reviewed (1)
- sleep-ui/package-lock.json: Language not supported
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
… keep /api/session and trends
…te, SSR loads, edit page; simplify Vite proxy to only /api; login uses /api
…d docs; refresh internal comments
…ate days for /api/sleep/recent; standardize error JSON; update OpenAPI and backend tests; UI: edit loads by id and SSR seeds exercise intensities
…esolve 405 for GET
Summary
Implements PR-C scope across backend (Axum) and SvelteKit frontend.
Backend (Axum)
Frontend (SvelteKit)
Alignment with PR-A/PR-B
How to run locally
Notes
Changelog of notable files
All backend tests and frontend unit tests pass locally.