feat(admin): SaaS readiness card in admin dashboard#3814
feat(admin): SaaS readiness card in admin dashboard#3814PierreBrisorgueil merged 4 commits intomasterfrom
Conversation
|
Warning Rate limit exceeded
Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 9 minutes and 20 seconds. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (7)
WalkthroughAdded a new "Readiness" feature to the admin view that fetches and displays readiness status from the API. Changes include updating docker-compose port configuration, extending the admin Pinia store with readiness state and action, implementing the readiness tab UI with conditional rendering and loading states, and adding comprehensive unit tests. Changes
Sequence Diagram(s)sequenceDiagram
actor User
participant AdminView as AdminView Component
participant Store as Admin Store (Pinia)
participant API as API Server
User->>AdminView: Select Readiness Tab
AdminView->>AdminView: Set readinessLoading = true
AdminView->>Store: Call getReadiness()
Store->>API: GET /admin/readiness
API-->>Store: Return readiness data
Store->>Store: Update readiness state
Store-->>AdminView: Action completes
AdminView->>AdminView: Set readinessLoading = false
AdminView->>AdminView: Render readiness table/empty state
AdminView-->>User: Display readiness status
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related issues
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #3814 +/- ##
=======================================
Coverage 99.31% 99.31%
=======================================
Files 29 29
Lines 1021 1026 +5
Branches 256 256
=======================================
+ Hits 1014 1019 +5
Misses 7 7 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Pull request overview
Adds an Admin Dashboard “Readiness” tab to surface SaaS operational status checks sourced from GET /api/admin/readiness, plus test infra tweaks to keep E2E stable.
Changes:
- Adds a “Readiness” tab UI (table + loading state) to the admin dashboard.
- Extends the admin Pinia store with
readinessstate +getReadiness()action, and adds unit coverage. - Fixes
docker-compose.test.ymlport/host env for test runs; updates.gitignorefor local worktrees.
Reviewed changes
Copilot reviewed 5 out of 6 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| src/modules/admin/views/admin.view.vue | Adds the “Readiness” tab UI and fetch trigger when the tab is selected |
| src/modules/admin/stores/admin.store.js | Adds readiness state and a getReadiness() action to call /admin/readiness |
| src/modules/admin/tests/admin.store.unit.tests.js | Adds initial-state assertion + unit tests for getReadiness() |
| src/modules/admin/tests/admin.readiness.view.unit.tests.js | New unit tests for the admin view’s readiness tab behavior |
| docker-compose.test.yml | Aligns node-api port mapping + healthcheck to 3000 and sets DEVKIT_NODE_api_host |
| .gitignore | Ignores .claude/worktrees/ |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@src/modules/admin/stores/admin.store.js`:
- Around line 86-93: Add a JSDoc header to the async function getReadiness
describing its purpose and include `@returns` (Promise<void>), and update its
catch to accept the error object and surface a fallback log/notification when
axios interceptor won't produce a user-visible message (i.e., when
error.response?.data?.description is missing); specifically, modify getReadiness
to catch (err) and call a fallback logger or notification (e.g., console.error
or a UI notify helper) with a concise message plus the error to ensure failures
are visible even if the interceptor doesn’t create a user notification.
In `@src/modules/admin/views/admin.view.vue`:
- Around line 107-119: The status rendering currently collapses "warning" and
"error" into the same appearance; update the conditional logic used by the
v-icon and v-chip (refer to the v-icon and v-chip usages and the item.status
reference) to explicitly map three states: "ok" => success (check-circle icon),
"warning" => warning/neutral tone (exclamation-triangle or similar icon), and
"error" => error/danger tone (times-circle or error icon); replace the existing
ternary expressions with either a small helper method/computed property (e.g.,
getStatusIcon/getStatusColor or a single computed returning {icon,color}) or an
explicit switch so each of the three statuses has its own icon and color.
🪄 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: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro
Run ID: 4d2e1ff8-e90b-4ee8-aaeb-50c2a9cdc71d
📒 Files selected for processing (6)
.gitignoredocker-compose.test.ymlsrc/modules/admin/stores/admin.store.jssrc/modules/admin/tests/admin.readiness.view.unit.tests.jssrc/modules/admin/tests/admin.store.unit.tests.jssrc/modules/admin/views/admin.view.vue
- New "Readiness" tab in admin view with visual checklist - Status chips (ok/warning/error) per category - Fetches from GET /api/admin/readiness - Fix docker-compose.test.yml port + host for E2E
…mes, tests - Add 3-state status mapping: ok (green), warning (orange), error (red) - Fix icon: fa-check-circle → fa-circle-check (FA6), add fa-circle-xmark for error - Add JSDoc on getReadiness, fetchReadiness, readinessIcon, readinessColor - Clear stale readiness data on API error - Fix test: seed stale data before error to verify cleanup - Remove brittle icon class assertion from DOM test
b92d0d4 to
13d2af9
Compare
Summary
GET /api/admin/readinessDEVKIT_NODE_api_host: 0.0.0.0Test plan
Summary by CodeRabbit
New Features
Testing
Chores