Skip to content

Commit c1d5dde

Browse files
Devops teamclaude
andcommitted
Remove confidence display from all user-facing pages
Confidence values (often showing misleading 0% or 100%) have been removed from the UI while keeping the data model intact for future use. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 58794c5 commit c1d5dde

File tree

7 files changed

+85
-142
lines changed

7 files changed

+85
-142
lines changed

src/components/Certificate/ValidationDetailsDialog.tsx

Lines changed: 25 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,8 @@ const ValidationDetailsDialog: React.FC<ValidationDetailsDialogProps> = ({ open,
2929
if (!validation) return null
3030

3131
// Check for video - either explicit videoUrl or video-like mediaUrl/image
32-
const videoUrl = validation.videoUrl ||
32+
const videoUrl =
33+
validation.videoUrl ||
3334
(isVideoUrl(validation.mediaUrl) ? validation.mediaUrl : undefined) ||
3435
(isVideoUrl(validation.image) ? validation.image : undefined)
3536

@@ -141,11 +142,13 @@ const ValidationDetailsDialog: React.FC<ValidationDetailsDialogProps> = ({ open,
141142

142143
{/* Video Testimonial */}
143144
{videoUrl && (
144-
<Box sx={{
145-
mt: { xs: 2, sm: 2.5 },
146-
width: '100%',
147-
maxWidth: { xs: '100%', sm: 360, md: 420 }
148-
}}>
145+
<Box
146+
sx={{
147+
mt: { xs: 2, sm: 2.5 },
148+
width: '100%',
149+
maxWidth: { xs: '100%', sm: 360, md: 420 }
150+
}}
151+
>
149152
<Typography
150153
sx={{
151154
color: '#495057',
@@ -186,9 +189,7 @@ const ValidationDetailsDialog: React.FC<ValidationDetailsDialogProps> = ({ open,
186189
>
187190
<Box sx={{ textAlign: 'center', color: 'white' }}>
188191
<PlayCircleOutlineIcon sx={{ fontSize: { xs: 40, sm: 48 }, mb: 0.5 }} />
189-
<Typography sx={{ fontWeight: 500, fontSize: { xs: 12, sm: 14 } }}>
190-
Play video
191-
</Typography>
192+
<Typography sx={{ fontWeight: 500, fontSize: { xs: 12, sm: 14 } }}>Play video</Typography>
192193
</Box>
193194
</Box>
194195
) : (
@@ -205,21 +206,21 @@ const ValidationDetailsDialog: React.FC<ValidationDetailsDialogProps> = ({ open,
205206

206207
{/* Image */}
207208
{imageUrl && (
208-
<Box sx={{
209-
mt: { xs: 2, sm: 2.5 },
210-
width: '100%',
211-
maxWidth: { xs: '100%', sm: 360, md: 420 }
212-
}}>
213-
<Box sx={{
214-
borderRadius: { xs: '6px', sm: '8px' },
215-
overflow: 'hidden',
216-
boxShadow: '0 2px 8px rgba(0,0,0,0.08)'
217-
}}>
218-
<img
219-
src={imageUrl}
220-
alt=''
221-
style={{ width: '100%', display: 'block' }}
222-
/>
209+
<Box
210+
sx={{
211+
mt: { xs: 2, sm: 2.5 },
212+
width: '100%',
213+
maxWidth: { xs: '100%', sm: 360, md: 420 }
214+
}}
215+
>
216+
<Box
217+
sx={{
218+
borderRadius: { xs: '6px', sm: '8px' },
219+
overflow: 'hidden',
220+
boxShadow: '0 2px 8px rgba(0,0,0,0.08)'
221+
}}
222+
>
223+
<img src={imageUrl} alt='' style={{ width: '100%', display: 'block' }} />
223224
</Box>
224225
</Box>
225226
)}
@@ -280,29 +281,6 @@ const ValidationDetailsDialog: React.FC<ValidationDetailsDialogProps> = ({ open,
280281
</Typography>
281282
</Box>
282283
)}
283-
{validation.confidence !== undefined && (
284-
<Box sx={{ marginBottom: { xs: 1.5, sm: 2 } }}>
285-
<Typography
286-
sx={{
287-
fontWeight: 500,
288-
color: '#495057',
289-
minWidth: { xs: '120px', sm: '140px', md: '150px' },
290-
display: { xs: 'block', sm: 'inline-block' },
291-
fontSize: { xs: '13px', sm: '14px' }
292-
}}
293-
>
294-
Confidence:
295-
</Typography>
296-
<Typography
297-
sx={{
298-
color: '#212529',
299-
fontSize: { xs: '13px', sm: '14px' }
300-
}}
301-
>
302-
{validation.confidence}
303-
</Typography>
304-
</Box>
305-
)}
306284
</Box>
307285
</Box>
308286
</DialogContent>

src/components/ClaimReport/RenderClaimInfo.tsx

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -183,14 +183,6 @@ const RenderClaimInfo = ({
183183
)}
184184
{claim.claim && <Chip label={claim.claim} color='primary' size='small' />}
185185
{claim.howKnown && <Chip label={claim.howKnown.replace(/_/g, ' ')} variant='outlined' size='small' />}
186-
{claim.confidence && (
187-
<Chip
188-
label={`${Math.round(Number(claim.confidence) * 100)}% confidence`}
189-
color='success'
190-
variant='outlined'
191-
size='small'
192-
/>
193-
)}
194186
{claim.stars && (
195187
<Chip
196188
label={`${'★'.repeat(Number(claim.stars))} (${claim.stars})`}

src/components/ClaimReport/index.tsx

Lines changed: 60 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,9 @@ const ClaimReport: React.FC = () => {
222222
// Get subject info
223223
const subjectName = (reportData as any)?.subject?.name || subjectNode?.name || claim.subjectNode?.name
224224
const subjectType = subjectNode?.entType || claim.subjectNode?.entType
225-
const subjectUri = subjectNode?.nodeUri || claim.subjectNode?.nodeUri ||
225+
const subjectUri =
226+
subjectNode?.nodeUri ||
227+
claim.subjectNode?.nodeUri ||
226228
(typeof claim.subject === 'object' ? claim.subject.uri : claim.subject)
227229
const subjectDescrip = subjectNode?.descrip || claim.subjectNode?.descrip
228230
const subjectImage = subjectNode?.image || claim.subjectNode?.image
@@ -232,9 +234,7 @@ const ClaimReport: React.FC = () => {
232234
{/* Subject - who/what this claim is about */}
233235
<Section>
234236
<Stack direction='row' spacing={2} alignItems='flex-start'>
235-
{subjectImage && (
236-
<Avatar src={subjectImage} sx={{ width: 56, height: 56 }} />
237-
)}
237+
{subjectImage && <Avatar src={subjectImage} sx={{ width: 56, height: 56 }} />}
238238
<Box>
239239
<Typography variant='h5' sx={{ fontWeight: 600 }}>
240240
{subjectName || 'Unknown Subject'}
@@ -251,7 +251,13 @@ const ClaimReport: React.FC = () => {
251251
target='_blank'
252252
rel='noopener noreferrer'
253253
variant='body2'
254-
sx={{ color: 'primary.main', textDecoration: 'none', '&:hover': { textDecoration: 'underline' }, display: 'block', mt: 0.5 }}
254+
sx={{
255+
color: 'primary.main',
256+
textDecoration: 'none',
257+
'&:hover': { textDecoration: 'underline' },
258+
display: 'block',
259+
mt: 0.5
260+
}}
255261
>
256262
{subjectUri} <OpenInNewIcon sx={{ fontSize: 12, verticalAlign: 'middle' }} />
257263
</Typography>
@@ -278,11 +284,7 @@ const ClaimReport: React.FC = () => {
278284

279285
{reportData.image && (
280286
<Box sx={{ my: 2 }}>
281-
<img
282-
src={reportData.image}
283-
alt=''
284-
style={{ width: '50vw', maxWidth: '100%', borderRadius: 8 }}
285-
/>
287+
<img src={reportData.image} alt='' style={{ width: '50vw', maxWidth: '100%', borderRadius: 8 }} />
286288
</Box>
287289
)}
288290

@@ -324,15 +326,17 @@ const ClaimReport: React.FC = () => {
324326
{hasMedia && (
325327
<Grid item xs={12} sm={5} md={4}>
326328
{mediaIsVideo ? (
327-
<Box sx={{
328-
position: 'relative',
329-
width: '100%',
330-
aspectRatio: '16/9',
331-
borderRadius: '8px',
332-
overflow: 'hidden',
333-
backgroundColor: theme.palette.mode === 'dark' ? '#1a1a1a' : '#f5f5f5',
334-
boxShadow: '0 2px 8px rgba(0,0,0,0.08)'
335-
}}>
329+
<Box
330+
sx={{
331+
position: 'relative',
332+
width: '100%',
333+
aspectRatio: '16/9',
334+
borderRadius: '8px',
335+
overflow: 'hidden',
336+
backgroundColor: theme.palette.mode === 'dark' ? '#1a1a1a' : '#f5f5f5',
337+
boxShadow: '0 2px 8px rgba(0,0,0,0.08)'
338+
}}
339+
>
336340
<video
337341
src={mediaUrl}
338342
controls
@@ -346,16 +350,14 @@ const ClaimReport: React.FC = () => {
346350
/>
347351
</Box>
348352
) : (
349-
<Box sx={{
350-
borderRadius: '8px',
351-
overflow: 'hidden',
352-
boxShadow: '0 2px 8px rgba(0,0,0,0.08)'
353-
}}>
354-
<img
355-
src={validation.image}
356-
alt=''
357-
style={{ width: '100%', display: 'block' }}
358-
/>
353+
<Box
354+
sx={{
355+
borderRadius: '8px',
356+
overflow: 'hidden',
357+
boxShadow: '0 2px 8px rgba(0,0,0,0.08)'
358+
}}
359+
>
360+
<img src={validation.image} alt='' style={{ width: '100%', display: 'block' }} />
359361
</Box>
360362
)}
361363
</Grid>
@@ -372,7 +374,11 @@ const ClaimReport: React.FC = () => {
372374
)}
373375
{(validation.sourceURI || validation.source_link) && (
374376
<Typography variant='caption' color='text.secondary' sx={{ display: 'block', mt: 1 }}>
375-
<a href={validation.sourceURI || validation.source_link} target='_blank' rel='noopener noreferrer'>
377+
<a
378+
href={validation.sourceURI || validation.source_link}
379+
target='_blank'
380+
rel='noopener noreferrer'
381+
>
376382
{validation.sourceURI || validation.source_link}
377383
</a>
378384
</Typography>
@@ -405,15 +411,17 @@ const ClaimReport: React.FC = () => {
405411
{hasMedia && (
406412
<Grid item xs={12} sm={5} md={4}>
407413
{mediaIsVideo ? (
408-
<Box sx={{
409-
position: 'relative',
410-
width: '100%',
411-
aspectRatio: '16/9',
412-
borderRadius: '8px',
413-
overflow: 'hidden',
414-
backgroundColor: theme.palette.mode === 'dark' ? '#1a1a1a' : '#f5f5f5',
415-
boxShadow: '0 2px 8px rgba(0,0,0,0.08)'
416-
}}>
414+
<Box
415+
sx={{
416+
position: 'relative',
417+
width: '100%',
418+
aspectRatio: '16/9',
419+
borderRadius: '8px',
420+
overflow: 'hidden',
421+
backgroundColor: theme.palette.mode === 'dark' ? '#1a1a1a' : '#f5f5f5',
422+
boxShadow: '0 2px 8px rgba(0,0,0,0.08)'
423+
}}
424+
>
417425
<video
418426
src={mediaUrl}
419427
controls
@@ -427,16 +435,14 @@ const ClaimReport: React.FC = () => {
427435
/>
428436
</Box>
429437
) : (
430-
<Box sx={{
431-
borderRadius: '8px',
432-
overflow: 'hidden',
433-
boxShadow: '0 2px 8px rgba(0,0,0,0.08)'
434-
}}>
435-
<img
436-
src={attestation.image}
437-
alt=''
438-
style={{ width: '100%', display: 'block' }}
439-
/>
438+
<Box
439+
sx={{
440+
borderRadius: '8px',
441+
overflow: 'hidden',
442+
boxShadow: '0 2px 8px rgba(0,0,0,0.08)'
443+
}}
444+
>
445+
<img src={attestation.image} alt='' style={{ width: '100%', display: 'block' }} />
440446
</Box>
441447
)}
442448
</Grid>
@@ -453,7 +459,11 @@ const ClaimReport: React.FC = () => {
453459
)}
454460
{(attestation.sourceURI || attestation.source_link) && (
455461
<Typography variant='caption' color='text.secondary' sx={{ display: 'block', mt: 1 }}>
456-
<a href={attestation.sourceURI || attestation.source_link} target='_blank' rel='noopener noreferrer'>
462+
<a
463+
href={attestation.sourceURI || attestation.source_link}
464+
target='_blank'
465+
rel='noopener noreferrer'
466+
>
457467
{attestation.sourceURI || attestation.source_link}
458468
</a>
459469
</Typography>

src/components/EnhancedClaimCreator.tsx

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -274,18 +274,6 @@ export const EnhancedClaimCreator: React.FC = () => {
274274
</>
275275
)}
276276

277-
{/* Confidence slider */}
278-
<Box>
279-
<Typography gutterBottom>Confidence: {Math.round(formData.confidence * 100)}%</Typography>
280-
<Slider
281-
value={formData.confidence}
282-
onChange={(e, value) => setFormData({ ...formData, confidence: value as number })}
283-
min={0}
284-
max={1}
285-
step={0.1}
286-
/>
287-
</Box>
288-
289277
<Button
290278
variant='contained'
291279
onClick={handleSubmitClaim}

src/components/GraphDetailModal/index.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,6 @@ const GraphDetailModal: React.FC<GraphDetailModalProps> = ({
128128
{ key: 'subject', label: 'Subject' },
129129
{ key: 'object', label: 'Object' },
130130
{ key: 'aspect', label: 'Aspect' },
131-
{ key: 'confidence', label: 'Confidence', format: v => `${Math.round(v * 100)}%` },
132131
{ key: 'stars', label: 'Rating', format: v => '★'.repeat(v) + '☆'.repeat(5 - v) },
133132
{ key: 'howKnown', label: 'How Known' },
134133
{ key: 'effectiveDate', label: 'Date', format: v => new Date(v).toLocaleDateString() },

src/components/Validate/index.tsx

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -642,16 +642,6 @@ const Validate = ({ toggleSnackbar, setSnackbarMessage }: IHomeProps) => {
642642
</Typography>
643643
</Box>
644644
)}
645-
{confidenceValue !== null && (
646-
<Box sx={{ display: 'flex', alignItems: 'center', gap: 0.5 }}>
647-
<Typography variant='body2' sx={{ color: theme.palette.text.secondary, fontWeight: 600 }}>
648-
Confidence:
649-
</Typography>
650-
<Typography variant='body2' sx={{ color: theme.palette.text.primary }}>
651-
{confidenceValue}
652-
</Typography>
653-
</Box>
654-
)}
655645
{amtValue && (
656646
<Box sx={{ display: 'flex', alignItems: 'center', gap: 0.5 }}>
657647
<Typography variant='body2' sx={{ color: theme.palette.text.secondary, fontWeight: 600 }}>

src/containers/feedOfClaim/index.tsx

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -409,20 +409,6 @@ const FeedClaim: React.FC<IHomeProps> = () => {
409409
Aspect: {claim.aspect}
410410
</Typography>
411411
)}
412-
{claim.confidence !== undefined && claim.confidence !== null && (
413-
<Typography
414-
variant='body2'
415-
sx={{
416-
mb: 0.5,
417-
fontSize: '12px',
418-
color: theme.palette.date,
419-
fontFamily: 'Roboto, sans-serif'
420-
}}
421-
>
422-
Confidence:{' '}
423-
{claim.confidence === 0 ? '0%' : `${Math.round(claim.confidence * 100)}%`}
424-
</Typography>
425-
)}
426412
{claim.howKnown && (
427413
<Typography
428414
variant='body2'

0 commit comments

Comments
 (0)