Summary
Disputes created by interacting with the contracts directly can contain answers whose title is empty or whitespace-only. The embedded resolver prevents an exactly empty title during normal creation, but presentation code must still handle externally supplied dispute data defensively.
Define and apply a consistent fallback for empty/whitespace-only answer titles (for example, a localized Unknown Option label or the existing Answer 0x{{ruling}} form). Decide whether the normalization belongs in kleros-sdk's dispute-data mapping or in a shared web presentation helper; do not add an isolated workaround only to the vote-confirmation modal.
Search findings
web rendering paths
web/src/pages/Cases/CaseDetails/Voting/OptionsContainer.tsx renders answer.title on voting buttons and derives the confirmation-modal choice from the title.
web/src/pages/Cases/CaseDetails/Voting/ConfirmVoteModal.tsx renders the selected choice.
web/src/components/DisputePreview/DisputeContext.tsx renders each answer title.
web/src/components/Verdict/Answer.tsx renders the current answer title.
web/src/pages/Cases/CaseDetails/Appeal/Classic/Options/StageTwo.tsx renders choice.title.
web/src/utils/getVoteChoice.ts returns selectedAnswer.title whenever an answer exists; it currently does not fall back for an empty title. Its callers include voting detail views.
web/src/pages/Profile/Votes/VoteCard/index.tsx has a partial falsy-title fallback today.
kleros-sdk
kleros-sdk/src/dataMappings/retrieveRealityData.ts produces answer objects. The search found this mapping layer but no SDK UI renderer.
Existing creation validation
web/src/pages/Resolver/NavigationButtons/NextButton.tsx and web/src/pages/Resolver/NavigationButtons/SubmitDisputeButton.tsx reject exactly empty titles in the resolver flow. This does not protect consumers of data from direct contract interactions, and it does not reject whitespace-only titles.
Acceptance criteria
Backlinks
Summary
Disputes created by interacting with the contracts directly can contain answers whose
titleis empty or whitespace-only. The embedded resolver prevents an exactly empty title during normal creation, but presentation code must still handle externally supplied dispute data defensively.Define and apply a consistent fallback for empty/whitespace-only answer titles (for example, a localized
Unknown Optionlabel or the existingAnswer 0x{{ruling}}form). Decide whether the normalization belongs inkleros-sdk's dispute-data mapping or in a sharedwebpresentation helper; do not add an isolated workaround only to the vote-confirmation modal.Search findings
webrendering pathsweb/src/pages/Cases/CaseDetails/Voting/OptionsContainer.tsxrendersanswer.titleon voting buttons and derives the confirmation-modal choice from the title.web/src/pages/Cases/CaseDetails/Voting/ConfirmVoteModal.tsxrenders the selectedchoice.web/src/components/DisputePreview/DisputeContext.tsxrenders each answer title.web/src/components/Verdict/Answer.tsxrenders the current answer title.web/src/pages/Cases/CaseDetails/Appeal/Classic/Options/StageTwo.tsxrenderschoice.title.web/src/utils/getVoteChoice.tsreturnsselectedAnswer.titlewhenever an answer exists; it currently does not fall back for an empty title. Its callers include voting detail views.web/src/pages/Profile/Votes/VoteCard/index.tsxhas a partial falsy-title fallback today.kleros-sdkkleros-sdk/src/dataMappings/retrieveRealityData.tsproduces answer objects. The search found this mapping layer but no SDK UI renderer.Existing creation validation
web/src/pages/Resolver/NavigationButtons/NextButton.tsxandweb/src/pages/Resolver/NavigationButtons/SubmitDisputeButton.tsxreject exactly empty titles in the resolver flow. This does not protect consumers of data from direct contract interactions, and it does not reject whitespace-only titles.Acceptance criteria
webdisplay paths, including voting buttons, the confirmation modal, dispute preview, verdict, appeal, vote details, and profile vote cards.kleros-sdkshould normalize atkleros-sdk/src/dataMappings/retrieveRealityData.tsor preserve raw data and expose a reusable helper/contract to consumers.""and whitespace-only titles, including the selected choice shown during voting.Backlinks