Skip to content

#370 Fix Improve Debate Details modal layout, scrolling, and content visibility#374

Open
hritikkumar07 wants to merge 2 commits into
AOSSIE-Org:mainfrom
hritikkumar07:main
Open

#370 Fix Improve Debate Details modal layout, scrolling, and content visibility#374
hritikkumar07 wants to merge 2 commits into
AOSSIE-Org:mainfrom
hritikkumar07:main

Conversation

@hritikkumar07

@hritikkumar07 hritikkumar07 commented Mar 24, 2026

Copy link
Copy Markdown

🧩Improve Debate Details Modal Layout & Scrolling
Issue Overview

While testing the Profile page, the Debate Details modal had several usability problems that affected readability and navigation:

Some content sections were not fully visible
Scrolling felt inconsistent due to multiple scroll areas
The layout looked tight and visually unbalanced
Long conversations were hard to read properly

What was happening ?
The modal did not properly manage height and overflow. Because of this:

Content exceeded the visible area
Inner elements introduced their own scrollbars
This created a nested scroll experience, which felt broken

🛠️ Changes Made
Reorganized modal structure using flex layout
Limited modal height relative to viewport for better control
Centralized scrolling into one container only
Removed unnecessary overflow rules from inner sections
Improved spacing between sections for better clarity
Adjusted layout to handle long conversation data more gracefully

Outcome
Smooth, single-direction scrolling
Entire content (including Full Conversation) is now accessible
More balanced and readable layout
Better handling of large data inside modal
Impact

Medium – No functional breakage, but significantly improves user experience and readability

Verification
Tested with long conversation data
Checked modal behavior across different screen sizes
Confirmed no overlapping or hidden content
Issue Reference

Close #370
Screenshot 2026-03-24 232235

Summary by CodeRabbit

  • New Features

    • Improved Debate Details dialog layout: smoother vertical scrolling and better header/content behavior.
  • Chores

    • Updated production config placeholders and local ignore rules to keep sensitive files out of version control.
    • Removed the support/donation page route; visits now redirect to home.

@coderabbitai

coderabbitai Bot commented Mar 24, 2026

Copy link
Copy Markdown

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: c95c32af-1d43-4f49-a117-5a8e527a0f9f

📥 Commits

Reviewing files that changed from the base of the PR and between 82d1bb5 and 1c33004.

📒 Files selected for processing (3)
  • backend/Dockerfile.dev
  • frontend/src/App.tsx
  • frontend/src/Pages/Profile.tsx
✅ Files skipped from review due to trivial changes (1)
  • backend/Dockerfile.dev
🚧 Files skipped from review as they are similar to previous changes (1)
  • frontend/src/App.tsx

📝 Walkthrough

Walkthrough

Ignored production config added; sample prod config placeholders standardized; a trailing newline added to a backend Dockerfile; a frontend support route was disabled; and the Profile page "Debate Details" modal layout was adjusted to use a scrollable column flex layout.

Changes

Cohort / File(s) Summary
Ignore files
\.gitignore, frontend/.gitignore
Added config.prod.yml to ignored files and re-introduced an ignored *.env pattern in root .gitignore.
Production config sample
backend/config/config.prod.sample.yml
Replaced angle-bracket placeholders with plain uppercase placeholders (e.g., YOUR_MONGODB_URI, YOUR_GEMINI_API_KEY, YOUR_JWT_SECRET, YOUR_EMAIL).
Backend Dockerfile
backend/Dockerfile.dev
Appended a trailing newline to the file (no content or logic changes).
Frontend routing
frontend/src/App.tsx
Commented-out the support-debateai route so /support-debateai is no longer registered.
Profile dialog layout
frontend/src/Pages/Profile.tsx
Changed Debate Details modal to flex flex-col with a non-shrinking header and an outer scrollable content region; removed internal transcript max-height to rely on outer scrolling.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Poem

🐰 I tuck the secrets out of sight,
Place keys in caps and close them tight,
A route steps back, a modal breathes,
Scrolling now through gentle leaves,
Little rabbit hops — deploy's delight! 🥕

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title directly addresses the main change: fixing Debate Details modal layout, scrolling, and content visibility issues, which aligns with the core modifications to Profile.tsx and related configuration files.
Linked Issues check ✅ Passed The PR fulfills all core objectives from issue #370: ensures no content is cut off by reorganizing modal flex layout, provides single-direction scrolling by centralizing it in one container and removing inner overflow rules, applies proper spacing, sets appropriate modal max-height, and improves handling of long conversation data.
Out of Scope Changes check ✅ Passed Changes to .gitignore files (adding config.prod.yml), backend configuration sample file, and Dockerfile trailing newline are incidental/supporting changes related to project setup, not directly addressing the modal issue but reasonable in scope for a deployment preparation PR.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

✏️ 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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 3

🤖 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/Dockerfile.dev`:
- Around line 23-27: Remove the invalid global GOFLAGS=-insecure and stop using
blanket "*" patterns for GONOSUMCHECK, GONOSUMDB, and GONOPROXY; instead set
GOPRIVATE to the specific private module path(s) you need (which will scope
GONOSUMDB/GONOPROXY behavior) and, only if required for specific hosts, set
GOINSECURE and GOPROXY for those specific domains (not "*"); update the ENV
entries so they use GOPRIVATE=<your-private-modules> and optionally
GOINSECURE=<comma-separated-hosts> and GOPROXY=<proxy-for-specific-hosts> while
removing GOFLAGS and the global "*" entries.

In `@frontend/src/App.tsx`:
- Line 20: The commented import and removed route for the SupportOpenSource
component (formerly imported as SupportOpenSource) caused header links to
/support-debateai to fall through to the wildcard redirect; restore the import
for SupportOpenSource and re-add the Route that mounts it at path
"/support-debateai" in the router configuration so header links resolve
correctly (ensure the route is registered before the wildcard Redirect/Route
that handles unknown paths).

In `@frontend/src/Pages/Profile.tsx`:
- Line 1437: The inner div with classes "max-h-48 overflow-y-auto border
rounded-lg p-3 space-y-3" creates a nested scroll region; remove the
constraining classes (remove "max-h-48" and "overflow-y-auto") so the content
flows and the parent scroll container handles scrolling, e.g., replace them with
no max-height (or "max-h-full"/"max-h-none") and use "overflow-visible" if
needed; update the JSX element that renders the "Full Conversation" message box
accordingly to avoid the inner scrollbar while preserving border/padding
classes.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 827a2cf6-094c-487d-a0f8-6ef482e9152b

📥 Commits

Reviewing files that changed from the base of the PR and between 09ef1bb and 82d1bb5.

📒 Files selected for processing (6)
  • .gitignore
  • backend/Dockerfile.dev
  • backend/config/config.prod.sample.yml
  • frontend/.gitignore
  • frontend/src/App.tsx
  • frontend/src/Pages/Profile.tsx

Comment thread backend/Dockerfile.dev Outdated
Comment on lines +23 to +27
ENV GONOSUMCHECK=*
ENV GOFLAGS=-insecure
ENV GONOSUMDB=*
ENV GONOPROXY=*
ENV GOPROXY=direct No newline at end of file

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

🌐 Web query:

In Go 1.24, is -insecurevalid inGOFLAGS? What are the recommended env vars for private/insecure module fetching (GOPRIVATE, GONOSUMDB, GONOPROXY, GOINSECURE)?

💡 Result:

No, the -insecure flag is not valid in GOFLAGS in Go 1.24. GOFLAGS supports command flags known by the current go subcommand (like -ldflags, -gcflags), but -insecure is a legacy flag primarily for go get that has been deprecated since Go 1.14 in favor of GOINSECURE. It is not listed among standard build flags shared across commands, and source code handling shows GOFLAGS applies flags recognized by the specific command. No Go 1.24 documentation or release notes mention -insecure support in GOFLAGS. The recommended environment variables for private/insecure module fetching are: - GOPRIVATE: Comma-separated glob patterns for private module path prefixes. Acts as default for GONOPROXY, GONOSUMDB, and affects GOVCS. Bypasses proxy and checksum DB, fetches directly via VCS. - GONOPROXY: Glob patterns for modules not to request from any proxy (use direct VCS). Overrides GOPRIVATE for proxy decision. - GONOSUMDB: Glob patterns for modules not to check against public checksum DB (sum.golang.org). - GOINSECURE: Glob patterns for module path prefixes to fetch insecurely (e.g., plain HTTP, skipping TLS verification). Only for direct fetches; does not disable sum DB validation (use with GOPRIVATE/GONOSUMDB). Set persistently with go env -w VAR=value. For example: go env -w GOPRIVATE=.corp.example.com go env -w GOINSECURE=.corp.example.com This configuration treats matching modules as private (direct fetch, no proxy/sumdb) and insecure (no TLS).

Citations:


GOFLAGS=-insecure is invalid in Go 1.24 and will cause command failures; global * patterns disable all supply-chain protections.

At Line 24, GOFLAGS=-insecure is not a recognized flag in Go 1.24 (the -insecure flag was deprecated in Go 1.14 in favor of GOINSECURE). This will cause command parsing failures at runtime.

At Lines 23–26, using * patterns for GONOSUMCHECK, GONOSUMDB, and GONOPROXY disables checksum validation and proxy protections globally, removing all supply-chain integrity checks. Additionally, GONOSUMCHECK is not a standard Go environment variable.

Replace with scoped patterns using GOPRIVATE (which acts as a default for both GONOSUMDB and GONOPROXY) and GOINSECURE if plain HTTP is required:

-ENV GONOSUMCHECK=*
-ENV GOFLAGS=-insecure
-ENV GONOSUMDB=*
-ENV GONOPROXY=*
-ENV GOPROXY=direct
+# For private modules, scope patterns narrowly:
+# ENV GOPRIVATE=github.com/<org>/*
+# ENV GOINSECURE=github.com/<org>/* (if plain HTTP is required)
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@backend/Dockerfile.dev` around lines 23 - 27, Remove the invalid global
GOFLAGS=-insecure and stop using blanket "*" patterns for GONOSUMCHECK,
GONOSUMDB, and GONOPROXY; instead set GOPRIVATE to the specific private module
path(s) you need (which will scope GONOSUMDB/GONOPROXY behavior) and, only if
required for specific hosts, set GOINSECURE and GOPROXY for those specific
domains (not "*"); update the ENV entries so they use
GOPRIVATE=<your-private-modules> and optionally
GOINSECURE=<comma-separated-hosts> and GOPROXY=<proxy-for-specific-hosts> while
removing GOFLAGS and the global "*" entries.

Comment thread frontend/src/App.tsx Outdated
// Layout
import Layout from './components/Layout';
import SupportOpenSource from './Pages/SupportOpenSource';
// import SupportOpenSource from './Pages/SupportOpenSource';

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

Disabling /support-debateai route breaks existing navigation paths.

With Line 68 commented, header links pointing to /support-debateai now fall through to the wildcard redirect at Line 108. This creates a silent navigation failure.

🔧 Proposed fix (restore route)
-// import SupportOpenSource from './Pages/SupportOpenSource';
+import SupportOpenSource from './Pages/SupportOpenSource';
...
-        {/* <Route path='support-debateai' element={<SupportOpenSource />} /> */}
+        <Route path='support-debateai' element={<SupportOpenSource />} />

Also applies to: 68-68

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

In `@frontend/src/App.tsx` at line 20, The commented import and removed route for
the SupportOpenSource component (formerly imported as SupportOpenSource) caused
header links to /support-debateai to fall through to the wildcard redirect;
restore the import for SupportOpenSource and re-add the Route that mounts it at
path "/support-debateai" in the router configuration so header links resolve
correctly (ensure the route is registered before the wildcard Redirect/Route
that handles unknown paths).

Comment thread frontend/src/Pages/Profile.tsx Outdated
@hritikkumar07

Copy link
Copy Markdown
Author

Hi, I've addressed all the @CodeRabbit review comments and pushed the fixes. Could a maintainer please review this PR when you get a chance?

Thank you!

@coderabbitai

coderabbitai Bot commented Mar 26, 2026

Copy link
Copy Markdown

The PR description image shows the updated "Debate Details" modal — the layout looks clean with a single unified scrollbar on the right side, all sections (Debate Summary, Your Performance, and Full Conversation) are visible, and the conversation messages render properly within the scrollable container. The flex-based restructuring is visible in the result.

@hritikkumar07, thanks for the heads-up! I'll go ahead and re-review the PR now to verify that all previously raised comments have been addressed.

✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

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.

[BUG]: Debate Details modal content overflow and improper display layout

1 participant