Skip to content

Render structured claim summary answers (RND-2030) - #3019

Merged
hugokallstrom merged 8 commits into
developfrom
feat/claim-summary-structured-answers
Jul 29, 2026
Merged

Render structured claim summary answers (RND-2030)#3019
hugokallstrom merged 8 commits into
developfrom
feat/claim-summary-structured-answers

Conversation

@hugokallstrom

@hugokallstrom hugokallstrom commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

Why

The claims-service summary step now exposes keyDetails (facts for a collapsed
"Claim details" card) and answers (ordered question/answer pairs whose value is
a Text / Audio / Files union), for the new "claims-flow-new" summary UI. Today the
Android summary renders one flat, always-expanded card, so it can't show the new
collapsed card + per-question answers (with inline audio playback).

What

  • SummaryFragment selects the new keyDetails and answers fields; StepContent.Summary
    gains keyDetails + answers (with an Answer.Value = Text/Audio/Files model), mapped
    in ClaimIntentExt.
  • ChatClaimSummaryTopContent renders a collapsed "Claim details" card from keyDetails
    (falling back to items when empty) plus a "Show all answers" button — shown only when
    answers is non-empty — that opens a HedvigBottomSheet listing each question with its
    answer inline (text, a HedvigAudioPlayer for recorded answers, or files). The existing
    Recording and Uploaded-files sections are unchanged.
  • Adds the claim_status_show_all_answers string.

🤖 Generated with Claude Code

@notion-workspace

Copy link
Copy Markdown

@hugokallstrom
hugokallstrom marked this pull request as ready for review July 14, 2026 11:48
@hugokallstrom
hugokallstrom requested a review from a team as a code owner July 14, 2026 11:48

@StylianosGakis StylianosGakis left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Regarding the

else -> {
 logcat { "SummaryFragment.Answer: Unknown answer value type" }
 raise(ClaimChatErrorMessage.NeedsUpdate)
}

When the answer is not of a known value, this I think would error out the entire screen, which if we do make such a change might be a bit too much.
How would we feel if we just ignored such unknown values, logged it, and did not render anything there, just rendering whatever else is available anyway to prevent blocking the rest of the content from showing?

I think the val freeTexts: List, part of data class Summary is now completely unused too, perhaps we can clean that part up if it’s not going to be used.

hugokallstrom and others added 8 commits July 29, 2026 10:50
Backend adds structured keyDetails/answers (Text/Audio/Files union) to
ClaimIntentStepContentSummary. Hand-add the identical SDL to the local
schema (dev router doesn't have it yet), extend SummaryFragment,
StepContent.Summary, and the union mapping so the data layer is ready
for the UI to consume.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Render the collapsed "Claim details" card from the structured keyDetails,
add a "Show all answers" control that opens a HedvigBottomSheet listing each
answer (text / inline audio player / files), and keep the existing Recording
and Uploaded files sections. Falls back to items when keyDetails is empty so
older backend responses do not regress.

Adds a jvmTest ImageComposeScene render harness for PNG verification (KMP
modules are unsupported by the AGP screenshot plugin) and a no-op JVM
CommonMediaPlayer so audio-backed composables render headlessly.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Outline the show-all-answers button, hide the audio transcript, and use
16dp top spacing above the button.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Add a full-width secondary Close button at the bottom of the answers sheet
(dismisses it), and give the header title more top spacing.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
An unknown answer value type raised NeedsUpdate from inside toStepContent,
which aborts mapping for the whole claim intent and errors out the entire
screen. The summary is a read-only recap, so drop just that answer and render
whatever else came back. Logged at WARN since it is now a silent degradation.

Also drop freeTexts: the answers sheet replaced the free-text pill list, so the
field was selected and mapped but never read. Free-text answers now arrive as
Answer.Value.Text.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@hugokallstrom
hugokallstrom force-pushed the feat/claim-summary-structured-answers branch from 6b37cf5 to 8913722 Compare July 29, 2026 09:06
@hugokallstrom
hugokallstrom enabled auto-merge (squash) July 29, 2026 09:07
@hugokallstrom
hugokallstrom merged commit 591077c into develop Jul 29, 2026
4 checks passed
@hugokallstrom
hugokallstrom deleted the feat/claim-summary-structured-answers branch July 29, 2026 09: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