Skip to content

fix: Theme issues in the light theme#60

Open
rayaanr wants to merge 1 commit intomainfrom
rr/fix-theme-issues
Open

fix: Theme issues in the light theme#60
rayaanr wants to merge 1 commit intomainfrom
rr/fix-theme-issues

Conversation

@rayaanr
Copy link
Contributor

@rayaanr rayaanr commented Nov 19, 2025

PR Type

Bug fix, Enhancement


Description

  • Fix light theme contrast issues with updated text and border colors

  • Add theme-aware logo switching between black and white SVG formats

  • Enhance visual consistency across pages with dark/light theme support

  • Temporarily disable KYC status check and add verification bypass for testing

  • Improve button and border styling for better accessibility in light theme


Diagram Walkthrough

flowchart LR
  A["Theme CSS<br/>Updated Colors"] --> B["Logo Selection<br/>Black/White SVG"]
  A --> C["Border & Text<br/>Light Theme"]
  B --> D["Onboard Page"]
  B --> E["Home Page"]
  B --> F["Subscription Page"]
  C --> G["History Page"]
  C --> H["Bottom Navigation"]
  C --> I["User Count"]
  J["KYC Check<br/>Disabled"] --> K["Wallet Page"]
  L["Verification<br/>Bypass"] --> M["Verification Page"]
Loading

File Walkthrough

Relevant files
Bug fix
3 files
theme.css
Update light theme text color for better contrast               
+1/-1     
page.tsx
Temporarily disable KYC status check for testing                 
+27/-26 
page.tsx
Add temporary verification bypass button for testing         
+29/-19 
Enhancement
7 files
page.tsx
Add light theme border and text color support                       
+3/-3     
page.tsx
Add theme-aware logo and improve tab styling                         
+11/-9   
page.tsx
Implement theme-aware logo and feature card backgrounds   
+7/-5     
page.tsx
Add theme-aware logo selection for home page                         
+3/-1     
page.tsx
Update plan card styling for light theme support                 
+1/-1     
bottomNavigation.tsx
Add light theme border color support                                         
+1/-1     
usercount.tsx
Apply primary text color to user count display                     
+1/-1     

Summary by CodeRabbit

  • New Features

    • Added dark mode theme support with adaptive logos and UI components across the app.
  • Style

    • Updated navigation, cards, and buttons with improved light and dark mode styling.
    • Refined borders and background colors for better visual consistency and contrast.
  • Chores

    • Temporarily disabled KYC status verification check.
    • Added testing shortcut in verification flow.

… app

style: update button and border styles for better contrast in History and Subscription pages

refactor: temporarily disable KYC status check in Wallet page for testing purposes

fix: adjust logo and background colors based on theme in Onboard and Home pages

style: enhance visual consistency in Subscription page with updated colors and borders

fix: improve user count display with primary text color

style: modify theme colors for better accessibility and visual appeal
Copilot AI review requested due to automatic review settings November 19, 2025 12:48
@vercel
Copy link

vercel bot commented Nov 19, 2025

@rayaanr must be a member of the CeyLabs Projects team on Vercel to deploy.
- Click here to add @rayaanr to the team.
- If you initiated this build, request access.

Learn more about collaboration on Vercel and other options here.

@coderabbitai
Copy link

coderabbitai bot commented Nov 19, 2025

Walkthrough

The PR adds dark mode theme support across dashboard and subscription pages by integrating a theme hook and conditional styling. It disables KYC verification checks, introduces a temporary testing button for verification flow, and updates light/dark border and color styling across multiple components.

Changes

Cohort / File(s) Summary
Dark Mode Theme Integration
src/app/dashboard/subscription/page.tsx, src/app/onboard/page.tsx, src/app/page.tsx, src/components/bottomNavigation.tsx
Added theme awareness via useTheme hook. Conditional logo rendering (white/black variants based on isDark). Updated borders, backgrounds, and text colors with dark-mode variants for tabs, feature tiles, and navigation elements.
Light/Dark Mode Styling Updates
src/app/dashboard/history/page.tsx, src/app/subscription/page.tsx
Updated button and card styling with lighter borders and backgrounds for light mode and darker variants for dark mode. Applied conditional dark-mode classes to refresh button, empty-state avatar, plan cards.
Feature/Behavior Changes
src/app/dashboard/page.tsx, src/app/verification/page.tsx
Disabled KYC status verification effect via commented-out useEffect. Added temporary testing button alongside identity verification button to navigate to /dashboard/subscription.
Minor Theme & Styling
src/components/usercount.tsx, src/styles/theme.css
Added text-primary class to user count display. Updated secondary text color in light theme from #666666 to #a92b2b.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

  • KYC verification disabled — Confirm intentionality and whether this is temporary; verify no unintended security implications.
  • Temporary testing button — Ensure testing bypass in src/app/verification/page.tsx is documented for removal and does not ship to production.
  • Dark mode consistency — Verify theme variants are applied uniformly across all updated pages and components.
  • Color value change — Review the secondary text color shift in theme.css to confirm it meets accessibility standards.

Poem

🐰✨ Dark mode hops into view,
Theme-aware buttons, logos anew,
Testing bypass (temporary, true!),
KYC rests while colors renew,
The dashboard's wardrobe shines through!


📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Free

📥 Commits

Reviewing files that changed from the base of the PR and between 2e26836 and ebfa0e4.

⛔ Files ignored due to path filters (4)
  • bun.lockb is excluded by !**/bun.lockb
  • package-lock.json is excluded by !**/package-lock.json
  • public/BDLogo_Black.svg is excluded by !**/*.svg
  • public/DeepaLogo_Black.svg is excluded by !**/*.svg
📒 Files selected for processing (10)
  • src/app/dashboard/history/page.tsx (2 hunks)
  • src/app/dashboard/page.tsx (1 hunks)
  • src/app/dashboard/subscription/page.tsx (8 hunks)
  • src/app/onboard/page.tsx (4 hunks)
  • src/app/page.tsx (3 hunks)
  • src/app/subscription/page.tsx (1 hunks)
  • src/app/verification/page.tsx (1 hunks)
  • src/components/bottomNavigation.tsx (1 hunks)
  • src/components/usercount.tsx (1 hunks)
  • src/styles/theme.css (1 hunks)

Tip

📝 Customizable high-level summaries are now available in beta!

You can now customize how CodeRabbit generates the high-level summary in your pull requests — including its content, structure, tone, and formatting.

  • Provide your own instructions using the high_level_summary_instructions setting.
  • Format the summary however you like (bullet lists, tables, multi-section layouts, contributor stats, etc.).
  • Use high_level_summary_in_walkthrough to move the summary from the description to the walkthrough section.

Example instruction:

"Divide the high-level summary into five sections:

  1. 📝 Description — Summarize the main change in 50–60 words, explaining what was done.
  2. 📓 References — List relevant issues, discussions, documentation, or related PRs.
  3. 📦 Dependencies & Requirements — Mention any new/updated dependencies, environment variable changes, or configuration updates.
  4. 📊 Contributor Summary — Include a Markdown table showing contributions:
    | Contributor | Lines Added | Lines Removed | Files Changed |
  5. ✔️ Additional Notes — Add any extra reviewer context.
    Keep each section concise (under 200 words) and use bullet or numbered lists for clarity."

Note: This feature is currently in beta for Pro-tier users, and pricing will be announced later.


Note

🎁 Summarized by CodeRabbit Free

Your organization is on the Free plan. CodeRabbit will generate a high-level summary and a walkthrough for each pull request. For a comprehensive line-by-line review, please upgrade your subscription to CodeRabbit Pro by visiting https://app.coderabbit.ai/login.

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

@qodo-code-review
Copy link
Contributor

PR Compliance Guide 🔍

Below is a summary of compliance checks for this PR:

Security Compliance
🔴
KYC enforcement disabled

Description: The KYC enforcement useEffect that redirects non-approved users to /verification is fully
commented out, effectively disabling KYC checks and allowing unverified users to access
the wallet/dashboard.
page.tsx [182-209]

Referred Code
// Temporarily disabled for testing
// useEffect(() => {
//     const checkKycStatus = async () => {
//         if (authToken) {
//             try {
//                 const res = await fetch(`/api/user/kyc/status`, {
//                     method: "GET",
//                     headers: {
//                         "Content-Type": "application/json",
//                         Authorization: `Bearer ${authToken}`,
//                     },
//                 });

//                 if (res.ok) {
//                     const data = await res.json();
//                     if (data.status !== "APPROVED") {
//                         router.push("/verification");
//                     }
//                 }
//             } catch (error) {
//                 console.error("Error checking KYC status:", error);


 ... (clipped 7 lines)
Verification bypass

Description: A "Skip Verification (Testing)" button routes users directly to /dashboard/subscription
without verification, enabling bypass of identity checks in production if not properly
gated.
page.tsx [628-635]

Referred Code
    {/* Temporary bypass for testing */}
    <Button
        onClick={() => router.push("/dashboard/subscription")}
        className="w-full border border-gray-600 bg-gray-800 px-6 py-3 text-sm font-medium text-gray-300 hover:bg-gray-700"
    >
        Skip Verification (Testing)
    </Button>
</>
Ticket Compliance
🎫 No ticket provided
  • Create ticket/issue
Codebase Duplication Compliance
Codebase context is not defined

Follow the guide to enable codebase context checks.

Custom Compliance
🟢
Generic: Meaningful Naming and Self-Documenting Code

Objective: Ensure all identifiers clearly express their purpose and intent, making code
self-documenting

Status: Passed

Learn more about managing compliance generic rules or creating your own custom rules

Generic: Secure Error Handling

Objective: To prevent the leakage of sensitive system information through error messages while
providing sufficient detail for internal debugging.

Status: Passed

Learn more about managing compliance generic rules or creating your own custom rules

Generic: Secure Logging Practices

Objective: To ensure logs are useful for debugging and auditing without exposing sensitive
information like PII, PHI, or cardholder data.

Status: Passed

Learn more about managing compliance generic rules or creating your own custom rules

Generic: Comprehensive Audit Trails

Objective: To create a detailed and reliable record of critical system actions for security analysis
and compliance.

Status:
Bypass Added: A temporary verification bypass button was added without any corresponding audit logging
to record the action, which may allow skipping a critical verification step without
traceability.

Referred Code
{/* Temporary bypass for testing */}
<Button
    onClick={() => router.push("/dashboard/subscription")}
    className="w-full border border-gray-600 bg-gray-800 px-6 py-3 text-sm font-medium text-gray-300 hover:bg-gray-700"
>
    Skip Verification (Testing)
</Button>

Learn more about managing compliance generic rules or creating your own custom rules

Generic: Robust Error Handling and Edge Case Management

Objective: Ensure comprehensive error handling that provides meaningful context and graceful
degradation

Status:
Disabled Checks: The KYC status check effect was fully commented out for testing without an alternative
error/edge handling path, which may skip necessary validation and degrade robustness.

Referred Code
// Temporarily disabled for testing
// useEffect(() => {
//     const checkKycStatus = async () => {
//         if (authToken) {
//             try {
//                 const res = await fetch(`/api/user/kyc/status`, {
//                     method: "GET",
//                     headers: {
//                         "Content-Type": "application/json",
//                         Authorization: `Bearer ${authToken}`,
//                     },
//                 });

//                 if (res.ok) {
//                     const data = await res.json();
//                     if (data.status !== "APPROVED") {
//                         router.push("/verification");
//                     }
//                 }
//             } catch (error) {
//                 console.error("Error checking KYC status:", error);


 ... (clipped 7 lines)

Learn more about managing compliance generic rules or creating your own custom rules

Generic: Security-First Input Validation and Data Handling

Objective: Ensure all data inputs are validated, sanitized, and handled securely to prevent
vulnerabilities

Status:
Auth Bypass: The addition of a "Skip Verification (Testing)" navigation introduces a
potential insecure flow that bypasses verification without visible guardrails or
environment gating in the diff.

Referred Code
{/* Temporary bypass for testing */}
<Button
    onClick={() => router.push("/dashboard/subscription")}
    className="w-full border border-gray-600 bg-gray-800 px-6 py-3 text-sm font-medium text-gray-300 hover:bg-gray-700"
>
    Skip Verification (Testing)
</Button>

Learn more about managing compliance generic rules or creating your own custom rules

Compliance status legend 🟢 - Fully Compliant
🟡 - Partial Compliant
🔴 - Not Compliant
⚪ - Requires Further Human Verification
🏷️ - Compliance label

@qodo-code-review
Copy link
Contributor

PR Code Suggestions ✨

Explore these optional code suggestions:

CategorySuggestion                                                                                                                                    Impact
Security
Restore the commented-out KYC check

Restore the commented-out KYC status check in the useEffect hook. Disabling this
check for testing introduces a critical security risk by allowing unverified
users to access the dashboard.

src/app/dashboard/page.tsx [182-208]

-// Temporarily disabled for testing
-// useEffect(() => {
-//     const checkKycStatus = async () => {
-//         if (authToken) {
-//             try {
-//                 const res = await fetch(`/api/user/kyc/status`, {
-//                     method: "GET",
-//                     headers: {
-//                         "Content-Type": "application/json",
-//                         Authorization: `Bearer ${authToken}`,
-//                     },
-//                 });
+useEffect(() => {
+    const checkKycStatus = async () => {
+        if (authToken) {
+            try {
+                const res = await fetch(`/api/user/kyc/status`, {
+                    method: "GET",
+                    headers: {
+                        "Content-Type": "application/json",
+                        Authorization: `Bearer ${authToken}`,
+                    },
+                });
 
-//                 if (res.ok) {
-//                     const data = await res.json();
-//                     if (data.status !== "APPROVED") {
-//                         router.push("/verification");
-//                     }
-//                 }
-//             } catch (error) {
-//                 console.error("Error checking KYC status:", error);
-//             }
-//         }
-//     };
+                if (res.ok) {
+                    const data = await res.json();
+                    if (data.status !== "APPROVED") {
+                        router.push("/verification");
+                    }
+                }
+            } catch (error) {
+                console.error("Error checking KYC status:", error);
+            }
+        }
+    };
 
-//     checkKycStatus();
-// }, [authToken, router]);
+    checkKycStatus();
+}, [authToken, router]);
  • Apply / Chat
Suggestion importance[1-10]: 10

__

Why: This suggestion correctly identifies a critical security vulnerability where the KYC status check is commented out, which would allow unverified users to access sensitive parts of the application.

High
Remove the verification bypass button

Remove the "Skip Verification (Testing)" button. This button creates a security
backdoor by bypassing the identity verification process and should not be
present in production code.

src/app/verification/page.tsx [628-634]

-{/* Temporary bypass for testing */}
-<Button
-    onClick={() => router.push("/dashboard/subscription")}
-    className="w-full border border-gray-600 bg-gray-800 px-6 py-3 text-sm font-medium text-gray-300 hover:bg-gray-700"
->
-    Skip Verification (Testing)
-</Button>
+{/* The temporary bypass button should be removed. */}
  • Apply / Chat
Suggestion importance[1-10]: 10

__

Why: This suggestion correctly identifies a critical security vulnerability where a temporary button allows bypassing the identity verification flow, which should never be merged into a main branch.

High
  • More

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR fixes theme-related issues in the light theme by improving visual consistency and accessibility across light and dark modes. The changes primarily involve adding proper theme-aware styling using Tailwind's dark: prefix and adjusting color values to work better in light mode.

Key changes:

  • Added theme context usage to dynamically switch between light and dark logos
  • Updated CSS custom properties for better light theme colors
  • Added responsive dark: classes throughout components for proper theme support
  • Introduced temporary testing bypass for KYC verification

Reviewed Changes

Copilot reviewed 10 out of 14 changed files in this pull request and generated 9 comments.

Show a summary per file
File Description
src/styles/theme.css Updated secondary text color for light theme
src/components/usercount.tsx Added primary text color class
src/components/bottomNavigation.tsx Added theme-aware border colors
src/app/verification/page.tsx Added KYC bypass button for testing, wrapped button in fragment
src/app/subscription/page.tsx Updated plan cards and status text with theme-aware colors
src/app/page.tsx Added dynamic logo switching based on theme
src/app/onboard/page.tsx Added dynamic logo and theme-aware card backgrounds
src/app/dashboard/subscription/page.tsx Added theme-aware logos, tabs, borders, and status colors
src/app/dashboard/page.tsx Commented out KYC status check for testing
src/app/dashboard/history/page.tsx Added theme-aware borders and icon colors
public/DeepaLogo_Black.svg Added new black logo variant
public/BDLogo_Black.svg Added new black logo variant
package-lock.json Deleted lock file

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

--tg-color-scheme: light;
--text-primary: var(--tg-theme-text-color, #000000);
--text-secondary: var(--tg-theme-hint-color, #666666);
--text-secondary: var(--tg-theme-hint-color, #a92b2b);
Copy link

Copilot AI Nov 19, 2025

Choose a reason for hiding this comment

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

The secondary text color #a92b2b is a red color, which is typically used for errors or warnings, not for secondary text. This should likely be a gray color like #666666 (the original value) or another neutral color appropriate for secondary text.

Suggested change
--text-secondary: var(--tg-theme-hint-color, #a92b2b);
--text-secondary: var(--tg-theme-hint-color, #666666);

Copilot uses AI. Check for mistakes.
Comment on lines +629 to +634
<Button
onClick={() => router.push("/dashboard/subscription")}
className="w-full border border-gray-600 bg-gray-800 px-6 py-3 text-sm font-medium text-gray-300 hover:bg-gray-700"
>
Skip Verification (Testing)
</Button>
Copy link

Copilot AI Nov 19, 2025

Choose a reason for hiding this comment

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

This testing bypass button allows users to skip KYC verification, which poses a security risk in production. Ensure this is removed before deploying to production or add environment-based conditional rendering to only show in development.

Suggested change
<Button
onClick={() => router.push("/dashboard/subscription")}
className="w-full border border-gray-600 bg-gray-800 px-6 py-3 text-sm font-medium text-gray-300 hover:bg-gray-700"
>
Skip Verification (Testing)
</Button>
{process.env.NODE_ENV === "development" && (
<Button
onClick={() => router.push("/dashboard/subscription")}
className="w-full border border-gray-600 bg-gray-800 px-6 py-3 text-sm font-medium text-gray-300 hover:bg-gray-700"
>
Skip Verification (Testing)
</Button>
)}

Copilot uses AI. Check for mistakes.
{/* Temporary bypass for testing */}
<Button
onClick={() => router.push("/dashboard/subscription")}
className="w-full border border-gray-600 bg-gray-800 px-6 py-3 text-sm font-medium text-gray-300 hover:bg-gray-700"
Copy link

Copilot AI Nov 19, 2025

Choose a reason for hiding this comment

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

The bypass button uses hardcoded dark theme colors (gray-600, gray-800) without theme-aware classes. Add dark: prefixes for consistency with the rest of the PR: border-gray-300 dark:border-gray-600 bg-gray-200 dark:bg-gray-800 text-gray-700 dark:text-gray-300 hover:bg-gray-300 dark:hover:bg-gray-700.

Suggested change
className="w-full border border-gray-600 bg-gray-800 px-6 py-3 text-sm font-medium text-gray-300 hover:bg-gray-700"
className="w-full border border-gray-300 dark:border-gray-600 bg-gray-200 dark:bg-gray-800 px-6 py-3 text-sm font-medium text-gray-700 dark:text-gray-300 hover:bg-gray-300 dark:hover:bg-gray-700"

Copilot uses AI. Check for mistakes.

checkKycStatus();
}, [authToken, router]);
// Temporarily disabled for testing
Copy link

Copilot AI Nov 19, 2025

Choose a reason for hiding this comment

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

The comment should specify what needs to be done before re-enabling this code and under what conditions it should be restored (e.g., 'Temporarily disabled for testing - re-enable before production deployment').

Suggested change
// Temporarily disabled for testing
// Temporarily disabled for testing. Re-enable this code before production deployment to ensure KYC status is checked and users are redirected to verification if not approved.

Copilot uses AI. Check for mistakes.
selectedPlan === plan.id
? "border-orange-500 bg-gradient-to-r from-orange-500/10 to-orange-600/10 shadow-lg shadow-orange-500/20"
: "border-gray-700 bg-gradient-to-r from-gray-800/50 to-gray-900/50 hover:border-gray-600"
: "border-gray-200 dark:border-gray-700 bg-gray-100 dark:bg-gray-800/50 hover:border-gray-600"
Copy link

Copilot AI Nov 19, 2025

Choose a reason for hiding this comment

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

There is an extra space between dark:bg-gray-800/50 and hover:border-gray-600. Remove the double space for consistency.

Suggested change
: "border-gray-200 dark:border-gray-700 bg-gray-100 dark:bg-gray-800/50 hover:border-gray-600"
: "border-gray-200 dark:border-gray-700 bg-gray-100 dark:bg-gray-800/50 hover:border-gray-600"

Copilot uses AI. Check for mistakes.
<div
className={cn(
"absolute inset-y-1 left-1 w-[calc(50%-0.25rem)] transform-gpu rounded-xl bg-zinc-800 transition-transform duration-200 ease-out",
"absolute inset-y-1 left-1 w-[calc(50%-0.25rem)] transform-gpu rounded-xl bg-orange-500 dark:bg-zinc-800 transition-transform duration-200 ease-out",
Copy link

Copilot AI Nov 19, 2025

Choose a reason for hiding this comment

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

There is an extra space between inset-y-1 and left-1. Remove the double space for consistency.

Suggested change
"absolute inset-y-1 left-1 w-[calc(50%-0.25rem)] transform-gpu rounded-xl bg-orange-500 dark:bg-zinc-800 transition-transform duration-200 ease-out",
"absolute inset-y-1 left-1 w-[calc(50%-0.25rem)] transform-gpu rounded-xl bg-orange-500 dark:bg-zinc-800 transition-transform duration-200 ease-out",

Copilot uses AI. Check for mistakes.
<>
<Button
onClick={initiateVerification}
disabled={isLoading || !userData}
Copy link

Copilot AI Nov 19, 2025

Choose a reason for hiding this comment

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

This use of variable 'isLoading' always evaluates to false.

Copilot uses AI. Check for mistakes.
disabled={isLoading || !userData}
className={cn(
"w-full px-6 py-4 text-lg font-semibold text-white transition-all duration-300",
isLoading || !userData
Copy link

Copilot AI Nov 19, 2025

Choose a reason for hiding this comment

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

This use of variable 'isLoading' always evaluates to false.

Copilot uses AI. Check for mistakes.
: "bg-gradient-to-r from-orange-500 to-orange-600 hover:from-orange-600 hover:to-orange-700 hover:shadow-xl"
)}
>
{isLoading ? (
Copy link

Copilot AI Nov 19, 2025

Choose a reason for hiding this comment

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

This use of variable 'isLoading' always evaluates to false.

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants