Skip to content

feat(ui): clavis pca get-by-id#838

Merged
vlad-schur-external-sap merged 8 commits into
mainfrom
vlad-clavis-get-by-id-ca
May 27, 2026
Merged

feat(ui): clavis pca get-by-id#838
vlad-schur-external-sap merged 8 commits into
mainfrom
vlad-clavis-get-by-id-ca

Conversation

@vlad-schur-external-sap

@vlad-schur-external-sap vlad-schur-external-sap commented May 26, 2026

Copy link
Copy Markdown
Contributor

Summary

Implemented details page, connected bff endpoint, showing ca-information(csr, project/pca ids, subject etc), connected delete modal to details page with redirect/invalidation to the list page.

Changes Made

  • Implemented pca-details route with get-by-id request
  • Added navigation from the pca-list
  • Changed Modal to redirect on-success from details-page

Related Issues

Testing Instructions

  1. pnpm i
  2. pnpm run test

Checklist

  • I have performed a self-review of my code.
  • I have commented my code, particularly in hard-to-understand areas.
  • I have added tests that prove my fix is effective or that my feature works.
  • New and existing unit tests pass locally with my changes.
  • I have made corresponding changes to the documentation (if applicable).
  • My changes generate no new warnings or errors.

Summary by CodeRabbit

Release Notes

  • New Features
    • Added a Private Certificate Authority (PCA) detail page accessible by clicking a PCA from the list.
    • Detail view displays comprehensive CA information including ID, validity duration, and certificate request.
    • Users can delete a PCA directly from its detail page.
    • Expanded localization support with German and English translations for CA workflows.

Review Change Stack

Signed-off-by: Vladislav Schur <u.shchur@sap.com>
Signed-off-by: Vladislav Schur <u.shchur@sap.com>
Signed-off-by: Vladislav Schur <u.shchur@sap.com>
@coderabbitai

coderabbitai Bot commented May 26, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

@vlad-schur-external-sap, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 40 minutes. Learn how PR review limits work.

Your organization has run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After more reviews become available, 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 include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: bdde9888-f824-4402-91aa-d736d131ff70

📥 Commits

Reviewing files that changed from the base of the PR and between 7a4efd5 and d66eb02.

📒 Files selected for processing (4)
  • apps/aurora-portal/docs/0011_clavis.md
  • apps/aurora-portal/src/client/routes/_auth/projects/$projectId/services/pca/$pcaId/-components/PcaDetailsView.test.tsx
  • apps/aurora-portal/src/client/routes/_auth/projects/$projectId/services/pca/$pcaId/-components/PcaDetailsView.tsx
  • apps/aurora-portal/src/client/routes/_auth/projects/$projectId/services/pca/-components/-table/PcaTableRow.tsx
📝 Walkthrough

Walkthrough

This PR introduces a new Private Certificate Authority details page under /_auth/projects/$projectId/services/pca/$pcaId/. It updates the backend PCA router to use the "pca" service, registers the new route in the TanStack router tree, implements detail view and page components with loading/error handling, wires delete modal callbacks for post-deletion navigation, adds table row navigation to the details page, and supplies localization strings in English and German.

Changes

PCA Detail Page Feature

Layer / File(s) Summary
Backend PCA Service Router
apps/aurora-portal/src/server/Services/routers/pcaRouter.ts, apps/aurora-portal/src/server/Services/routers/pcaRouter.test.ts
Backend router changes the service target from "clavis" to "pca" and updates response parsing to return CertificateAuthority directly instead of extracting from a wrapped response shape. Test fixtures and assertions are updated to match the new response structure.
Route Tree Registration
apps/aurora-portal/src/client/routeTree.gen.ts
TanStack router tree adds the new PCA detail index route as a child of the project services segment, wiring it into FileRoutesByPath, FileRoutesByFullPath, FileRoutesByTo, and FileRoutesById type unions.
PCA Detail Page Route and View Component
apps/aurora-portal/src/client/routes/_auth/projects/$projectId/services/pca/$pcaId/index.tsx, apps/aurora-portal/src/client/routes/_auth/projects/$projectId/services/pca/$pcaId/-components/PcaDetailsView.tsx, apps/aurora-portal/src/client/routes/_auth/projects/$projectId/services/pca/$pcaId/-components/PcaDetailsView.test.tsx
New detail page route with beforeLoad service validation, loading/error/missing-data UI states, and PcaDetailsView component that renders certificate authority details (CA ID, validity, subject, CSR), delete button wired to DeletePcaModal, and post-delete navigation callback.
Delete Modal onSuccess Callback
apps/aurora-portal/src/client/routes/_auth/projects/$projectId/services/pca/-components/-modals/DeletePcaModal.tsx, apps/aurora-portal/src/client/routes/_auth/projects/$projectId/services/pca/-components/-modals/DeletePcaModal.test.tsx
DeletePcaModal accepts an optional onSuccess callback prop and invokes it after successful deletion, enabling consuming components like PcaDetailsView to navigate away post-delete.
Table Navigation and List Page Updates
apps/aurora-portal/src/client/routes/_auth/projects/$projectId/services/pca/-components/-table/PcaTableRow.tsx, apps/aurora-portal/src/client/routes/_auth/projects/$projectId/services/pca/-components/-table/PcaTableRow.test.tsx, apps/aurora-portal/src/client/routes/_auth/projects/$projectId/services/pca/index.tsx
PcaTableRow adds row-click navigation to the detail page with projected projectId and pcaId params, and PCA list page renders ContentHeader with projectId instead of ContentHeading.
Localization Strings
apps/aurora-portal/src/locales/en/messages.po, apps/aurora-portal/src/locales/de/messages.po
New English and German localization entries for detail page UI labels (CA ID, Duration/validity, Subject), navigation ("Back to Certificate Authorities"), error messages, and loading states.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Suggested reviewers

  • KirylSAP
  • mark-karnaukh-extern-sap

Poem

🐰 A detail page hops into view,
Routes aligned, backend anew,
Delete flows smooth with callbacks true,
Table rows navigate through—
A PCA portrait, carefully drew! 🔐

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title 'feat(ui): clavis pca get-by-id' accurately reflects the main change: adding a UI feature for retrieving PCA details by ID.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description check ✅ Passed Pull request description follows the required template with all major sections present: Summary, Changes Made, Related Issues, Testing Instructions, and Checklist all completed.

✏️ 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 vlad-clavis-get-by-id-ca

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.

@vlad-schur-external-sap vlad-schur-external-sap changed the title feat(ui): add ca get-by-id router with request feat(ui): add ca get-by-id May 26, 2026
@vlad-schur-external-sap vlad-schur-external-sap changed the title feat(ui): add ca get-by-id feat(ui): clavis ca get-by-id May 26, 2026
Base automatically changed from vlad-clavis-delete-ca-with-docs to main May 26, 2026 12:09
@vlad-schur-external-sap vlad-schur-external-sap changed the title feat(ui): clavis ca get-by-id feat(ui): clavis pca get-by-id May 26, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 adds a PCA (Private Certificate Authority) certificate-authority details page in the Aurora Portal UI and updates the server-side PCA “get by id” endpoint to support the new detail view.

Changes:

  • Update pcaRouter.getById to use the "pca" OpenStack service and parse a direct CertificateAuthority payload.
  • Add a new PCA details route (/projects/:projectId/services/pca/:pcaId) plus a details view component and tests.
  • Add navigation from the PCA list table rows to the new details page and update i18n catalogs.

Reviewed changes

Copilot reviewed 13 out of 15 changed files in this pull request and generated 14 comments.

Show a summary per file
File Description
apps/aurora-portal/src/server/Services/routers/pcaRouter.ts Switch PCA get-by-id to "pca" service + direct schema parsing.
apps/aurora-portal/src/server/Services/routers/pcaRouter.test.ts Adjust get-by-id test payload shape and service naming expectations.
apps/aurora-portal/src/locales/en/messages.ts Regenerated compiled EN catalog for new PCA strings.
apps/aurora-portal/src/locales/en/messages.po Add EN strings for PCA details page.
apps/aurora-portal/src/locales/de/messages.ts Regenerated compiled DE catalog for new PCA strings.
apps/aurora-portal/src/locales/de/messages.po Add DE msgids for PCA details page (translations currently empty).
apps/aurora-portal/src/client/routeTree.gen.ts Add generated route entries for PCA details route.
apps/aurora-portal/src/client/routes/_auth/projects/$projectId/services/pca/index.tsx Use shared ContentHeader on PCA list page.
apps/aurora-portal/src/client/routes/_auth/projects/$projectId/services/pca/$pcaId/index.tsx New route: fetch and render PCA by id with loading/error/empty states.
apps/aurora-portal/src/client/routes/_auth/projects/$projectId/services/pca/$pcaId/-components/PcaDetailsView.tsx New PCA details UI (basic info + CSR/cert card + delete action).
apps/aurora-portal/src/client/routes/_auth/projects/$projectId/services/pca/$pcaId/-components/PcaDetailsView.test.tsx Tests for details view rendering and delete flow navigation.
apps/aurora-portal/src/client/routes/_auth/projects/$projectId/services/pca/-components/-table/PcaTableRow.tsx Make PCA table rows navigable to the details route.
apps/aurora-portal/src/client/routes/_auth/projects/$projectId/services/pca/-components/-table/PcaTableRow.test.tsx Add test coverage for row-click navigation.
apps/aurora-portal/src/client/routes/_auth/projects/$projectId/services/pca/-components/-modals/DeletePcaModal.tsx Add optional onSuccess callback for post-delete navigation.
apps/aurora-portal/src/client/routes/_auth/projects/$projectId/services/pca/-components/-modals/DeletePcaModal.test.tsx Test new onSuccess callback behavior.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread apps/aurora-portal/src/server/Services/routers/pcaRouter.ts
Comment thread apps/aurora-portal/src/locales/de/messages.po
Comment thread apps/aurora-portal/src/locales/de/messages.po
Comment thread apps/aurora-portal/src/locales/de/messages.po
Comment thread apps/aurora-portal/src/locales/de/messages.po
Comment thread apps/aurora-portal/src/locales/de/messages.po
Comment thread apps/aurora-portal/src/server/Services/routers/pcaRouter.ts
@vlad-schur-external-sap vlad-schur-external-sap linked an issue May 26, 2026 that may be closed by this pull request
3 tasks

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🧹 Nitpick comments (1)
apps/aurora-portal/src/client/routes/_auth/projects/$projectId/services/pca/-components/-table/PcaTableRow.test.tsx (1)

10-18: ⚡ Quick win

Reset shared mockNavigate between tests.

mockNavigate is module-scoped; add a reset hook to keep test outcomes independent as this suite grows.

Suggested patch
 import { describe, expect, it, vi } from "vitest"
@@
 const mockNavigate = vi.fn()
+
+beforeEach(() => {
+  mockNavigate.mockClear()
+})
🤖 Prompt for 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.

In
`@apps/aurora-portal/src/client/routes/_auth/projects/`$projectId/services/pca/-components/-table/PcaTableRow.test.tsx
around lines 10 - 18, The module-scoped mockNavigate (created as const
mockNavigate = vi.fn()) is reused across tests causing state leakage; add a test
lifecycle hook (e.g., beforeEach or afterEach) in PcaTableRow.test.tsx to
reset/clear the mock (call mockNavigate.mockReset() or use
vi.clearAllMocks()/vi.resetAllMocks()) so each test starts with a fresh mock;
keep the existing vi.mock for useNavigate unchanged but ensure the reset hook
references the mockNavigate symbol.
🤖 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/aurora-portal/src/client/routes/_auth/projects/`$projectId/services/pca/$pcaId/-components/PcaDetailsView.tsx:
- Around line 42-47: The certificate validity duration calculation in
PcaDetailsView.tsx uses new Date(...) on Unix seconds
(pca.certificate.validity.not_before / not_after) which expects milliseconds,
producing wrong day counts; update the duration compute (where
pca.certificate?.validity.not_before and pca.certificate?.validity.not_after are
used) to multiply the seconds by 1000 before creating Date objects (or otherwise
convert to milliseconds) and also adjust PcaDetailsView.test.tsx fixtures to
provide Unix seconds (remove any * 1000) so tests match the real model.

In `@apps/aurora-portal/src/locales/de/messages.po`:
- Around line 298-299: Several new PCA-related msgid entries (e.g., "Back to
Certificate Authorities", "CA ID", "Certificate Authority not found", "Delete
Certificate Authority", "Duration/validity", "Error loading Certificate
Authority", "Loading Certificate Authority Details...", "Manage your Private
Certificate Authority infrastructure", "Subject") in messages.po have empty
msgstr values; populate each corresponding msgstr with the correct German
translation (or, if intentional, add a TODO comment and reference a tracking
issue ID) so German users see localized text; update the msgstr for each listed
msgid in apps/aurora-portal/src/locales/de/messages.po and ensure
consistency/grammar across entries before merging.

---

Nitpick comments:
In
`@apps/aurora-portal/src/client/routes/_auth/projects/`$projectId/services/pca/-components/-table/PcaTableRow.test.tsx:
- Around line 10-18: The module-scoped mockNavigate (created as const
mockNavigate = vi.fn()) is reused across tests causing state leakage; add a test
lifecycle hook (e.g., beforeEach or afterEach) in PcaTableRow.test.tsx to
reset/clear the mock (call mockNavigate.mockReset() or use
vi.clearAllMocks()/vi.resetAllMocks()) so each test starts with a fresh mock;
keep the existing vi.mock for useNavigate unchanged but ensure the reset hook
references the mockNavigate symbol.
🪄 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

Run ID: aa5fbb7b-8cb1-4a92-88ec-bd8c0d106b0c

📥 Commits

Reviewing files that changed from the base of the PR and between 116ff9a and 7a4efd5.

📒 Files selected for processing (15)
  • apps/aurora-portal/src/client/routeTree.gen.ts
  • apps/aurora-portal/src/client/routes/_auth/projects/$projectId/services/pca/$pcaId/-components/PcaDetailsView.test.tsx
  • apps/aurora-portal/src/client/routes/_auth/projects/$projectId/services/pca/$pcaId/-components/PcaDetailsView.tsx
  • apps/aurora-portal/src/client/routes/_auth/projects/$projectId/services/pca/$pcaId/index.tsx
  • apps/aurora-portal/src/client/routes/_auth/projects/$projectId/services/pca/-components/-modals/DeletePcaModal.test.tsx
  • apps/aurora-portal/src/client/routes/_auth/projects/$projectId/services/pca/-components/-modals/DeletePcaModal.tsx
  • apps/aurora-portal/src/client/routes/_auth/projects/$projectId/services/pca/-components/-table/PcaTableRow.test.tsx
  • apps/aurora-portal/src/client/routes/_auth/projects/$projectId/services/pca/-components/-table/PcaTableRow.tsx
  • apps/aurora-portal/src/client/routes/_auth/projects/$projectId/services/pca/index.tsx
  • apps/aurora-portal/src/locales/de/messages.po
  • apps/aurora-portal/src/locales/de/messages.ts
  • apps/aurora-portal/src/locales/en/messages.po
  • apps/aurora-portal/src/locales/en/messages.ts
  • apps/aurora-portal/src/server/Services/routers/pcaRouter.test.ts
  • apps/aurora-portal/src/server/Services/routers/pcaRouter.ts

Comment thread apps/aurora-portal/src/locales/de/messages.po
Signed-off-by: Vladislav Schur <u.shchur@sap.com>
Signed-off-by: Vladislav Schur <u.shchur@sap.com>

@andypf andypf left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

👍

@vlad-schur-external-sap vlad-schur-external-sap merged commit b027042 into main May 27, 2026
16 checks passed
@vlad-schur-external-sap vlad-schur-external-sap deleted the vlad-clavis-get-by-id-ca branch May 27, 2026 08:18
@coderabbitai coderabbitai Bot mentioned this pull request Jun 11, 2026
6 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Task](clavis): get-by-id ca

4 participants