Skip to content

Show Car claims on claim card and history (RND-1677)#2930

Merged
hugokallstrom merged 36 commits intodevelopfrom
feat/show-car-claims
May 7, 2026
Merged

Show Car claims on claim card and history (RND-1677)#2930
hugokallstrom merged 36 commits intodevelopfrom
feat/show-car-claims

Conversation

@hugokallstrom
Copy link
Copy Markdown
Contributor

Summary

  • Add PartnerClaim GraphQL type support and fetch partner claims alongside regular claims
  • Partner claims appear mixed in the same horizontal pager on the home screen, sorted by submission date
  • Partner claims appear in claim history list with "Closed" label
  • New simplified partner claim details screen (status card, display items, T&C documents — no chat/files/audio)
  • Extract shared composables (DisplayItemsSection, ExplanationBottomSheet, TermsConditionsCard) from feature-claim-details to ui-claim-status for reuse

Context

Test plan

  • Verify partner claims show up on home screen alongside regular claims
  • Verify tapping a partner claim card navigates to the simplified details screen
  • Verify partner claims appear in claim history (Profile → Claim history)
  • Verify tapping a partner claim in history navigates to the details screen
  • Verify regular claims still work as before (no regressions)
  • Verify the details screen shows status card, display items, and T&C document

🤖 Generated with Claude Code

@hugokallstrom hugokallstrom requested a review from a team as a code owner April 23, 2026 10:49
@notion-workspace
Copy link
Copy Markdown

hugokallstrom and others added 15 commits April 23, 2026 12:52
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Extends the Home query to include partnerClaimsActive, merges them with
regular claims sorted by date, and threads partnerClaimIds through
ClaimStatusCardsData so the UI can dispatch to the correct details screen.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Adds onPartnerClaimDetailCardClicked parameter throughout the home
composable stack (HomeGraph → HomeDestination → HomeScreen →
HomeScreenSuccess), routing partner claim card taps to a separate
details screen based on partnerClaimIds from ClaimStatusCardsData.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Extends the claim history screen to include partner claims alongside regular claims, sorted by submission date. Partner claims dispatch to a separate navigation target on click.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Use IconButton with wrapContentSize(CenterEnd) and Column padding,
matching the established pattern from the regular claim details screen.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@hugokallstrom hugokallstrom changed the title Show partner car claims (Eir) on home screen and claim history (RND-1677) Show Car claims on claim card and history (RND-1677) Apr 23, 2026
hugokallstrom and others added 11 commits April 23, 2026 14:09
The claims/claimsActive fields are mutually exclusive via @skip/@include
directives, but `?:` treats an empty list as non-null, picking it over
the populated field. Use `.orEmpty()` concatenation instead.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…etail

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…rough ViewModel

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…lbacks

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
hugokallstrom and others added 4 commits April 27, 2026 11:11
…details

Since partner claims and regular claims share the same feature module,
there's no need to extract these components to ui-claim-status.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…to reduce diff noise

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@hugokallstrom hugokallstrom marked this pull request as draft April 27, 2026 12:42
@hugokallstrom hugokallstrom marked this pull request as ready for review April 28, 2026 07:53
*/
@SerialName("claimId")
val claimId: String,
val isPartnerClaim: Boolean = false,
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.

Could it happen that if we deeplink to here with id for car claim, we'll hit error screen due to this being default false?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Removed this

ClaimStatus.REOPENED -> ClaimDetailUiState.Content.ClaimStatus.REOPENED
ClaimStatus.UNKNOWN__, null -> ClaimDetailUiState.Content.ClaimStatus.UNKNOWN
},
claimOutcome = ClaimDetailUiState.Content.ClaimOutcome.UNKNOWN,
Copy link
Copy Markdown
Contributor

@panasetskaya panasetskaya May 4, 2026

Choose a reason for hiding this comment

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

I remember there being some problems with having the outcome here from the BE, right? So we can't really have status "Paid" and payout can only be mentioned in the details?

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.

no "10000 kr", "Paid" pill on the card, I mean

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Correct, we dont get outcome from EIR.

ClaimHistory(
id = history.id,
claimType = history.claimType,
submittedAt = history.submittedAt?.atStartOfDayIn(TimeZone.UTC) ?: Clock.System.now(),
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.

should it be nullable, the submittedAt?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Fixed!

@Immutable
data class ClaimStatusCardsData(
val claimStatusCardsUiState: NonEmptyList<ClaimStatusCardUiState>,
val partnerClaimIds: Set<String> = emptySet(),
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.

could we have maybe isPartnerClaim boolean property inside ClaimStatusCardUiState instead of partnerClaimIds here?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Fixed!

Copy link
Copy Markdown
Contributor

@panasetskaya panasetskaya left a comment

Choose a reason for hiding this comment

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

left a couple of comments

hugokallstrom and others added 5 commits May 7, 2026 10:15
- Drop isPartnerClaim from claim detail navigation; use case now queries
  regular claims first and falls back to partner on NoClaimFound, so
  deep-linked partner claim IDs no longer hit the error screen.
- Make submittedAt/submittedDate nullable through ClaimHistory and
  ClaimStatusCardUiState; sort with nullsLast and hide the subtitle when
  the BE does not return a submission date instead of substituting "now".
- Drop partnerClaimIds from HomeData since the click handler no longer
  needs the discriminator.
- Show iOS-style copyable Reference number / Email rows on the partner
  claim detail screen and the partner support paragraph above the
  details for active partner claims.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…Case

Replace the nested while loop and shared mutable flags with a linear
flow: first iteration runs the regular endpoint and falls back to
partner on NoClaimFound, then a clean polling loop calls whichever
endpoint matched.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Per Mariia's review: make the partner-vs-regular distinction explicit on
the card UI state instead of leaving it implicit in pill types and
nullable display fields. No consumer branches on it today, but it makes
the model honest about a card knowing what kind of claim it represents.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@hugokallstrom hugokallstrom requested a review from panasetskaya May 7, 2026 09:02
# Conflicts:
#	app/apollo/apollo-octopus-public/src/commonMain/graphql/com/hedvig/android/apollo/octopus/schema.graphqls
#	app/core/core-resources/src/androidMain/res/values-sv-rSE/strings.xml
#	app/core/core-resources/src/androidMain/res/values/strings.xml
#	app/core/core-resources/src/commonMain/composeResources/values-sv-rSE/strings.xml
#	app/core/core-resources/src/commonMain/composeResources/values/strings.xml
@hugokallstrom hugokallstrom enabled auto-merge (squash) May 7, 2026 09:09
Copy link
Copy Markdown
Contributor

@panasetskaya panasetskaya left a comment

Choose a reason for hiding this comment

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

Looks great!

@hugokallstrom hugokallstrom merged commit e7eb78e into develop May 7, 2026
4 checks passed
@hugokallstrom hugokallstrom deleted the feat/show-car-claims branch May 7, 2026 11:17
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