From 3c612b03b526179f76a29332965b6c14e5dd941c Mon Sep 17 00:00:00 2001 From: Rohan Kamat Date: Mon, 2 Nov 2026 11:31:34 +0530 Subject: [PATCH 1/5] feat: enhance debate UI with improved styling and scrollbar customization --- frontend/src/Pages/BotSelection.tsx | 157 +++++++++++---------- frontend/src/Pages/DebateRoom.tsx | 203 ++++++++++++++++++++-------- frontend/src/index.css | 41 ++++++ 3 files changed, 270 insertions(+), 131 deletions(-) diff --git a/frontend/src/Pages/BotSelection.tsx b/frontend/src/Pages/BotSelection.tsx index 134f43cb..407c0232 100644 --- a/frontend/src/Pages/BotSelection.tsx +++ b/frontend/src/Pages/BotSelection.tsx @@ -431,41 +431,47 @@ const BotSelection: React.FC = () => { {/* Main Content Grid */}
{/* Bot Selection Section */} -
-

- Pick Your Bot -

+
+
+

+ Pick Your Bot +

+ + {allBots.length} Rivals Available + +
+ {fieldErrors.bot && ( -

{fieldErrors.bot}

+

{fieldErrors.bot}

)} {/* Selected Bot Preview */} {selectedBotObj && ( -
-

- Selected Bot -

-
-
+
+ + Active Challenger + +
+
{selectedBotObj.name}
-
-

+
+

{selectedBotObj.name}

-

+

"{selectedBotObj.quote}"

-
- +
+ {selectedBotObj.level} - - {selectedBotObj.rating} Rating + + {selectedBotObj.rating} Elo
@@ -473,41 +479,45 @@ const BotSelection: React.FC = () => {
)} - {/* Difficulty Cards (Fixed Height Scroller) */} -
+ {/* Difficulty Cards (Scrollable List) */} +
{levels.map((level) => (
toggleLevel(level.name)} > -
- +
+ {level.name} - + {level.count} bots {recommendedDifficulty === level.name && ( - + ⭐ Recommended )}
- + {expandedLevel === level.name ? "▲" : "▼"}
{expandedLevel === level.name && ( -
+
{allBots .filter((bot) => bot.level === level.name) .map((bot) => ( @@ -533,28 +543,25 @@ const BotSelection: React.FC = () => { bot: undefined, })); }} - className={`relative flex flex-col items-center p-2 rounded-md border transition-colors cursor-pointer group ${ + className={`relative flex flex-col items-center p-2.5 rounded-xl border-2 transition-all duration-200 cursor-pointer ${ selectedBot === bot.name - ? "border-2 border-primary bg-primary/10" - : "border-border hover:bg-muted" + ? "border-2 border-primary bg-primary/10 shadow-sm ring-1 ring-primary/30 scale-[1.02]" + : "border-2 border-border/70 hover:border-primary/40 hover:bg-muted/40 hover:scale-[1.01]" }`} > -
+
{bot.name}
- {/* Hover overlay */} -
-

- {bot.name} -

-
- {bot.rating} Rating -
-
+ + {bot.name} + + + {bot.rating} Elo +
))}
@@ -565,26 +572,28 @@ const BotSelection: React.FC = () => {
{/* Debate Setup Section */} -
-
-

- Debate Setup +
+
+

+ Debate Setup

-

+

Configure your topic, stance, and phase timings.

{selectedBotObj && selectedBotObj.specialMessage && ( -
- {selectedBotObj.specialMessage} +
+ {selectedBotObj.specialMessage}
)}
- -
-
+ + + +
+
{/* Topic Selection */}
-
{/* Responsive Timer Section */} -
-