From 0e968d31d773103d264bd6e81db71fdc28942c63 Mon Sep 17 00:00:00 2001
From: Juan
Date: Sat, 13 Jun 2026 04:42:29 +0200
Subject: [PATCH] feat(draft): overhaul pick/ban phase with meta tiers, UI
pivots, and flex-pick visibility
Implements issue #302.
1. Meta tier system: added MetaTier enum (S/A/B/C/D) to champion domain model,
parsed from champion-list.json or defaulted to B. Exposed to frontend
via ChampionData.meta_tier. Badge shown on draft suggestion tips.
2. UI pivot fix: reworked tip mixing logic so ALL player tips are always
visible (one per role). When a player changes their request, other
players' bubbles no longer get hidden. Pre-slice cap raised to 6-7.
3. Flex-pick visibility: champion suggestion tips now render secondary
role badges when a champion can flex into other positions (e.g. Corki
shown as MID + ADC). Uses the existing roleHints/role_icons infra.
---
src-tauri/crates/olm_core/src/champions.rs | 8 ++
.../src/db/repositories/champion_repo.rs | 4 +
.../crates/olm_core/src/domain/champion.rs | 34 +++++++++
src-tauri/src/commands/game.rs | 1 +
src/store/types.ts | 1 +
.../components/match/ChampionDraft.tsx | 74 ++++++++++++++-----
6 files changed, 102 insertions(+), 20 deletions(-)
diff --git a/src-tauri/crates/olm_core/src/champions.rs b/src-tauri/crates/olm_core/src/champions.rs
index 3bb2819b3..6d0c57814 100644
--- a/src-tauri/crates/olm_core/src/champions.rs
+++ b/src-tauri/crates/olm_core/src/champions.rs
@@ -1604,6 +1604,8 @@ pub struct ChampionListEntry {
pub name: String,
pub tags: Vec,
pub image: String,
+ /// Patch meta tier (S/A/B/C/D). Defaults to "B" when absent.
+ pub meta_tier: Option,
}
/// Load the champion catalog from `assets/draft/champion-list.json`.
@@ -1636,6 +1638,11 @@ pub fn load_champion_catalog_from_path(path: &Path) -> Vec Vec Result Result, String> {
synergies_json: row.get(5)?,
image_tile_url: row.get(6)?,
image_splash_url: row.get(7)?,
+ meta_tier: crate::domain::champion::MetaTier::B,
})
})
.map_err(|e| format!("Failed to query champions: {}", e))?;
@@ -203,6 +205,7 @@ pub fn get_champion_by_id(conn: &Connection, id: i64) -> Result
{tip.champion ? (
-
+
{tip.champion.name}
+
+ {/* Meta tier badge */}
+ {tip.champion.meta_tier && (
+
+ {tip.champion.meta_tier}
+
+ )}
+
+ {/* Flex pick: show secondary roles if champion has multiple */}
+ {(() => {
+ const roleHints = tip.champion!.roleHints ?? [];
+ const secondaryRoles = roleHints.filter(
+ (r) => tip.sourceRole && r !== tip.sourceRole && ROLE_ORDER.includes(r as Role),
+ );
+ if (secondaryRoles.length > 0) {
+ return secondaryRoles.map((role) => (
+
+
+ {role}
+
+ ));
+ }
+ return null;
+ })()}
) : null}