Skip to content

Improve Visibility of Team Builder Section#349

Open
Abhishek2005-ard wants to merge 2 commits intoAOSSIE-Org:mainfrom
Abhishek2005-ard:fix/team-builder-ui
Open

Improve Visibility of Team Builder Section#349
Abhishek2005-ard wants to merge 2 commits intoAOSSIE-Org:mainfrom
Abhishek2005-ard:fix/team-builder-ui

Conversation

@Abhishek2005-ard
Copy link
Copy Markdown
Contributor

@Abhishek2005-ard Abhishek2005-ard commented Mar 10, 2026

This PR improves the visibility and UI clarity of the Team Builder section in the interface. Previously, the heading and description of the Team Builder section were not prominent enough, making it harder for users to immediately notice the feature. This update enhances the styling to make the section more visually clear and user-friendly.

Changes Made
Increased the heading font size
Improved font weight and spacing
Updated text color for better contrast
Improved layout alignment for better readability

Before
Before UI

After
After UI

PR Importance
Minor UI Enhancement

Issue Link
Closes #348

Summary by CodeRabbit

  • New Features

    • Expanded dark mode across the debate room interface.
  • Bug Fixes

    • Prevented duplicate judgment submissions.
    • Improved judgment parsing to be more robust.
    • Improved navigation when closing the judgment popup (returns to home).
  • Style

    • Updated debate room animation glow colors.
    • Redesigned Team Builder header with centered layout and larger typography.
  • Chores

    • Removed the now-unused public support page route.

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Mar 10, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: fcc7072a-7cda-41f2-9aa9-953cda04f7f2

📥 Commits

Reviewing files that changed from the base of the PR and between 113540e and 2a3bd9b.

📒 Files selected for processing (1)
  • frontend/src/App.tsx
💤 Files with no reviewable changes (1)
  • frontend/src/App.tsx

📝 Walkthrough

Walkthrough

This pull request updates DebateRoom to add a concurrency guard for judging, switches judgment parsing to JSON5, changes JudgmentPopup close to navigate to /, and extends dark-mode styling. It also restyles the TeamBuilder header to a centered, larger, primary-colored layout and removes the support-debateai route from App routes.

Changes

Cohort / File(s) Summary
DebateRoom Logic & Styling
frontend/src/Pages/DebateRoom.tsx
Added judgingRef concurrency guard around judgeDebateResult; replaced JSON.parse (and prior fallback logic) with JSON5.parse and updated error messaging; JudgmentPopup close now navigates to /; added dark:* Tailwind variants across page/header/popup/bot panel; adjusted "glow" keyframe RGBA values; minor JSX/className formatting.
TeamBuilder Header Restyling
frontend/src/Pages/TeamBuilder.tsx
Changed header layout from left-aligned to centered; increased title to text-5xl with primary color and tracking; updated subtitle sizing and color.
Routing Cleanup
frontend/src/App.tsx
Removed support-debateai route and its SupportOpenSource import.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

Poem

🐰 I hop through code with tiny paws,
Guards set firm to stop duplicate laws.
JSON5 whispers tidy and neat,
Dark mode shimmers, titles take the seat.
A little polish — soft, swift applause. ✨

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Out of Scope Changes check ⚠️ Warning The PR includes out-of-scope changes unrelated to the Team Builder heading visibility: DebateRoom.tsx modifications and removal of support-debateai route from App.tsx. Remove unrelated changes to DebateRoom.tsx and App.tsx that are not part of the Team Builder heading visibility improvement.
Docstring Coverage ⚠️ Warning Docstring coverage is 28.57% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change in the TeamBuilder.tsx file, which restyled the heading to improve visibility with centered layout and larger, colored text.
Linked Issues check ✅ Passed The PR fulfills the core requirements from issue #348: it makes the Team Builder heading prominently visible with larger font size, applies centered layout with responsive styling, and preserves all core functionality.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Tip

You can make CodeRabbit's review stricter and more nitpicky using the `assertive` profile, if that's what you prefer.

Change the reviews.profile setting to assertive to make CodeRabbit's nitpick more issues in your PRs.

Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 4

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (2)
backend/models/transcript.go (1)

41-55: ⚠️ Potential issue | 🔴 Critical

MarshalJSON produces duplicate/conflicting ID fields.

The current implementation embeds the Alias struct (which contains zeroed ID/UserID fields) alongside explicit string ID/UserID fields. This causes JSON output to contain both:

  • "id": "actual-hex-string" from the explicit field
  • "id": "000000000000000000000000" from the embedded Alias (NilObjectID)

The last field with the same name wins in JSON, but behavior varies across decoders and this is confusing.

Proposed fix

Use a type alias that excludes the ID fields entirely, or create a separate output struct:

 func (s SavedDebateTranscript) MarshalJSON() ([]byte, error) {
-	type Alias SavedDebateTranscript
-	a := Alias(s)
-	a.ID = primitive.NilObjectID
-	a.UserID = primitive.NilObjectID
-	return json.Marshal(&struct {
-		ID     string `json:"id"`
-		UserID string `json:"userId"`
-		Alias
-	}{
-		ID:     s.ID.Hex(),
-		UserID: s.UserID.Hex(),
-		Alias:  a,
-	})
+	type Alias SavedDebateTranscript
+	return json.Marshal(&struct {
+		ID     string `json:"id"`
+		UserID string `json:"userId"`
+		*Alias
+	}{
+		ID:     s.ID.Hex(),
+		UserID: s.UserID.Hex(),
+		Alias:  (*Alias)(&s),
+	})
 }

Note: The embedded *Alias will still include id and userId fields. A cleaner approach is to use json:"-" tags on the original struct's ID fields if you always want string serialization, or create an explicit output struct without embedding.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@backend/models/transcript.go` around lines 41 - 55, The custom MarshalJSON
for SavedDebateTranscript embeds Alias which still contains the ID and UserID
fields, producing duplicate/conflicting "id"/"userId" keys; fix it by removing
the embedded Alias with ID/UserID and instead build and marshal an explicit
output struct that sets ID: s.ID.Hex(), UserID: s.UserID.Hex() and copies only
the other needed fields from s (or use a type alias that omits the ID/UserID
fields), updating the MarshalJSON function (SavedDebateTranscript, Alias, ID,
UserID, MarshalJSON) to return JSON from that explicit output struct so no
duplicate id/userId keys are emitted.
backend/services/transcriptservice.go (1)

194-206: ⚠️ Potential issue | 🔴 Critical

Missing eloChange argument - compilation error.

The SaveDebateTranscript call for the "against" user is missing the required eloChange parameter that was added to the function signature at line 663.

Proposed fix
 				// Save transcript for "against" user
 				err = SaveDebateTranscript(
 					againstUser.ID,
 					againstUser.Email,
 					"user_vs_user",
 					topic,
 					forUser.Email,
 					resultAgainst,
 					[]models.Message{},
 					againstSubmission.Transcripts,
+					againstEloChange,
 				)
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@backend/services/transcriptservice.go` around lines 194 - 206, The call to
SaveDebateTranscript for the "against" user is missing the newly required
eloChange argument; locate the analogous SaveDebateTranscript call used for the
"for" user and mirror its final parameter by passing the appropriate eloChange
value (e.g., eloChange or eloChangeAgainst) into the
againstUser.SaveDebateTranscript call so the call signature matches the updated
function definition.
🧹 Nitpick comments (7)
frontend/src/components/Matchmaking.tsx (1)

38-44: Redundant useEffect — useState already initializes these values.

This effect sets isInPool to false and waitTime to 0 on mount, but both variables are already initialized to these exact values via useState on lines 32-33. The effect has no practical effect.

Additionally:

  1. Misleading comment: States "page refresh" but [] dependency runs on every mount, including when users switch tabs in DebatePopup, causing the component to remount.
  2. Indentation inconsistency: Uses 4-space indentation while the rest of the component uses 2-space.
  3. State sync already handled: The pool_update handler (lines 91-97) and matchmaking_started/matchmaking_stopped handlers (lines 109-117) already synchronize isInPool with server state.

If you're addressing a specific edge case (e.g., stale state persisting across remounts), please clarify the scenario. Otherwise, consider removing this effect.

Suggested removal
-
-
-    // Reset matchmaking UI state on page refresh
-    useEffect(() => {
-      setIsInPool(false);
-      setWaitTime(0);
-    }, []);
-
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@frontend/src/components/Matchmaking.tsx` around lines 38 - 44, Remove the
redundant useEffect in Matchmaking that calls setIsInPool(false) and
setWaitTime(0) on mount because those states are already initialized via
useState and are kept in sync by the pool_update and
matchmaking_started/matchmaking_stopped handlers; delete the entire useEffect
block (the one that references setIsInPool and setWaitTime) and ensure
indentation matches the file's 2-space style after removal.
frontend/src/index.css (1)

88-91: Consider moving .high-contrast inside @layer base for consistency.

The .dark and .contrast theme classes (lines 34-86) are defined inside @layer base, but .high-contrast is placed outside. This inconsistency may cause unexpected specificity behavior where .high-contrast rules override layered rules.

Suggested placement

Move the .high-contrast block inside @layer base alongside the other theme classes:

   .contrast {
     /* ... existing contrast tokens ... */
   }
+
+  .high-contrast {
+    --hc-hover-bg: 48 100% 50%;      
+    --hc-hover-text: 0 0% 0%;       
+  }
 }
-
-.high-contrast {
-  --hc-hover-bg: 48 100% 50%;      
-  --hc-hover-text: 0 0% 0%;       
-}
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@frontend/src/index.css` around lines 88 - 91, The .high-contrast theme
variables are defined outside `@layer` base while .dark and .contrast live inside,
which can cause specificity/order issues; move the .high-contrast block into the
existing `@layer` base section next to .dark and .contrast so all theme classes
(.dark, .contrast, .high-contrast) are defined within `@layer` base to ensure
consistent layering and predictable cascading.
backend/services/transcriptservice.go (1)

975-976: Stale TODO comment.

The TODO comment "Add actual Elo change tracking" is now outdated since EloChange has been added to the model and is being tracked. This should be updated to use transcript.EloChange.

Proposed fix
 		recentDebates = append(recentDebates, map[string]interface{}{
 			"id":         transcript.ID.Hex(),
 			"topic":      transcript.Topic,
 			"result":     transcript.Result,
 			"opponent":   transcript.Opponent,
 			"debateType": transcript.DebateType,
 			"date":       transcript.CreatedAt.Format("2006-01-02T15:04:05Z07:00"),
-			"eloChange":  0, // TODO: Add actual Elo change tracking
+			"eloChange":  transcript.EloChange,
 		})
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@backend/services/transcriptservice.go` around lines 975 - 976, The TODO left
a hardcoded zero for "eloChange" in the response; replace the stub with the
tracked value by using transcript.EloChange (or the appropriate field on the
Transcript/model) instead of 0 and remove the outdated TODO comment; locate the
code block constructing the response (the map/object that includes "eloChange":
0) and substitute transcript.EloChange so the actual Elo change is returned.
frontend/src/Pages/TeamBuilder.tsx (1)

341-343: Subtitle color may have poor visibility in dark mode.

The hardcoded text-gray-700 won't adapt to dark mode themes, potentially causing readability issues. Consider using a theme-aware token for consistency with the rest of the application.

Proposed fix
-        <p className="text-lg text-gray-700">
+        <p className="text-lg text-muted-foreground">
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@frontend/src/Pages/TeamBuilder.tsx` around lines 341 - 343, The subtitle uses
a hardcoded color class ("text-gray-700") that won't adapt to dark mode; update
the <p> element in TeamBuilder.tsx to use a theme-aware token or Tailwind dark
variant (for example replace className="text-lg text-gray-700" with
className="text-lg text-gray-700 dark:text-gray-300" or with your app's design
token like "text-lg text-secondary") so the subtitle remains readable in both
light and dark themes.
backend/controllers/profile_controller.go (1)

257-257: Remove or update the stale TODO comment.

The comment // TODO: Add actual Elo change tracking is inconsistent with the code—you're now using transcript.EloChange, which indicates Elo tracking is implemented. Either remove this TODO or update it to reflect any remaining work.

Also, add a space before // for consistent formatting.

✏️ Suggested fix
-				"eloChange": transcript.EloChange,// TODO: Add actual Elo change tracking
+				"eloChange": transcript.EloChange,
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@backend/controllers/profile_controller.go` at line 257, The TODO comment is
stale and formatting is inconsistent: remove or update the comment next to
transcript.EloChange in the response/struct assembly so it accurately reflects
current behavior (either delete "// TODO: Add actual Elo change tracking" or
replace it with a short, accurate note) and ensure there is a space before "//"
for consistent formatting where the field "eloChange": transcript.EloChange is
set.
frontend/src/components/Header.tsx (2)

130-193: Inconsistent use of design tokens in notification popover.

The header, drawer, and NavItem now use design tokens (text-foreground, bg-muted, etc.), but the notification popover still uses hardcoded colors like text-gray-600, text-gray-900, border-gray-100, bg-gray-50, and text-blue-600. This inconsistency may cause visual discrepancies in dark mode or when theming is applied.

Consider migrating these to design tokens for consistency:

  • text-gray-600text-muted-foreground
  • text-gray-900text-foreground
  • border-gray-100border-border
  • bg-gray-50bg-muted
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@frontend/src/components/Header.tsx` around lines 130 - 193, The notification
popover uses hardcoded Tailwind gray/blue classes causing theming
inconsistencies; update the class names inside the Popover/PopoverContent block
(the JSX that renders the Bell button, PopoverContent header, notification
items, and the "Mark all read" Button) to use design tokens: replace
text-gray-600 with text-muted-foreground, text-gray-900 with text-foreground,
border-gray-100 with border-border, bg-gray-50 with bg-muted and text-blue-600
on the Button with primary-foreground or an appropriate token; ensure the unread
item background (bg-blue-50/50 and bg-blue-500) maps to a token (e.g.,
bg-accent/50 and accent-foreground or bg-accent and accent-foreground) so colors
align with existing token usage across Header, Drawer, and NavItem.

195-241: User popover also uses hardcoded colors.

Same observation as the notification popover—this section uses text-gray-900, text-gray-500, bg-gray-100, border-gray-200, etc. Consider updating to design tokens for consistent theming.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@frontend/src/components/Header.tsx` around lines 195 - 241, The popover UI in
Header.tsx (Popover / PopoverContent / PopoverTrigger) uses hardcoded Tailwind
color classes (e.g., text-gray-900, text-gray-500, bg-gray-100, border-gray-200)
which breaks theming; replace those specific utility classes on the avatar img,
h4, p, the User ID/Rating spans and the container borders/backgrounds with your
design token classes (for example text-default/text-muted, bg-surface,
border-muted, text-accent) provided by the design system so the popover respects
global theming and dark mode.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@backend/services/transcriptservice.go`:
- Around line 189-190: The code references an undefined variable forRecord
(forRecord.RatingChange) causing a compilation error because
debateRecord/opponentRecord are only produced by UpdateRatings(); fix by either
moving the SaveDebateTranscript calls so they occur after UpdateRatings() and
then pass debateRecord.RatingChange and opponentRecord.RatingChange, or if you
must keep SaveDebateTranscript here, replace forRecord.RatingChange with a safe
placeholder (e.g., 0.0) until the real rating changes are available; update
calls to SaveDebateTranscript and any related variables accordingly (look for
SaveDebateTranscript, UpdateRatings, debateRecord, opponentRecord, forRecord,
RatingChange).

In `@frontend/src/components/ui/select.tsx`:
- Around line 121-122: The Tailwind classes
"high-contrast:data-[highlighted]:bg-[hsl(var(--hc-hover-bg))]" and
"high-contrast:data-[highlighted]:text-[hsl(var(--hc-hover-text))]" in
select.tsx use a non-configured variant; either add a custom variant in
tailwind.config.js by registering a plugin that calls
addVariant('high-contrast', '.high-contrast &') so those prefixed classes become
active, or remove the variant prefix and implement the equivalent styles via the
existing .high-contrast selector in index.css; update the config/plugin or
refactor the two affected class strings in Select component accordingly.

In `@frontend/src/Pages/DebateRoom.tsx`:
- Line 10: The project imports JSON5 (import JSON5 from "json5") and uses it in
judgeDebateResult, but json5 is missing from frontend/package.json; add "json5"
to the dependencies in package.json and run the package manager to install it
(e.g., npm install --save json5 or yarn add json5) so the import in
DebateRoom.tsx and usage in judgeDebateResult resolve correctly.

In `@frontend/src/Pages/TeamBuilder.tsx`:
- Around line 338-340: The Tailwind class "font-600" used on the <h1> element in
TeamBuilder.tsx is invalid; update the className on the Team Builder heading
(the <h1> in TeamBuilder) to use a valid semantic weight such as "font-semibold"
(or "font-bold"/"font-extrabold" if you prefer a heavier weight) instead of
"font-600".

---

Outside diff comments:
In `@backend/models/transcript.go`:
- Around line 41-55: The custom MarshalJSON for SavedDebateTranscript embeds
Alias which still contains the ID and UserID fields, producing
duplicate/conflicting "id"/"userId" keys; fix it by removing the embedded Alias
with ID/UserID and instead build and marshal an explicit output struct that sets
ID: s.ID.Hex(), UserID: s.UserID.Hex() and copies only the other needed fields
from s (or use a type alias that omits the ID/UserID fields), updating the
MarshalJSON function (SavedDebateTranscript, Alias, ID, UserID, MarshalJSON) to
return JSON from that explicit output struct so no duplicate id/userId keys are
emitted.

In `@backend/services/transcriptservice.go`:
- Around line 194-206: The call to SaveDebateTranscript for the "against" user
is missing the newly required eloChange argument; locate the analogous
SaveDebateTranscript call used for the "for" user and mirror its final parameter
by passing the appropriate eloChange value (e.g., eloChange or eloChangeAgainst)
into the againstUser.SaveDebateTranscript call so the call signature matches the
updated function definition.

---

Nitpick comments:
In `@backend/controllers/profile_controller.go`:
- Line 257: The TODO comment is stale and formatting is inconsistent: remove or
update the comment next to transcript.EloChange in the response/struct assembly
so it accurately reflects current behavior (either delete "// TODO: Add actual
Elo change tracking" or replace it with a short, accurate note) and ensure there
is a space before "//" for consistent formatting where the field "eloChange":
transcript.EloChange is set.

In `@backend/services/transcriptservice.go`:
- Around line 975-976: The TODO left a hardcoded zero for "eloChange" in the
response; replace the stub with the tracked value by using transcript.EloChange
(or the appropriate field on the Transcript/model) instead of 0 and remove the
outdated TODO comment; locate the code block constructing the response (the
map/object that includes "eloChange": 0) and substitute transcript.EloChange so
the actual Elo change is returned.

In `@frontend/src/components/Header.tsx`:
- Around line 130-193: The notification popover uses hardcoded Tailwind
gray/blue classes causing theming inconsistencies; update the class names inside
the Popover/PopoverContent block (the JSX that renders the Bell button,
PopoverContent header, notification items, and the "Mark all read" Button) to
use design tokens: replace text-gray-600 with text-muted-foreground,
text-gray-900 with text-foreground, border-gray-100 with border-border,
bg-gray-50 with bg-muted and text-blue-600 on the Button with primary-foreground
or an appropriate token; ensure the unread item background (bg-blue-50/50 and
bg-blue-500) maps to a token (e.g., bg-accent/50 and accent-foreground or
bg-accent and accent-foreground) so colors align with existing token usage
across Header, Drawer, and NavItem.
- Around line 195-241: The popover UI in Header.tsx (Popover / PopoverContent /
PopoverTrigger) uses hardcoded Tailwind color classes (e.g., text-gray-900,
text-gray-500, bg-gray-100, border-gray-200) which breaks theming; replace those
specific utility classes on the avatar img, h4, p, the User ID/Rating spans and
the container borders/backgrounds with your design token classes (for example
text-default/text-muted, bg-surface, border-muted, text-accent) provided by the
design system so the popover respects global theming and dark mode.

In `@frontend/src/components/Matchmaking.tsx`:
- Around line 38-44: Remove the redundant useEffect in Matchmaking that calls
setIsInPool(false) and setWaitTime(0) on mount because those states are already
initialized via useState and are kept in sync by the pool_update and
matchmaking_started/matchmaking_stopped handlers; delete the entire useEffect
block (the one that references setIsInPool and setWaitTime) and ensure
indentation matches the file's 2-space style after removal.

In `@frontend/src/index.css`:
- Around line 88-91: The .high-contrast theme variables are defined outside
`@layer` base while .dark and .contrast live inside, which can cause
specificity/order issues; move the .high-contrast block into the existing `@layer`
base section next to .dark and .contrast so all theme classes (.dark, .contrast,
.high-contrast) are defined within `@layer` base to ensure consistent layering and
predictable cascading.

In `@frontend/src/Pages/TeamBuilder.tsx`:
- Around line 341-343: The subtitle uses a hardcoded color class
("text-gray-700") that won't adapt to dark mode; update the <p> element in
TeamBuilder.tsx to use a theme-aware token or Tailwind dark variant (for example
replace className="text-lg text-gray-700" with className="text-lg text-gray-700
dark:text-gray-300" or with your app's design token like "text-lg
text-secondary") so the subtitle remains readable in both light and dark themes.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 0cffd401-284b-4969-9938-a9e9db2879d1

📥 Commits

Reviewing files that changed from the base of the PR and between 90fb523 and 3d32519.

📒 Files selected for processing (12)
  • backend/config/config.prod.sample.yml
  • backend/controllers/profile_controller.go
  • backend/models/transcript.go
  • backend/services/transcriptservice.go
  • frontend/src/App.tsx
  • frontend/src/Pages/DebateRoom.tsx
  • frontend/src/Pages/TeamBuilder.tsx
  • frontend/src/components/Header.tsx
  • frontend/src/components/JudgementPopup.tsx
  • frontend/src/components/Matchmaking.tsx
  • frontend/src/components/ui/select.tsx
  • frontend/src/index.css
💤 Files with no reviewable changes (1)
  • backend/config/config.prod.sample.yml

Comment thread backend/services/transcriptservice.go Outdated
Comment thread frontend/src/components/ui/select.tsx Outdated
Comment thread frontend/src/Pages/DebateRoom.tsx
Comment thread frontend/src/Pages/TeamBuilder.tsx Outdated
@bhavik-mangla
Copy link
Copy Markdown
Contributor

12 files changes, for a small UI fix?

Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
frontend/src/Pages/DebateRoom.tsx (1)

1-10: Consider splitting unrelated changes into a separate PR.

This file contains judgment concurrency guards, JSON5 parsing changes, navigation behavior updates, and dark mode styling—none of which relate to the stated PR objective of improving TeamBuilder section visibility. Bundling unrelated changes increases review complexity and risk.

Consider moving these DebateRoom enhancements to a dedicated PR for cleaner history and easier rollback if needed.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@frontend/src/Pages/DebateRoom.tsx` around lines 1 - 10, This file mixes
unrelated changes with the TeamBuilder visibility PR—undo or extract the
DebateRoom-specific changes (judgment concurrency guards around
judgeDebate/concedeDebate, JSON5 parsing changes, navigation behavior updates
around useNavigate/useLocation, and dark-mode styling and the JudgmentPopup/Mic
imports) into a separate branch/PR; specifically, revert or remove edits in
DebateRoom.tsx that touch sendDebateMessage, judgeDebate, concedeDebate logic,
JSON5 usage, and dark-mode class/style changes so this PR only contains
TeamBuilder visibility work, then open a new PR containing the DebateRoom
enhancements (retain function names like judgeDebate, concedeDebate,
sendDebateMessage, JudgmentPopup, JSON5 usage) for independent review.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@frontend/src/Pages/DebateRoom.tsx`:
- Around line 1-10: This file mixes unrelated changes with the TeamBuilder
visibility PR—undo or extract the DebateRoom-specific changes (judgment
concurrency guards around judgeDebate/concedeDebate, JSON5 parsing changes,
navigation behavior updates around useNavigate/useLocation, and dark-mode
styling and the JudgmentPopup/Mic imports) into a separate branch/PR;
specifically, revert or remove edits in DebateRoom.tsx that touch
sendDebateMessage, judgeDebate, concedeDebate logic, JSON5 usage, and dark-mode
class/style changes so this PR only contains TeamBuilder visibility work, then
open a new PR containing the DebateRoom enhancements (retain function names like
judgeDebate, concedeDebate, sendDebateMessage, JudgmentPopup, JSON5 usage) for
independent review.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 29acea39-d285-493f-ae53-9275a94638a4

📥 Commits

Reviewing files that changed from the base of the PR and between 23ad9ed and 113540e.

📒 Files selected for processing (2)
  • frontend/src/Pages/DebateRoom.tsx
  • frontend/src/Pages/TeamBuilder.tsx
✅ Files skipped from review due to trivial changes (1)
  • frontend/src/Pages/TeamBuilder.tsx

@Abhishek2005-ard
Copy link
Copy Markdown
Contributor Author

hello @bhavik-mangla
Thanks for the feedback. I’ve cleaned up the branch, resolved conflicts, and reduced the changes to only the required UI files. The PR has been updated please review it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Improve Visibility of "Team Builder" Heading in UI

2 participants