Skip to content

chore(IT-Wallet): [SIW-4277] Add check in status assertion saga to avoid override after playground status selection#8106

Draft
DavideOnano wants to merge 5 commits into
masterfrom
SIW-4277/fix-credential-playground-status-persist
Draft

chore(IT-Wallet): [SIW-4277] Add check in status assertion saga to avoid override after playground status selection#8106
DavideOnano wants to merge 5 commits into
masterfrom
SIW-4277/fix-credential-playground-status-persist

Conversation

@DavideOnano

@DavideOnano DavideOnano commented May 13, 2026

Copy link
Copy Markdown
Collaborator

Short description

Remove the persisted playground credential status override behavior, so mocked statuses do not survive app restart and credentials are restored to their real state.

List of changes proposed in this pull request

  • Added a playground debug cleanup saga to restore original credentials when temporary status overrides are active.
  • Prevented credentialStatusOverrides from being persisted while keeping savedCredentials available for restore.
  • Added tests for debug persistence filtering and playground credential status restore.

How to test

  1. Enable IT Wallet PRE environment.
  2. Open the IT Wallet playground status override section.
  3. Select a mocked status for a credential.
  4. Verify the selected status is reflected in the playground and wallet.
  5. Kill and reopen the app.
  6. Verify the radio selector is back to “No override”.
  7. Verify the credential status is restored to the real status.

@github-actions

github-actions Bot commented May 13, 2026

Copy link
Copy Markdown
Contributor

Jira Pull Request Link

This Pull Request refers to Jira issues:

@github-actions

Copy link
Copy Markdown
Contributor

PR Title Validation for conventional commit type

All good! PR title follows the conventional commit type.

@codecov

codecov Bot commented May 13, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 87.87%. Comparing base (37c4596) to head (448f353).
⚠️ Report is 2 commits behind head on master.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##           master    #8106       +/-   ##
===========================================
+ Coverage   62.35%   87.87%   +25.52%     
===========================================
  Files        1942        1     -1941     
  Lines       36710       33    -36677     
  Branches     6072        3     -6069     
===========================================
- Hits        22890       29    -22861     
+ Misses      12469        2    -12467     
+ Partials     1351        2     -1349     
Files with missing lines Coverage Δ
...s/features/itwallet/common/store/reducers/index.ts 87.87% <100.00%> (+0.78%) ⬆️

... and 1941 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 37c4596...448f353. Read the comment docs.

🚀 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.

@DavideOnano DavideOnano self-assigned this May 13, 2026
@DavideOnano DavideOnano changed the title chore(IT-Wallet): [SIW-4277] Add credential status overrides for PRE checks in status assertion saga chore(IT-Wallet): [SIW-4277] Add check in status assertion saga to avoid override after playground status selection May 13, 2026
@DavideOnano DavideOnano marked this pull request as ready for review May 18, 2026 10:07
@mastro993

Copy link
Copy Markdown
Contributor

I don't agree with this change, we are polluting the code with debug/testing logic. And that's exactly what we need to avoid.
Status override should be ephemeral

@DavideOnano

Copy link
Copy Markdown
Collaborator Author

I don't agree with this change, we are polluting the code with debug/testing logic. And that's exactly what we need to avoid. Status override should be ephemeral

@mastro993 I agree with you, but I couldn't find another way with the current status override implementation: it writes the modified credential through itwCredentialsStore.
I'll think about a re-work to achieve a read-only layer, if you have any suggestion let me know!

@mastro993

mastro993 commented May 27, 2026

Copy link
Copy Markdown
Contributor

I don't agree with this change, we are polluting the code with debug/testing logic. And that's exactly what we need to avoid. Status override should be ephemeral

@mastro993 I agree with you, but I couldn't find another way with the current status override implementation: it writes the modified credential through itwCredentialsStore. I'll think about a re-work to achieve a read-only layer, if you have any suggestion let me know!

IMHO an override should be just an override. If an user want valid credentials back he needs to issue them again.
We should just keep this very simple and basic.
fyi @ale-mazz

@ale-mazz

Copy link
Copy Markdown
Contributor

I don't agree with this change, we are polluting the code with debug/testing logic. And that's exactly what we need to avoid. Status override should be ephemeral

@mastro993 I agree with you, but I couldn't find another way with the current status override implementation: it writes the modified credential through itwCredentialsStore. I'll think about a re-work to achieve a read-only layer, if you have any suggestion let me know!

IMHO an override should be just an override. If an user want valid credentials back he needs to issue them again. We should just keep this very simple and basic. fyi @ale-mazz

I agree with @mastro993. That saga is a bit too much

@DavideOnano DavideOnano marked this pull request as draft May 27, 2026 12:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants