Skip to content

Handle nullable upload URI (RND-1677)#2931

Closed
hugokallstrom wants to merge 2 commits intodevelopfrom
eng/handle-nullable-upload-uri-rnd-1677
Closed

Handle nullable upload URI (RND-1677)#2931
hugokallstrom wants to merge 2 commits intodevelopfrom
eng/handle-nullable-upload-uri-rnd-1677

Conversation

@hugokallstrom
Copy link
Copy Markdown
Contributor

Summary

  • Loosens Claim.targetFileUploadUri from String! to String and propagates the nullability through ClaimDetailUiState.Content.uploadUri and the picker callbacks. Companion to the claims-service PartnerClaim → Claim merge.
  • Hides the dangling "Uploaded files" section header when there is no submitted content, no files, and uploads are disabled. Triggered by partner claims; also fixes the pre-existing case of regular closed-non-pet claims with no submitted content.

Coordination

Draft until backend ships. This PR's schema edit is hand-applied to match the upcoming claims-service change. Before marking ready:

  1. The claims-service PartnerClaim → Claim merge is deployed to staging.
  2. Re-run ./gradlew downloadOctopusApolloSchemaFromIntrospection and confirm the diff is a no-op for targetFileUploadUri (catches unrelated schema drift).

Test plan

  • ./gradlew :feature-claim-details:compileDebugKotlin — passes
  • ./gradlew :feature-claim-details:ktlintCheck — passes
  • Manual smoke on staging with a member that has a partner claim:
    • Partner claim shows up in claimsActive / claimsHistory
    • Detail screen: no upload button, no audio/free-text/files, no dangling "Uploaded files" header
    • externalId shows in the display items
    • Regular claim path unchanged (upload still works on an open pet claim)

🤖 Generated with Claude Code

hugokallstrom and others added 2 commits April 27, 2026 14:41
Backend is collapsing PartnerClaim into Claim, which loosens
targetFileUploadUri from String! to String. Partner claims have
no upload URI; the existing isUploadingFilesEnabled gate already
hides the add-files button for them, but the type chain needs to
permit null.

- Schema: targetFileUploadUri: String! -> String (hand-edited;
  re-run downloadOctopusApolloSchemaFromIntrospection after the
  backend change deploys to staging to catch any unrelated drift).
- ClaimDetailUiState.Content.uploadUri: String -> String?
- Picker callbacks at ClaimDetailsDestination guard with ?.let so
  the (List<Uri>, String) -> Unit callback signature stays non-null.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The 'Uploaded files' title rendered unconditionally, even when
there was no submitted content, no files, and uploads were
disabled — leaving a dangling header with nothing under it.

Triggered by partner claims (no audio, no free text, empty files,
isUploadingFilesEnabled = false) but also affects pre-existing
regular closed-non-pet claims with no submitted content.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@notion-workspace
Copy link
Copy Markdown

@hugokallstrom hugokallstrom deleted the eng/handle-nullable-upload-uri-rnd-1677 branch April 28, 2026 07:52
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.

1 participant