From 9237a0562fc22c75bea3846c6749764cd2db0fef Mon Sep 17 00:00:00 2001 From: Paco Cartones <253313177+pacocartones@users.noreply.github.com> Date: Wed, 26 Aug 2026 14:22:22 +0200 Subject: [PATCH] fix(dashboard): conceal locked hidden badge details (#11605) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Merged via /merge-batch (lote 2026-08-26 batch 2, v3.8.51). Boarded no worktree combinado junto com outras ~20 PRs; validação única: typecheck/complexity/cognitive-complexity/changelog-integrity verdes, file-size rebaseado onde necessário (crescimento legítimo), lint com os mesmos 228 achados pré-existentes confirmados via sonda contra o tip puro (não introduzidos por este lote), e 292 testes focados (unit) + 18 (vitest) passando. Obrigado pela contribuição. --- .../11605-profile-hidden-badge-details.md | 1 + .../(dashboard)/dashboard/profile/page.tsx | 8 +- ...file-hidden-badge-confidentiality.test.tsx | 114 ++++++++++++++++++ 3 files changed, 120 insertions(+), 3 deletions(-) create mode 100644 changelog.d/fixes/11605-profile-hidden-badge-details.md create mode 100644 tests/unit/ui/profile-hidden-badge-confidentiality.test.tsx diff --git a/changelog.d/fixes/11605-profile-hidden-badge-details.md b/changelog.d/fixes/11605-profile-hidden-badge-details.md new file mode 100644 index 0000000000..7236f7cee7 --- /dev/null +++ b/changelog.d/fixes/11605-profile-hidden-badge-details.md @@ -0,0 +1 @@ +- **fix(dashboard):** Prevent locked hidden badges from revealing their icon or opening private badge details before they are earned ([#11605](https://github.com/diegosouzapw/OmniRoute/pull/11605)) — thanks @pacocartones diff --git a/src/app/(dashboard)/dashboard/profile/page.tsx b/src/app/(dashboard)/dashboard/profile/page.tsx index dd456bbe2f..082ea0bee2 100644 --- a/src/app/(dashboard)/dashboard/profile/page.tsx +++ b/src/app/(dashboard)/dashboard/profile/page.tsx @@ -249,21 +249,23 @@ export default function ProfilePage() {
{allBadges.map((badge) => { const isEarned = earnedIds.has(badge.id); + const isHiddenAndLocked = Boolean(badge.hidden) && !isEarned; const earnedInfo = earnedBadges.find((b) => b.badgeId === badge.id); const rarityColor = RARITY_COLORS[badge.rarity] || RARITY_COLORS.common; return (