Skip to content

Create modular configure-* packages - #4706

Merged
brionmario merged 3 commits into
thunder-id:mainfrom
brionmario:move-features
Aug 10, 2026
Merged

Create modular configure-* packages#4706
brionmario merged 3 commits into
thunder-id:mainfrom
brionmario:move-features

Conversation

@brionmario

@brionmario brionmario commented Aug 8, 2026

Copy link
Copy Markdown
Member

Purpose

Extract several console app features into standalone configure-* workspace packages, following the existing pattern set by configure-connections, configure-applications, etc. (feature code lives in a reusable package that Console composes, instead of being hardcoded into apps/console).

Approach

configure-verifiable-credentials

  • Renamed configure-verifiable-presentations to configure-verifiable-credentials, and merged the console app's verifiable-credentials and verifiable-presentations feature folders into a single verifiable-credentials feature directory, then moved that whole feature into the package.
  • Resolved three real name collisions between the two merged feature folders by prefixing with domain (e.g. ClaimsEditor.tsxCredentialClaimsEditor.tsx / PresentationClaimsEditor.tsx).
  • Routes, URL segments, and i18n namespaces are unchanged — only source-file location and package identity moved.

configure-settings

  • Extracted the CORS allowed-origins management feature (zero cross-feature dependencies, moved first).

configure-import-export

  • Extracted the import/export configuration flow (upload, validate, summary, export pages), including its "welcome" first-run variant routes.

configure-design

  • Extracted the theme/layout builder (DesignPage, ThemeBuilderPage, LayoutBuilderPage, ThemeCreatePage, ThemeBuilder/LayoutBuilder contexts) into a new, separate package — not merged into the existing @thunderid/design, which stays a shared design-system library consumed by apps/gate and five other configure-* packages.
  • 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 LayoutBuilderPage depends on it back — a real two-way coupling that makes GatePreview a natural part of this package. applications and flows, still console-local, now import GatePreview from configure-design instead.

configure-groups

  • Extracted the groups feature. Includes a small, clearly-labeled temporary internal copy of the three agents pieces (useGetAgents hook, its query-keys, and the BasicAgent/AgentListResponse shapes) that AddMemberDialog needs for its agent-members tab, since agents hasn't been extracted into its own package yet — marked for deletion once that migration lands.
  • Updates roles' AddAssignmentDialog (still console-local) to import useGetGroups/GroupBasic from the new package instead of reaching into the old console-local groups path.

Common pattern across all of the above

  • Each package gets a routes hook (e.g. useDesignRoutes, useGroupRoutes) backed by @thunderid/contexts's RoutesProvider, replacing direct RouteConfig imports, so the package doesn't depend on the host app's route config module directly.
  • App.tsx and RouteConfig.ts updated 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-units cleanup) are blocked on a real dependency chain (flowsapplications cycle via GradientBorderButton, agentsapplications, rolesagents+groups) and will follow in subsequent PRs/commits.

Related Issues

Related PRs

  • N/A

Checklist

  • Followed the contribution guidelines.
  • Manual test round performed and verified.
  • Documentation provided. (Add links if there are any)
    • Ran Vale and fixed all errors and warnings
  • Tests provided. (Add links if there are any)
    • Unit Tests
    • Integration Tests
  • Breaking changes. (Fill if applicable)
    • Breaking changes section filled.
    • breaking change label added.

Security checks

  • Followed secure coding standards in WSO2 Secure Coding Guidelines
  • Confirmed that this PR doesn't commit any keys, passwords, tokens, usernames, or other secrets.

@coderabbitai

coderabbitai Bot commented Aug 8, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Important

Review skipped

Too 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 configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 71fc7751-7b0e-4e89-83c7-0ee037dd2bc9

📥 Commits

Reviewing files that changed from the base of the PR and between eccb8c2 and 5c7bdbf.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (352)
  • frontend/apps/console/package.json
  • frontend/apps/console/src/App.tsx
  • frontend/apps/console/src/__tests__/App.test.tsx
  • frontend/apps/console/src/configs/RouteConfig.ts
  • frontend/apps/console/src/features/applications/components/create-application/ConfigureDesign.tsx
  • frontend/apps/console/src/features/applications/components/create-application/ConfigureRedirectUris.tsx
  • frontend/apps/console/src/features/applications/components/edit-application/integration-guides/IntegrationGuides.tsx
  • frontend/apps/console/src/features/applications/components/edit-application/integration-guides/__tests__/IntegrationGuides.test.tsx
  • frontend/apps/console/src/features/applications/pages/ApplicationCreatePage.tsx
  • frontend/apps/console/src/features/applications/pages/__tests__/ApplicationCreatePage.test.tsx
  • frontend/apps/console/src/features/applications/utils/mergeCorsOrigins.ts
  • frontend/apps/console/src/features/design/components/themes/__tests__/TypographyBuilderContent.test.tsx
  • frontend/apps/console/src/features/flows/components/resource-property-panel/PresentationDefinitionSelect.tsx
  • frontend/apps/console/src/features/flows/components/visual-flow/SimulationStepPreview.tsx
  • frontend/apps/console/src/features/flows/components/visual-flow/__tests__/SimulationStepPreview.test.tsx
  • frontend/apps/console/src/features/flows/utils/resolveUpstreamOtpLength.ts
  • frontend/apps/console/src/features/roles/components/edit-role/assignments-settings/AddAssignmentDialog.tsx
  • frontend/apps/console/src/features/roles/components/edit-role/assignments-settings/__tests__/AddAssignmentDialog.test.tsx
  • frontend/apps/console/src/features/welcome/components/WayfinderConfigImport.tsx
  • frontend/apps/console/src/features/welcome/components/__tests__/WayfinderConfigImport.test.tsx
  • frontend/packages/configure-agent-types/src/components/edit-agent-type/schema-settings/__tests__/EditSchemaSettings.test.tsx
  • frontend/packages/configure-design/.editorconfig
  • frontend/packages/configure-design/.gitignore
  • frontend/packages/configure-design/.prettierignore
  • frontend/packages/configure-design/eslint.config.js
  • frontend/packages/configure-design/package.json
  • frontend/packages/configure-design/prettier.config.js
  • frontend/packages/configure-design/rolldown.config.js
  • frontend/packages/configure-design/src/GatePreview/ColorSchemeSync.tsx
  • frontend/packages/configure-design/src/GatePreview/GatePreview.tsx
  • frontend/packages/configure-design/src/GatePreview/IframeContent.tsx
  • frontend/packages/configure-design/src/GatePreview/PreviewThemeProvider.tsx
  • frontend/packages/configure-design/src/GatePreview/__tests__/GatePreview.test.tsx
  • frontend/packages/configure-design/src/GatePreview/__tests__/IframeContent.test.tsx
  • frontend/packages/configure-design/src/GatePreview/__tests__/richTextClickResolution.test.ts
  • frontend/packages/configure-design/src/GatePreview/mocks/__tests__/buildMfaPreviewMock.test.ts
  • frontend/packages/configure-design/src/GatePreview/mocks/__tests__/buildPreviewMock.test.ts
  • frontend/packages/configure-design/src/GatePreview/mocks/buildMfaPreviewMock.ts
  • frontend/packages/configure-design/src/GatePreview/mocks/buildPreviewMock.ts
  • frontend/packages/configure-design/src/GatePreview/richTextClickResolution.ts
  • frontend/packages/configure-design/src/components/LayoutConfigPanel.tsx
  • frontend/packages/configure-design/src/components/LayoutPreviewPanel.tsx
  • frontend/packages/configure-design/src/components/PreviewToolbar.tsx
  • frontend/packages/configure-design/src/components/ThemeConfigPanel.tsx
  • frontend/packages/configure-design/src/components/ThemePreviewPanel.tsx
  • frontend/packages/configure-design/src/components/__tests__/LayoutConfigPanel.test.tsx
  • frontend/packages/configure-design/src/components/__tests__/LayoutPreviewPanel.test.tsx
  • frontend/packages/configure-design/src/components/__tests__/ThemeConfigPanel.test.tsx
  • frontend/packages/configure-design/src/components/__tests__/viewportConstants.test.ts
  • frontend/packages/configure-design/src/components/common/AddCard.tsx
  • frontend/packages/configure-design/src/components/common/ColorEditRow.tsx
  • frontend/packages/configure-design/src/components/common/ConfigCard.tsx
  • frontend/packages/configure-design/src/components/common/ItemCard.tsx
  • frontend/packages/configure-design/src/components/common/SectionHeader.tsx
  • frontend/packages/configure-design/src/components/common/SectionLabel.tsx
  • frontend/packages/configure-design/src/components/common/SelectRow.tsx
  • frontend/packages/configure-design/src/components/common/SliderRow.tsx
  • frontend/packages/configure-design/src/components/common/SwitchRow.tsx
  • frontend/packages/configure-design/src/components/common/__tests__/AddCard.test.tsx
  • frontend/packages/configure-design/src/components/common/__tests__/ColorEditRow.test.tsx
  • frontend/packages/configure-design/src/components/common/__tests__/ConfigCard.test.tsx
  • frontend/packages/configure-design/src/components/common/__tests__/ItemCard.test.tsx
  • frontend/packages/configure-design/src/components/common/__tests__/SectionHeader.test.tsx
  • frontend/packages/configure-design/src/components/common/__tests__/SectionLabel.test.tsx
  • frontend/packages/configure-design/src/components/common/__tests__/SelectRow.test.tsx
  • frontend/packages/configure-design/src/components/common/__tests__/SliderRow.test.tsx
  • frontend/packages/configure-design/src/components/common/__tests__/SwitchRow.test.tsx
  • frontend/packages/configure-design/src/components/create-theme/ConfigureThemeColor.tsx
  • frontend/packages/configure-design/src/components/create-theme/ConfigureThemeName.tsx
  • frontend/packages/configure-design/src/components/layouts/AddScreenRow.tsx
  • frontend/packages/configure-design/src/components/layouts/CustomCSSEditor.tsx
  • frontend/packages/configure-design/src/components/layouts/EditableTitle.tsx
  • frontend/packages/configure-design/src/components/layouts/ElementInspector.tsx
  • frontend/packages/configure-design/src/components/layouts/InlineCSSField.tsx
  • frontend/packages/configure-design/src/components/layouts/LayoutPresetThumbnail.tsx
  • frontend/packages/configure-design/src/components/layouts/LayoutThumbnail.tsx
  • frontend/packages/configure-design/src/components/layouts/ScreenEditor.tsx
  • frontend/packages/configure-design/src/components/layouts/ScreenListItem.tsx
  • frontend/packages/configure-design/src/components/layouts/SlotEditor.tsx
  • frontend/packages/configure-design/src/components/layouts/StylesheetItem.tsx
  • frontend/packages/configure-design/src/components/layouts/UrlField.tsx
  • frontend/packages/configure-design/src/components/layouts/__tests__/AddScreenRow.test.tsx
  • frontend/packages/configure-design/src/components/layouts/__tests__/CustomCSSEditor.test.tsx
  • frontend/packages/configure-design/src/components/layouts/__tests__/ElementInspector.test.tsx
  • frontend/packages/configure-design/src/components/layouts/__tests__/LayoutPresetThumbnail.test.tsx
  • frontend/packages/configure-design/src/components/layouts/__tests__/LayoutThumbnail.test.tsx
  • frontend/packages/configure-design/src/components/layouts/__tests__/ScreenEditor.test.tsx
  • frontend/packages/configure-design/src/components/layouts/__tests__/ScreenListItem.test.tsx
  • frontend/packages/configure-design/src/components/layouts/__tests__/SlotEditor.test.tsx
  • frontend/packages/configure-design/src/components/themes/ColorBuilderContent.tsx
  • frontend/packages/configure-design/src/components/themes/GeneralBuilderContent.tsx
  • frontend/packages/configure-design/src/components/themes/SectionCard.tsx
  • frontend/packages/configure-design/src/components/themes/ShapeBuilderContent.tsx
  • frontend/packages/configure-design/src/components/themes/ThemeBuilderLeftPanel.tsx
  • frontend/packages/configure-design/src/components/themes/ThemeDeleteDialog.tsx
  • frontend/packages/configure-design/src/components/themes/ThemeThumbnail.tsx
  • frontend/packages/configure-design/src/components/themes/TypographyBuilderContent.tsx
  • frontend/packages/configure-design/src/components/themes/__tests__/SectionCard.test.tsx
  • frontend/packages/configure-design/src/components/themes/__tests__/ThemeDeleteDialog.test.tsx
  • frontend/packages/configure-design/src/components/themes/__tests__/ThemeThumbnail.test.tsx
  • frontend/packages/configure-design/src/components/themes/__tests__/TypographyBuilderContent.test.tsx
  • frontend/packages/configure-design/src/components/viewportConstants.ts
  • frontend/packages/configure-design/src/constants/ColorSchemeOptions.tsx
  • frontend/packages/configure-design/src/constants/__tests__/ColorSchemeOptions.test.tsx
  • frontend/packages/configure-design/src/constants/__tests__/design-ui-constants.test.ts
  • frontend/packages/configure-design/src/constants/design-ui-constants.ts
  • frontend/packages/configure-design/src/contexts/LayoutBuilder/LayoutBuilderContext.tsx
  • frontend/packages/configure-design/src/contexts/LayoutBuilder/LayoutBuilderProvider.tsx
  • frontend/packages/configure-design/src/contexts/LayoutBuilder/__tests__/LayoutBuilderProvider.test.tsx
  • frontend/packages/configure-design/src/contexts/LayoutBuilder/__tests__/useLayoutBuilder.test.tsx
  • frontend/packages/configure-design/src/contexts/LayoutBuilder/useLayoutBuilder.tsx
  • frontend/packages/configure-design/src/contexts/ThemeBuilder/ThemeBuilderContext.tsx
  • frontend/packages/configure-design/src/contexts/ThemeBuilder/ThemeBuilderProvider.tsx
  • frontend/packages/configure-design/src/contexts/ThemeBuilder/__tests__/ThemeBuilderProvider.test.tsx
  • frontend/packages/configure-design/src/contexts/ThemeBuilder/__tests__/useThemeBuilder.test.tsx
  • frontend/packages/configure-design/src/contexts/ThemeBuilder/useThemeBuilder.tsx
  • frontend/packages/configure-design/src/hooks/useDesignRoutes.ts
  • frontend/packages/configure-design/src/index.ts
  • frontend/packages/configure-design/src/models/theme-builder.ts
  • frontend/packages/configure-design/src/pages/DesignPage.tsx
  • frontend/packages/configure-design/src/pages/LayoutBuilderPage.tsx
  • frontend/packages/configure-design/src/pages/ThemeBuilderPage.tsx
  • frontend/packages/configure-design/src/pages/ThemeCreatePage.tsx
  • frontend/packages/configure-design/src/pages/__tests__/DesignPage.test.tsx
  • frontend/packages/configure-design/src/pages/__tests__/LayoutBuilderPage.test.tsx
  • frontend/packages/configure-design/src/pages/__tests__/ThemeBuilderPage.test.tsx
  • frontend/packages/configure-design/src/pages/__tests__/ThemeCreatePage.test.tsx
  • frontend/packages/configure-design/src/utils/__tests__/buildThemeFromPrimaryColor.test.ts
  • frontend/packages/configure-design/src/utils/buildThemeFromPrimaryColor.ts
  • frontend/packages/configure-design/tsconfig.eslint.json
  • frontend/packages/configure-design/tsconfig.json
  • frontend/packages/configure-design/tsconfig.lib.json
  • frontend/packages/configure-design/tsconfig.spec.json
  • frontend/packages/configure-design/types/vite-env.d.ts
  • frontend/packages/configure-design/vitest.config.ts
  • frontend/packages/configure-groups/.editorconfig
  • frontend/packages/configure-groups/.gitignore
  • frontend/packages/configure-groups/.prettierignore
  • frontend/packages/configure-groups/eslint.config.js
  • frontend/packages/configure-groups/package.json
  • frontend/packages/configure-groups/prettier.config.js
  • frontend/packages/configure-groups/rolldown.config.js
  • frontend/packages/configure-groups/src/api/__tests__/useAddGroupMembers.test.ts
  • frontend/packages/configure-groups/src/api/__tests__/useCreateGroup.test.ts
  • frontend/packages/configure-groups/src/api/__tests__/useDeleteGroup.test.ts
  • frontend/packages/configure-groups/src/api/__tests__/useGetGroup.test.ts
  • frontend/packages/configure-groups/src/api/__tests__/useGetGroupMembers.test.ts
  • frontend/packages/configure-groups/src/api/__tests__/useGetGroups.test.ts
  • frontend/packages/configure-groups/src/api/__tests__/useRemoveGroupMembers.test.ts
  • frontend/packages/configure-groups/src/api/__tests__/useUpdateGroup.test.ts
  • frontend/packages/configure-groups/src/api/useAddGroupMembers.ts
  • frontend/packages/configure-groups/src/api/useCreateGroup.ts
  • frontend/packages/configure-groups/src/api/useDeleteGroup.ts
  • frontend/packages/configure-groups/src/api/useGetGroup.ts
  • frontend/packages/configure-groups/src/api/useGetGroupMembers.ts
  • frontend/packages/configure-groups/src/api/useGetGroups.ts
  • frontend/packages/configure-groups/src/api/useRemoveGroupMembers.ts
  • frontend/packages/configure-groups/src/api/useUpdateGroup.ts
  • frontend/packages/configure-groups/src/components/GroupDeleteDialog.tsx
  • frontend/packages/configure-groups/src/components/GroupsList.tsx
  • frontend/packages/configure-groups/src/components/__tests__/AddMemberDialog.test.tsx
  • frontend/packages/configure-groups/src/components/__tests__/EditAdvancedSettings.test.tsx
  • frontend/packages/configure-groups/src/components/__tests__/EditGeneralSettings.test.tsx
  • frontend/packages/configure-groups/src/components/__tests__/EditMembersSettings.test.tsx
  • frontend/packages/configure-groups/src/components/__tests__/GroupDeleteDialog.test.tsx
  • frontend/packages/configure-groups/src/components/__tests__/GroupsList.test.tsx
  • frontend/packages/configure-groups/src/components/__tests__/ManageMembersSection.test.tsx
  • frontend/packages/configure-groups/src/components/create-group/ConfigureName.tsx
  • frontend/packages/configure-groups/src/components/create-group/__tests__/ConfigureName.test.tsx
  • frontend/packages/configure-groups/src/components/edit-group/advanced-settings/EditAdvancedSettings.tsx
  • frontend/packages/configure-groups/src/components/edit-group/general-settings/EditGeneralSettings.tsx
  • frontend/packages/configure-groups/src/components/edit-group/general-settings/QuickCopySection.tsx
  • frontend/packages/configure-groups/src/components/edit-group/members-settings/AddMemberDialog.tsx
  • frontend/packages/configure-groups/src/components/edit-group/members-settings/EditMembersSettings.tsx
  • frontend/packages/configure-groups/src/components/edit-group/members-settings/ManageMembersSection.tsx
  • frontend/packages/configure-groups/src/constants/group-query-keys.ts
  • frontend/packages/configure-groups/src/contexts/GroupCreate/GroupCreateContext.tsx
  • frontend/packages/configure-groups/src/contexts/GroupCreate/GroupCreateProvider.tsx
  • frontend/packages/configure-groups/src/contexts/GroupCreate/__tests__/GroupCreateProvider.test.tsx
  • frontend/packages/configure-groups/src/contexts/GroupCreate/useGroupCreate.ts
  • frontend/packages/configure-groups/src/hooks/useGroupRoutes.ts
  • frontend/packages/configure-groups/src/index.ts
  • frontend/packages/configure-groups/src/internal/agent-query-keys.ts
  • frontend/packages/configure-groups/src/internal/agent.ts
  • frontend/packages/configure-groups/src/internal/useGetAgents.ts
  • frontend/packages/configure-groups/src/models/group-create-flow.ts
  • frontend/packages/configure-groups/src/models/group.ts
  • frontend/packages/configure-groups/src/models/requests.ts
  • frontend/packages/configure-groups/src/pages/CreateGroupPage.tsx
  • frontend/packages/configure-groups/src/pages/GroupEditPage.tsx
  • frontend/packages/configure-groups/src/pages/GroupsListPage.tsx
  • frontend/packages/configure-groups/src/pages/__tests__/CreateGroupPage.test.tsx
  • frontend/packages/configure-groups/src/pages/__tests__/GroupEditPage.test.tsx
  • frontend/packages/configure-groups/src/pages/__tests__/GroupsListPage.test.tsx
  • frontend/packages/configure-groups/tsconfig.eslint.json
  • frontend/packages/configure-groups/tsconfig.json
  • frontend/packages/configure-groups/tsconfig.lib.json
  • frontend/packages/configure-groups/tsconfig.spec.json
  • frontend/packages/configure-groups/vitest.config.ts
  • frontend/packages/configure-import-export/.editorconfig
  • frontend/packages/configure-import-export/.gitignore
  • frontend/packages/configure-import-export/.prettierignore
  • frontend/packages/configure-import-export/eslint.config.js
  • frontend/packages/configure-import-export/package.json
  • frontend/packages/configure-import-export/prettier.config.js
  • frontend/packages/configure-import-export/rolldown.config.js
  • frontend/packages/configure-import-export/src/api/__tests__/useExportConfiguration.test.ts
  • frontend/packages/configure-import-export/src/api/__tests__/useImportConfiguration.test.ts
  • frontend/packages/configure-import-export/src/api/useExportConfiguration.ts
  • frontend/packages/configure-import-export/src/api/useImportConfiguration.ts
  • frontend/packages/configure-import-export/src/components/ConfigureExport.tsx
  • frontend/packages/configure-import-export/src/components/EnvVariablesViewer.tsx
  • frontend/packages/configure-import-export/src/components/FileContentViewer.tsx
  • frontend/packages/configure-import-export/src/components/HowProductRunInHostedIllustration.tsx
  • frontend/packages/configure-import-export/src/components/ResourceSummaryTable.tsx
  • frontend/packages/configure-import-export/src/components/TemplateVariableDisplay.tsx
  • frontend/packages/configure-import-export/src/components/__tests__/ConfigureExport.test.tsx
  • frontend/packages/configure-import-export/src/components/__tests__/EnvVariablesViewer.test.tsx
  • frontend/packages/configure-import-export/src/components/__tests__/FileContentViewer.test.tsx
  • frontend/packages/configure-import-export/src/components/__tests__/HowProductRunInHostedIllustration.test.tsx
  • frontend/packages/configure-import-export/src/components/__tests__/ResourceSummaryTable.test.tsx
  • frontend/packages/configure-import-export/src/components/__tests__/TemplateVariableDisplay.test.tsx
  • frontend/packages/configure-import-export/src/constants/file-names.ts
  • frontend/packages/configure-import-export/src/constants/import-export-query-keys.ts
  • frontend/packages/configure-import-export/src/constants/resource-types.ts
  • frontend/packages/configure-import-export/src/hooks/useImportExportRoutes.ts
  • frontend/packages/configure-import-export/src/index.ts
  • frontend/packages/configure-import-export/src/models/export-configuration.ts
  • frontend/packages/configure-import-export/src/models/import-configuration.ts
  • frontend/packages/configure-import-export/src/pages/ExportPage.tsx
  • frontend/packages/configure-import-export/src/pages/ImportConfigurationSummaryPage.tsx
  • frontend/packages/configure-import-export/src/pages/ImportConfigurationUploadPage.tsx
  • frontend/packages/configure-import-export/src/pages/ImportConfigurationValidatePage.tsx
  • frontend/packages/configure-import-export/src/pages/ImportExportPage.tsx
  • frontend/packages/configure-import-export/src/pages/__tests__/ExportPage.test.tsx
  • frontend/packages/configure-import-export/src/pages/__tests__/ImportConfigurationSummaryPage.test.tsx
  • frontend/packages/configure-import-export/src/pages/__tests__/ImportConfigurationUploadPage.test.tsx
  • frontend/packages/configure-import-export/src/pages/__tests__/ImportConfigurationValidatePage.test.tsx
  • frontend/packages/configure-import-export/src/pages/__tests__/ImportExportPage.test.tsx
  • frontend/packages/configure-import-export/src/utils/getConfigFileName.ts
  • frontend/packages/configure-import-export/src/utils/getEnvFileName.ts
  • frontend/packages/configure-import-export/tsconfig.eslint.json
  • frontend/packages/configure-import-export/tsconfig.json
  • frontend/packages/configure-import-export/tsconfig.lib.json
  • frontend/packages/configure-import-export/tsconfig.spec.json
  • frontend/packages/configure-import-export/vitest.config.ts
  • frontend/packages/configure-resource-servers/src/components/resource-tree/__tests__/AddNodeDialog.test.tsx
  • frontend/packages/configure-settings/.editorconfig
  • frontend/packages/configure-settings/.gitignore
  • frontend/packages/configure-settings/.prettierignore
  • frontend/packages/configure-settings/eslint.config.js
  • frontend/packages/configure-settings/package.json
  • frontend/packages/configure-settings/prettier.config.js
  • frontend/packages/configure-settings/rolldown.config.js
  • frontend/packages/configure-settings/src/api/__tests__/useGetCorsConfig.test.ts
  • frontend/packages/configure-settings/src/api/__tests__/useUpdateCorsConfig.test.ts
  • frontend/packages/configure-settings/src/api/useGetCorsConfig.ts
  • frontend/packages/configure-settings/src/api/useUpdateCorsConfig.ts
  • frontend/packages/configure-settings/src/components/cors/CorsSection.tsx
  • frontend/packages/configure-settings/src/components/cors/OriginRow.tsx
  • frontend/packages/configure-settings/src/components/cors/__tests__/CorsSection.test.tsx
  • frontend/packages/configure-settings/src/constants/settings-query-keys.ts
  • frontend/packages/configure-settings/src/hooks/__tests__/useAllowedOriginsDraft.test.ts
  • frontend/packages/configure-settings/src/hooks/useAllowedOriginsDraft.ts
  • frontend/packages/configure-settings/src/index.ts
  • frontend/packages/configure-settings/src/models/responses.ts
  • frontend/packages/configure-settings/src/pages/SettingsPage.tsx
  • frontend/packages/configure-settings/src/pages/__tests__/SettingsPage.test.tsx
  • frontend/packages/configure-settings/src/utils/__tests__/baselineKey.test.ts
  • frontend/packages/configure-settings/src/utils/__tests__/isStringOrigin.test.ts
  • frontend/packages/configure-settings/src/utils/__tests__/normalizedNonEmpty.test.ts
  • frontend/packages/configure-settings/src/utils/__tests__/origin.test.ts
  • frontend/packages/configure-settings/src/utils/__tests__/originValueText.test.ts
  • frontend/packages/configure-settings/src/utils/baselineKey.ts
  • frontend/packages/configure-settings/src/utils/isStringOrigin.ts
  • frontend/packages/configure-settings/src/utils/normalizedNonEmpty.ts
  • frontend/packages/configure-settings/src/utils/origin.ts
  • frontend/packages/configure-settings/src/utils/originValueText.ts
  • frontend/packages/configure-settings/tsconfig.eslint.json
  • frontend/packages/configure-settings/tsconfig.json
  • frontend/packages/configure-settings/tsconfig.lib.json
  • frontend/packages/configure-settings/tsconfig.spec.json
  • frontend/packages/configure-settings/vitest.config.ts
  • frontend/packages/configure-translations/src/components/__tests__/TranslationDeleteDialog.test.tsx
  • frontend/packages/configure-translations/src/components/create-translation/__tests__/ReviewLocaleCode.test.tsx
  • frontend/packages/configure-translations/src/components/create-translation/__tests__/SelectCountry.test.tsx
  • frontend/packages/configure-translations/src/components/create-translation/__tests__/SelectLanguage.test.tsx
  • frontend/packages/configure-translations/src/components/edit-translation/__tests__/NamespaceSelector.test.tsx
  • frontend/packages/configure-translations/src/components/edit-translation/__tests__/TranslationEditorCard.test.tsx
  • frontend/packages/configure-translations/src/components/edit-translation/__tests__/TranslationFieldsView.test.tsx
  • frontend/packages/configure-translations/src/components/edit-translation/__tests__/TranslationJsonEditor.test.tsx
  • frontend/packages/configure-translations/src/pages/__tests__/TranslationCreatePage.test.tsx
  • frontend/packages/configure-translations/src/pages/__tests__/TranslationsListPage.test.tsx
  • frontend/packages/configure-verifiable-credentials/.editorconfig
  • frontend/packages/configure-verifiable-credentials/.gitignore
  • frontend/packages/configure-verifiable-credentials/.prettierignore
  • frontend/packages/configure-verifiable-credentials/eslint.config.js
  • frontend/packages/configure-verifiable-credentials/package.json
  • frontend/packages/configure-verifiable-credentials/prettier.config.js
  • frontend/packages/configure-verifiable-credentials/rolldown.config.js
  • frontend/packages/configure-verifiable-credentials/src/api/useCreateCredentialOffer.ts
  • frontend/packages/configure-verifiable-credentials/src/api/useCreateVerifiableCredential.ts
  • frontend/packages/configure-verifiable-credentials/src/api/useCreateVerifiablePresentation.ts
  • frontend/packages/configure-verifiable-credentials/src/api/useDeleteVerifiableCredential.ts
  • frontend/packages/configure-verifiable-credentials/src/api/useDeleteVerifiablePresentation.ts
  • frontend/packages/configure-verifiable-credentials/src/api/useGetTrustAnchors.ts
  • frontend/packages/configure-verifiable-credentials/src/api/useGetVerifiableCredential.ts
  • frontend/packages/configure-verifiable-credentials/src/api/useGetVerifiableCredentials.ts
  • frontend/packages/configure-verifiable-credentials/src/api/useGetVerifiablePresentation.ts
  • frontend/packages/configure-verifiable-credentials/src/api/useGetVerifiablePresentations.ts
  • frontend/packages/configure-verifiable-credentials/src/api/useInitiateVerification.ts
  • frontend/packages/configure-verifiable-credentials/src/api/useUpdateVerifiableCredential.ts
  • frontend/packages/configure-verifiable-credentials/src/api/useUpdateVerifiablePresentation.ts
  • frontend/packages/configure-verifiable-credentials/src/api/useVerificationStatus.ts
  • frontend/packages/configure-verifiable-credentials/src/components/CredentialClaimsEditor.tsx
  • frontend/packages/configure-verifiable-credentials/src/components/CredentialOfferDialog.tsx
  • frontend/packages/configure-verifiable-credentials/src/components/PresentationClaimsEditor.tsx
  • frontend/packages/configure-verifiable-credentials/src/components/VerifiableCredentialDeleteDialog.tsx
  • frontend/packages/configure-verifiable-credentials/src/components/VerifiableCredentialForm.tsx
  • frontend/packages/configure-verifiable-credentials/src/components/VerifiableCredentialsList.tsx
  • frontend/packages/configure-verifiable-credentials/src/components/VerifiablePresentationDeleteDialog.tsx
  • frontend/packages/configure-verifiable-credentials/src/components/VerifiablePresentationForm.tsx
  • frontend/packages/configure-verifiable-credentials/src/components/VerifiablePresentationsList.tsx
  • frontend/packages/configure-verifiable-credentials/src/components/VerificationDialog.tsx
  • frontend/packages/configure-verifiable-credentials/src/components/create-verifiable-credential/ConfigureName.tsx
  • frontend/packages/configure-verifiable-credentials/src/components/create-verifiable-credential/__tests__/ConfigureName.test.tsx
  • frontend/packages/configure-verifiable-credentials/src/components/create-verifiable-presentation/ConfigureName.tsx
  • frontend/packages/configure-verifiable-credentials/src/components/create-verifiable-presentation/__tests__/ConfigureName.test.tsx
  • frontend/packages/configure-verifiable-credentials/src/constants/vc-query-keys.ts
  • frontend/packages/configure-verifiable-credentials/src/constants/vp-query-keys.ts
  • frontend/packages/configure-verifiable-credentials/src/hooks/useVerifiableCredentialRoutes.ts
  • frontend/packages/configure-verifiable-credentials/src/index.ts
  • frontend/packages/configure-verifiable-credentials/src/models/credential-claims.ts
  • frontend/packages/configure-verifiable-credentials/src/models/credential-requests.ts
  • frontend/packages/configure-verifiable-credentials/src/models/presentation-claims.ts
  • frontend/packages/configure-verifiable-credentials/src/models/presentation-requests.ts
  • frontend/packages/configure-verifiable-credentials/src/models/vc.ts
  • frontend/packages/configure-verifiable-credentials/src/models/vp.ts
  • frontend/packages/configure-verifiable-credentials/src/pages/VerifiableCredentialCreatePage.tsx
  • frontend/packages/configure-verifiable-credentials/src/pages/VerifiableCredentialEditPage.tsx
  • frontend/packages/configure-verifiable-credentials/src/pages/VerifiableCredentialsListPage.tsx
  • frontend/packages/configure-verifiable-credentials/src/pages/VerifiablePresentationCreatePage.tsx
  • frontend/packages/configure-verifiable-credentials/src/pages/VerifiablePresentationEditPage.tsx
  • frontend/packages/configure-verifiable-credentials/src/pages/VerifiablePresentationsListPage.tsx
  • frontend/packages/configure-verifiable-credentials/src/utils/deriveHandle.ts
  • frontend/packages/configure-verifiable-credentials/tsconfig.eslint.json
  • frontend/packages/configure-verifiable-credentials/tsconfig.json
  • frontend/packages/configure-verifiable-credentials/tsconfig.lib.json
  • frontend/packages/configure-verifiable-credentials/tsconfig.spec.json
  • frontend/packages/configure-verifiable-credentials/vitest.config.ts
  • frontend/packages/configure-verifiable-presentations/src/index.ts
  • frontend/packages/test-utils/src/setup.ts

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

📝 Walkthrough

Walkthrough

The console now consumes shared @thunderid/configure-settings and @thunderid/configure-verifiable-credentials packages. The packages provide settings, CORS, credential, presentation, verification, routing, build, and test support.

Changes

Frontend configuration packages

Layer / File(s) Summary
Verifiable credentials package foundation
frontend/packages/configure-verifiable-credentials/*, src/models/*, src/constants/*, src/hooks/*, src/index.ts, src/utils/*
Adds package tooling, public exports, route contracts, query keys, credential and presentation models, request types, claim conversion utilities, and deriveHandle.
Credential, presentation, and verification flows
frontend/packages/configure-verifiable-credentials/src/api/*, src/components/*, src/pages/*
Adds credential retrieval, offer, deletion, and verification flows. Updates presentation APIs, forms, dialogs, pages, and list navigation to use local contracts and shared routes.
Settings and CORS package
frontend/packages/configure-settings/*
Adds the settings package, CORS API hooks, origin validation, editable-origin state, settings page, CORS components, public exports, and package tooling.
Console integration
frontend/apps/console/package.json, frontend/apps/console/src/App.tsx, frontend/apps/console/src/configs/RouteConfig.ts, frontend/apps/console/src/features/*
Updates workspace dependencies, lazy-loaded pages, CORS imports, presentation lookup, and route type composition to use the shared packages.
Test support
frontend/packages/configure-settings/src/**/__tests__/*, frontend/packages/configure-verifiable-credentials/src/components/create-*/__tests__/*, frontend/packages/configure-translations/src/**/__tests__/*, frontend/packages/test-utils/src/setup.ts
Adds CORS and ConfigureName coverage. Translation tests now assert resolved locale strings and use shared test locale setup.

Estimated code review effort: 4 (Complex) | ~60 minutes

Possibly related PRs

Suggested reviewers: donomalvindula, jeradrutnam

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 79.17% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title clearly summarizes the main change: extracting features into modular configure-* workspace packages.
Description check ✅ Passed The description covers the purpose, approach, issue, checklist, security checks, testing status, and known migration scope.
✨ Finishing Touches 💡 1
🛠️ Fix failing CI checks 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 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

📥 Commits

Reviewing files that changed from the base of the PR and between d7796d2 and b7347aa.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (46)
  • frontend/apps/console/package.json
  • frontend/apps/console/src/App.tsx
  • frontend/apps/console/src/features/flows/components/resource-property-panel/PresentationDefinitionSelect.tsx
  • frontend/apps/console/src/features/verifiable-credentials/api/useCreateVerifiableCredential.ts
  • frontend/apps/console/src/features/verifiable-credentials/api/useCreateVerifiablePresentation.ts
  • frontend/apps/console/src/features/verifiable-credentials/api/useDeleteVerifiablePresentation.ts
  • frontend/apps/console/src/features/verifiable-credentials/api/useGetTrustAnchors.ts
  • frontend/apps/console/src/features/verifiable-credentials/api/useGetVerifiablePresentation.ts
  • frontend/apps/console/src/features/verifiable-credentials/api/useInitiateVerification.ts
  • frontend/apps/console/src/features/verifiable-credentials/api/useUpdateVerifiableCredential.ts
  • frontend/apps/console/src/features/verifiable-credentials/api/useUpdateVerifiablePresentation.ts
  • frontend/apps/console/src/features/verifiable-credentials/api/useVerificationStatus.ts
  • frontend/apps/console/src/features/verifiable-credentials/components/CredentialClaimsEditor.tsx
  • frontend/apps/console/src/features/verifiable-credentials/components/PresentationClaimsEditor.tsx
  • frontend/apps/console/src/features/verifiable-credentials/components/VerifiableCredentialForm.tsx
  • frontend/apps/console/src/features/verifiable-credentials/components/VerifiablePresentationDeleteDialog.tsx
  • frontend/apps/console/src/features/verifiable-credentials/components/VerifiablePresentationForm.tsx
  • frontend/apps/console/src/features/verifiable-credentials/components/VerifiablePresentationsList.tsx
  • frontend/apps/console/src/features/verifiable-credentials/components/VerificationDialog.tsx
  • frontend/apps/console/src/features/verifiable-credentials/components/create-verifiable-presentation/ConfigureName.tsx
  • frontend/apps/console/src/features/verifiable-credentials/components/create-verifiable-presentation/__tests__/ConfigureName.test.tsx
  • frontend/apps/console/src/features/verifiable-credentials/models/credential-claims.ts
  • frontend/apps/console/src/features/verifiable-credentials/models/credential-requests.ts
  • frontend/apps/console/src/features/verifiable-credentials/models/presentation-claims.ts
  • frontend/apps/console/src/features/verifiable-credentials/models/presentation-requests.ts
  • frontend/apps/console/src/features/verifiable-credentials/pages/VerifiableCredentialCreatePage.tsx
  • frontend/apps/console/src/features/verifiable-credentials/pages/VerifiableCredentialEditPage.tsx
  • frontend/apps/console/src/features/verifiable-credentials/pages/VerifiablePresentationCreatePage.tsx
  • frontend/apps/console/src/features/verifiable-credentials/pages/VerifiablePresentationEditPage.tsx
  • frontend/apps/console/src/features/verifiable-credentials/pages/VerifiablePresentationsListPage.tsx
  • frontend/packages/configure-verifiable-credentials/.editorconfig
  • frontend/packages/configure-verifiable-credentials/.gitignore
  • frontend/packages/configure-verifiable-credentials/.prettierignore
  • frontend/packages/configure-verifiable-credentials/eslint.config.js
  • frontend/packages/configure-verifiable-credentials/package.json
  • frontend/packages/configure-verifiable-credentials/prettier.config.js
  • frontend/packages/configure-verifiable-credentials/rolldown.config.js
  • frontend/packages/configure-verifiable-credentials/src/api/useGetVerifiablePresentations.ts
  • frontend/packages/configure-verifiable-credentials/src/constants/vp-query-keys.ts
  • frontend/packages/configure-verifiable-credentials/src/index.ts
  • frontend/packages/configure-verifiable-credentials/src/models/vp.ts
  • frontend/packages/configure-verifiable-credentials/tsconfig.eslint.json
  • frontend/packages/configure-verifiable-credentials/tsconfig.json
  • frontend/packages/configure-verifiable-credentials/tsconfig.lib.json
  • frontend/packages/configure-verifiable-credentials/tsconfig.spec.json
  • frontend/packages/configure-verifiable-credentials/vitest.config.ts

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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

📥 Commits

Reviewing files that changed from the base of the PR and between d7796d2 and b7347aa.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (46)
  • frontend/apps/console/package.json
  • frontend/apps/console/src/App.tsx
  • frontend/apps/console/src/features/flows/components/resource-property-panel/PresentationDefinitionSelect.tsx
  • frontend/apps/console/src/features/verifiable-credentials/api/useCreateVerifiableCredential.ts
  • frontend/apps/console/src/features/verifiable-credentials/api/useCreateVerifiablePresentation.ts
  • frontend/apps/console/src/features/verifiable-credentials/api/useDeleteVerifiablePresentation.ts
  • frontend/apps/console/src/features/verifiable-credentials/api/useGetTrustAnchors.ts
  • frontend/apps/console/src/features/verifiable-credentials/api/useGetVerifiablePresentation.ts
  • frontend/apps/console/src/features/verifiable-credentials/api/useInitiateVerification.ts
  • frontend/apps/console/src/features/verifiable-credentials/api/useUpdateVerifiableCredential.ts
  • frontend/apps/console/src/features/verifiable-credentials/api/useUpdateVerifiablePresentation.ts
  • frontend/apps/console/src/features/verifiable-credentials/api/useVerificationStatus.ts
  • frontend/apps/console/src/features/verifiable-credentials/components/CredentialClaimsEditor.tsx
  • frontend/apps/console/src/features/verifiable-credentials/components/PresentationClaimsEditor.tsx
  • frontend/apps/console/src/features/verifiable-credentials/components/VerifiableCredentialForm.tsx
  • frontend/apps/console/src/features/verifiable-credentials/components/VerifiablePresentationDeleteDialog.tsx
  • frontend/apps/console/src/features/verifiable-credentials/components/VerifiablePresentationForm.tsx
  • frontend/apps/console/src/features/verifiable-credentials/components/VerifiablePresentationsList.tsx
  • frontend/apps/console/src/features/verifiable-credentials/components/VerificationDialog.tsx
  • frontend/apps/console/src/features/verifiable-credentials/components/create-verifiable-presentation/ConfigureName.tsx
  • frontend/apps/console/src/features/verifiable-credentials/components/create-verifiable-presentation/__tests__/ConfigureName.test.tsx
  • frontend/apps/console/src/features/verifiable-credentials/models/credential-claims.ts
  • frontend/apps/console/src/features/verifiable-credentials/models/credential-requests.ts
  • frontend/apps/console/src/features/verifiable-credentials/models/presentation-claims.ts
  • frontend/apps/console/src/features/verifiable-credentials/models/presentation-requests.ts
  • frontend/apps/console/src/features/verifiable-credentials/pages/VerifiableCredentialCreatePage.tsx
  • frontend/apps/console/src/features/verifiable-credentials/pages/VerifiableCredentialEditPage.tsx
  • frontend/apps/console/src/features/verifiable-credentials/pages/VerifiablePresentationCreatePage.tsx
  • frontend/apps/console/src/features/verifiable-credentials/pages/VerifiablePresentationEditPage.tsx
  • frontend/apps/console/src/features/verifiable-credentials/pages/VerifiablePresentationsListPage.tsx
  • frontend/packages/configure-verifiable-credentials/.editorconfig
  • frontend/packages/configure-verifiable-credentials/.gitignore
  • frontend/packages/configure-verifiable-credentials/.prettierignore
  • frontend/packages/configure-verifiable-credentials/eslint.config.js
  • frontend/packages/configure-verifiable-credentials/package.json
  • frontend/packages/configure-verifiable-credentials/prettier.config.js
  • frontend/packages/configure-verifiable-credentials/rolldown.config.js
  • frontend/packages/configure-verifiable-credentials/src/api/useGetVerifiablePresentations.ts
  • frontend/packages/configure-verifiable-credentials/src/constants/vp-query-keys.ts
  • frontend/packages/configure-verifiable-credentials/src/index.ts
  • frontend/packages/configure-verifiable-credentials/src/models/vp.ts
  • frontend/packages/configure-verifiable-credentials/tsconfig.eslint.json
  • frontend/packages/configure-verifiable-credentials/tsconfig.json
  • frontend/packages/configure-verifiable-credentials/tsconfig.lib.json
  • frontend/packages/configure-verifiable-credentials/tsconfig.spec.json
  • frontend/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 with TextDecoder before 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/.editorconfig

Repository: thunder-id/thunderid

Length of output: 273


Make this .editorconfig a symbolic link.

frontend/packages/configure-verifiable-credentials/.editorconfig is tracked as a regular file (100644), so ../../.editorconfig is not a valid editorconfig import. Store it with mode 120000 pointing 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-credentials only has a coverage script and no test files for useGetVerifiablePresentations, VerifiablePresentationQueryKeys, or response handling. Add the existing Vitest coverage setup to vitest run so 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

@brionmario brionmario added skip-changelog Skip generating changelog for a particular PR trigger-pr-builder Add when the PR is ready for CI; starts the PR Builder for this and all later pushes labels Aug 8, 2026
@brionmario brionmario changed the title Rename configure-verifiable-presentations package and merge console VC/VP features Create a modular @thunder/configure-verifiable-credentials package Aug 8, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 5

🧹 Nitpick comments (2)
frontend/packages/configure-verifiable-credentials/src/hooks/useVerifiableCredentialRoutes.ts (1)

15-45: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Move the route types and defaults to routes/types.ts.

The hook implementation matches the package route contract. The guideline places VerifiableCredentialRoutePaths and defaultVerifiableCredentialRoutePaths in routes/types.ts, with the hook importing them. Keep useVerifiableCredentialRoutes here and re-export the type and defaults from src/index.ts unchanged, so consumers are unaffected.

As per coding guidelines: "Define route types and defaults in routes/types.ts, expose a use<Domain>Routes() hook using useRoutes, 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 win

Add focused deriveHandle tests.

deriveHandle handles 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

📥 Commits

Reviewing files that changed from the base of the PR and between b7347aa and 541d0ac.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (47)
  • frontend/apps/console/src/App.tsx
  • frontend/apps/console/src/configs/RouteConfig.ts
  • frontend/packages/configure-verifiable-credentials/package.json
  • frontend/packages/configure-verifiable-credentials/src/api/useCreateCredentialOffer.ts
  • frontend/packages/configure-verifiable-credentials/src/api/useCreateVerifiableCredential.ts
  • frontend/packages/configure-verifiable-credentials/src/api/useCreateVerifiablePresentation.ts
  • frontend/packages/configure-verifiable-credentials/src/api/useDeleteVerifiableCredential.ts
  • frontend/packages/configure-verifiable-credentials/src/api/useDeleteVerifiablePresentation.ts
  • frontend/packages/configure-verifiable-credentials/src/api/useGetTrustAnchors.ts
  • frontend/packages/configure-verifiable-credentials/src/api/useGetVerifiableCredential.ts
  • frontend/packages/configure-verifiable-credentials/src/api/useGetVerifiableCredentials.ts
  • frontend/packages/configure-verifiable-credentials/src/api/useGetVerifiablePresentation.ts
  • frontend/packages/configure-verifiable-credentials/src/api/useInitiateVerification.ts
  • frontend/packages/configure-verifiable-credentials/src/api/useUpdateVerifiableCredential.ts
  • frontend/packages/configure-verifiable-credentials/src/api/useUpdateVerifiablePresentation.ts
  • frontend/packages/configure-verifiable-credentials/src/api/useVerificationStatus.ts
  • frontend/packages/configure-verifiable-credentials/src/components/CredentialClaimsEditor.tsx
  • frontend/packages/configure-verifiable-credentials/src/components/CredentialOfferDialog.tsx
  • frontend/packages/configure-verifiable-credentials/src/components/PresentationClaimsEditor.tsx
  • frontend/packages/configure-verifiable-credentials/src/components/VerifiableCredentialDeleteDialog.tsx
  • frontend/packages/configure-verifiable-credentials/src/components/VerifiableCredentialForm.tsx
  • frontend/packages/configure-verifiable-credentials/src/components/VerifiableCredentialsList.tsx
  • frontend/packages/configure-verifiable-credentials/src/components/VerifiablePresentationDeleteDialog.tsx
  • frontend/packages/configure-verifiable-credentials/src/components/VerifiablePresentationForm.tsx
  • frontend/packages/configure-verifiable-credentials/src/components/VerifiablePresentationsList.tsx
  • frontend/packages/configure-verifiable-credentials/src/components/VerificationDialog.tsx
  • frontend/packages/configure-verifiable-credentials/src/components/create-verifiable-credential/ConfigureName.tsx
  • frontend/packages/configure-verifiable-credentials/src/components/create-verifiable-credential/__tests__/ConfigureName.test.tsx
  • frontend/packages/configure-verifiable-credentials/src/components/create-verifiable-presentation/ConfigureName.tsx
  • frontend/packages/configure-verifiable-credentials/src/components/create-verifiable-presentation/__tests__/ConfigureName.test.tsx
  • frontend/packages/configure-verifiable-credentials/src/constants/vc-query-keys.ts
  • frontend/packages/configure-verifiable-credentials/src/hooks/useVerifiableCredentialRoutes.ts
  • frontend/packages/configure-verifiable-credentials/src/index.ts
  • frontend/packages/configure-verifiable-credentials/src/models/credential-claims.ts
  • frontend/packages/configure-verifiable-credentials/src/models/credential-requests.ts
  • frontend/packages/configure-verifiable-credentials/src/models/presentation-claims.ts
  • frontend/packages/configure-verifiable-credentials/src/models/presentation-requests.ts
  • frontend/packages/configure-verifiable-credentials/src/models/vc.ts
  • frontend/packages/configure-verifiable-credentials/src/pages/VerifiableCredentialCreatePage.tsx
  • frontend/packages/configure-verifiable-credentials/src/pages/VerifiableCredentialEditPage.tsx
  • frontend/packages/configure-verifiable-credentials/src/pages/VerifiableCredentialsListPage.tsx
  • frontend/packages/configure-verifiable-credentials/src/pages/VerifiablePresentationCreatePage.tsx
  • frontend/packages/configure-verifiable-credentials/src/pages/VerifiablePresentationEditPage.tsx
  • frontend/packages/configure-verifiable-credentials/src/pages/VerifiablePresentationsListPage.tsx
  • frontend/packages/configure-verifiable-credentials/src/utils/deriveHandle.ts
  • frontend/packages/configure-verifiable-credentials/vitest.config.ts
  • frontend/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

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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 win

Move the route types and defaults to routes/types.ts.

The hook implementation matches the package route contract. The guideline places VerifiableCredentialRoutePaths and defaultVerifiableCredentialRoutePaths in routes/types.ts, with the hook importing them. Keep useVerifiableCredentialRoutes here and re-export the type and defaults from src/index.ts unchanged, so consumers are unaffected.

As per coding guidelines: "Define route types and defaults in routes/types.ts, expose a use<Domain>Routes() hook using useRoutes, 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 win

Add focused deriveHandle tests.

deriveHandle handles 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

📥 Commits

Reviewing files that changed from the base of the PR and between b7347aa and 541d0ac.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (47)
  • frontend/apps/console/src/App.tsx
  • frontend/apps/console/src/configs/RouteConfig.ts
  • frontend/packages/configure-verifiable-credentials/package.json
  • frontend/packages/configure-verifiable-credentials/src/api/useCreateCredentialOffer.ts
  • frontend/packages/configure-verifiable-credentials/src/api/useCreateVerifiableCredential.ts
  • frontend/packages/configure-verifiable-credentials/src/api/useCreateVerifiablePresentation.ts
  • frontend/packages/configure-verifiable-credentials/src/api/useDeleteVerifiableCredential.ts
  • frontend/packages/configure-verifiable-credentials/src/api/useDeleteVerifiablePresentation.ts
  • frontend/packages/configure-verifiable-credentials/src/api/useGetTrustAnchors.ts
  • frontend/packages/configure-verifiable-credentials/src/api/useGetVerifiableCredential.ts
  • frontend/packages/configure-verifiable-credentials/src/api/useGetVerifiableCredentials.ts
  • frontend/packages/configure-verifiable-credentials/src/api/useGetVerifiablePresentation.ts
  • frontend/packages/configure-verifiable-credentials/src/api/useInitiateVerification.ts
  • frontend/packages/configure-verifiable-credentials/src/api/useUpdateVerifiableCredential.ts
  • frontend/packages/configure-verifiable-credentials/src/api/useUpdateVerifiablePresentation.ts
  • frontend/packages/configure-verifiable-credentials/src/api/useVerificationStatus.ts
  • frontend/packages/configure-verifiable-credentials/src/components/CredentialClaimsEditor.tsx
  • frontend/packages/configure-verifiable-credentials/src/components/CredentialOfferDialog.tsx
  • frontend/packages/configure-verifiable-credentials/src/components/PresentationClaimsEditor.tsx
  • frontend/packages/configure-verifiable-credentials/src/components/VerifiableCredentialDeleteDialog.tsx
  • frontend/packages/configure-verifiable-credentials/src/components/VerifiableCredentialForm.tsx
  • frontend/packages/configure-verifiable-credentials/src/components/VerifiableCredentialsList.tsx
  • frontend/packages/configure-verifiable-credentials/src/components/VerifiablePresentationDeleteDialog.tsx
  • frontend/packages/configure-verifiable-credentials/src/components/VerifiablePresentationForm.tsx
  • frontend/packages/configure-verifiable-credentials/src/components/VerifiablePresentationsList.tsx
  • frontend/packages/configure-verifiable-credentials/src/components/VerificationDialog.tsx
  • frontend/packages/configure-verifiable-credentials/src/components/create-verifiable-credential/ConfigureName.tsx
  • frontend/packages/configure-verifiable-credentials/src/components/create-verifiable-credential/__tests__/ConfigureName.test.tsx
  • frontend/packages/configure-verifiable-credentials/src/components/create-verifiable-presentation/ConfigureName.tsx
  • frontend/packages/configure-verifiable-credentials/src/components/create-verifiable-presentation/__tests__/ConfigureName.test.tsx
  • frontend/packages/configure-verifiable-credentials/src/constants/vc-query-keys.ts
  • frontend/packages/configure-verifiable-credentials/src/hooks/useVerifiableCredentialRoutes.ts
  • frontend/packages/configure-verifiable-credentials/src/index.ts
  • frontend/packages/configure-verifiable-credentials/src/models/credential-claims.ts
  • frontend/packages/configure-verifiable-credentials/src/models/credential-requests.ts
  • frontend/packages/configure-verifiable-credentials/src/models/presentation-claims.ts
  • frontend/packages/configure-verifiable-credentials/src/models/presentation-requests.ts
  • frontend/packages/configure-verifiable-credentials/src/models/vc.ts
  • frontend/packages/configure-verifiable-credentials/src/pages/VerifiableCredentialCreatePage.tsx
  • frontend/packages/configure-verifiable-credentials/src/pages/VerifiableCredentialEditPage.tsx
  • frontend/packages/configure-verifiable-credentials/src/pages/VerifiableCredentialsListPage.tsx
  • frontend/packages/configure-verifiable-credentials/src/pages/VerifiablePresentationCreatePage.tsx
  • frontend/packages/configure-verifiable-credentials/src/pages/VerifiablePresentationEditPage.tsx
  • frontend/packages/configure-verifiable-credentials/src/pages/VerifiablePresentationsListPage.tsx
  • frontend/packages/configure-verifiable-credentials/src/utils/deriveHandle.ts
  • frontend/packages/configure-verifiable-credentials/vitest.config.ts
  • frontend/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.

id comes from the route. An ID containing /, ?, or # changes the request URL and can fetch the wrong endpoint. Use encodeURIComponent(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:


🏁 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" || true

Repository: 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 with handleCopy(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"
fi

Repository: thunder-id/thunderid

Length of output: 6292


Add fallback strings to every t() call in CredentialOfferDialog.tsx.

The remaining fallbacks are still missing for offer.title, offer.openInWallet, common:actions.copied, offer.copy, and common:actions.close. Supply a positional fallback or defaultValue for 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 call t() with bare keys and no fallback, so a missing catalog entry renders the raw key in the UI. The guideline requires a fallback on every t() call.

  • frontend/packages/configure-verifiable-credentials/src/components/VerifiableCredentialDeleteDialog.tsx#L62-L79: add fallbacks to delete.title, delete.message, delete.disclaimer, common:actions.cancel, common:status.deleting, and common:actions.delete.
  • frontend/packages/configure-verifiable-credentials/src/components/VerifiablePresentationDeleteDialog.tsx#L63-L80: add fallbacks to the same six keys in the verifiable-presentations namespace.
  • frontend/packages/configure-verifiable-credentials/src/components/VerificationDialog.tsx#L123-L209: add fallbacks to verify.title, verify.scanHint, verify.openInWallet, verify.copy, common:actions.copied, verify.waiting, verify.expired, verify.completed, verify.keyBindingVerified, and verify.claimsTitle.
  • frontend/packages/configure-verifiable-credentials/src/api/useDeleteVerifiableCredential.ts#L33-L33: add a fallback to t('delete.success').

As per coding guidelines: "Every t() call must provide a fallback default string, either as the positional fallback argument or as defaultValue in 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-L80
  • frontend/packages/configure-verifiable-credentials/src/components/VerificationDialog.tsx#L123-L209
  • frontend/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.

atob returns 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 with TextDecoder.

String(vc[key]) also produces [object Object] when a claim value is an object or array. Serialize non-primitive values with JSON.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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 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 win

Enforce 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, and lines under coverage.thresholds so test:coverage enforces 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

📥 Commits

Reviewing files that changed from the base of the PR and between 541d0ac and 97dc140.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (52)
  • frontend/apps/console/package.json
  • frontend/apps/console/src/App.tsx
  • frontend/apps/console/src/features/applications/components/create-application/ConfigureRedirectUris.tsx
  • frontend/apps/console/src/features/applications/pages/ApplicationCreatePage.tsx
  • frontend/apps/console/src/features/applications/utils/mergeCorsOrigins.ts
  • frontend/packages/configure-settings/.editorconfig
  • frontend/packages/configure-settings/.gitignore
  • frontend/packages/configure-settings/.prettierignore
  • frontend/packages/configure-settings/eslint.config.js
  • frontend/packages/configure-settings/package.json
  • frontend/packages/configure-settings/prettier.config.js
  • frontend/packages/configure-settings/rolldown.config.js
  • frontend/packages/configure-settings/src/api/__tests__/useGetCorsConfig.test.ts
  • frontend/packages/configure-settings/src/api/__tests__/useUpdateCorsConfig.test.ts
  • frontend/packages/configure-settings/src/api/useGetCorsConfig.ts
  • frontend/packages/configure-settings/src/api/useUpdateCorsConfig.ts
  • frontend/packages/configure-settings/src/components/cors/CorsSection.tsx
  • frontend/packages/configure-settings/src/components/cors/OriginRow.tsx
  • frontend/packages/configure-settings/src/components/cors/__tests__/CorsSection.test.tsx
  • frontend/packages/configure-settings/src/constants/settings-query-keys.ts
  • frontend/packages/configure-settings/src/hooks/__tests__/useAllowedOriginsDraft.test.ts
  • frontend/packages/configure-settings/src/hooks/useAllowedOriginsDraft.ts
  • frontend/packages/configure-settings/src/index.ts
  • frontend/packages/configure-settings/src/models/responses.ts
  • frontend/packages/configure-settings/src/pages/SettingsPage.tsx
  • frontend/packages/configure-settings/src/pages/__tests__/SettingsPage.test.tsx
  • frontend/packages/configure-settings/src/utils/__tests__/baselineKey.test.ts
  • frontend/packages/configure-settings/src/utils/__tests__/isStringOrigin.test.ts
  • frontend/packages/configure-settings/src/utils/__tests__/normalizedNonEmpty.test.ts
  • frontend/packages/configure-settings/src/utils/__tests__/origin.test.ts
  • frontend/packages/configure-settings/src/utils/__tests__/originValueText.test.ts
  • frontend/packages/configure-settings/src/utils/baselineKey.ts
  • frontend/packages/configure-settings/src/utils/isStringOrigin.ts
  • frontend/packages/configure-settings/src/utils/normalizedNonEmpty.ts
  • frontend/packages/configure-settings/src/utils/origin.ts
  • frontend/packages/configure-settings/src/utils/originValueText.ts
  • frontend/packages/configure-settings/tsconfig.eslint.json
  • frontend/packages/configure-settings/tsconfig.json
  • frontend/packages/configure-settings/tsconfig.lib.json
  • frontend/packages/configure-settings/tsconfig.spec.json
  • frontend/packages/configure-settings/vitest.config.ts
  • frontend/packages/configure-translations/src/components/__tests__/TranslationDeleteDialog.test.tsx
  • frontend/packages/configure-translations/src/components/create-translation/__tests__/ReviewLocaleCode.test.tsx
  • frontend/packages/configure-translations/src/components/create-translation/__tests__/SelectCountry.test.tsx
  • frontend/packages/configure-translations/src/components/create-translation/__tests__/SelectLanguage.test.tsx
  • frontend/packages/configure-translations/src/components/edit-translation/__tests__/NamespaceSelector.test.tsx
  • frontend/packages/configure-translations/src/components/edit-translation/__tests__/TranslationEditorCard.test.tsx
  • frontend/packages/configure-translations/src/components/edit-translation/__tests__/TranslationFieldsView.test.tsx
  • frontend/packages/configure-translations/src/components/edit-translation/__tests__/TranslationJsonEditor.test.tsx
  • frontend/packages/configure-translations/src/pages/__tests__/TranslationCreatePage.test.tsx
  • frontend/packages/configure-translations/src/pages/__tests__/TranslationsListPage.test.tsx
  • frontend/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();

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

📐 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

Comment on lines +38 to +50
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();

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

📐 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-L52
  • frontend/packages/configure-translations/src/components/create-translation/__tests__/SelectCountry.test.tsx#L41-L54
  • frontend/packages/configure-translations/src/components/create-translation/__tests__/SelectLanguage.test.tsx#L44-L59
  • frontend/packages/configure-translations/src/components/edit-translation/__tests__/NamespaceSelector.test.tsx#L32-L38
  • frontend/packages/configure-translations/src/components/edit-translation/__tests__/TranslationEditorCard.test.tsx#L50-L129
  • frontend/packages/configure-translations/src/components/edit-translation/__tests__/TranslationFieldsView.test.tsx#L55-L248
  • frontend/packages/configure-translations/src/components/edit-translation/__tests__/TranslationJsonEditor.test.tsx#L76-L164
  • frontend/packages/configure-translations/src/pages/__tests__/TranslationCreatePage.test.tsx#L126-L126
  • frontend/packages/configure-translations/src/pages/__tests__/TranslationCreatePage.test.tsx#L633-L633
  • frontend/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

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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 win

Enforce 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, and lines under coverage.thresholds so test:coverage enforces 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

📥 Commits

Reviewing files that changed from the base of the PR and between 541d0ac and 97dc140.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (52)
  • frontend/apps/console/package.json
  • frontend/apps/console/src/App.tsx
  • frontend/apps/console/src/features/applications/components/create-application/ConfigureRedirectUris.tsx
  • frontend/apps/console/src/features/applications/pages/ApplicationCreatePage.tsx
  • frontend/apps/console/src/features/applications/utils/mergeCorsOrigins.ts
  • frontend/packages/configure-settings/.editorconfig
  • frontend/packages/configure-settings/.gitignore
  • frontend/packages/configure-settings/.prettierignore
  • frontend/packages/configure-settings/eslint.config.js
  • frontend/packages/configure-settings/package.json
  • frontend/packages/configure-settings/prettier.config.js
  • frontend/packages/configure-settings/rolldown.config.js
  • frontend/packages/configure-settings/src/api/__tests__/useGetCorsConfig.test.ts
  • frontend/packages/configure-settings/src/api/__tests__/useUpdateCorsConfig.test.ts
  • frontend/packages/configure-settings/src/api/useGetCorsConfig.ts
  • frontend/packages/configure-settings/src/api/useUpdateCorsConfig.ts
  • frontend/packages/configure-settings/src/components/cors/CorsSection.tsx
  • frontend/packages/configure-settings/src/components/cors/OriginRow.tsx
  • frontend/packages/configure-settings/src/components/cors/__tests__/CorsSection.test.tsx
  • frontend/packages/configure-settings/src/constants/settings-query-keys.ts
  • frontend/packages/configure-settings/src/hooks/__tests__/useAllowedOriginsDraft.test.ts
  • frontend/packages/configure-settings/src/hooks/useAllowedOriginsDraft.ts
  • frontend/packages/configure-settings/src/index.ts
  • frontend/packages/configure-settings/src/models/responses.ts
  • frontend/packages/configure-settings/src/pages/SettingsPage.tsx
  • frontend/packages/configure-settings/src/pages/__tests__/SettingsPage.test.tsx
  • frontend/packages/configure-settings/src/utils/__tests__/baselineKey.test.ts
  • frontend/packages/configure-settings/src/utils/__tests__/isStringOrigin.test.ts
  • frontend/packages/configure-settings/src/utils/__tests__/normalizedNonEmpty.test.ts
  • frontend/packages/configure-settings/src/utils/__tests__/origin.test.ts
  • frontend/packages/configure-settings/src/utils/__tests__/originValueText.test.ts
  • frontend/packages/configure-settings/src/utils/baselineKey.ts
  • frontend/packages/configure-settings/src/utils/isStringOrigin.ts
  • frontend/packages/configure-settings/src/utils/normalizedNonEmpty.ts
  • frontend/packages/configure-settings/src/utils/origin.ts
  • frontend/packages/configure-settings/src/utils/originValueText.ts
  • frontend/packages/configure-settings/tsconfig.eslint.json
  • frontend/packages/configure-settings/tsconfig.json
  • frontend/packages/configure-settings/tsconfig.lib.json
  • frontend/packages/configure-settings/tsconfig.spec.json
  • frontend/packages/configure-settings/vitest.config.ts
  • frontend/packages/configure-translations/src/components/__tests__/TranslationDeleteDialog.test.tsx
  • frontend/packages/configure-translations/src/components/create-translation/__tests__/ReviewLocaleCode.test.tsx
  • frontend/packages/configure-translations/src/components/create-translation/__tests__/SelectCountry.test.tsx
  • frontend/packages/configure-translations/src/components/create-translation/__tests__/SelectLanguage.test.tsx
  • frontend/packages/configure-translations/src/components/edit-translation/__tests__/NamespaceSelector.test.tsx
  • frontend/packages/configure-translations/src/components/edit-translation/__tests__/TranslationEditorCard.test.tsx
  • frontend/packages/configure-translations/src/components/edit-translation/__tests__/TranslationFieldsView.test.tsx
  • frontend/packages/configure-translations/src/components/edit-translation/__tests__/TranslationJsonEditor.test.tsx
  • frontend/packages/configure-translations/src/pages/__tests__/TranslationCreatePage.test.tsx
  • frontend/packages/configure-translations/src/pages/__tests__/TranslationsListPage.test.tsx
  • frontend/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 through defaultValue.

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 through tForErrors.

  • 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: Ensure tForErrors always 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-L50
  • frontend/packages/configure-settings/src/components/cors/CorsSection.tsx#L111-L112
  • frontend/packages/configure-settings/src/components/cors/CorsSection.tsx#L136-L147
  • frontend/packages/configure-settings/src/components/cors/CorsSection.tsx#L158-L166
  • frontend/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"
done

Repository: 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*.json

Repository: 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:


🏁 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; fi

Repository: 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'
fi

Repository: thunder-id/thunderid

Length of output: 574


Enable composite mode for the referenced TypeScript projects.

tsconfig.lib.json and tsconfig.spec.json are added as project references but do not set compilerOptions.composite. A referenced project may only enable composite mode if the effective compiler option is true; tsconfig.lib.json sets declaration: true, but tsconfig.spec.json inherits declaration: false from the root config and would fail to build with composite: true. Add composite: true directly in both referenced configs, and override declaration to true in 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.json

Repository: 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 || true

Repository: 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'
fi

Repository: thunder-id/thunderid

Length of output: 1107


Align moduleResolution with the test config’s CommonJS module output.

tsconfig.spec.json sets module: "commonjs" while tsconfig.json provides moduleResolution: "bundler". This spec config inherits incompatible compiler options. Either keep the module output ESM, or override moduleResolution to 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.

@brionmario brionmario changed the title Create a modular @thunder/configure-verifiable-credentials package Create modular configure-* packages Aug 9, 2026
@brionmario
brionmario force-pushed the move-features branch 4 times, most recently from a3e98ec to f3140d9 Compare August 9, 2026 19:07
@brionmario
brionmario enabled auto-merge August 9, 2026 19:16
@brionmario
brionmario force-pushed the move-features branch 3 times, most recently from 79e4c41 to 6f23e82 Compare August 9, 2026 20:24
- 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.
@brionmario
brionmario enabled auto-merge August 10, 2026 05:10
@brionmario
brionmario added this pull request to the merge queue Aug 10, 2026
Merged via the queue into thunder-id:main with commit 628754e Aug 10, 2026
26 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip-changelog Skip generating changelog for a particular PR trigger-pr-builder Add when the PR is ready for CI; starts the PR Builder for this and all later pushes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants