Skip to content

Decouple credential card views from OCA and migrate OpenID cards#1881

Draft
MosCD3 wants to merge 5 commits into
openwallet-foundation:mainfrom
MosCD3:moscd3/cleanup-code-batch-1
Draft

Decouple credential card views from OCA and migrate OpenID cards#1881
MosCD3 wants to merge 5 commits into
openwallet-foundation:mainfrom
MosCD3:moscd3/cleanup-code-batch-1

Conversation

@MosCD3

@MosCD3 MosCD3 commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

Summary of Changes

  • Remove unused legacy card components, duplicate card types, and their orphaned tests.
    • Introduce an OCA-free WalletCredentialCardViewModel contract for pure credential card views.
    • Migrate Card10Pure, Card11Pure, and their attribute components to consume only local view-model data.
    • Add an OCA-free card style hook for pure card rendering.
    • Keep the existing DidComm/OCA mapper working through a transitional adapter that maps legacy card data to the new view model.
    • Add an OpenID-specific card mapper that derives labels, field order, branding, images, and revoked status from OpenID display metadata.
    • Migrate OpenID credential offer and details card headers to the shared card presenter.
    • Preserve the historical layout rule:
      • OCA Branding01 → card10
      • OCA Branding10 / Branding11 → card11
      • OpenID → card11

Testing Instructions

Replace this text with detailed instructions on how to test the changes included in this PR.

Acceptance Criteria

Replace this text with the acceptance criteria that must be met for this PR to be approved.

Screenshots, videos, or gifs

Replace this text with embedded media for UI changes if they are included in this PR. If there are none, simply enter N/A

Breaking change guide

Replace this text with any breaking changes included in this PR along with how to address them in downstream projects. If there are none, simply enter N/A

Related Issues

Replace this text with issue #'s that are relevant to this PR. If there are none, simply enter N/A

Pull Request Checklist

Tick all boxes below to demonstrate that you have completed the respective task. If the item does not apply to your this PR check it anyway to make it apparent that there's nothing to do.

  • All commits contain a DCO Signed-off-by line (we use the DCO GitHub app to enforce this)
  • If applicable, screenshots, gifs, or video are included for UI changes
  • If applicable, breaking changes are described above along with how to address them
  • If applicable, added changeset(s)
  • Added sufficient tests so that overall code coverage is not reduced

If you have any questions to any of the points above, just submit and ask! This checklist is here to help you, not to deter you from contributing!

Pro Tip 🤓

  • Read our contribution guide at least once; it will save you a few review cycles!
  • Your PR will likely not be reviewed until all the above boxes are checked and all automated checks have passed

MosCD3 added 4 commits July 14, 2026 13:58
Signed-off-by: Mostafa Gamal <moscd3@gmail.com>
Signed-off-by: Mostafa Gamal <moscd3@gmail.com>
Signed-off-by: Mostafa Gamal <moscd3@gmail.com>
Signed-off-by: Mostafa Gamal <moscd3@gmail.com>
@changeset-bot

changeset-bot Bot commented Jul 14, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 69b80d8

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@codecov-commenter

codecov-commenter commented Jul 14, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 64.83516% with 32 lines in your changes missing coverage. Please review.
✅ Project coverage is 59.62%. Comparing base (7ebd3cd) to head (69b80d8).
⚠️ Report is 3 commits behind head on main.

Files with missing lines Patch % Lines
packages/core/src/components/misc/Card10Pure.tsx 10.00% 9 Missing ⚠️
...modules/openid/screens/OpenIDCredentialDetails.tsx 0.00% 6 Missing ⚠️
packages/core/src/components/misc/Card11Pure.tsx 44.44% 5 Missing ⚠️
...c/modules/openid/screens/OpenIDCredentialOffer.tsx 0.00% 4 Missing ⚠️
...es/openid/mappers/openid-credential-card-mapper.ts 88.46% 3 Missing ⚠️
...ges/core/src/components/misc/CredentialCardGen.tsx 60.00% 2 Missing ⚠️
packages/core/src/wallet/use-card-view-styles.ts 90.90% 2 Missing ⚠️
packages/core/src/wallet/CardPresenter.tsx 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1881      +/-   ##
==========================================
+ Coverage   59.28%   59.62%   +0.33%     
==========================================
  Files         346      347       +1     
  Lines       12225    12214      -11     
  Branches     3477     3319     -158     
==========================================
+ Hits         7248     7283      +35     
+ Misses       4895     4874      -21     
+ Partials       82       57      -25     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Signed-off-by: Mostafa Gamal <moscd3@gmail.com>
@sonarqubecloud

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
3.6% Duplication on New Code (required ≤ 3%)

See analysis details on SonarQube Cloud

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants