Create modular configure-* packages - #4706
Conversation
|
Important Review skippedToo many files! This PR contains 352 files, which is 252 over the limit of 100. To get a review, reduce the PR to 100 files or fewer by splitting it into smaller PRs or changing its base branch. Upgrade to a paid plan to raise the limit. Usage-priced reviews support at most 300 files. ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (352)
You can disable this status message by setting the 📝 WalkthroughWalkthroughThe console now consumes shared ChangesFrontend configuration packages
Estimated code review effort: 4 (Complex) | ~60 minutes Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1🛠️ Fix failing CI checks 💡
🧪 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: 7
🤖 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
`@frontend/apps/console/src/features/verifiable-credentials/components/create-verifiable-presentation/ConfigureName.tsx`:
- Around line 107-128: Add fallback default strings to every t() call in
ConfigureName.tsx lines 107-128 for the name and handle labels, placeholders,
and hints. Also update VerifiablePresentationsListPage.tsx lines 22-40 so the
page title, subtitle, and add-action translations each provide fallback strings,
preserving the existing translation keys.
In
`@frontend/apps/console/src/features/verifiable-credentials/components/VerifiablePresentationDeleteDialog.tsx`:
- Around line 63-80: Update every user-visible t() call in
VerifiablePresentationDeleteDialog.tsx lines 63-80 to include an appropriate
fallback string for the delete title, message, disclaimer, cancel/delete
actions, and deleting status. Also update every t() call in
VerificationDialog.tsx lines 123-231 with fallback strings for the verification
title, wallet instructions, status labels, claim labels, and close action.
- Around line 20-85: Add focused component tests for
frontend/apps/console/src/features/verifiable-credentials/components/VerifiablePresentationDeleteDialog.tsx
lines 20-85, covering deletion success, failure, and pending-state behavior; the
dialog implementation itself requires no direct change. Add tests for
frontend/apps/console/src/features/verifiable-credentials/components/VerificationDialog.tsx
lines 40-235 covering initiation failure, polling terminal states, copy
behavior, and UTF-8 result-token decoding. Ensure the combined tests achieve at
least 80% coverage of these flows.
In
`@frontend/apps/console/src/features/verifiable-credentials/components/VerificationDialog.tsx`:
- Around line 130-137: Update the getErrorMessage call in VerificationDialog so
unknown verification-initiation failures use an initiation-specific generic
fallback instead of the signing-key configuration message. Keep the existing
configuration message only for the known verifier configuration error, and
preserve the current translation and error handling flow.
- Around line 40-65: Update decodeResult to convert the base64-decoded JWT
payload bytes to UTF-8 with TextDecoder before JSON.parse, replacing the direct
JSON.parse(atob(b64)) call. Preserve the existing verified_claims extraction,
claim mapping, key-binding detection, and null-on-error behavior.
In `@frontend/packages/configure-verifiable-credentials/.editorconfig`:
- Line 1: The package-level .editorconfig is tracked as a regular file instead
of a symbolic link. Replace it with a symlink targeting ../../.editorconfig,
ensuring the repository records mode 120000; alternatively remove the local
.editorconfig if no package-specific entry is required.
In `@frontend/packages/configure-verifiable-credentials/src/index.ts`:
- Around line 5-18: Add Vitest tests covering useGetVerifiablePresentations,
VerifiablePresentationQueryKeys, and verifiable-presentation response handling,
then update the package coverage script to invoke vitest run with the
repository’s existing coverage configuration. Ensure the package-level coverage
task includes these newly tested exports and API behavior.
🪄 Autofix
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: CHILL
Plan: Pro Plus
Run ID: d3ee767d-223b-4635-836c-ff49a73640f1
⛔ Files ignored due to path filters (1)
pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (46)
frontend/apps/console/package.jsonfrontend/apps/console/src/App.tsxfrontend/apps/console/src/features/flows/components/resource-property-panel/PresentationDefinitionSelect.tsxfrontend/apps/console/src/features/verifiable-credentials/api/useCreateVerifiableCredential.tsfrontend/apps/console/src/features/verifiable-credentials/api/useCreateVerifiablePresentation.tsfrontend/apps/console/src/features/verifiable-credentials/api/useDeleteVerifiablePresentation.tsfrontend/apps/console/src/features/verifiable-credentials/api/useGetTrustAnchors.tsfrontend/apps/console/src/features/verifiable-credentials/api/useGetVerifiablePresentation.tsfrontend/apps/console/src/features/verifiable-credentials/api/useInitiateVerification.tsfrontend/apps/console/src/features/verifiable-credentials/api/useUpdateVerifiableCredential.tsfrontend/apps/console/src/features/verifiable-credentials/api/useUpdateVerifiablePresentation.tsfrontend/apps/console/src/features/verifiable-credentials/api/useVerificationStatus.tsfrontend/apps/console/src/features/verifiable-credentials/components/CredentialClaimsEditor.tsxfrontend/apps/console/src/features/verifiable-credentials/components/PresentationClaimsEditor.tsxfrontend/apps/console/src/features/verifiable-credentials/components/VerifiableCredentialForm.tsxfrontend/apps/console/src/features/verifiable-credentials/components/VerifiablePresentationDeleteDialog.tsxfrontend/apps/console/src/features/verifiable-credentials/components/VerifiablePresentationForm.tsxfrontend/apps/console/src/features/verifiable-credentials/components/VerifiablePresentationsList.tsxfrontend/apps/console/src/features/verifiable-credentials/components/VerificationDialog.tsxfrontend/apps/console/src/features/verifiable-credentials/components/create-verifiable-presentation/ConfigureName.tsxfrontend/apps/console/src/features/verifiable-credentials/components/create-verifiable-presentation/__tests__/ConfigureName.test.tsxfrontend/apps/console/src/features/verifiable-credentials/models/credential-claims.tsfrontend/apps/console/src/features/verifiable-credentials/models/credential-requests.tsfrontend/apps/console/src/features/verifiable-credentials/models/presentation-claims.tsfrontend/apps/console/src/features/verifiable-credentials/models/presentation-requests.tsfrontend/apps/console/src/features/verifiable-credentials/pages/VerifiableCredentialCreatePage.tsxfrontend/apps/console/src/features/verifiable-credentials/pages/VerifiableCredentialEditPage.tsxfrontend/apps/console/src/features/verifiable-credentials/pages/VerifiablePresentationCreatePage.tsxfrontend/apps/console/src/features/verifiable-credentials/pages/VerifiablePresentationEditPage.tsxfrontend/apps/console/src/features/verifiable-credentials/pages/VerifiablePresentationsListPage.tsxfrontend/packages/configure-verifiable-credentials/.editorconfigfrontend/packages/configure-verifiable-credentials/.gitignorefrontend/packages/configure-verifiable-credentials/.prettierignorefrontend/packages/configure-verifiable-credentials/eslint.config.jsfrontend/packages/configure-verifiable-credentials/package.jsonfrontend/packages/configure-verifiable-credentials/prettier.config.jsfrontend/packages/configure-verifiable-credentials/rolldown.config.jsfrontend/packages/configure-verifiable-credentials/src/api/useGetVerifiablePresentations.tsfrontend/packages/configure-verifiable-credentials/src/constants/vp-query-keys.tsfrontend/packages/configure-verifiable-credentials/src/index.tsfrontend/packages/configure-verifiable-credentials/src/models/vp.tsfrontend/packages/configure-verifiable-credentials/tsconfig.eslint.jsonfrontend/packages/configure-verifiable-credentials/tsconfig.jsonfrontend/packages/configure-verifiable-credentials/tsconfig.lib.jsonfrontend/packages/configure-verifiable-credentials/tsconfig.spec.jsonfrontend/packages/configure-verifiable-credentials/vitest.config.ts
There was a problem hiding this comment.
Caution
Inline review comments failed to post. This is likely due to GitHub's internal server error or limits when posting large numbers of comments. If you are seeing this consistently it is likely a permissions issue. Please check "Moderation" -> "Code review limits" under your organization settings.
Actionable comments posted: 7
🤖 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
`@frontend/apps/console/src/features/verifiable-credentials/components/create-verifiable-presentation/ConfigureName.tsx`:
- Around line 107-128: Add fallback default strings to every t() call in
ConfigureName.tsx lines 107-128 for the name and handle labels, placeholders,
and hints. Also update VerifiablePresentationsListPage.tsx lines 22-40 so the
page title, subtitle, and add-action translations each provide fallback strings,
preserving the existing translation keys.
In
`@frontend/apps/console/src/features/verifiable-credentials/components/VerifiablePresentationDeleteDialog.tsx`:
- Around line 63-80: Update every user-visible t() call in
VerifiablePresentationDeleteDialog.tsx lines 63-80 to include an appropriate
fallback string for the delete title, message, disclaimer, cancel/delete
actions, and deleting status. Also update every t() call in
VerificationDialog.tsx lines 123-231 with fallback strings for the verification
title, wallet instructions, status labels, claim labels, and close action.
- Around line 20-85: Add focused component tests for
frontend/apps/console/src/features/verifiable-credentials/components/VerifiablePresentationDeleteDialog.tsx
lines 20-85, covering deletion success, failure, and pending-state behavior; the
dialog implementation itself requires no direct change. Add tests for
frontend/apps/console/src/features/verifiable-credentials/components/VerificationDialog.tsx
lines 40-235 covering initiation failure, polling terminal states, copy
behavior, and UTF-8 result-token decoding. Ensure the combined tests achieve at
least 80% coverage of these flows.
In
`@frontend/apps/console/src/features/verifiable-credentials/components/VerificationDialog.tsx`:
- Around line 130-137: Update the getErrorMessage call in VerificationDialog so
unknown verification-initiation failures use an initiation-specific generic
fallback instead of the signing-key configuration message. Keep the existing
configuration message only for the known verifier configuration error, and
preserve the current translation and error handling flow.
- Around line 40-65: Update decodeResult to convert the base64-decoded JWT
payload bytes to UTF-8 with TextDecoder before JSON.parse, replacing the direct
JSON.parse(atob(b64)) call. Preserve the existing verified_claims extraction,
claim mapping, key-binding detection, and null-on-error behavior.
In `@frontend/packages/configure-verifiable-credentials/.editorconfig`:
- Line 1: The package-level .editorconfig is tracked as a regular file instead
of a symbolic link. Replace it with a symlink targeting ../../.editorconfig,
ensuring the repository records mode 120000; alternatively remove the local
.editorconfig if no package-specific entry is required.
In `@frontend/packages/configure-verifiable-credentials/src/index.ts`:
- Around line 5-18: Add Vitest tests covering useGetVerifiablePresentations,
VerifiablePresentationQueryKeys, and verifiable-presentation response handling,
then update the package coverage script to invoke vitest run with the
repository’s existing coverage configuration. Ensure the package-level coverage
task includes these newly tested exports and API behavior.
🪄 Autofix
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: CHILL
Plan: Pro Plus
Run ID: d3ee767d-223b-4635-836c-ff49a73640f1
⛔ Files ignored due to path filters (1)
pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (46)
frontend/apps/console/package.jsonfrontend/apps/console/src/App.tsxfrontend/apps/console/src/features/flows/components/resource-property-panel/PresentationDefinitionSelect.tsxfrontend/apps/console/src/features/verifiable-credentials/api/useCreateVerifiableCredential.tsfrontend/apps/console/src/features/verifiable-credentials/api/useCreateVerifiablePresentation.tsfrontend/apps/console/src/features/verifiable-credentials/api/useDeleteVerifiablePresentation.tsfrontend/apps/console/src/features/verifiable-credentials/api/useGetTrustAnchors.tsfrontend/apps/console/src/features/verifiable-credentials/api/useGetVerifiablePresentation.tsfrontend/apps/console/src/features/verifiable-credentials/api/useInitiateVerification.tsfrontend/apps/console/src/features/verifiable-credentials/api/useUpdateVerifiableCredential.tsfrontend/apps/console/src/features/verifiable-credentials/api/useUpdateVerifiablePresentation.tsfrontend/apps/console/src/features/verifiable-credentials/api/useVerificationStatus.tsfrontend/apps/console/src/features/verifiable-credentials/components/CredentialClaimsEditor.tsxfrontend/apps/console/src/features/verifiable-credentials/components/PresentationClaimsEditor.tsxfrontend/apps/console/src/features/verifiable-credentials/components/VerifiableCredentialForm.tsxfrontend/apps/console/src/features/verifiable-credentials/components/VerifiablePresentationDeleteDialog.tsxfrontend/apps/console/src/features/verifiable-credentials/components/VerifiablePresentationForm.tsxfrontend/apps/console/src/features/verifiable-credentials/components/VerifiablePresentationsList.tsxfrontend/apps/console/src/features/verifiable-credentials/components/VerificationDialog.tsxfrontend/apps/console/src/features/verifiable-credentials/components/create-verifiable-presentation/ConfigureName.tsxfrontend/apps/console/src/features/verifiable-credentials/components/create-verifiable-presentation/__tests__/ConfigureName.test.tsxfrontend/apps/console/src/features/verifiable-credentials/models/credential-claims.tsfrontend/apps/console/src/features/verifiable-credentials/models/credential-requests.tsfrontend/apps/console/src/features/verifiable-credentials/models/presentation-claims.tsfrontend/apps/console/src/features/verifiable-credentials/models/presentation-requests.tsfrontend/apps/console/src/features/verifiable-credentials/pages/VerifiableCredentialCreatePage.tsxfrontend/apps/console/src/features/verifiable-credentials/pages/VerifiableCredentialEditPage.tsxfrontend/apps/console/src/features/verifiable-credentials/pages/VerifiablePresentationCreatePage.tsxfrontend/apps/console/src/features/verifiable-credentials/pages/VerifiablePresentationEditPage.tsxfrontend/apps/console/src/features/verifiable-credentials/pages/VerifiablePresentationsListPage.tsxfrontend/packages/configure-verifiable-credentials/.editorconfigfrontend/packages/configure-verifiable-credentials/.gitignorefrontend/packages/configure-verifiable-credentials/.prettierignorefrontend/packages/configure-verifiable-credentials/eslint.config.jsfrontend/packages/configure-verifiable-credentials/package.jsonfrontend/packages/configure-verifiable-credentials/prettier.config.jsfrontend/packages/configure-verifiable-credentials/rolldown.config.jsfrontend/packages/configure-verifiable-credentials/src/api/useGetVerifiablePresentations.tsfrontend/packages/configure-verifiable-credentials/src/constants/vp-query-keys.tsfrontend/packages/configure-verifiable-credentials/src/index.tsfrontend/packages/configure-verifiable-credentials/src/models/vp.tsfrontend/packages/configure-verifiable-credentials/tsconfig.eslint.jsonfrontend/packages/configure-verifiable-credentials/tsconfig.jsonfrontend/packages/configure-verifiable-credentials/tsconfig.lib.jsonfrontend/packages/configure-verifiable-credentials/tsconfig.spec.jsonfrontend/packages/configure-verifiable-credentials/vitest.config.ts
🛑 Comments failed to post (7)
frontend/apps/console/src/features/verifiable-credentials/components/create-verifiable-presentation/ConfigureName.tsx (1)
107-128: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
Add fallback strings to every
t()call.The affected calls can render raw translation keys when a catalog entry is unavailable.
frontend/apps/console/src/features/verifiable-credentials/components/create-verifiable-presentation/ConfigureName.tsx#L107-L128: Add fallback strings for the name and handle labels, placeholders, and hints.frontend/apps/console/src/features/verifiable-credentials/pages/VerifiablePresentationsListPage.tsx#L22-L40: Add fallback strings for the page title, subtitle, and add action.As per coding guidelines, “Every
t()call must provide a fallback default string.”📍 Affects 2 files
frontend/apps/console/src/features/verifiable-credentials/components/create-verifiable-presentation/ConfigureName.tsx#L107-L128(this comment)frontend/apps/console/src/features/verifiable-credentials/pages/VerifiablePresentationsListPage.tsx#L22-L40🤖 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 `@frontend/apps/console/src/features/verifiable-credentials/components/create-verifiable-presentation/ConfigureName.tsx` around lines 107 - 128, Add fallback default strings to every t() call in ConfigureName.tsx lines 107-128 for the name and handle labels, placeholders, and hints. Also update VerifiablePresentationsListPage.tsx lines 22-40 so the page title, subtitle, and add-action translations each provide fallback strings, preserving the existing translation keys.Source: Coding guidelines
frontend/apps/console/src/features/verifiable-credentials/components/VerifiablePresentationDeleteDialog.tsx (2)
20-85: 📐 Maintainability & Code Quality | 🟠 Major | 🏗️ Heavy lift
Add focused tests for both new dialog flows.
The supplied changes add deletion and verification flows, but this layer contains no focused tests. Add tests for deletion success, failure, and pending behavior. Add tests for initiation failure, polling terminal states, copy behavior, and UTF-8 result-token decoding. Meet the required 80% coverage target.
frontend/apps/console/src/features/verifiable-credentials/components/VerifiablePresentationDeleteDialog.tsx#L20-L85: Add dialog mutation lifecycle tests.frontend/apps/console/src/features/verifiable-credentials/components/VerificationDialog.tsx#L40-L235: Add verification lifecycle and result-rendering tests.As per coding guidelines, “Write tests for new features and bug fixes, targeting at least 80% coverage.”
📍 Affects 2 files
frontend/apps/console/src/features/verifiable-credentials/components/VerifiablePresentationDeleteDialog.tsx#L20-L85(this comment)frontend/apps/console/src/features/verifiable-credentials/components/VerificationDialog.tsx#L40-L235🤖 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 `@frontend/apps/console/src/features/verifiable-credentials/components/VerifiablePresentationDeleteDialog.tsx` around lines 20 - 85, Add focused component tests for frontend/apps/console/src/features/verifiable-credentials/components/VerifiablePresentationDeleteDialog.tsx lines 20-85, covering deletion success, failure, and pending-state behavior; the dialog implementation itself requires no direct change. Add tests for frontend/apps/console/src/features/verifiable-credentials/components/VerificationDialog.tsx lines 40-235 covering initiation failure, polling terminal states, copy behavior, and UTF-8 result-token decoding. Ensure the combined tests achieve at least 80% coverage of these flows.Source: Coding guidelines
63-80: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
Provide fallback strings for all translation calls.
The shared root cause is missing fallback strings on user-visible
t()calls. A missing catalog entry can render a translation key instead of usable text.
frontend/apps/console/src/features/verifiable-credentials/components/VerifiablePresentationDeleteDialog.tsx#L63-L80: Add fallback strings for the delete title, message, disclaimer, actions, and pending label.frontend/apps/console/src/features/verifiable-credentials/components/VerificationDialog.tsx#L123-L231: Add fallback strings for the verification title, wallet instructions, status labels, claim labels, and close action.As per coding guidelines, “Every
t()call must provide a fallback default string.”📍 Affects 2 files
frontend/apps/console/src/features/verifiable-credentials/components/VerifiablePresentationDeleteDialog.tsx#L63-L80(this comment)frontend/apps/console/src/features/verifiable-credentials/components/VerificationDialog.tsx#L123-L231🤖 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 `@frontend/apps/console/src/features/verifiable-credentials/components/VerifiablePresentationDeleteDialog.tsx` around lines 63 - 80, Update every user-visible t() call in VerifiablePresentationDeleteDialog.tsx lines 63-80 to include an appropriate fallback string for the delete title, message, disclaimer, cancel/delete actions, and deleting status. Also update every t() call in VerificationDialog.tsx lines 123-231 with fallback strings for the verification title, wallet instructions, status labels, claim labels, and close action.Source: Coding guidelines
frontend/apps/console/src/features/verifiable-credentials/components/VerificationDialog.tsx (2)
40-65: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
Decode JWT payload bytes as UTF-8.
atob()returns a binary string.JSON.parse(atob(b64))corrupts non-ASCII claim names and values. Decode the bytes withTextDecoderbefore parsing the JSON.Proposed fix
- const payload = JSON.parse(atob(b64)) as {verified_claims?: Record<string, unknown>}; + const binary = atob(b64); + const bytes = Uint8Array.from(binary, (char) => char.charCodeAt(0)); + const payload = JSON.parse(new TextDecoder().decode(bytes)) as {verified_claims?: Record<string, unknown>};📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements./** Decodes the verified_claims and holder-key-binding marker from a result token JWT. */ function decodeResult(token: string): DecodedResult | null { try { const part: string | undefined = token.split('.')[1]; if (!part) { return null; } let b64: string = part.replace(/-/g, '+').replace(/_/g, '/'); while (b64.length % 4 !== 0) { b64 += '='; } const binary = atob(b64); const bytes = Uint8Array.from(binary, (char) => char.charCodeAt(0)); const payload = JSON.parse(new TextDecoder().decode(bytes)) as {verified_claims?: Record<string, unknown>}; const vc: Record<string, unknown> = payload.verified_claims ?? {}; const claims: {name: string; value: string}[] = []; let keyBinding = false; Object.keys(vc).forEach((key: string): void => { if (key.startsWith('cnf.')) { keyBinding = true; return; } claims.push({name: key, value: String(vc[key])}); }); return {claims, keyBinding}; } catch { return null; }🤖 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 `@frontend/apps/console/src/features/verifiable-credentials/components/VerificationDialog.tsx` around lines 40 - 65, Update decodeResult to convert the base64-decoded JWT payload bytes to UTF-8 with TextDecoder before JSON.parse, replacing the direct JSON.parse(atob(b64)) call. Preserve the existing verified_claims extraction, claim mapping, key-binding detection, and null-on-error behavior.
130-137: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
Use a generic fallback for unknown initiation failures.
Line 135 supplies a signing-key configuration message as the fallback for every unrecognized initiation error. A network or server failure can therefore tell the user to change valid signing-key configuration. Use an initiation-specific generic fallback. Keep the configuration message for a known configuration error only.
🤖 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 `@frontend/apps/console/src/features/verifiable-credentials/components/VerificationDialog.tsx` around lines 130 - 137, Update the getErrorMessage call in VerificationDialog so unknown verification-initiation failures use an initiation-specific generic fallback instead of the signing-key configuration message. Keep the existing configuration message only for the known verifier configuration error, and preserve the current translation and error handling flow.frontend/packages/configure-verifiable-credentials/.editorconfig (1)
1-1: 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash set -euo pipefail git ls-files -s -- frontend/packages/configure-verifiable-credentials/.editorconfigRepository: thunder-id/thunderid
Length of output: 273
Make this
.editorconfiga symbolic link.
frontend/packages/configure-verifiable-credentials/.editorconfigis tracked as a regular file (100644), so../../.editorconfigis not a valid editorconfig import. Store it with mode120000pointing at../../.editorconfig, or remove the file if the package should rely on the repository config without a local entry.🤖 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 `@frontend/packages/configure-verifiable-credentials/.editorconfig` at line 1, The package-level .editorconfig is tracked as a regular file instead of a symbolic link. Replace it with a symlink targeting ../../.editorconfig, ensuring the repository records mode 120000; alternatively remove the local .editorconfig if no package-specific entry is required.frontend/packages/configure-verifiable-credentials/src/index.ts (1)
5-18: 📐 Maintainability & Code Quality | 🟠 Major | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
#!/usr/bin/env bash set -euo pipefail package_dir="frontend/packages/configure-verifiable-credentials" echo "Test files:" rg --files "$package_dir" \ | rg '(^|/)(__tests__/|[^/]+\.(test|spec)\.[^/]+$)' || true echo "Coverage script:" jq -r '.scripts["test:coverage"] // "<missing>"' "$package_dir/package.json"Repository: thunder-id/thunderid
Length of output: 297
🏁 Script executed:
#!/usr/bin/env bash set -euo pipefail pkg="frontend/packages/configure-verifiable-credentials" echo "Package files:" git ls-files "$pkg" | sed 's#^##' echo echo "Coverage references:" rg -n '"test:coverage"|configure-verifiable-credentials|coverage' -g '!node_modules' -g '!dist' -g '!build' . echo echo "Changed files summary:" git diff --name-only HEAD~1..HEAD -- "$pkg" || true echo echo "Package.json:" cat -n "$pkg/package.json" echo echo "Source candidates:" git ls-files "$pkg" | rg '\.ts$|\.tsx$' | sed -n '1,120p'Repository: thunder-id/thunderid
Length of output: 50376
Cover the new VerifiableCredentials API with tests.
@thunderid/configure-verifiable-credentialsonly has a coverage script and no test files foruseGetVerifiablePresentations,VerifiablePresentationQueryKeys, or response handling. Add the existing Vitest coverage setup tovitest runso the package-level coverage task captures this code.🤖 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 `@frontend/packages/configure-verifiable-credentials/src/index.ts` around lines 5 - 18, Add Vitest tests covering useGetVerifiablePresentations, VerifiablePresentationQueryKeys, and verifiable-presentation response handling, then update the package coverage script to invoke vitest run with the repository’s existing coverage configuration. Ensure the package-level coverage task includes these newly tested exports and API behavior.Sources: Coding guidelines, Learnings
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
@thunder/configure-verifiable-credentials package
eac1f00 to
541d0ac
Compare
There was a problem hiding this comment.
Actionable comments posted: 5
🧹 Nitpick comments (2)
frontend/packages/configure-verifiable-credentials/src/hooks/useVerifiableCredentialRoutes.ts (1)
15-45: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winMove the route types and defaults to
routes/types.ts.The hook implementation matches the package route contract. The guideline places
VerifiableCredentialRoutePathsanddefaultVerifiableCredentialRoutePathsinroutes/types.ts, with the hook importing them. KeepuseVerifiableCredentialRouteshere and re-export the type and defaults fromsrc/index.tsunchanged, so consumers are unaffected.As per coding guidelines: "Define route types and defaults in
routes/types.ts, expose ause<Domain>Routes()hook usinguseRoutes, and build destinations from the hook's returned functions."🤖 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 `@frontend/packages/configure-verifiable-credentials/src/hooks/useVerifiableCredentialRoutes.ts` around lines 15 - 45, Move the VerifiableCredentialRoutePaths interface and defaultVerifiableCredentialRoutePaths constant from useVerifiableCredentialRoutes.ts to routes/types.ts, then import and use them in useVerifiableCredentialRoutes without changing its behavior. Keep the existing src/index.ts re-exports unchanged so consumer imports remain compatible.Source: Coding guidelines
frontend/packages/configure-verifiable-credentials/src/utils/deriveHandle.ts (1)
4-10: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winAdd focused
deriveHandletests.
deriveHandlehandles empty input, repeated separators, uppercase input, punctuation, and non-ASCII names. Add coverage for these inputs.🤖 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 `@frontend/packages/configure-verifiable-credentials/src/utils/deriveHandle.ts` around lines 4 - 10, Add focused tests for the exported deriveHandle function covering empty input, repeated separators, uppercase text, punctuation, and non-ASCII names, asserting the expected lowercase hyphen-delimited results for each case.Source: Coding guidelines
🤖 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
`@frontend/packages/configure-verifiable-credentials/src/api/useGetVerifiableCredential.ts`:
- Around line 20-25: Update the request URL in the queryFn for
useGetVerifiableCredential to interpolate encodeURIComponent(id) instead of the
raw id, ensuring the credential ID remains a single URL path segment.
In
`@frontend/packages/configure-verifiable-credentials/src/components/CredentialOfferDialog.tsx`:
- Around line 78-130: Add positional fallback strings or defaultValue options to
the t() calls for offer.title, offer.openInWallet, common:actions.copied,
offer.copy, and common:actions.close in CredentialOfferDialog. Keep the existing
translation keys and UI behavior unchanged while ensuring each call has an
explicit fallback.
- Around line 61-68: Update handleCopy and its dialog callers to preserve
clipboard write failures instead of swallowing them, set dialog error state when
navigator.clipboard.writeText rejects, and render a generic inline error in the
dialog. Keep the deep-link text field selectable so users can copy the value
manually, while preserving the existing success and timeout behavior.
In
`@frontend/packages/configure-verifiable-credentials/src/components/VerifiableCredentialDeleteDialog.tsx`:
- Around line 62-79: Every t() call in the affected flows lacks a fallback and
can render raw translation keys; add an appropriate positional fallback or
defaultValue while preserving interpolation and existing conventions. Update
VerifiableCredentialDeleteDialog.tsx lines 62-79 for its six listed keys,
VerifiablePresentationDeleteDialog.tsx lines 63-80 for the corresponding
presentation keys, VerificationDialog.tsx lines 123-209 for its ten listed keys,
and useDeleteVerifiableCredential.ts line 33 for delete.success.
In
`@frontend/packages/configure-verifiable-credentials/src/components/VerificationDialog.tsx`:
- Around line 51-61: Update the payload decoding before JSON.parse to convert
the binary result of atob into UTF-8 using TextDecoder, preserving non-ASCII
claim text. In the claims mapping within the existing verification dialog flow,
render object and array values with JSON.stringify while keeping primitive
values readable.
---
Nitpick comments:
In
`@frontend/packages/configure-verifiable-credentials/src/hooks/useVerifiableCredentialRoutes.ts`:
- Around line 15-45: Move the VerifiableCredentialRoutePaths interface and
defaultVerifiableCredentialRoutePaths constant from
useVerifiableCredentialRoutes.ts to routes/types.ts, then import and use them in
useVerifiableCredentialRoutes without changing its behavior. Keep the existing
src/index.ts re-exports unchanged so consumer imports remain compatible.
In
`@frontend/packages/configure-verifiable-credentials/src/utils/deriveHandle.ts`:
- Around line 4-10: Add focused tests for the exported deriveHandle function
covering empty input, repeated separators, uppercase text, punctuation, and
non-ASCII names, asserting the expected lowercase hyphen-delimited results for
each case.
🪄 Autofix
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: CHILL
Plan: Pro Plus
Run ID: c0954f8b-eefc-4c08-ae36-2a407f1ac918
⛔ Files ignored due to path filters (1)
pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (47)
frontend/apps/console/src/App.tsxfrontend/apps/console/src/configs/RouteConfig.tsfrontend/packages/configure-verifiable-credentials/package.jsonfrontend/packages/configure-verifiable-credentials/src/api/useCreateCredentialOffer.tsfrontend/packages/configure-verifiable-credentials/src/api/useCreateVerifiableCredential.tsfrontend/packages/configure-verifiable-credentials/src/api/useCreateVerifiablePresentation.tsfrontend/packages/configure-verifiable-credentials/src/api/useDeleteVerifiableCredential.tsfrontend/packages/configure-verifiable-credentials/src/api/useDeleteVerifiablePresentation.tsfrontend/packages/configure-verifiable-credentials/src/api/useGetTrustAnchors.tsfrontend/packages/configure-verifiable-credentials/src/api/useGetVerifiableCredential.tsfrontend/packages/configure-verifiable-credentials/src/api/useGetVerifiableCredentials.tsfrontend/packages/configure-verifiable-credentials/src/api/useGetVerifiablePresentation.tsfrontend/packages/configure-verifiable-credentials/src/api/useInitiateVerification.tsfrontend/packages/configure-verifiable-credentials/src/api/useUpdateVerifiableCredential.tsfrontend/packages/configure-verifiable-credentials/src/api/useUpdateVerifiablePresentation.tsfrontend/packages/configure-verifiable-credentials/src/api/useVerificationStatus.tsfrontend/packages/configure-verifiable-credentials/src/components/CredentialClaimsEditor.tsxfrontend/packages/configure-verifiable-credentials/src/components/CredentialOfferDialog.tsxfrontend/packages/configure-verifiable-credentials/src/components/PresentationClaimsEditor.tsxfrontend/packages/configure-verifiable-credentials/src/components/VerifiableCredentialDeleteDialog.tsxfrontend/packages/configure-verifiable-credentials/src/components/VerifiableCredentialForm.tsxfrontend/packages/configure-verifiable-credentials/src/components/VerifiableCredentialsList.tsxfrontend/packages/configure-verifiable-credentials/src/components/VerifiablePresentationDeleteDialog.tsxfrontend/packages/configure-verifiable-credentials/src/components/VerifiablePresentationForm.tsxfrontend/packages/configure-verifiable-credentials/src/components/VerifiablePresentationsList.tsxfrontend/packages/configure-verifiable-credentials/src/components/VerificationDialog.tsxfrontend/packages/configure-verifiable-credentials/src/components/create-verifiable-credential/ConfigureName.tsxfrontend/packages/configure-verifiable-credentials/src/components/create-verifiable-credential/__tests__/ConfigureName.test.tsxfrontend/packages/configure-verifiable-credentials/src/components/create-verifiable-presentation/ConfigureName.tsxfrontend/packages/configure-verifiable-credentials/src/components/create-verifiable-presentation/__tests__/ConfigureName.test.tsxfrontend/packages/configure-verifiable-credentials/src/constants/vc-query-keys.tsfrontend/packages/configure-verifiable-credentials/src/hooks/useVerifiableCredentialRoutes.tsfrontend/packages/configure-verifiable-credentials/src/index.tsfrontend/packages/configure-verifiable-credentials/src/models/credential-claims.tsfrontend/packages/configure-verifiable-credentials/src/models/credential-requests.tsfrontend/packages/configure-verifiable-credentials/src/models/presentation-claims.tsfrontend/packages/configure-verifiable-credentials/src/models/presentation-requests.tsfrontend/packages/configure-verifiable-credentials/src/models/vc.tsfrontend/packages/configure-verifiable-credentials/src/pages/VerifiableCredentialCreatePage.tsxfrontend/packages/configure-verifiable-credentials/src/pages/VerifiableCredentialEditPage.tsxfrontend/packages/configure-verifiable-credentials/src/pages/VerifiableCredentialsListPage.tsxfrontend/packages/configure-verifiable-credentials/src/pages/VerifiablePresentationCreatePage.tsxfrontend/packages/configure-verifiable-credentials/src/pages/VerifiablePresentationEditPage.tsxfrontend/packages/configure-verifiable-credentials/src/pages/VerifiablePresentationsListPage.tsxfrontend/packages/configure-verifiable-credentials/src/utils/deriveHandle.tsfrontend/packages/configure-verifiable-credentials/vitest.config.tsfrontend/packages/test-utils/src/setup.ts
🚧 Files skipped from review as they are similar to previous changes (1)
- frontend/packages/configure-verifiable-credentials/vitest.config.ts
There was a problem hiding this comment.
Caution
Inline review comments failed to post. This is likely due to GitHub's internal server error or limits when posting large numbers of comments. If you are seeing this consistently it is likely a permissions issue. Please check "Moderation" -> "Code review limits" under your organization settings.
Actionable comments posted: 5
🧹 Nitpick comments (2)
frontend/packages/configure-verifiable-credentials/src/hooks/useVerifiableCredentialRoutes.ts (1)
15-45: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winMove the route types and defaults to
routes/types.ts.The hook implementation matches the package route contract. The guideline places
VerifiableCredentialRoutePathsanddefaultVerifiableCredentialRoutePathsinroutes/types.ts, with the hook importing them. KeepuseVerifiableCredentialRouteshere and re-export the type and defaults fromsrc/index.tsunchanged, so consumers are unaffected.As per coding guidelines: "Define route types and defaults in
routes/types.ts, expose ause<Domain>Routes()hook usinguseRoutes, and build destinations from the hook's returned functions."🤖 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 `@frontend/packages/configure-verifiable-credentials/src/hooks/useVerifiableCredentialRoutes.ts` around lines 15 - 45, Move the VerifiableCredentialRoutePaths interface and defaultVerifiableCredentialRoutePaths constant from useVerifiableCredentialRoutes.ts to routes/types.ts, then import and use them in useVerifiableCredentialRoutes without changing its behavior. Keep the existing src/index.ts re-exports unchanged so consumer imports remain compatible.Source: Coding guidelines
frontend/packages/configure-verifiable-credentials/src/utils/deriveHandle.ts (1)
4-10: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winAdd focused
deriveHandletests.
deriveHandlehandles empty input, repeated separators, uppercase input, punctuation, and non-ASCII names. Add coverage for these inputs.🤖 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 `@frontend/packages/configure-verifiable-credentials/src/utils/deriveHandle.ts` around lines 4 - 10, Add focused tests for the exported deriveHandle function covering empty input, repeated separators, uppercase text, punctuation, and non-ASCII names, asserting the expected lowercase hyphen-delimited results for each case.Source: Coding guidelines
🤖 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
`@frontend/packages/configure-verifiable-credentials/src/api/useGetVerifiableCredential.ts`:
- Around line 20-25: Update the request URL in the queryFn for
useGetVerifiableCredential to interpolate encodeURIComponent(id) instead of the
raw id, ensuring the credential ID remains a single URL path segment.
In
`@frontend/packages/configure-verifiable-credentials/src/components/CredentialOfferDialog.tsx`:
- Around line 78-130: Add positional fallback strings or defaultValue options to
the t() calls for offer.title, offer.openInWallet, common:actions.copied,
offer.copy, and common:actions.close in CredentialOfferDialog. Keep the existing
translation keys and UI behavior unchanged while ensuring each call has an
explicit fallback.
- Around line 61-68: Update handleCopy and its dialog callers to preserve
clipboard write failures instead of swallowing them, set dialog error state when
navigator.clipboard.writeText rejects, and render a generic inline error in the
dialog. Keep the deep-link text field selectable so users can copy the value
manually, while preserving the existing success and timeout behavior.
In
`@frontend/packages/configure-verifiable-credentials/src/components/VerifiableCredentialDeleteDialog.tsx`:
- Around line 62-79: Every t() call in the affected flows lacks a fallback and
can render raw translation keys; add an appropriate positional fallback or
defaultValue while preserving interpolation and existing conventions. Update
VerifiableCredentialDeleteDialog.tsx lines 62-79 for its six listed keys,
VerifiablePresentationDeleteDialog.tsx lines 63-80 for the corresponding
presentation keys, VerificationDialog.tsx lines 123-209 for its ten listed keys,
and useDeleteVerifiableCredential.ts line 33 for delete.success.
In
`@frontend/packages/configure-verifiable-credentials/src/components/VerificationDialog.tsx`:
- Around line 51-61: Update the payload decoding before JSON.parse to convert
the binary result of atob into UTF-8 using TextDecoder, preserving non-ASCII
claim text. In the claims mapping within the existing verification dialog flow,
render object and array values with JSON.stringify while keeping primitive
values readable.
---
Nitpick comments:
In
`@frontend/packages/configure-verifiable-credentials/src/hooks/useVerifiableCredentialRoutes.ts`:
- Around line 15-45: Move the VerifiableCredentialRoutePaths interface and
defaultVerifiableCredentialRoutePaths constant from
useVerifiableCredentialRoutes.ts to routes/types.ts, then import and use them in
useVerifiableCredentialRoutes without changing its behavior. Keep the existing
src/index.ts re-exports unchanged so consumer imports remain compatible.
In
`@frontend/packages/configure-verifiable-credentials/src/utils/deriveHandle.ts`:
- Around line 4-10: Add focused tests for the exported deriveHandle function
covering empty input, repeated separators, uppercase text, punctuation, and
non-ASCII names, asserting the expected lowercase hyphen-delimited results for
each case.
🪄 Autofix
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: CHILL
Plan: Pro Plus
Run ID: c0954f8b-eefc-4c08-ae36-2a407f1ac918
⛔ Files ignored due to path filters (1)
pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (47)
frontend/apps/console/src/App.tsxfrontend/apps/console/src/configs/RouteConfig.tsfrontend/packages/configure-verifiable-credentials/package.jsonfrontend/packages/configure-verifiable-credentials/src/api/useCreateCredentialOffer.tsfrontend/packages/configure-verifiable-credentials/src/api/useCreateVerifiableCredential.tsfrontend/packages/configure-verifiable-credentials/src/api/useCreateVerifiablePresentation.tsfrontend/packages/configure-verifiable-credentials/src/api/useDeleteVerifiableCredential.tsfrontend/packages/configure-verifiable-credentials/src/api/useDeleteVerifiablePresentation.tsfrontend/packages/configure-verifiable-credentials/src/api/useGetTrustAnchors.tsfrontend/packages/configure-verifiable-credentials/src/api/useGetVerifiableCredential.tsfrontend/packages/configure-verifiable-credentials/src/api/useGetVerifiableCredentials.tsfrontend/packages/configure-verifiable-credentials/src/api/useGetVerifiablePresentation.tsfrontend/packages/configure-verifiable-credentials/src/api/useInitiateVerification.tsfrontend/packages/configure-verifiable-credentials/src/api/useUpdateVerifiableCredential.tsfrontend/packages/configure-verifiable-credentials/src/api/useUpdateVerifiablePresentation.tsfrontend/packages/configure-verifiable-credentials/src/api/useVerificationStatus.tsfrontend/packages/configure-verifiable-credentials/src/components/CredentialClaimsEditor.tsxfrontend/packages/configure-verifiable-credentials/src/components/CredentialOfferDialog.tsxfrontend/packages/configure-verifiable-credentials/src/components/PresentationClaimsEditor.tsxfrontend/packages/configure-verifiable-credentials/src/components/VerifiableCredentialDeleteDialog.tsxfrontend/packages/configure-verifiable-credentials/src/components/VerifiableCredentialForm.tsxfrontend/packages/configure-verifiable-credentials/src/components/VerifiableCredentialsList.tsxfrontend/packages/configure-verifiable-credentials/src/components/VerifiablePresentationDeleteDialog.tsxfrontend/packages/configure-verifiable-credentials/src/components/VerifiablePresentationForm.tsxfrontend/packages/configure-verifiable-credentials/src/components/VerifiablePresentationsList.tsxfrontend/packages/configure-verifiable-credentials/src/components/VerificationDialog.tsxfrontend/packages/configure-verifiable-credentials/src/components/create-verifiable-credential/ConfigureName.tsxfrontend/packages/configure-verifiable-credentials/src/components/create-verifiable-credential/__tests__/ConfigureName.test.tsxfrontend/packages/configure-verifiable-credentials/src/components/create-verifiable-presentation/ConfigureName.tsxfrontend/packages/configure-verifiable-credentials/src/components/create-verifiable-presentation/__tests__/ConfigureName.test.tsxfrontend/packages/configure-verifiable-credentials/src/constants/vc-query-keys.tsfrontend/packages/configure-verifiable-credentials/src/hooks/useVerifiableCredentialRoutes.tsfrontend/packages/configure-verifiable-credentials/src/index.tsfrontend/packages/configure-verifiable-credentials/src/models/credential-claims.tsfrontend/packages/configure-verifiable-credentials/src/models/credential-requests.tsfrontend/packages/configure-verifiable-credentials/src/models/presentation-claims.tsfrontend/packages/configure-verifiable-credentials/src/models/presentation-requests.tsfrontend/packages/configure-verifiable-credentials/src/models/vc.tsfrontend/packages/configure-verifiable-credentials/src/pages/VerifiableCredentialCreatePage.tsxfrontend/packages/configure-verifiable-credentials/src/pages/VerifiableCredentialEditPage.tsxfrontend/packages/configure-verifiable-credentials/src/pages/VerifiableCredentialsListPage.tsxfrontend/packages/configure-verifiable-credentials/src/pages/VerifiablePresentationCreatePage.tsxfrontend/packages/configure-verifiable-credentials/src/pages/VerifiablePresentationEditPage.tsxfrontend/packages/configure-verifiable-credentials/src/pages/VerifiablePresentationsListPage.tsxfrontend/packages/configure-verifiable-credentials/src/utils/deriveHandle.tsfrontend/packages/configure-verifiable-credentials/vitest.config.tsfrontend/packages/test-utils/src/setup.ts
🚧 Files skipped from review as they are similar to previous changes (1)
- frontend/packages/configure-verifiable-credentials/vitest.config.ts
🛑 Comments failed to post (5)
frontend/packages/configure-verifiable-credentials/src/api/useGetVerifiableCredential.ts (1)
20-25: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
Encode the credential ID as one URL path segment.
idcomes from the route. An ID containing/,?, or#changes the request URL and can fetch the wrong endpoint. UseencodeURIComponent(id).Proposed fix
- url: `${serverUrl}/openid4vci/credential-configurations/${id}`, + url: `${serverUrl}/openid4vci/credential-configurations/${encodeURIComponent(id)}`,📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.queryFn: async (): Promise<VerifiableCredential> => { const serverUrl: string = getServerUrl(); const response: {data: VerifiableCredential} = await http.request({ url: `${serverUrl}/openid4vci/credential-configurations/${encodeURIComponent(id)}`, method: 'GET', } as unknown as Parameters<typeof http.request>[0]);🤖 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 `@frontend/packages/configure-verifiable-credentials/src/api/useGetVerifiableCredential.ts` around lines 20 - 25, Update the request URL in the queryFn for useGetVerifiableCredential to interpolate encodeURIComponent(id) instead of the raw id, ensuring the credential ID remains a single URL path segment.frontend/packages/configure-verifiable-credentials/src/components/CredentialOfferDialog.tsx (2)
61-68: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
🧩 Analysis chain
🌐 Web query:
Can navigator.clipboard.writeText reject because of permissions, browser support, or an insecure context?💡 Result:
Yes, navigator.clipboard.writeText can reject or fail due to secure context restrictions, missing browser support, permission policies, and other environmental factors [1][2][3][4]. Insecure Contexts The Clipboard API is only available in secure contexts (HTTPS or localhost) [1][2][3]. If a page is served over HTTP, navigator.clipboard is typically undefined [2][5][3]. Attempting to access it will result in a TypeError (e.g., Cannot read properties of undefined), rather than a promise rejection, because the property does not exist on the navigator object [6][3]. Browser Support While the Clipboard API is widely supported in modern browsers [1][7], it was not available in older versions [7]. In environments where the API is not supported, navigator.clipboard will also be undefined [3][4]. Permissions and Policies Even in a secure context, the operation can fail or reject for several reasons: - Permissions Policy: The feature can be explicitly blocked by a Permissions-Policy header or an iframe sandbox attribute (e.g., allow="clipboard-write" is missing in a cross-origin iframe) [8][2][9]. - Transient User Activation: Many browsers require a "user gesture" (such as a click or keypress) to allow clipboard access [10][2][4]. If the call is delayed or occurs outside of this "fresh" gesture context, the browser may reject the promise [2][9]. - Active Tab/Focus: Some browsers restrict clipboard access to the active, focused tab [10][11][3]. If the page is in a background tab, the request may be denied [10]. It is recommended to wrap calls in a try-catch block and check for the existence of the API before invocation [3][4]: if (navigator.clipboard && window.isSecureContext) { try { await navigator.clipboard.writeText(text); } catch (err) { console.error('Clipboard write failed', err); } }
Citations:
- 1: https://developer.mozilla.org/en-US/docs/Web/API/Clipboard/writeText
- 2: https://juanchi.dev/en/blog/clipboard-api-typescript-fails-undocumented-cases-copytext
- 3: https://bobbyhadz.com/blog/navigator-clipboard-is-undefined-in-javascript
- 4: https://sentry.io/answers/how-do-i-copy-to-the-clipboard-in-javascript/
- 5: https://stackoverflow.com/questions/71873824/copy-text-to-clipboard-cannot-read-properties-of-undefined-reading-writetext
- 6: microsoft/TypeScript-DOM-lib-generator#1150
- 7: https://caniuse.com/mdn-api_clipboard_writetext
- 8: https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/Permissions-Policy
- 9: https://developer.mozilla.org/en-US/docs/Web/API/Clipboard_API
- 10: w3c/clipboard-apis#182
- 11: https://web.dev/articles/async-clipboard
🏁 Script executed:
#!/bin/bash set -euo pipefail file="frontend/packages/configure-verifiable-credentials/src/components/CredentialOfferDialog.tsx" echo "=== file exists / line count ===" wc -l "$file" || true echo echo "=== relevant sections ===" sed -n '1,180p' "$file" | cat -n echo echo "=== imports and error/alert usage in file ===" rg -n "useState|useCallback|Alert|handleCopy|copy|Clipboard|copied|t\\(|useTranslation" "$file" || trueRepository: thunder-id/thunderid
Length of output: 6926
Show clipboard copy failures in the dialog.
navigator.clipboard.writeText()can reject, and the copy button currently discards failures withhandleCopy(deepLink).catch(() => null). Render a generic inline error in the dialog and keep the deep-link text field selectable so users can copy manually.🤖 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 `@frontend/packages/configure-verifiable-credentials/src/components/CredentialOfferDialog.tsx` around lines 61 - 68, Update handleCopy and its dialog callers to preserve clipboard write failures instead of swallowing them, set dialog error state when navigator.clipboard.writeText rejects, and render a generic inline error in the dialog. Keep the deep-link text field selectable so users can copy the value manually, while preserving the existing success and timeout behavior.
78-130: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash set -euo pipefail FILE="frontend/packages/configure-verifiable-credentials/src/components/CredentialOfferDialog.tsx" if [ -f "$FILE" ]; then echo "== file exists ==" wc -l "$FILE" echo "== changed/context lines ==" sed -n '1,180p' "$FILE" | cat -n echo "== all t() occurrences ==" rg -n "t\\(" "$FILE" || true echo "== package/config/translation imports ==" rg -n "import .*useTranslation|translation|resourceKey|fallback|default" "$FILE" -g '*.{ts,tsx}' | head -80 || true else echo "missing $FILE" fiRepository: thunder-id/thunderid
Length of output: 6292
Add fallback strings to every
t()call inCredentialOfferDialog.tsx.The remaining fallbacks are still missing for
offer.title,offer.openInWallet,common:actions.copied,offer.copy, andcommon:actions.close. Supply a positional fallback ordefaultValuefor each call.🤖 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 `@frontend/packages/configure-verifiable-credentials/src/components/CredentialOfferDialog.tsx` around lines 78 - 130, Add positional fallback strings or defaultValue options to the t() calls for offer.title, offer.openInWallet, common:actions.copied, offer.copy, and common:actions.close in CredentialOfferDialog. Keep the existing translation keys and UI behavior unchanged while ensuring each call has an explicit fallback.Source: Coding guidelines
frontend/packages/configure-verifiable-credentials/src/components/VerifiableCredentialDeleteDialog.tsx (1)
62-79: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
Missing
t()fallback default strings across the new package. The new files callt()with bare keys and no fallback, so a missing catalog entry renders the raw key in the UI. The guideline requires a fallback on everyt()call.
frontend/packages/configure-verifiable-credentials/src/components/VerifiableCredentialDeleteDialog.tsx#L62-L79: add fallbacks todelete.title,delete.message,delete.disclaimer,common:actions.cancel,common:status.deleting, andcommon:actions.delete.frontend/packages/configure-verifiable-credentials/src/components/VerifiablePresentationDeleteDialog.tsx#L63-L80: add fallbacks to the same six keys in theverifiable-presentationsnamespace.frontend/packages/configure-verifiable-credentials/src/components/VerificationDialog.tsx#L123-L209: add fallbacks toverify.title,verify.scanHint,verify.openInWallet,verify.copy,common:actions.copied,verify.waiting,verify.expired,verify.completed,verify.keyBindingVerified, andverify.claimsTitle.frontend/packages/configure-verifiable-credentials/src/api/useDeleteVerifiableCredential.ts#L33-L33: add a fallback tot('delete.success').As per coding guidelines: "Every
t()call must provide a fallback default string, either as the positional fallback argument or asdefaultValuein the options object; preserve interpolation arguments and prefer the surrounding code's established form."📍 Affects 4 files
frontend/packages/configure-verifiable-credentials/src/components/VerifiableCredentialDeleteDialog.tsx#L62-L79(this comment)frontend/packages/configure-verifiable-credentials/src/components/VerifiablePresentationDeleteDialog.tsx#L63-L80frontend/packages/configure-verifiable-credentials/src/components/VerificationDialog.tsx#L123-L209frontend/packages/configure-verifiable-credentials/src/api/useDeleteVerifiableCredential.ts#L33-L33🤖 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 `@frontend/packages/configure-verifiable-credentials/src/components/VerifiableCredentialDeleteDialog.tsx` around lines 62 - 79, Every t() call in the affected flows lacks a fallback and can render raw translation keys; add an appropriate positional fallback or defaultValue while preserving interpolation and existing conventions. Update VerifiableCredentialDeleteDialog.tsx lines 62-79 for its six listed keys, VerifiablePresentationDeleteDialog.tsx lines 63-80 for the corresponding presentation keys, VerificationDialog.tsx lines 123-209 for its ten listed keys, and useDeleteVerifiableCredential.ts line 33 for delete.success.Source: Coding guidelines
frontend/packages/configure-verifiable-credentials/src/components/VerificationDialog.tsx (1)
51-61: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
Decode the JWT payload as UTF-8, and render object claim values correctly.
atobreturns a binary string. JWT payloads are UTF-8, so any non-ASCII claim value (accented names, non-Latin scripts) renders as mojibake. Decode the bytes withTextDecoder.
String(vc[key])also produces[object Object]when a claim value is an object or array. Serialize non-primitive values withJSON.stringify.🐛 Proposed fix
- const payload = JSON.parse(atob(b64)) as {verified_claims?: Record<string, unknown>}; + const binary: string = atob(b64); + const bytes: Uint8Array = Uint8Array.from(binary, (c: string): number => c.charCodeAt(0)); + const payload = JSON.parse(new TextDecoder().decode(bytes)) as {verified_claims?: Record<string, unknown>}; const vc: Record<string, unknown> = payload.verified_claims ?? {}; const claims: {name: string; value: string}[] = []; let keyBinding = false; Object.keys(vc).forEach((key: string): void => { if (key.startsWith('cnf.')) { keyBinding = true; return; } - claims.push({name: key, value: String(vc[key])}); + const raw: unknown = vc[key]; + claims.push({name: key, value: typeof raw === 'object' && raw !== null ? JSON.stringify(raw) : String(raw)}); });🤖 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 `@frontend/packages/configure-verifiable-credentials/src/components/VerificationDialog.tsx` around lines 51 - 61, Update the payload decoding before JSON.parse to convert the binary result of atob into UTF-8 using TextDecoder, preserving non-ASCII claim text. In the claims mapping within the existing verification dialog flow, render object and array values with JSON.stringify while keeping primitive values readable.
66b5e9e to
97dc140
Compare
There was a problem hiding this comment.
Actionable comments posted: 7
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
frontend/packages/configure-settings/vitest.config.ts (1)
9-22: 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick winEnforce coverage thresholds under
test.coverage.thresholds.This config reports coverage but does not fail when coverage is below 80%. Add thresholds for
statements,branches,functions, andlinesundercoverage.thresholdssotest:coverageenforces the required target.🤖 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 `@frontend/packages/configure-settings/vitest.config.ts` around lines 9 - 22, Add a coverage.thresholds configuration in the existing coverage block of vitest.config.ts, setting statements, branches, functions, and lines to 80 so test:coverage fails below the required target while preserving the current provider, reporters, include, and exclude settings.Source: Coding guidelines
🤖 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 `@frontend/packages/configure-settings/src/api/useUpdateCorsConfig.ts`:
- Around line 54-57: Update the success toast in the onSuccess callback to
provide a fallback default string to the t() call, using the supported
second-argument or defaultValue form, while preserving the existing translation
key and success behavior.
In `@frontend/packages/configure-settings/src/hooks/useAllowedOriginsDraft.ts`:
- Around line 79-82: Ensure every new translation call supplies a fallback
default string: update the invalid and duplicate messages in
useAllowedOriginsDraft.ts (lines 79-82); make tForErrors and all related calls
in CorsSection.tsx (lines 49-50, 111-112, 136-147, and 158-166) provide
defaults; and add defaults to the metadata and tab-label translations in
SettingsPage.tsx (lines 22-30).
In
`@frontend/packages/configure-settings/src/pages/__tests__/SettingsPage.test.tsx`:
- Line 20: Update the SettingsPage test’s rendered-text expectation to derive
the product name from the application configuration, using the established
configuration hook or symbol such as useConfig().productName, instead of
hardcoding “ThunderID”; preserve the existing assertion text and behavior.
In `@frontend/packages/configure-settings/tsconfig.json`:
- Around line 28-35: Update the compilerOptions in tsconfig.lib.json and
tsconfig.spec.json to set composite: true; in tsconfig.spec.json also override
declaration to true so both project references satisfy TypeScript’s composite
requirements.
In `@frontend/packages/configure-settings/tsconfig.spec.json`:
- Around line 3-6: Align the compiler settings in tsconfig.spec.json by either
changing its module output to ESM or overriding the inherited moduleResolution:
"bundler" with a Node-compatible resolution mode. Preserve the test
configuration’s intended CommonJS behavior while ensuring the module and
resolution options are compatible.
In
`@frontend/packages/configure-translations/src/components/__tests__/TranslationDeleteDialog.test.tsx`:
- Around line 38-50: Every changed t() call in the listed assertions must
provide a fallback defaultValue string. Update the calls in
frontend/packages/configure-translations/src/components/__tests__/TranslationDeleteDialog.test.tsx:38-50,
ReviewLocaleCode.test.tsx:39-52, SelectCountry.test.tsx:41-54,
SelectLanguage.test.tsx:44-59, NamespaceSelector.test.tsx:32-38,
TranslationEditorCard.test.tsx:50-129, TranslationFieldsView.test.tsx:55-248,
TranslationJsonEditor.test.tsx:76-164, TranslationCreatePage.test.tsx:126-126
and :633-633, and TranslationsListPage.test.tsx:111-117, covering each title,
message, label, helper text, placeholder, validation, button, breadcrumb,
loading, tab, and empty-state translation assertion without changing their
existing translation keys or interpolation values.
In
`@frontend/packages/configure-translations/src/components/edit-translation/__tests__/TranslationFieldsView.test.tsx`:
- Line 209: Update the Cancel interaction in the TranslationFieldsView test to
query the button by its role and accessible name instead of using getByText,
ensuring it targets the Cancel button rather than the actions.cancel field
value.
---
Outside diff comments:
In `@frontend/packages/configure-settings/vitest.config.ts`:
- Around line 9-22: Add a coverage.thresholds configuration in the existing
coverage block of vitest.config.ts, setting statements, branches, functions, and
lines to 80 so test:coverage fails below the required target while preserving
the current provider, reporters, include, and exclude settings.
🪄 Autofix
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: CHILL
Plan: Pro Plus
Run ID: 5629003f-3eb0-4bc3-a88a-d036d3d94bcb
⛔ Files ignored due to path filters (1)
pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (52)
frontend/apps/console/package.jsonfrontend/apps/console/src/App.tsxfrontend/apps/console/src/features/applications/components/create-application/ConfigureRedirectUris.tsxfrontend/apps/console/src/features/applications/pages/ApplicationCreatePage.tsxfrontend/apps/console/src/features/applications/utils/mergeCorsOrigins.tsfrontend/packages/configure-settings/.editorconfigfrontend/packages/configure-settings/.gitignorefrontend/packages/configure-settings/.prettierignorefrontend/packages/configure-settings/eslint.config.jsfrontend/packages/configure-settings/package.jsonfrontend/packages/configure-settings/prettier.config.jsfrontend/packages/configure-settings/rolldown.config.jsfrontend/packages/configure-settings/src/api/__tests__/useGetCorsConfig.test.tsfrontend/packages/configure-settings/src/api/__tests__/useUpdateCorsConfig.test.tsfrontend/packages/configure-settings/src/api/useGetCorsConfig.tsfrontend/packages/configure-settings/src/api/useUpdateCorsConfig.tsfrontend/packages/configure-settings/src/components/cors/CorsSection.tsxfrontend/packages/configure-settings/src/components/cors/OriginRow.tsxfrontend/packages/configure-settings/src/components/cors/__tests__/CorsSection.test.tsxfrontend/packages/configure-settings/src/constants/settings-query-keys.tsfrontend/packages/configure-settings/src/hooks/__tests__/useAllowedOriginsDraft.test.tsfrontend/packages/configure-settings/src/hooks/useAllowedOriginsDraft.tsfrontend/packages/configure-settings/src/index.tsfrontend/packages/configure-settings/src/models/responses.tsfrontend/packages/configure-settings/src/pages/SettingsPage.tsxfrontend/packages/configure-settings/src/pages/__tests__/SettingsPage.test.tsxfrontend/packages/configure-settings/src/utils/__tests__/baselineKey.test.tsfrontend/packages/configure-settings/src/utils/__tests__/isStringOrigin.test.tsfrontend/packages/configure-settings/src/utils/__tests__/normalizedNonEmpty.test.tsfrontend/packages/configure-settings/src/utils/__tests__/origin.test.tsfrontend/packages/configure-settings/src/utils/__tests__/originValueText.test.tsfrontend/packages/configure-settings/src/utils/baselineKey.tsfrontend/packages/configure-settings/src/utils/isStringOrigin.tsfrontend/packages/configure-settings/src/utils/normalizedNonEmpty.tsfrontend/packages/configure-settings/src/utils/origin.tsfrontend/packages/configure-settings/src/utils/originValueText.tsfrontend/packages/configure-settings/tsconfig.eslint.jsonfrontend/packages/configure-settings/tsconfig.jsonfrontend/packages/configure-settings/tsconfig.lib.jsonfrontend/packages/configure-settings/tsconfig.spec.jsonfrontend/packages/configure-settings/vitest.config.tsfrontend/packages/configure-translations/src/components/__tests__/TranslationDeleteDialog.test.tsxfrontend/packages/configure-translations/src/components/create-translation/__tests__/ReviewLocaleCode.test.tsxfrontend/packages/configure-translations/src/components/create-translation/__tests__/SelectCountry.test.tsxfrontend/packages/configure-translations/src/components/create-translation/__tests__/SelectLanguage.test.tsxfrontend/packages/configure-translations/src/components/edit-translation/__tests__/NamespaceSelector.test.tsxfrontend/packages/configure-translations/src/components/edit-translation/__tests__/TranslationEditorCard.test.tsxfrontend/packages/configure-translations/src/components/edit-translation/__tests__/TranslationFieldsView.test.tsxfrontend/packages/configure-translations/src/components/edit-translation/__tests__/TranslationJsonEditor.test.tsxfrontend/packages/configure-translations/src/pages/__tests__/TranslationCreatePage.test.tsxfrontend/packages/configure-translations/src/pages/__tests__/TranslationsListPage.test.tsxfrontend/packages/test-utils/src/setup.ts
🚧 Files skipped from review as they are similar to previous changes (1)
- frontend/apps/console/package.json
| expect(screen.getByText('settings:page.subtitle')).toBeInTheDocument(); | ||
| expect(screen.getByRole('tab', {name: 'settings:tabs.cors'})).toBeInTheDocument(); | ||
| expect(screen.getByText('Settings')).toBeInTheDocument(); | ||
| expect(screen.getByText('Settings that apply across your entire ThunderID deployment.')).toBeInTheDocument(); |
There was a problem hiding this comment.
📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win
Is this hardcoded brand name intentional?
Line 20 hardcodes ThunderID in a rendered-text expectation. If product branding is configurable, derive the expected product name from the app configuration, such as useConfig().productName, instead of using a raw string literal.
As per path instructions, “Is this hardcoded brand name intentional?”
🤖 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
`@frontend/packages/configure-settings/src/pages/__tests__/SettingsPage.test.tsx`
at line 20, Update the SettingsPage test’s rendered-text expectation to derive
the product name from the application configuration, using the established
configuration hook or symbol such as useConfig().productName, instead of
hardcoding “ThunderID”; preserve the existing assertion text and behavior.
Source: Path instructions
| expect(screen.getByText(t('translations:delete.title'))).toBeInTheDocument(); | ||
| }); | ||
|
|
||
| it('renders the confirmation message', () => { | ||
| render(<TranslationDeleteDialog {...defaultProps} />); | ||
|
|
||
| expect(screen.getByText('delete.message')).toBeInTheDocument(); | ||
| expect(screen.getByText(t('translations:delete.message', {language: 'DisplayName(fr-FR)'}))).toBeInTheDocument(); | ||
| }); | ||
|
|
||
| it('renders the warning disclaimer', () => { | ||
| render(<TranslationDeleteDialog {...defaultProps} />); | ||
|
|
||
| expect(screen.getByText('delete.disclaimer')).toBeInTheDocument(); | ||
| expect(screen.getByText(t('translations:delete.disclaimer'))).toBeInTheDocument(); |
There was a problem hiding this comment.
📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win
Add fallback defaults to the changed t() calls.
The coding guideline requires a fallback default string for every t() call. Add defaultValue for each changed assertion.
frontend/packages/configure-translations/src/components/__tests__/TranslationDeleteDialog.test.tsx#L38-L50: Add fallback defaults to the dialog title, message, and disclaimer calls.frontend/packages/configure-translations/src/components/create-translation/__tests__/ReviewLocaleCode.test.tsx#L39-L52: Add fallback defaults to the title, subtitle, and helper text calls.frontend/packages/configure-translations/src/components/create-translation/__tests__/SelectCountry.test.tsx#L41-L54: Add fallback defaults to the country step calls.frontend/packages/configure-translations/src/components/create-translation/__tests__/SelectLanguage.test.tsx#L44-L59: Add fallback defaults to the language step calls.frontend/packages/configure-translations/src/components/edit-translation/__tests__/NamespaceSelector.test.tsx#L32-L38: Add fallback defaults to the label and helper text calls.frontend/packages/configure-translations/src/components/edit-translation/__tests__/TranslationEditorCard.test.tsx#L50-L129: Add fallback defaults to the loading, tab, and placeholder calls.frontend/packages/configure-translations/src/components/edit-translation/__tests__/TranslationFieldsView.test.tsx#L55-L248: Add fallback defaults to the empty-state, add-key, form-label, placeholder, validation, and button calls.frontend/packages/configure-translations/src/components/edit-translation/__tests__/TranslationJsonEditor.test.tsx#L76-L164: Add fallback defaults to the JSON validation message calls.frontend/packages/configure-translations/src/pages/__tests__/TranslationCreatePage.test.tsx#L126-L126: Add a fallback default to the country breadcrumb call.frontend/packages/configure-translations/src/pages/__tests__/TranslationCreatePage.test.tsx#L633-L633: Add a fallback default to the breadcrumb navigation call.frontend/packages/configure-translations/src/pages/__tests__/TranslationsListPage.test.tsx#L111-L117: Add fallback defaults to the page title and subtitle calls.
As per coding guidelines, “Every t() call must provide a fallback default string.”
📍 Affects 10 files
frontend/packages/configure-translations/src/components/__tests__/TranslationDeleteDialog.test.tsx#L38-L50(this comment)frontend/packages/configure-translations/src/components/create-translation/__tests__/ReviewLocaleCode.test.tsx#L39-L52frontend/packages/configure-translations/src/components/create-translation/__tests__/SelectCountry.test.tsx#L41-L54frontend/packages/configure-translations/src/components/create-translation/__tests__/SelectLanguage.test.tsx#L44-L59frontend/packages/configure-translations/src/components/edit-translation/__tests__/NamespaceSelector.test.tsx#L32-L38frontend/packages/configure-translations/src/components/edit-translation/__tests__/TranslationEditorCard.test.tsx#L50-L129frontend/packages/configure-translations/src/components/edit-translation/__tests__/TranslationFieldsView.test.tsx#L55-L248frontend/packages/configure-translations/src/components/edit-translation/__tests__/TranslationJsonEditor.test.tsx#L76-L164frontend/packages/configure-translations/src/pages/__tests__/TranslationCreatePage.test.tsx#L126-L126frontend/packages/configure-translations/src/pages/__tests__/TranslationCreatePage.test.tsx#L633-L633frontend/packages/configure-translations/src/pages/__tests__/TranslationsListPage.test.tsx#L111-L117
🤖 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
`@frontend/packages/configure-translations/src/components/__tests__/TranslationDeleteDialog.test.tsx`
around lines 38 - 50, Every changed t() call in the listed assertions must
provide a fallback defaultValue string. Update the calls in
frontend/packages/configure-translations/src/components/__tests__/TranslationDeleteDialog.test.tsx:38-50,
ReviewLocaleCode.test.tsx:39-52, SelectCountry.test.tsx:41-54,
SelectLanguage.test.tsx:44-59, NamespaceSelector.test.tsx:32-38,
TranslationEditorCard.test.tsx:50-129, TranslationFieldsView.test.tsx:55-248,
TranslationJsonEditor.test.tsx:76-164, TranslationCreatePage.test.tsx:126-126
and :633-633, and TranslationsListPage.test.tsx:111-117, covering each title,
message, label, helper text, placeholder, validation, button, breadcrumb,
loading, tab, and empty-state translation assertion without changing their
existing translation keys or interpolation values.
Source: Coding guidelines
There was a problem hiding this comment.
Caution
Inline review comments failed to post. This is likely due to GitHub's internal server error or limits when posting large numbers of comments. If you are seeing this consistently it is likely a permissions issue. Please check "Moderation" -> "Code review limits" under your organization settings.
Actionable comments posted: 7
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
frontend/packages/configure-settings/vitest.config.ts (1)
9-22: 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick winEnforce coverage thresholds under
test.coverage.thresholds.This config reports coverage but does not fail when coverage is below 80%. Add thresholds for
statements,branches,functions, andlinesundercoverage.thresholdssotest:coverageenforces the required target.🤖 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 `@frontend/packages/configure-settings/vitest.config.ts` around lines 9 - 22, Add a coverage.thresholds configuration in the existing coverage block of vitest.config.ts, setting statements, branches, functions, and lines to 80 so test:coverage fails below the required target while preserving the current provider, reporters, include, and exclude settings.Source: Coding guidelines
🤖 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 `@frontend/packages/configure-settings/src/api/useUpdateCorsConfig.ts`:
- Around line 54-57: Update the success toast in the onSuccess callback to
provide a fallback default string to the t() call, using the supported
second-argument or defaultValue form, while preserving the existing translation
key and success behavior.
In `@frontend/packages/configure-settings/src/hooks/useAllowedOriginsDraft.ts`:
- Around line 79-82: Ensure every new translation call supplies a fallback
default string: update the invalid and duplicate messages in
useAllowedOriginsDraft.ts (lines 79-82); make tForErrors and all related calls
in CorsSection.tsx (lines 49-50, 111-112, 136-147, and 158-166) provide
defaults; and add defaults to the metadata and tab-label translations in
SettingsPage.tsx (lines 22-30).
In
`@frontend/packages/configure-settings/src/pages/__tests__/SettingsPage.test.tsx`:
- Line 20: Update the SettingsPage test’s rendered-text expectation to derive
the product name from the application configuration, using the established
configuration hook or symbol such as useConfig().productName, instead of
hardcoding “ThunderID”; preserve the existing assertion text and behavior.
In `@frontend/packages/configure-settings/tsconfig.json`:
- Around line 28-35: Update the compilerOptions in tsconfig.lib.json and
tsconfig.spec.json to set composite: true; in tsconfig.spec.json also override
declaration to true so both project references satisfy TypeScript’s composite
requirements.
In `@frontend/packages/configure-settings/tsconfig.spec.json`:
- Around line 3-6: Align the compiler settings in tsconfig.spec.json by either
changing its module output to ESM or overriding the inherited moduleResolution:
"bundler" with a Node-compatible resolution mode. Preserve the test
configuration’s intended CommonJS behavior while ensuring the module and
resolution options are compatible.
In
`@frontend/packages/configure-translations/src/components/__tests__/TranslationDeleteDialog.test.tsx`:
- Around line 38-50: Every changed t() call in the listed assertions must
provide a fallback defaultValue string. Update the calls in
frontend/packages/configure-translations/src/components/__tests__/TranslationDeleteDialog.test.tsx:38-50,
ReviewLocaleCode.test.tsx:39-52, SelectCountry.test.tsx:41-54,
SelectLanguage.test.tsx:44-59, NamespaceSelector.test.tsx:32-38,
TranslationEditorCard.test.tsx:50-129, TranslationFieldsView.test.tsx:55-248,
TranslationJsonEditor.test.tsx:76-164, TranslationCreatePage.test.tsx:126-126
and :633-633, and TranslationsListPage.test.tsx:111-117, covering each title,
message, label, helper text, placeholder, validation, button, breadcrumb,
loading, tab, and empty-state translation assertion without changing their
existing translation keys or interpolation values.
In
`@frontend/packages/configure-translations/src/components/edit-translation/__tests__/TranslationFieldsView.test.tsx`:
- Line 209: Update the Cancel interaction in the TranslationFieldsView test to
query the button by its role and accessible name instead of using getByText,
ensuring it targets the Cancel button rather than the actions.cancel field
value.
---
Outside diff comments:
In `@frontend/packages/configure-settings/vitest.config.ts`:
- Around line 9-22: Add a coverage.thresholds configuration in the existing
coverage block of vitest.config.ts, setting statements, branches, functions, and
lines to 80 so test:coverage fails below the required target while preserving
the current provider, reporters, include, and exclude settings.
🪄 Autofix
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: CHILL
Plan: Pro Plus
Run ID: 5629003f-3eb0-4bc3-a88a-d036d3d94bcb
⛔ Files ignored due to path filters (1)
pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (52)
frontend/apps/console/package.jsonfrontend/apps/console/src/App.tsxfrontend/apps/console/src/features/applications/components/create-application/ConfigureRedirectUris.tsxfrontend/apps/console/src/features/applications/pages/ApplicationCreatePage.tsxfrontend/apps/console/src/features/applications/utils/mergeCorsOrigins.tsfrontend/packages/configure-settings/.editorconfigfrontend/packages/configure-settings/.gitignorefrontend/packages/configure-settings/.prettierignorefrontend/packages/configure-settings/eslint.config.jsfrontend/packages/configure-settings/package.jsonfrontend/packages/configure-settings/prettier.config.jsfrontend/packages/configure-settings/rolldown.config.jsfrontend/packages/configure-settings/src/api/__tests__/useGetCorsConfig.test.tsfrontend/packages/configure-settings/src/api/__tests__/useUpdateCorsConfig.test.tsfrontend/packages/configure-settings/src/api/useGetCorsConfig.tsfrontend/packages/configure-settings/src/api/useUpdateCorsConfig.tsfrontend/packages/configure-settings/src/components/cors/CorsSection.tsxfrontend/packages/configure-settings/src/components/cors/OriginRow.tsxfrontend/packages/configure-settings/src/components/cors/__tests__/CorsSection.test.tsxfrontend/packages/configure-settings/src/constants/settings-query-keys.tsfrontend/packages/configure-settings/src/hooks/__tests__/useAllowedOriginsDraft.test.tsfrontend/packages/configure-settings/src/hooks/useAllowedOriginsDraft.tsfrontend/packages/configure-settings/src/index.tsfrontend/packages/configure-settings/src/models/responses.tsfrontend/packages/configure-settings/src/pages/SettingsPage.tsxfrontend/packages/configure-settings/src/pages/__tests__/SettingsPage.test.tsxfrontend/packages/configure-settings/src/utils/__tests__/baselineKey.test.tsfrontend/packages/configure-settings/src/utils/__tests__/isStringOrigin.test.tsfrontend/packages/configure-settings/src/utils/__tests__/normalizedNonEmpty.test.tsfrontend/packages/configure-settings/src/utils/__tests__/origin.test.tsfrontend/packages/configure-settings/src/utils/__tests__/originValueText.test.tsfrontend/packages/configure-settings/src/utils/baselineKey.tsfrontend/packages/configure-settings/src/utils/isStringOrigin.tsfrontend/packages/configure-settings/src/utils/normalizedNonEmpty.tsfrontend/packages/configure-settings/src/utils/origin.tsfrontend/packages/configure-settings/src/utils/originValueText.tsfrontend/packages/configure-settings/tsconfig.eslint.jsonfrontend/packages/configure-settings/tsconfig.jsonfrontend/packages/configure-settings/tsconfig.lib.jsonfrontend/packages/configure-settings/tsconfig.spec.jsonfrontend/packages/configure-settings/vitest.config.tsfrontend/packages/configure-translations/src/components/__tests__/TranslationDeleteDialog.test.tsxfrontend/packages/configure-translations/src/components/create-translation/__tests__/ReviewLocaleCode.test.tsxfrontend/packages/configure-translations/src/components/create-translation/__tests__/SelectCountry.test.tsxfrontend/packages/configure-translations/src/components/create-translation/__tests__/SelectLanguage.test.tsxfrontend/packages/configure-translations/src/components/edit-translation/__tests__/NamespaceSelector.test.tsxfrontend/packages/configure-translations/src/components/edit-translation/__tests__/TranslationEditorCard.test.tsxfrontend/packages/configure-translations/src/components/edit-translation/__tests__/TranslationFieldsView.test.tsxfrontend/packages/configure-translations/src/components/edit-translation/__tests__/TranslationJsonEditor.test.tsxfrontend/packages/configure-translations/src/pages/__tests__/TranslationCreatePage.test.tsxfrontend/packages/configure-translations/src/pages/__tests__/TranslationsListPage.test.tsxfrontend/packages/test-utils/src/setup.ts
🚧 Files skipped from review as they are similar to previous changes (1)
- frontend/apps/console/package.json
🛑 Comments failed to post (4)
frontend/packages/configure-settings/src/api/useUpdateCorsConfig.ts (1)
54-57: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
Provide a fallback for the success message.
The
t()call at Line 57 has no fallback string. If the translation is unavailable, the toast can display the translation key. Pass a default message as the second argument or throughdefaultValue.As per coding guidelines, “Every
t()call must provide a fallback default string.”🤖 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 `@frontend/packages/configure-settings/src/api/useUpdateCorsConfig.ts` around lines 54 - 57, Update the success toast in the onSuccess callback to provide a fallback default string to the t() call, using the supported second-argument or defaultValue form, while preserving the existing translation key and success behavior.Source: Coding guidelines
frontend/packages/configure-settings/src/hooks/useAllowedOriginsDraft.ts (1)
79-82: 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win
Add fallback defaults to all new translation calls.
The new settings surfaces do not consistently supply fallback strings to
t(). Add a fallback default to every call, including calls forwarded throughtForErrors.
frontend/packages/configure-settings/src/hooks/useAllowedOriginsDraft.ts#L79-L82: Add fallback text for invalid and duplicate origin errors.frontend/packages/configure-settings/src/components/cors/CorsSection.tsx#L49-L50: EnsuretForErrorsalways supplies a fallback default.frontend/packages/configure-settings/src/components/cors/CorsSection.tsx#L111-L112: Add fallback text for the input placeholder and remove action.frontend/packages/configure-settings/src/components/cors/CorsSection.tsx#L136-L147: Add fallback text for add-origin and read-only hint labels.frontend/packages/configure-settings/src/components/cors/CorsSection.tsx#L158-L166: Add fallback text for the card and unsaved-changes labels.frontend/packages/configure-settings/src/pages/SettingsPage.tsx#L22-L30: Add fallback text for page metadata and tab labels.As per coding guidelines, “Every
t()call must provide a fallback default string.”📍 Affects 3 files
frontend/packages/configure-settings/src/hooks/useAllowedOriginsDraft.ts#L79-L82(this comment)frontend/packages/configure-settings/src/components/cors/CorsSection.tsx#L49-L50frontend/packages/configure-settings/src/components/cors/CorsSection.tsx#L111-L112frontend/packages/configure-settings/src/components/cors/CorsSection.tsx#L136-L147frontend/packages/configure-settings/src/components/cors/CorsSection.tsx#L158-L166frontend/packages/configure-settings/src/pages/SettingsPage.tsx#L22-L30🤖 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 `@frontend/packages/configure-settings/src/hooks/useAllowedOriginsDraft.ts` around lines 79 - 82, Ensure every new translation call supplies a fallback default string: update the invalid and duplicate messages in useAllowedOriginsDraft.ts (lines 79-82); make tForErrors and all related calls in CorsSection.tsx (lines 49-50, 111-112, 136-147, and 158-166) provide defaults; and add defaults to the metadata and tab-label translations in SettingsPage.tsx (lines 22-30).Source: Coding guidelines
frontend/packages/configure-settings/tsconfig.json (1)
28-35: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash set -euo pipefail for config in \ frontend/packages/configure-settings/tsconfig.json \ frontend/packages/configure-settings/tsconfig.lib.json \ frontend/packages/configure-settings/tsconfig.spec.json do printf '\n%s\n' "$config" jq '.compilerOptions | {composite, declaration}' "$config" doneRepository: thunder-id/thunderid
Length of output: 465
🏁 Script executed:
#!/bin/bash set -euo pipefail configs=( frontend/packages/configure-settings/tsconfig.json frontend/packages/configure-settings/tsconfig.lib.json frontend/packages/configure-settings/tsconfig.spec.json ) printf 'Relevant tsconfig files:\n' for config in "${configs[@]}"; do printf '\n--- %s ---\n' "$config" cat -n "$config" done printf '\nPackage reference usage:\n' rg -n '"references"|"composite"|extends|declaration' frontend/packages/configure-settings/tsconfig*.jsonRepository: thunder-id/thunderid
Length of output: 3230
🌐 Web query:
TypeScript composite projects referenced projects compilerOptions composite required tsc --build💡 Result:
In TypeScript, the composite compiler option is a fundamental requirement for project references [1][2]. Its primary purpose is to enable the TypeScript compiler and other build tools to quickly determine the build status of a project, allowing for efficient incremental compilation when using tsc --build [3][4]. Key details regarding the composite flag and project references: Requirement: Any project that is intended to be referenced by another project must have composite set to true in its tsconfig.json [1][5]. This flag tells the compiler that the project is part of a larger, multi-project system, enabling specific constraints and behaviors [3]. Constraints enabled by composite: When composite is enabled, the following behaviors are enforced: - The declaration compiler option is implicitly set to true (required for other projects to consume the output) [1][3]. - The rootDir defaults to the directory containing the tsconfig.json file [1][3]. - All source files must be explicitly included or listed in the files array; the compiler will error if files are discovered that are not part of the explicit include/files configuration [1][3]. Role of tsc --build: The --build (or -b) flag is the orchestration mode designed for multi-project setups [4][6]. It uses project references to understand the dependency graph, builds dependencies in the correct topological order, and utilizes.tsbuildinfo files to achieve incremental compilation by skipping unchanged projects [4]. Solution-style tsconfig.json: It is a common pattern to use a top-level solution tsconfig.json that references various sub-projects [1]. While referenced sub-projects must have composite enabled, the top-level "solution" project itself does not necessarily need the composite flag enabled, as its primary purpose is simply to aggregate references for the tsc --build command [7][5].
Citations:
- 1: https://www.typescriptlang.org/docs/handbook/project-references
- 2: https://www.typescriptlang.org/docs/handbook/project-references.html
- 3: https://www.typescriptlang.org/tsconfig/composite.html
- 4: https://www.stanza.dev/courses/typescript-production/monorepos-references/typescript-production-build-mode
- 5: microsoft/TypeScript#60465
- 6: https://stackoverflow.com/questions/67796765/tsc-build-vs-tsc-project
- 7: microsoft/TypeScript#40766
🏁 Script executed:
#!/bin/bash set -euo pipefail printf 'Files that run/depend on tsc in frontend config/package areas:\n' rg -n --hidden --glob '!node_modules/**' --glob '!dist/**' --glob '!tmp/**' \ '\b(tsc|--build|-b|tsconfig\.json|references:)\b' frontend/package.json frontend/packages frontend apps 2>/dev/null || true printf '\nChanged tsconfig files in git:\n' git diff --name-only 2>/dev/null | rg 'frontend/packages/configure-settings/tsconfig.*\.json$|package\.json$' || true printf '\npackage scripts mentioning tsc/build:\n' if [ -f frontend/package.json ]; then jq -r '.scripts // {}' frontend/package.json; fiRepository: thunder-id/thunderid
Length of output: 36841
🏁 Script executed:
#!/bin/bash set -euo pipefail if command -v tsc >/dev/null 2>&1; then tsc_version="tsc $(tsc -v | head -n 1 2>/dev/null || true)" else printf 'tsc: not available in PATH\n' tsc_version="" fi tmpdir="$(mktemp -d)" trap 'rm -rf "$tmpdir"' EXIT cd "$tmpdir" cat > tsconfig.json <<'JSON' { "compilerOptions": { "declaration": false, "strict": true }, "references": [ { "path": "./lib" }, { "path": "./spec" } ], "files": [] } JSON for dir in lib spec; do mkdir "$dir" cat > "$dir/index.ts" <<'TS' export const value = 1; TS cat > "$dir/tsconfig.json" <<'JSON' { "extends": "../tsconfig.json", "compilerOptions": { "composite": true, "declaration": true }, "include": ["index.ts"], "files": [] } JSON done printf '\nResolved composite and declaration effective values:\n' node - <<'JS' const fs = require('fs'); for (const file of ['tsconfig.json', 'lib/tsconfig.json', 'spec/tsconfig.json']) { const json = JSON.parse(fs.readFileSync(file, 'utf8')); const base = file !== 'tsconfig.json' ? JSON.parse(fs.readFileSync('tsconfig.json', 'utf8')) : {}; console.log(`${file}:`); console.log(` explicit composite=${json.compilerOptions?.composite}, inherited composite=${json.compilerOptions?.composite ?? base.compilerOptions?.composite}`); console.log(` effective declaration=${json.compilerOptions?.declaration ?? base.compilerOptions?.declaration}`); } JS if [ -n "$tsc_version" ]; then printf '\n%1$s check referenced composite projects:\n' "$tsc_version" tsc --build --dry --pretty false || true else printf '\ntsc --build dry run: skipped (tsc not available)\n' fiRepository: thunder-id/thunderid
Length of output: 574
Enable composite mode for the referenced TypeScript projects.
tsconfig.lib.jsonandtsconfig.spec.jsonare added as project references but do not setcompilerOptions.composite. A referenced project may only enable composite mode if the effective compiler option is true;tsconfig.lib.jsonsetsdeclaration: true, buttsconfig.spec.jsoninheritsdeclaration: falsefrom the root config and would fail to build withcomposite: true. Addcomposite: truedirectly in both referenced configs, and overridedeclarationtotruein the spec config.🤖 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 `@frontend/packages/configure-settings/tsconfig.json` around lines 28 - 35, Update the compilerOptions in tsconfig.lib.json and tsconfig.spec.json to set composite: true; in tsconfig.spec.json also override declaration to true so both project references satisfy TypeScript’s composite requirements.frontend/packages/configure-settings/tsconfig.spec.json (1)
3-6: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash set -euo pipefail jq '.compilerOptions | {module, moduleResolution}' \ frontend/packages/configure-settings/tsconfig.json \ frontend/packages/configure-settings/tsconfig.spec.jsonRepository: thunder-id/thunderid
Length of output: 271
🏁 Script executed:
#!/bin/bash set -euo pipefail printf 'Package TypeScript/bin availability:\n' for f in package.json frontend/packages/configure-settings/package.json; do if [ -f "$f" ]; then echo "--- $f" jq '{type, packageManager, scripts, devDependencies?["typescript"], dependencies?["typescript"]}' "$f" 2>/dev/null || sed -n '1,120p' "$f" fi done printf '\nTarget tsconfig files:\n' cat -n frontend/packages/configure-settings/tsconfig.json frontend/packages/configure-settings/tsconfig.spec.json printf '\nLockfile TypeScript versions (if present):\n' rg -n '"typescript"\s*:' package-lock.json pnpm-lock.yaml yarn.lock 2>/dev/null | head -20 || trueRepository: thunder-id/thunderid
Length of output: 6881
🏁 Script executed:
#!/bin/bash set -euo pipefail printf 'Resolve tsconfig.compilerOptions and check tsconfig.include from include lists:\n' jq -n ' { base: "frontend/packages/configure-settings/tsconfig.json", test: "frontend/packages/configure-settings/tsconfig.spec.json" } ' python3 - <<'PY' import json, os root = "frontend/packages/configure-settings" base = json.load(open(f"{root}/tsconfig.json")) spec = json.load(open(f"{root}/tsconfig.spec.json")) base_opts = base["compilerOptions"] spec_opts = spec["compilerOptions"] merged = dict(base_opts) merged.update((k, v) for k, v in spec_opts.items() if v is not None) print(f"spec extends: {spec.get('extends')}") print(f"base module: {base_opts.get('module')}") print(f"base moduleResolution: {base_opts.get('moduleResolution')}") print(f"spec compilerOptions.moduleResolution: {spec_opts.get('moduleResolution')}") print(f"merged module: {merged.get('module')}") print(f"merged moduleResolution: {merged.get('moduleResolution')}") print("spec include:") for inc in spec.get("include", []): path = os.path.join(root, inc) print(f" {inc}: exists={os.path.exists(path)}, is_dir={os.path.isdir(path)}") PY printf '\ntypecheck script availability via pnpm:\n' if [ -x pnpm ]; then pnpm -C frontend/packages/configure-settings exec which tsc || true pnpm -C frontend/packages/configure-settings exec tsc --version || true else printf 'pnpm not available\n' fiRepository: thunder-id/thunderid
Length of output: 1107
Align
moduleResolutionwith the test config’s CommonJS module output.
tsconfig.spec.jsonsetsmodule: "commonjs"whiletsconfig.jsonprovidesmoduleResolution: "bundler". This spec config inherits incompatible compiler options. Either keep the module output ESM, or overridemoduleResolutionto a Node-compatible mode in this config.🤖 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 `@frontend/packages/configure-settings/tsconfig.spec.json` around lines 3 - 6, Align the compiler settings in tsconfig.spec.json by either changing its module output to ESM or overriding the inherited moduleResolution: "bundler" with a Node-compatible resolution mode. Preserve the test configuration’s intended CommonJS behavior while ensuring the module and resolution options are compatible.
@thunder/configure-verifiable-credentials packageconfigure-* packages
a3e98ec to
f3140d9
Compare
79e4c41 to
6f23e82
Compare
- Implement VerifiableCredentialsListPage for listing verifiable credentials. - Create VerifiablePresentationCreatePage for creating new verifiable presentations with a multi-step wizard. - Add VerifiablePresentationEditPage for editing existing verifiable presentations. - Introduce VerifiablePresentationsListPage for displaying a list of verifiable presentations. - Add deriveHandle utility function for generating handles from names. - Set up TypeScript configuration files for the new package. - Integrate Vitest for testing with coverage reporting. - Update pnpm lockfile to reflect changes in package structure and dependencies.
Extract two more console features into standalone workspace packages: - configure-import-export: the import/export configuration flow (upload, validate, summary, export pages), including its "welcome" first-run variant routes. - configure-design: the theme/layout builder (DesignPage, ThemeBuilderPage, LayoutBuilderPage, ThemeCreatePage, ThemeBuilder/LayoutBuilder contexts). This is a separate package from the existing @thunderid/design (which stays a shared design-system library consumed by apps/gate and five other configure-* packages) rather than a merge into it. Also relocates GatePreview (the live theme/flow preview iframe) from apps/console/src/components into configure-design, since it depends on design's PreviewToolbar/viewportConstants/ColorSchemeOptions/ElementInspector and design's LayoutBuilderPage depends on it back — a real two-way coupling that made GatePreview a natural part of this package rather than console- local. applications and flows, still console-local, now import GatePreview from configure-design instead. Both packages get a routes hook (useImportExportRoutes/useDesignRoutes) backed by RoutesProvider, replacing direct RouteConfig imports, following the same pattern as prior feature-to-package migrations.
Extract apps/console/src/features/groups into a standalone configure-groups workspace package. Adds a temporary internal copy of the three small agents pieces (useGetAgents hook, agent-query-keys, and the BasicAgent/AgentListResponse model shapes) that AddMemberDialog needs for its agent-members tab, since the agents feature hasn't been extracted into its own package yet — clearly marked for deletion once that migration lands. Also updates roles' AddAssignmentDialog (still console-local) to import useGetGroups/GroupBasic from the new package instead of reaching into the old console-local groups path.
6f23e82 to
5c7bdbf
Compare
Purpose
Extract several console app features into standalone
configure-*workspace packages, following the existing pattern set byconfigure-connections,configure-applications, etc. (feature code lives in a reusable package that Console composes, instead of being hardcoded intoapps/console).Approach
configure-verifiable-credentialsconfigure-verifiable-presentationstoconfigure-verifiable-credentials, and merged the console app'sverifiable-credentialsandverifiable-presentationsfeature folders into a singleverifiable-credentialsfeature directory, then moved that whole feature into the package.ClaimsEditor.tsx→CredentialClaimsEditor.tsx/PresentationClaimsEditor.tsx).configure-settingsconfigure-import-exportconfigure-designDesignPage,ThemeBuilderPage,LayoutBuilderPage,ThemeCreatePage,ThemeBuilder/LayoutBuildercontexts) into a new, separate package — not merged into the existing@thunderid/design, which stays a shared design-system library consumed byapps/gateand five otherconfigure-*packages.GatePreview(the live theme/flow preview iframe) fromapps/console/src/componentsintoconfigure-design, since it depends on design'sPreviewToolbar/viewportConstants/ColorSchemeOptions/ElementInspector, andLayoutBuilderPagedepends on it back — a real two-way coupling that makesGatePreviewa natural part of this package.applicationsandflows, still console-local, now importGatePreviewfromconfigure-designinstead.configure-groupsagentspieces (useGetAgentshook, its query-keys, and theBasicAgent/AgentListResponseshapes) thatAddMemberDialogneeds for its agent-members tab, sinceagentshasn't been extracted into its own package yet — marked for deletion once that migration lands.roles'AddAssignmentDialog(still console-local) to importuseGetGroups/GroupBasicfrom the new package instead of reaching into the old console-localgroupspath.Common pattern across all of the above
useDesignRoutes,useGroupRoutes) backed by@thunderid/contexts'sRoutesProvider, replacing directRouteConfigimports, so the package doesn't depend on the host app's route config module directly.App.tsxandRouteConfig.tsupdated to source each moved feature's page components and route-path types from its new package.packages/test-utils's shared i18n test setup was broadened to load every locale namespace (instead of a hand-picked subset), since each migrated package brings its own i18next namespace.Remaining features not yet migrated (
flows,applications,agents,roles,organization-unitscleanup) are blocked on a real dependency chain (flows↔applicationscycle viaGradientBorderButton,agents→applications,roles→agents+groups) and will follow in subsequent PRs/commits.Related Issues
Related PRs
Checklist
breaking changelabel added.Security checks