feat(admin): SaaS readiness card in admin dashboard - #3814
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
# [2.0.0](v1.5.0...v2.0.0) (2026-05-01) * feat(admin)!: render extra tabs as inline nested routes ([e5ebea9](e5ebea9)), closes [#3955](#3955) ### Bug Fixes * **admin:** frame Readiness & Activity tabs to match Users/Organizations ([#3987](#3987)) ([73c7527](73c7527)) * **admin:** nav label, activeTab sync, tighter tab-route validation ([39f2eac](39f2eac)) * **admin:** prevent toggleUserRole from erasing user fields ([#3995](#3995)) ([d469759](d469759)), closes [#3993](#3993) [#3993](#3993) * **audit:** security fixes — SVG XSS, router guard, admin errors, docs config ([#3880](#3880)) ([b57d8fc](b57d8fc)), closes [#3876](#3876) [#3877](#3877) [#3878](#3878) [#3879](#3879) [#3877](#3877) * **auth,admin:** structured logging + remove stale TODOs ([#3919](#3919)) ([2b52c28](2b52c28)) * **auth:** call backend signout to clear httpOnly TOKEN cookie ([#4018](#4018)) ([6b04471](6b04471)), closes [#3502](#3502) * **auth:** show loader on oAuth callback, surface token() errors ([#4017](#4017)) ([#4019](#4019)) ([a60d1b9](a60d1b9)) * **auth:** tolerate canonical + legacy + plain-string OAuth error payloads ([#4022](#4022)) ([89fa807](89fa807)), closes [#3495](#3495) [pre-#3513](https://github.com/pre-/issues/3513) [#4021](#4021) [#4021](#4021) * **avatar:** snap size to backend sharp whitelist ([#3973](#3973)) ([c6f59d9](c6f59d9)), closes [#3972](#3972) * **billing:** cumulative review — loading race + unconditional useMeter + cleanup ([#4043](#4043)) ([3ff56ba](3ff56ba)) * **billing:** replace networkidle with domcontentloaded in pricing E2E tests ([#3858](#3858)) ([b468027](b468027)), closes [#3848](#3848) * **billing:** use named import for plans, add migration note for billing.config.js rename ([162689d](162689d)) * **config:** fix layer numbering and clarify downstream README instructions ([3c7c918](3c7c918)) * **config:** guard loadModuleConfigs against array default exports ([#3908](#3908)) ([0c215a0](0c215a0)), closes [#3900](#3900) * **config:** rename billing.config.js to billing.development.config.js ([394efaa](394efaa)) * **developers:** remove orphan developers module (no backend) ([#3909](#3909)) ([8e1b440](8e1b440)) * **e2e:** eliminate flaky Vite cold-start race on ARC runners ([#3918](#3918)) ([534c7a7](534c7a7)), closes [#3917](#3917) * **features:** remount carousel cards on step change to replay SVG animations ([#3887](#3887)) ([e202d65](e202d65)), closes [#3886](#3886) * **footer:** transparent background on link list ([#3875](#3875)) ([83b83b0](83b83b0)), closes [#3862](#3862) * **footer:** use transparent card color to match section background ([#3871](#3871)) ([eaca4b5](eaca4b5)) * **home:** add title/subtitle spacing in HomeContentComponent ([#3840](#3840)) ([e52a10a](e52a10a)), closes [#3835](#3835) * **home:** equalize capabilities card heights across tabs ([#3946](#3946)) ([3fa094b](3fa094b)), closes [#3945](#3945) * **home:** isSvg handles URLs with query strings and fragments ([#3950](#3950)) ([548facf](548facf)), closes [#3949](#3949) * **home:** prevent last section and footer sharing same background ([#3842](#3842)) ([2cda9c7](2cda9c7)), closes [#3838](#3838) * **home:** remove hardcoded Ghost API key, use env var ([#3915](#3915)) ([aaba326](aaba326)), closes [#3910](#3910) * **home:** render SVGs inline to access CSS custom properties ([#3860](#3860)) ([f95ef06](f95ef06)), closes [#3849](#3849) * **home:** replace console.error/warn with structured logger ([#3916](#3916)) ([631ddac](631ddac)), closes [#3911](#3911) * **home:** support custom gradient in features section background ([#3866](#3866)) ([d66c36e](d66c36e)) * **home:** use homeImgComponent for about section SVGs ([#3930](#3930)) ([b9246dd](b9246dd)), closes [#3929](#3929) * **images:** omit port when api.port is empty or undefined ([#3964](#3964)) ([70c2e4c](70c2e4c)), closes [#3927](#3927) [#3963](#3963) * **img:** await nextTick before setting SVG content from cache ([#3889](#3889)) ([5e98d2c](5e98d2c)) * **navigation:** clean mobile glass navigation ([#3942](#3942)) ([ec6a283](ec6a283)) * **stores:** normalize console.log → console.error in catch blocks ([#3912](#3912)) ([09423de](09423de)), closes [#3906](#3906) * **tests:** eliminate component mount leaks + harden vitest config ([#4045](#4045)) ([79a8108](79a8108)) ### Features * **admin:** add Activity tab with audit log viewer ([#3928](#3928)) ([79cacff](79cacff)), closes [#3891](#3891) * **admin:** configurable tabs via admin config array ([#3847](#3847)) ([3a99e67](3a99e67)), closes [#3846](#3846) * **admin:** SaaS readiness card in admin dashboard ([#3814](#3814)) ([f2f86e0](f2f86e0)) * **admin:** surface API errors in admin store actions ([#3861](#3861)) ([38aa910](38aa910)), closes [#3850](#3850) * **billing:** meter UI primitives — progress + breakdown + ledger (PR-V2) ([#4038](#4038)) ([089d200](089d200)) * **billing:** meter UX surfaces (PR-V3) ([#4039](#4039)) ([0d0d4f6](0d0d4f6)) * **billing:** mini-bar always-on (free/admin) + extras section in /billing + account links ([#4048](#4048)) ([b459fad](b459fad)) * **billing:** useMeter composable + extras store actions (PR-V1) ([#4037](#4037)) ([1d05894](1d05894)) * **config:** document and standardize {module}.{project}.config.js per-module project overrides ([93393e3](93393e3)) * **core/pageHeader:** breadcrumb slot + canonical height + overflow fix ([#4026](#4026)) ([52e00cd](52e00cd)), closes [#4013](#4013) * **core:** expose reusable OrgAvatar component ([#3926](#3926)) ([1d71817](1d71817)), closes [#3924](#3924) * **core:** support SVG/image sidenav logo + click-to-home ([#3988](#3988)) ([958b1a5](958b1a5)), closes [#3986](#3986) * **docs:** add docs module with embedded Scalar API reference ([#3873](#3873)) ([b5df8d1](b5df8d1)), closes [#3867](#3867) * **docs:** add markdown guide pages with navigation tabs ([#3874](#3874)) ([a39256c](a39256c)), closes [#3867](#3867) [#3868](#3868) * **home:** add animated counter to statistics component ([#3845](#3845)) ([df63150](df63150)), closes [#3831](#3831) * **home:** add configurable cols to services component ([#3856](#3856)) ([ceeb9e0](ceeb9e0)), closes [#3853](#3853) * **home:** add grid layout option to features component ([#3859](#3859)) ([e1b6540](e1b6540)), closes [#3854](#3854) * **home:** add HomeCtaComponent for final CTA section ([#3843](#3843)) ([38c5444](38c5444)), closes [#3837](#3837) [#3839](#3839) * **home:** add imgBackground option to about component ([#3857](#3857)) ([4d939ee](4d939ee)), closes [#3855](#3855) * **home:** add imgMode prop to features cards for SVG illustrations ([#3844](#3844)) ([bfe6ab7](bfe6ab7)), closes [#3839](#3839) * **home:** make timeline opposite-side labels optional ([#3841](#3841)) ([564808c](564808c)), closes [#3836](#3836) * **home:** render icon on the right of title when alignment='right' ([#3952](#3952)) ([94ff2ee](94ff2ee)), closes [#3951](#3951) * **home:** support custom section background in all home components ([#3872](#3872)) ([5756f9c](5756f9c)) * **home:** support right alignment in homeContentComponent ([#3947](#3947)) ([26af7df](26af7df)), closes [#3944](#3944) * **modules:** per-module activation config flag ([#3864](#3864)) ([d49dae0](d49dae0)), closes [#3863](#3863) * **navigation:** support explicit sidenav ordering via meta.order ([#3965](#3965)) ([37eaa67](37eaa67)), closes [#3962](#3962) * **navigation:** support external links in sidenav ([#3954](#3954)) ([#3956](#3956)) ([8708fa0](8708fa0)) * **observability:** fan-out errors Sentry + PostHog + opt-in flags ([#4012](#4012)) ([0efe3ab](0efe3ab)), closes [#4011](#4011) [#4011](#4011) ### BREAKING CHANGES * downstream projects using config.admin.tabs with /admin/* sibling routes must migrate per MIGRATIONS.md — relative paths in the router file, registration via injectAdminChildren in app.router.js, and removal of PageHeader from tab views.
Summary
GET /api/admin/readinessDEVKIT_NODE_api_host: 0.0.0.0Test plan
Summary by CodeRabbit
New Features
Testing
Chores