Skip to content

feat(ui): clavis delete pca modal, added docs with implemented clavis functionality#837

Merged
vlad-schur-external-sap merged 3 commits into
mainfrom
vlad-clavis-delete-ca-with-docs
May 26, 2026
Merged

feat(ui): clavis delete pca modal, added docs with implemented clavis functionality#837
vlad-schur-external-sap merged 3 commits into
mainfrom
vlad-clavis-delete-ca-with-docs

Conversation

@vlad-schur-external-sap
Copy link
Copy Markdown
Contributor

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

Summary

Added delete-modal with connected delete-bff-endpoint

Changes Made

  • Added Delete-Pca modal and connected it into the PcaTableRow
  • Component names on UI were changed from CA to PCA for consistency throughout the UI/BFF.
  • Added documentation with implemented clavis functionality

Related Issues

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.

@vlad-schur-external-sap vlad-schur-external-sap requested a review from a team as a code owner May 26, 2026 08:07
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 26, 2026

📝 Walkthrough

Walkthrough

This PR implements PCA (Clavis) certificate authority deletion functionality with a confirmation-text modal, renames the create modal for naming consistency, fixes backend service routing from "clavis" to "pca", adds internationalization strings, and documents the integration design.

Changes

PCA Delete Modal and Refactoring

Layer / File(s) Summary
DeletePcaModal component and tests
src/.../pca/-components/-modals/DeletePcaModal.tsx, DeletePcaModal.test.tsx
New modal component uses TanStack Form with Zod validation requiring user to type "delete" to enable the confirm button. On confirm, submits tRPC mutation with project_id and certificate_authority_id, invalidates PCA list cache, and calls onClose. Tests verify initial disabled state, confirmation text validation (case-sensitive), and full deletion flow including mutation calls and list invalidation.
PcaTableRow modal integration and tests
src/.../pca/-components/-table/PcaTableRow.tsx, PcaTableRow.test.tsx
Wire DeletePcaModal into table row with useModal hook for state management. "Delete CA" popup menu item now opens the modal instead of being disabled. Tests updated to mock DeletePcaModal and verify menu item interaction triggers modal display.
CreatePcaModal component rename and test updates
src/.../pca/-components/-modals/CreatePcaModal.tsx, CreatePcaModal.test.tsx
Exported component renamed from CreateCaModal to CreatePcaModal; all internal mutation references updated from createCaMutation to createPcaMutation. Test suite name and render helper updated to match new component name.
PcaListContainer modal render update
src/.../pca/-components/PcaListContainer.tsx
Update container to import and render CreatePcaModal instead of CreateCaModal.
Backend router service selector fix
src/server/Services/routers/pcaRouter.ts, pcaRouter.test.ts
pcaRouter.delete now requests OpenStack "pca" service instead of "clavis". Test expectation updated to match new service name in error message.
Internationalization strings for delete confirmation
src/locales/en/messages.po, src/locales/de/messages.po
Add i18n entries for delete modal UI in English and German: delete certificate authority label, deletion status message, permanent-deletion warning, lowercase validation requirement, and confirmation prompts. German translations currently empty.
Clavis/PCA integration documentation
docs/0011_clavis.md
New ADR documenting implemented PCA integration scope: project-scoped CA and certificate operations, UI screens and interactions, BFF-to-OpenStack endpoint mappings, PCA state transitions, schema details, UX/validation notes, and gaps for future documentation.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related issues

Possibly related PRs

  • cobaltcore-dev/aurora-dashboard#777: Both PRs modify pcaRouter.delete; the retrieved PR introduced the endpoint while this PR fixes service selection from "clavis" to "pca".
  • cobaltcore-dev/aurora-dashboard#774: This PR switches CreatePcaModal to submit via services.pca.create tRPC mutation, matching the retrieved PR's addition of the pcaRouter.create backend endpoint.
  • cobaltcore-dev/aurora-dashboard#796: Both PRs implement PCA list UI delete behavior: they modify PcaTableRow delete/menu interaction and both update pcaRouter.ts to use "pca" OpenStack service selection.

Suggested labels

aurora-portal, clavis

Suggested reviewers

  • KirylSAP
  • andypf
  • TilmanHaupt

Poem

🐰 A rabbit hops through PCA gates,
With modals bold and confirmed states—
Type "delete" if you dare to part,
With careful form and pca heart!
The clavis clasp now loosens free. 🔑

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Description check ❓ Inconclusive The PR description provides minimal detail; summary and changes lack specificity with placeholder-like text, and key information is missing. Expand the summary with specifics (e.g., what functionality the delete modal adds), detail each change made, replace placeholder text, and provide a link to issue 828.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main changes: adding a delete PCA modal UI component and documentation for implemented Clavis functionality.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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.

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

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch vlad-clavis-delete-ca-with-docs

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.

Copy link
Copy Markdown
Contributor

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

This PR adds PCA delete support to the Aurora Portal UI, aligns the delete BFF route with the PCA service key, renames the create modal to PCA terminology, and documents the current Clavis/PCA integration.

Changes:

  • Adds a typed-confirmation DeletePcaModal and wires it into the PCA table row action.
  • Renames CreateCaModal to CreatePcaModal and updates related tests/imports.
  • Updates PCA delete router behavior/tests, localization catalogs, and adds Clavis/PCA feature documentation.

Reviewed changes

Copilot reviewed 12 out of 14 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
apps/aurora-portal/src/server/Services/routers/pcaRouter.ts Switches PCA delete service lookup/validation to pca.
apps/aurora-portal/src/server/Services/routers/pcaRouter.test.ts Updates delete unavailable-service test wording.
apps/aurora-portal/src/locales/en/messages.ts Regenerates English Lingui catalog with delete modal strings.
apps/aurora-portal/src/locales/en/messages.po Adds English delete modal message entries.
apps/aurora-portal/src/locales/de/messages.ts Regenerates German Lingui catalog with new fallback strings.
apps/aurora-portal/src/locales/de/messages.po Adds German catalog entries for new delete modal strings.
apps/aurora-portal/src/client/routes/_auth/projects/$projectId/services/pca/-components/PcaListContainer.tsx Updates create modal import/render name and path.
apps/aurora-portal/src/client/routes/_auth/projects/$projectId/services/pca/-components/-table/PcaTableRow.tsx Enables Delete CA row action and renders delete modal.
apps/aurora-portal/src/client/routes/_auth/projects/$projectId/services/pca/-components/-table/PcaTableRow.test.tsx Updates row action test for modal opening.
apps/aurora-portal/src/client/routes/_auth/projects/$projectId/services/pca/-components/-modals/DeletePcaModal.tsx Adds PCA delete confirmation modal.
apps/aurora-portal/src/client/routes/_auth/projects/$projectId/services/pca/-components/-modals/DeletePcaModal.test.tsx Adds tests for delete confirmation gating and mutation payload.
apps/aurora-portal/src/client/routes/_auth/projects/$projectId/services/pca/-components/-modals/CreatePcaModal.tsx Renames create modal component/mutation variables to PCA terminology.
apps/aurora-portal/src/client/routes/_auth/projects/$projectId/services/pca/-components/-modals/CreatePcaModal.test.tsx Updates create modal test imports and suite name.
apps/aurora-portal/docs/0011_clavis.md Documents current Clavis/PCA UI and BFF scope.

💡 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
@vlad-schur-external-sap vlad-schur-external-sap linked an issue May 26, 2026 that may be closed by this pull request
3 tasks
Copy link
Copy Markdown
Contributor

@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 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/-components/-table/PcaTableRow.tsx:
- Line 42: The render can crash when pca.configuration exists but subject is
undefined; update the cell rendering (the DataGridCell that uses
pca.configuration?.subject.common_name) to guard subject as well and use nullish
coalescing: access pca.configuration?.subject?.common_name ?? "—" so both
missing configuration.subject and empty values are handled safely.

In `@apps/aurora-portal/src/locales/de/messages.po`:
- Around line 634-636: The PO file has empty German translations for several
msgid entries (e.g., msgid "Delete certificate authority" and the other
untranslated msgid groups at the ranges you noted), causing untranslated UI in
the PCA delete flow; update each corresponding msgstr with the proper German
text (for example provide translations for "Delete certificate authority" and
the other msgid strings referenced at 673-675, 679-681, 2515-2517, 2635-2637,
2665-2667) by replacing the empty msgstr values with the correct German phrases,
ensuring plural forms or context markers (if present) are preserved and the PO
file encoding/formatting remains unchanged.
🪄 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: 55eb665a-c418-43fb-b6eb-24352e43fee5

📥 Commits

Reviewing files that changed from the base of the PR and between 6eaafea and b863c02.

📒 Files selected for processing (14)
  • apps/aurora-portal/docs/0011_clavis.md
  • apps/aurora-portal/src/client/routes/_auth/projects/$projectId/services/pca/-components/-modals/CreatePcaModal.test.tsx
  • apps/aurora-portal/src/client/routes/_auth/projects/$projectId/services/pca/-components/-modals/CreatePcaModal.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/-components/PcaListContainer.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
@vlad-schur-external-sap vlad-schur-external-sap merged commit 116ff9a into main May 26, 2026
26 checks passed
@vlad-schur-external-sap vlad-schur-external-sap deleted the vlad-clavis-delete-ca-with-docs branch May 26, 2026 12:09
@coderabbitai coderabbitai Bot mentioned this pull request May 26, 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): delete ca

4 participants