health module and vite 8 migration - #151
Conversation
- organized all the health related endpoints in one single health module that covers both the native nest.js implementation using a controller than the trpc way using a router - added tests for the `health.service`, `health.router` and `health.controller`
- migrated the dashboard to vite 8
- updated the `IsoDateStringSchema` to use the built-in z.iso.date() instead of a complex regex - updated the `globalStateInitialDataSchema` to use `z.iso.datetime()...` to validate the fields `lastServerSync` and `updatedAt` instead of an union because the dates are serialized into strings when saving the object in memory - moved the `IsoDateSchema` into the dashboard app since it is now only used there
- bumped the extension version to `v0.0.74`
📝 WalkthroughWalkthroughThe API adds HTTP and tRPC health ping endpoints. Dashboard tooling moves to Babel and Rolldown configuration. Period schemas export date utilities, while shared and VSCode schemas standardize ISO date parsing. ChangesAPI health checks
Dashboard build and period schemas
Datetime schema normalization
Estimated code review effort: 3 (Moderate) | ~25 minutes Sequence Diagram(s)sequenceDiagram
participant Client
participant HealthController
participant HealthRouter
participant HealthService
Client->>HealthController: GET /health/ping
HealthController->>HealthService: ping()
HealthService-->>HealthController: { status: "OK" }
Client->>HealthRouter: health.ping query
HealthRouter->>HealthService: ping()
HealthService-->>HealthRouter: { status: "OK" }
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 ESLint
ESLint install timed out. The project may have too many dependencies for the sandbox. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@apps/dashboard/src/stores/period/types-schemas.ts`:
- Around line 9-11: Update IsoDateSchema to parse date-only strings as local
calendar dates rather than passing them directly to the Date constructor. Split
the YYYY-MM-DD value into numeric year, month, and day components and construct
the local date with those components, preserving the existing transformed Date
output.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: 1f69c169-37d1-4eb8-ab38-8a7b30122a41
⛔ Files ignored due to path filters (1)
package-lock.jsonis excluded by!**/package-lock.json
📒 Files selected for processing (20)
apps/api/package.jsonapps/api/src/app-router/app-router.module.tsapps/api/src/app-router/providers/app-router.provider.tsapps/api/src/app.controller.tsapps/api/src/app.module.tsapps/api/src/app.service.tsapps/api/src/health/health.controller.test.tsapps/api/src/health/health.controller.tsapps/api/src/health/health.module.tsapps/api/src/health/health.router.test.tsapps/api/src/health/health.router.tsapps/api/src/health/health.service.test.tsapps/api/src/health/health.service.tsapps/dashboard/package.jsonapps/dashboard/src/stores/period/types-schemas.tsapps/dashboard/src/stores/period/utils/get-period-store-values-from-url.tsapps/dashboard/vite.config.tsapps/vscode-extension/package.jsonapps/vscode-extension/src/types-schemas.tspackages/common/src/types-schemas.ts
💤 Files with no reviewable changes (2)
- apps/api/src/app.service.ts
- apps/api/src/app.controller.ts
Commits
chore: health
health.service,health.routerandhealth.controllerchore: vite 8 migration
fix: zod schemas
IsoDateStringSchemato use the built-in z.iso.date() instead of a complex regexglobalStateInitialDataSchemato usez.iso.datetime()...to validate the fieldslastServerSyncandupdatedAtinstead of an union because the dates are serialized into strings when saving the object in memoryIsoDateSchemainto the dashboard app since it is now only used therechore: extension version
v0.0.74Summary by CodeRabbit
New Features
/health/ping, returning the service’s operational status.Bug Fixes
Improvements