Skip to content

feat(admin): SaaS readiness card in admin dashboard#3814

Merged
PierreBrisorgueil merged 4 commits intomasterfrom
feat/saas-readiness
Apr 4, 2026
Merged

feat(admin): SaaS readiness card in admin dashboard#3814
PierreBrisorgueil merged 4 commits intomasterfrom
feat/saas-readiness

Conversation

@PierreBrisorgueil
Copy link
Copy Markdown
Collaborator

@PierreBrisorgueil PierreBrisorgueil commented Mar 30, 2026

Summary

  • New "Readiness" tab in admin dashboard with visual status checklist
  • Status chips (ok/warning/error) per category with color coding
  • Fetches data from GET /api/admin/readiness
  • Fix docker-compose.test.yml: port 3001→3000 + add DEVKIT_NODE_api_host: 0.0.0.0

Test plan

  • Admin dashboard shows 3 tabs (Users, Teams, Readiness)
  • Readiness tab displays status chips per category
  • Non-admin users cannot access admin page
  • E2E tests pass with fixed docker-compose

Summary by CodeRabbit

  • New Features

    • Added a "Readiness" tab to the admin panel displaying system status with visual indicators, loading states, and detailed status messages.
  • Testing

    • Added comprehensive unit test coverage for the admin module, including the new readiness functionality and error handling scenarios.
  • Chores

    • Updated service configuration and port mapping for improved consistency.

Copilot AI review requested due to automatic review settings March 30, 2026 13:26
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Mar 30, 2026

Warning

Rate limit exceeded

@PierreBrisorgueil has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 9 minutes and 20 seconds before requesting another review.

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 @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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 configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 8938b676-f5d0-465a-899b-61ceed82ad39

📥 Commits

Reviewing files that changed from the base of the PR and between 95b997e and 14530ef.

📒 Files selected for processing (7)
  • .gitignore
  • docker-compose.test.yml
  • src/modules/admin/stores/admin.store.js
  • src/modules/admin/tests/admin.readiness.view.unit.tests.js
  • src/modules/admin/tests/admin.store.unit.tests.js
  • src/modules/admin/tests/admin.view.unit.tests.js
  • src/modules/admin/views/admin.view.vue

Walkthrough

Added 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

Cohort / File(s) Summary
Configuration
.gitignore
Added .claude/worktrees/ path to ignore rules.
Docker Compose
docker-compose.test.yml
Updated node-api port mapping from 3000:3001 to 3000:3000, added DEVKIT_NODE_api_host: 0.0.0.0 environment variable, and adjusted healthcheck endpoint from port 3001 to 3000.
Admin Store
src/modules/admin/stores/admin.store.js
Added readiness state initialized to empty array and new getReadiness() action that fetches from /admin/readiness endpoint and updates store state.
Admin View
src/modules/admin/views/admin.view.vue
Added new "Readiness" tab with computed property binding to store, loading state management via watch on tab selection, and conditional rendering for loading bar, status table, and empty state message.
Admin Store Tests
src/modules/admin/tests/admin.store.unit.tests.js
Extended existing store tests with assertions for readiness state initialization and new test suite for getReadiness() action including success and error-handling scenarios.
Admin View Tests
src/modules/admin/tests/admin.readiness.view.unit.tests.js
Added comprehensive test suite for AdminView readiness tab including store setup, dependency mocking, Vuetify stubs, and tests verifying tab rendering, async fetching behavior, and data binding.

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
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related issues

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Description check ❓ Inconclusive The description covers the summary and test plan but omits several required template sections (Scope, Validation, Guardrails check, Infra/Stack details) making it incomplete and difficult to fully assess risk and test coverage. Complete the missing sections: add Scope (modules impacted, cross-module impact, risk level), Validation (checkbox statuses), Guardrails check, and any infra/stack alignment details relevant to the port and environment changes.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main feature addition: a new 'Readiness' tab/card in the admin dashboard, which is the primary change across multiple files in this changeset.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/saas-readiness

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@codecov
Copy link
Copy Markdown

codecov bot commented Mar 30, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.31%. Comparing base (38aa910) to head (14530ef).
⚠️ Report is 1 commits behind head on master.

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 readiness state + getReadiness() action, and adds unit coverage.
  • Fixes docker-compose.test.yml port/host env for test runs; updates .gitignore for 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/

Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

📥 Commits

Reviewing files that changed from the base of the PR and between 07f3b97 and 95b997e.

📒 Files selected for processing (6)
  • .gitignore
  • docker-compose.test.yml
  • src/modules/admin/stores/admin.store.js
  • src/modules/admin/tests/admin.readiness.view.unit.tests.js
  • src/modules/admin/tests/admin.store.unit.tests.js
  • src/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
@PierreBrisorgueil PierreBrisorgueil merged commit f2f86e0 into master Apr 4, 2026
6 checks passed
@PierreBrisorgueil PierreBrisorgueil deleted the feat/saas-readiness branch April 4, 2026 20:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants