fix(applicant-feedback): correct scales, hide jury-internal criteria, declutter UI
All checks were successful
Build and Push Docker Image / build (push) Successful in 8m11s

- globalScore is /10 (was hardcoded /100); use real round.name (was 'Round N')
- Render criteria by type: numeric uses parsed scale (1-10/0-10/1-5),
  text shows as quoted block, boolean/advance hidden as jury-internal
- Drop redundant cross-round stat strip and per-round Score Comparison
- Plain language: 'Lowest/Highest' instead of 'Range', 'reviews' not 'evaluations'
- Settings toggles update optimistically (was waiting for refresh)

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
Matt
2026-05-07 12:21:52 +02:00
parent 55e6abc161
commit b7a4eac2b1
3 changed files with 179 additions and 239 deletions

View File

@@ -624,8 +624,9 @@ function SettingToggle({
settingKey: string
value: string
}) {
const [optimistic, setOptimistic] = useState<boolean | null>(null)
const mutation = useSettingsMutation()
const isChecked = value === 'true'
const isChecked = optimistic ?? value === 'true'
return (
<div className="flex items-center justify-between rounded-lg border p-3">
@@ -638,9 +639,13 @@ function SettingToggle({
<Switch
checked={isChecked}
disabled={mutation.isPending}
onCheckedChange={(checked) =>
mutation.mutate({ key: settingKey, value: String(checked) })
}
onCheckedChange={(checked) => {
setOptimistic(checked)
mutation.mutate(
{ key: settingKey, value: String(checked) },
{ onError: () => setOptimistic(null) },
)
}}
/>
</div>
)