feat(clavis): design changes first iteration#932
Conversation
Signed-off-by: Vladislav Schur <u.shchur@sap.com>
Signed-off-by: Vladislav Schur <u.shchur@sap.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (9)
🚧 Files skipped from review as they are similar to previous changes (2)
📝 WalkthroughWalkthroughAdds post-creation navigation to detail pages from modals, introduces an ChangesPCA UI Enhancements
Sequence Diagram(s)sequenceDiagram
participant User
participant Modal as CreatePcaModal / IssueEndEntityCertificateModal
participant TRPC as mutateAsync (tRPC)
participant Router as useNavigate
User->>Modal: Submit form
Modal->>TRPC: await mutateAsync(formData)
TRPC-->>Modal: { id: createdId }
Modal->>Modal: handleClose()
Modal->>Router: navigate({ to: detailRoute, params: { projectId, pcaId / certificateId } })
Router-->>User: Detail page rendered with intermediate breadcrumb
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Suggested reviewers
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 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 |
There was a problem hiding this comment.
Actionable comments posted: 4
🧹 Nitpick comments (1)
packages/aurora/src/client/components/ProjectView/ProjectInfoBox.tsx (1)
89-103: 💤 Low valueConsider adding an explicit array bounds check for robustness.
Accessing
projectMatches[projectMatches.length - 2]at line 91 will returnundefinedif the array has fewer than two elements. While the optional chaining at line 92 prevents a crash, an explicit guard would make the intent clearer and prevent silent label fallback in unexpected route hierarchies.🛡️ Suggested defensive guard
if (info.intermediateCrumb) { const { to: iTo, useParamAsLabel: iParam, useParentTitleAsLabel } = info.intermediateCrumb - const parentMatch = projectMatches[projectMatches.length - 2] + const parentMatch = projectMatches.length >= 2 ? projectMatches[projectMatches.length - 2] : undefined const parentTitle = parentMatch?.meta?.find((m) => m != null && "title" in m)?.title as string | undefined🤖 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 `@packages/aurora/src/client/components/ProjectView/ProjectInfoBox.tsx` around lines 89 - 103, The code accesses projectMatches array at index projectMatches.length - 2 without verifying the array has sufficient length, which could result in undefined parentMatch and silent label fallback behavior. Add an explicit array bounds check before the assignment of parentMatch to ensure projectMatches has at least 2 elements; if the condition in the intermediateCrumb block is true, verify projectMatches.length is greater than or equal to 2 before proceeding with the parentMatch lookup and subsequent logic.
🤖 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
`@packages/aurora/src/client/routes/_auth/projects/`$projectId/services/pca/-components/-table/constants.tsx:
- Around line 14-37: The STATE_CONFIG object contains hard-coded English strings
in the text property and Badge component text props that will not be translated
for non-English locales. Replace all hard-coded string literals in the text
fields and badge text props within the STATE_CONFIG object (CREATING,
AWAITING_CERTIFICATE, READY, FAILED, UNEXPECTED states) with Lingui macros
following the same localization pattern used in TABLE_COLUMNS elsewhere in this
file. This will ensure these user-facing strings are extractable and
translatable.
In
`@packages/aurora/src/client/routes/_auth/projects/`$projectId/services/pca/$pcaId/-components/PcaDetailsView.tsx:
- Around line 104-106: The heading prop in the CodeBlock component contains a
hardcoded English string "Certificate ..." that is not wrapped in Lingui's
translation system, preventing it from being translated. Wrap the heading string
using Lingui's `t` function or `Trans` component (whichever is already in use
throughout the PcaDetailsView component) to make this user-facing text
localizable and consistent with the rest of the view.
In
`@packages/aurora/src/client/routes/_auth/projects/`$projectId/services/pca/$pcaId/$certificateId.tsx:
- Around line 23-27: The intermediateCrumb object's to property contains a
trailing slash in the route path (/projects/$projectId/services/pca/$pcaId/),
which is inconsistent with how the same route is referenced elsewhere in the
file (without a trailing slash). Remove the trailing slash from the to property
in the intermediateCrumb object to ensure consistent path formatting across the
application and prevent potential routing issues based on router configuration.
In `@packages/aurora/src/locales/de/messages.po`:
- Around line 1693-1700: The German locale file (de/messages.po) contains
English text in the msgstr fields for certificate-related messages instead of
proper German translations. Update the msgstr values for "Issue End-Entity
Certificate" (around line 1694) and "Issuing End-Entity Certificate..." (around
line 1700) to use German translations instead of the English text. For each
msgid entry, replace the English msgstr with an appropriate German translation
that conveys the same meaning to German-speaking users.
---
Nitpick comments:
In `@packages/aurora/src/client/components/ProjectView/ProjectInfoBox.tsx`:
- Around line 89-103: The code accesses projectMatches array at index
projectMatches.length - 2 without verifying the array has sufficient length,
which could result in undefined parentMatch and silent label fallback behavior.
Add an explicit array bounds check before the assignment of parentMatch to
ensure projectMatches has at least 2 elements; if the condition in the
intermediateCrumb block is true, verify projectMatches.length is greater than or
equal to 2 before proceeding with the parentMatch lookup and subsequent logic.
🪄 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: 634fc5ac-de7b-47eb-b7ef-00fceb8dc6d8
📒 Files selected for processing (21)
packages/aurora/docs/0011_clavis.mdpackages/aurora/src/client/components/ProjectView/ProjectInfoBox.tsxpackages/aurora/src/client/routes/_auth/projects/$projectId/services/pca/$pcaId/$certificateId.tsxpackages/aurora/src/client/routes/_auth/projects/$projectId/services/pca/$pcaId/-components/-modals/IssueEndEntityCertificateModal.test.tsxpackages/aurora/src/client/routes/_auth/projects/$projectId/services/pca/$pcaId/-components/-modals/IssueEndEntityCertificateModal.tsxpackages/aurora/src/client/routes/_auth/projects/$projectId/services/pca/$pcaId/-components/-modals/IssueSelfSignedCertificateModal.tsxpackages/aurora/src/client/routes/_auth/projects/$projectId/services/pca/$pcaId/-components/-table/PcaCertificatesTableRow.tsxpackages/aurora/src/client/routes/_auth/projects/$projectId/services/pca/$pcaId/-components/PcaCertificatesListContainer.test.tsxpackages/aurora/src/client/routes/_auth/projects/$projectId/services/pca/$pcaId/-components/PcaCertificatesListContainer.tsxpackages/aurora/src/client/routes/_auth/projects/$projectId/services/pca/$pcaId/-components/PcaDetailsView.test.tsxpackages/aurora/src/client/routes/_auth/projects/$projectId/services/pca/$pcaId/-components/PcaDetailsView.tsxpackages/aurora/src/client/routes/_auth/projects/$projectId/services/pca/-components/-modals/CreatePcaModal.test.tsxpackages/aurora/src/client/routes/_auth/projects/$projectId/services/pca/-components/-modals/CreatePcaModal.tsxpackages/aurora/src/client/routes/_auth/projects/$projectId/services/pca/-components/-table/PcaTableRow.tsxpackages/aurora/src/client/routes/_auth/projects/$projectId/services/pca/-components/-table/constants.tsxpackages/aurora/src/client/routes/_auth/projects/$projectId/services/pca/-components/PcaListContainer.tsxpackages/aurora/src/client/routes/routeInfo.tspackages/aurora/src/locales/de/messages.popackages/aurora/src/locales/de/messages.tspackages/aurora/src/locales/en/messages.popackages/aurora/src/locales/en/messages.ts
There was a problem hiding this comment.
Pull request overview
This PR iterates on the Clavis (PCA) UX by refining PCA/certificate pages (layout + actions), improving breadcrumbs for nested certificate routes, and standardizing certificate-related copy in i18n catalogs.
Changes:
- Replaced custom CSR/certificate display blocks with
CodeBlockon PCA details and certificate detail pages. - Added support for an
intermediateCrumb(anduseParentTitleAsLabel) to generate better breadcrumbs for nested detail routes. - Updated PCA list/cert list actions (e.g., “Show Details”, “Issue End-Entity Certificate”), added post-create navigation, and refreshed PCA state display (badge + icon/text).
Reviewed changes
Copilot reviewed 19 out of 21 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/aurora/src/locales/en/messages.ts | Updated compiled Lingui catalog for revised PCA/certificate strings. |
| packages/aurora/src/locales/en/messages.po | Updated English msgids/strings (e.g., “End-Entity”, removed obsolete entries). |
| packages/aurora/src/locales/de/messages.ts | Updated compiled German Lingui catalog for revised PCA/certificate strings. |
| packages/aurora/src/locales/de/messages.po | Updated German msgids/strings (e.g., “End-Entity”, removed obsolete entries). |
| packages/aurora/src/client/routes/routeInfo.ts | Extended route metadata schema to support intermediateCrumb + useParentTitleAsLabel. |
| packages/aurora/src/client/routes/_auth/projects/$projectId/services/pca/$pcaId/$certificateId.tsx | Added intermediate crumb metadata and switched CSR rendering to CodeBlock. |
| packages/aurora/src/client/routes/_auth/projects/$projectId/services/pca/$pcaId/-components/PcaDetailsView.tsx | Switched certificate/CSR rendering to CodeBlock and updated state display to use badge. |
| packages/aurora/src/client/routes/_auth/projects/$projectId/services/pca/$pcaId/-components/PcaDetailsView.test.tsx | Updated test strings for “Self-Signed” wording. |
| packages/aurora/src/client/routes/_auth/projects/$projectId/services/pca/$pcaId/-components/PcaCertificatesListContainer.tsx | UI tweaks: button label update (“End-Entity”), layout spacing, minor columnsLength refactor. |
| packages/aurora/src/client/routes/_auth/projects/$projectId/services/pca/$pcaId/-components/PcaCertificatesListContainer.test.tsx | Updated tests to match new “End-Entity” wording and modal text. |
| packages/aurora/src/client/routes/_auth/projects/$projectId/services/pca/$pcaId/-components/-table/PcaCertificatesTableRow.tsx | Replaced disabled “Create Certificate” menu item with “Show Details”. |
| packages/aurora/src/client/routes/_auth/projects/$projectId/services/pca/$pcaId/-components/-modals/IssueSelfSignedCertificateModal.tsx | Updated modal title wording (“Self-Signed”). |
| packages/aurora/src/client/routes/_auth/projects/$projectId/services/pca/$pcaId/-components/-modals/IssueEndEntityCertificateModal.tsx | After issuing a certificate, navigate directly to the certificate detail route; updated wording. |
| packages/aurora/src/client/routes/_auth/projects/$projectId/services/pca/$pcaId/-components/-modals/IssueEndEntityCertificateModal.test.tsx | Mocked navigation and asserted redirect to the new certificate detail route. |
| packages/aurora/src/client/routes/_auth/projects/$projectId/services/pca/-components/PcaListContainer.tsx | Layout tweaks and minor columnsLength refactor; import ordering. |
| packages/aurora/src/client/routes/_auth/projects/$projectId/services/pca/-components/-table/PcaTableRow.tsx | Added “Show Details” menu item to PCA table row actions. |
| packages/aurora/src/client/routes/_auth/projects/$projectId/services/pca/-components/-table/constants.tsx | Refreshed PCA state presentation (new icons/text + badge field). |
| packages/aurora/src/client/routes/_auth/projects/$projectId/services/pca/-components/-modals/CreatePcaModal.tsx | After creating a CA, navigate directly to the CA detail route. |
| packages/aurora/src/client/routes/_auth/projects/$projectId/services/pca/-components/-modals/CreatePcaModal.test.tsx | Mocked navigation and asserted redirect to the new CA detail route. |
| packages/aurora/src/client/components/ProjectView/ProjectInfoBox.tsx | Implemented breadcrumb insertion logic for intermediateCrumb. |
| packages/aurora/docs/0011_clavis.md | Updated docs to match “Issue End-Entity Certificate” wording. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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>
Summary
Addressed Clavis changes after design review with Marta
Changes Made
Related Issues
Testing Instructions
pnpm ipnpm run testChecklist
Summary by CodeRabbit
Summary by CodeRabbit
New Features
UI/UX Improvements