Skip to content

chore: Rename Reason to Cause and add ReLogin issue dismissal#150

Merged
LouisCAD merged 7 commits intomainfrom
rename-reason-to-cause-and-add-relogin-issue-dismissal
Apr 30, 2026
Merged

chore: Rename Reason to Cause and add ReLogin issue dismissal#150
LouisCAD merged 7 commits intomainfrom
rename-reason-to-cause-and-add-relogin-issue-dismissal

Conversation

@LouisCAD
Copy link
Copy Markdown
Contributor

No description provided.

Copilot AI review requested due to automatic review settings April 30, 2026 08:47
@sonarqubecloud
Copy link
Copy Markdown

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the library’s issue/error modeling by renaming Issue.Retriable.Reason to Cause, and extends the ReLogin migration flow to allow dismissing the last displayed issue while still waiting for credentials.

Changes:

  • Renamed Issue.Retriable.Reason to Issue.Retriable.Cause and updated call sites.
  • Added a dismissable ReLogin issue model (ReLogin.DismissableIssue) and integrated dismissal handling during credential entry.
  • Updated NetworkException to carry an underlying cause, and adjusted ApiClientProvider accordingly.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
multiplatform-lib/src/commonMain/kotlin/network/exceptions/NetworkException.kt Changes NetworkException constructor to include a cause.
multiplatform-lib/src/commonMain/kotlin/internal/network/ApiClientProvider.kt Passes underlying IOException as NetworkException cause; uses named args for UnexpectedApiErrorFormatException.
multiplatform-lib/src/commonMain/kotlin/internal/AuthenticatorFacadeImpl.kt Implements ReLogin issue dismissal while awaiting credentials; updates issue mapping to Cause.
multiplatform-lib/src/commonMain/kotlin/Issue.kt Renames Retriable.Reason to Retriable.Cause.
multiplatform-lib/src/commonMain/kotlin/Account.kt Introduces ReLogin.DismissableIssue and renames LoginFailed(cause) to LoginFailed(issue).
app/src/main/kotlin/com/infomaniak/auth/ui/screen/accountdetails/ActionRequiredCard.kt Updates UI handling for LoginFailed(issue) and Issue.Retriable.Cause.
app/src/main/kotlin/com/infomaniak/auth/ui/previewparameter/AccountPreviewParameter.kt Updates preview data to the new ReLogin issue model and Cause.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@LouisCAD LouisCAD merged commit 1c12d23 into main Apr 30, 2026
13 checks passed
@LouisCAD LouisCAD deleted the rename-reason-to-cause-and-add-relogin-issue-dismissal branch April 30, 2026 08:57
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.

3 participants