Skip to content

Conversation

@apsinghdev
Copy link
Owner

@apsinghdev apsinghdev commented Nov 18, 2025

Summary by CodeRabbit

  • New Features

    • Added a dedicated Contact page with email, phone, response info and alternate connection links.
    • Added Cancellation & Refund and Shipping & Exchange policy pages.
    • Introduced reusable legal UI components (layout, header, sections, cards, content, contact block, footer) for site-wide use.
    • Expanded footer with Contact, Cancellation & Refunds, and Shipping & Exchange links.
  • Documentation

    • Replaced "Terms of Service" with "Terms and Conditions" across legal pages.

@vercel
Copy link

vercel bot commented Nov 18, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
opensox-web Ready Ready Preview Comment Nov 18, 2025 6:04am
opensox-website Ready Ready Preview Comment Nov 18, 2025 6:04am

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Nov 18, 2025

Walkthrough

Adds reusable legal UI components, three legal pages and a contact page, updates Privacy/Terms wording to "Terms and Conditions", and updates footer navigation with new legal and contact links.

Changes

Cohort / File(s) Change Summary
Legal UI Components
apps/web/src/components/legal/LegalPageLayout.tsx, apps/web/src/components/legal/LegalPageHeader.tsx, apps/web/src/components/legal/LegalSection.tsx, apps/web/src/components/legal/LegalCard.tsx, apps/web/src/components/legal/LegalContent.tsx, apps/web/src/components/legal/ContactInfo.tsx, apps/web/src/components/legal/LegalFooter.tsx
Adds multiple new React/TS components for legal pages: page layout, page header (title + optional effective date/subtitle), section wrapper, stylized card (variants), content wrapper, contact info block (email/phone/optional contact-page link), and footer with dynamic year.
Legal Barrel Export
apps/web/src/components/legal/index.ts
Adds barrel file re-exporting the new legal components for centralized imports.
Legal Policy Pages
apps/web/src/app/(main)/legal/cancellation-and-refund/page.tsx, apps/web/src/app/(main)/legal/shipping-and-exchange/page.tsx
Adds new Next.js app-router pages for Cancellation & Refund and Shipping & Exchange policies; each exports metadata and a default page component composed from the legal components.
Contact Page
apps/web/src/app/(main)/contact/page.tsx
Adds a new contact page using the legal layout/components; includes email/phone cards, response-time card, guidance on what to include, and other connection links.
Terminology Updates
apps/web/src/app/(main)/legal/privacy/page.tsx, apps/web/src/app/(main)/legal/terms/page.tsx
Replaces occurrences of "Terms of Service" with "Terms and Conditions" to unify terminology across Privacy and Terms pages.
Footer Navigation
apps/web/src/components/landing-sections/footer.tsx
Updates footer links: renames "Terms of Service" to "Terms and Conditions", adds "Cancellation and Refunds", "Shipping and Exchange", and adds a Contact link.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant Footer
    participant Router
    participant LegalPageLayout
    participant Components
    participant External

    User->>Footer: Click legal or Contact link
    Footer->>Router: Navigate to route (/contact or /legal/...)
    Router->>LegalPageLayout: Mount page layout
    LegalPageLayout->>Components: Compose header, sections, cards, ContactInfo
    Components->>External: Render mailto / tel / external links (Discord, GitHub)
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

  • Areas to inspect closely:
    • ContactInfo.tsx — mailto/tel formatting, defaults, and /contact link behavior
    • New pages' metadata exports and effective date usage
    • Barrel exports in components/legal/index.ts
    • Footer link targets and updated link text
    • Styling/variant handling in LegalCard and conditional rendering in LegalPageHeader

Poem

🐰
I hopped through code with tiny paws and cheer,
I stitched up headers, cards, and contact near.
Links that lead and footers that softly hum,
Policies and pages — all neat and plumb.
— Flops, the legal rabbit 🥕

Pre-merge checks and finishing touches

❌ Failed checks (1 warning, 1 inconclusive)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
Title check ❓ Inconclusive The title '[chore]: add legal details' is vague and overly broad. It uses generic language that doesn't clearly convey the specific changes made in the changeset. Refine the title to be more specific about the primary change, such as '[chore]: add legal pages and contact components' or '[chore]: create cancellation, shipping, and contact pages with legal components'.
✅ Passed checks (1 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch chore/add-customer-support-details

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between d6e2167 and 7a5bbed.

📒 Files selected for processing (2)
  • apps/web/src/app/(main)/legal/cancellation-and-refund/page.tsx (1 hunks)
  • apps/web/src/app/(main)/legal/shipping-and-exchange/page.tsx (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • apps/web/src/app/(main)/legal/shipping-and-exchange/page.tsx
🧰 Additional context used
🧬 Code graph analysis (1)
apps/web/src/app/(main)/legal/cancellation-and-refund/page.tsx (7)
apps/web/src/components/legal/LegalPageLayout.tsx (1)
  • LegalPageLayout (7-13)
apps/web/src/components/legal/LegalPageHeader.tsx (1)
  • LegalPageHeader (9-26)
apps/web/src/components/legal/LegalContent.tsx (1)
  • LegalContent (7-11)
apps/web/src/components/legal/LegalCard.tsx (1)
  • LegalCard (10-28)
apps/web/src/components/legal/LegalSection.tsx (1)
  • LegalSection (9-22)
apps/web/src/components/legal/ContactInfo.tsx (1)
  • ContactInfo (11-58)
apps/web/src/components/legal/LegalFooter.tsx (1)
  • LegalFooter (3-11)
🔇 Additional comments (4)
apps/web/src/app/(main)/legal/cancellation-and-refund/page.tsx (4)

1-12: LGTM! Imports and setup are clean.

The ESLint disable for react/no-unescaped-entities is appropriate given the apostrophes in the content (e.g., "don't", "You'll"), and all imported components are properly utilized.


16-20: LGTM! Metadata is well-structured.

The title and description are clear, SEO-friendly, and accurately reflect the page content.


22-181: LGTM! Component structure and content are well-organized.

The component properly utilizes the legal UI components and presents the policy in a clear, user-friendly manner:

  • Clean component hierarchy with proper use of LegalPageLayout, LegalSection, and LegalCard
  • Content is logically structured from introduction through policy details to contact information
  • Good use of visual hierarchy with the highlighted contact card (line 163)
  • Responsive grid layout for pre-purchase guidance cards (line 78)
  • EFFECTIVE_DATE constant is correctly used in the header (line 27), addressing the previous critical issue

14-14: Acknowledge the fix but verify the date is intentional.

The critical technical issue has been successfully addressed: the dynamic new Date() has been replaced with a constant, which is correct for legal documents. However, the chosen date "January 8, 2024" is over 10 months in the past.

Please confirm: Is January 8, 2024 the correct effective date for this policy? If this is intentional (e.g., representing a retroactive policy date), no action is needed. If this should reflect the actual go-live date, please update accordingly.


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.

Copy link
Contributor

@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: 2

🧹 Nitpick comments (6)
apps/web/src/components/legal/LegalContent.tsx (1)

7-11: Consider using a more semantic HTML element.

The component wraps children in a generic div. For better accessibility and semantic HTML, consider using <article> or <section> depending on the content context.

 export function LegalContent({ children }: LegalContentProps) {
   return (
-    <div className="space-y-8 text-[#e1e1e1] leading-relaxed">{children}</div>
+    <article className="space-y-8 text-[#e1e1e1] leading-relaxed">{children}</article>
   );
 }
apps/web/src/components/legal/LegalSection.tsx (1)

9-18: LGTM with a minor suggestion for className composition.

The component logic is correct. However, for consistency with LegalCard.tsx which uses the cn utility for className composition, consider using the same approach here to handle potential className conflicts more robustly.

+import { cn } from "@/lib/utils";
+
 export function LegalSection({ title, children, className = "" }: LegalSectionProps) {
   return (
-    <section className={className}>
+    <section className={cn(className)}>
       {title && (
         <h2 className="text-2xl lg:text-3xl font-semibold mb-4">{title}</h2>
       )}
       {children}
     </section>
   );
 }
apps/web/src/components/legal/LegalFooter.tsx (1)

3-11: Consider using semantic <footer> element.

For better semantic HTML and accessibility, replace the wrapping div with a <footer> element.

 export function LegalFooter() {
   return (
-    <div className="mt-16 pt-8 border-t border-[#252525] text-center text-[#b1b1b1]">
+    <footer className="mt-16 pt-8 border-t border-[#252525] text-center text-[#b1b1b1]">
       <p className="text-sm">
         © {new Date().getFullYear()} Opensox AI. All rights reserved.
       </p>
-    </div>
+    </footer>
   );
 }
apps/web/src/components/legal/LegalPageLayout.tsx (1)

7-13: Consider using semantic HTML elements for better accessibility.

The layout uses nested div elements. Consider using <main> for the outer container to indicate it's the main content area.

 export function LegalPageLayout({ children }: LegalPageLayoutProps) {
   return (
-    <div className="min-h-screen bg-[#101010] text-white">
+    <main className="min-h-screen bg-[#101010] text-white">
       <div className="max-w-4xl mx-auto px-4 py-16 lg:py-24">{children}</div>
-    </div>
+    </main>
   );
 }
apps/web/src/components/legal/LegalPageHeader.tsx (1)

17-23: Document the precedence behavior when both props are provided.

The conditional logic gives effectiveDate precedence over subtitle. If both props are provided, the subtitle will be ignored. This might be the intended behavior, but consider adding a comment to clarify this design decision, or handle both props if needed.

If showing both is desired, consider this approach:

       {(effectiveDate || subtitle) && (
-        <p className="text-[#b1b1b1] text-lg mb-12">
-          {effectiveDate
-            ? `Effective date: ${effectiveDate}`
-            : subtitle}
-        </p>
+        <div className="text-[#b1b1b1] text-lg mb-12">
+          {effectiveDate && <p>Effective date: {effectiveDate}</p>}
+          {subtitle && <p>{subtitle}</p>}
+        </div>
       )}

Otherwise, add a comment explaining the precedence:

+      {/* effectiveDate takes precedence over subtitle when both are provided */}
       {(effectiveDate || subtitle) && (
apps/web/src/app/(main)/legal/terms/page.tsx (1)

4-547: Suggest refactoring to use the new legal UI components.

This page currently uses inline layout code (Lines 6-11, 540-544) that duplicates the functionality now available in LegalPageLayout, LegalPageHeader, LegalContent, and LegalFooter components. According to the PR summary, other legal pages (shipping-and-exchange, cancellation-and-refund) are being built with these shared components. For consistency and maintainability, consider refactoring this page to use the new component library.

Example refactor:

+import {
+  LegalPageLayout,
+  LegalPageHeader,
+  LegalContent,
+  LegalSection,
+  LegalFooter,
+} from "@/components/legal";
+
 export default function TermsOfServicePage() {
   return (
-    <div className="min-h-screen bg-[#101010] text-white">
-      <div className="max-w-4xl mx-auto px-4 py-16 lg:py-24">
-        {/* Header */}
-        <h1 className="text-4xl lg:text-6xl font-bold mb-4">
-          Terms and Conditions
-        </h1>
-        <p className="text-[#b1b1b1] text-lg mb-12">
-          Effective date: January 8, 2024
-        </p>
-
-        {/* Content */}
-        <div className="space-y-8 text-[#e1e1e1] leading-relaxed">
+    <LegalPageLayout>
+      <LegalPageHeader
+        title="Terms and Conditions"
+        effectiveDate="January 8, 2024"
+      />
+      <LegalContent>
           {/* existing content sections */}
-        </div>
-
-        {/* Footer */}
-        <div className="mt-16 pt-8 border-t border-[#252525] text-center text-[#b1b1b1]">
-          <p className="text-sm">
-            © {new Date().getFullYear()} Opensox AI. All rights reserved.
-          </p>
-        </div>
-      </div>
-    </div>
+      </LegalContent>
+      <LegalFooter />
+    </LegalPageLayout>
   );
 }
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 97e699a and 4167cd6.

📒 Files selected for processing (14)
  • apps/web/src/app/(main)/contact/page.tsx (1 hunks)
  • apps/web/src/app/(main)/legal/cancellation-and-refund/page.tsx (1 hunks)
  • apps/web/src/app/(main)/legal/privacy/page.tsx (3 hunks)
  • apps/web/src/app/(main)/legal/shipping-and-exchange/page.tsx (1 hunks)
  • apps/web/src/app/(main)/legal/terms/page.tsx (4 hunks)
  • apps/web/src/components/landing-sections/footer.tsx (2 hunks)
  • apps/web/src/components/legal/ContactInfo.tsx (1 hunks)
  • apps/web/src/components/legal/LegalCard.tsx (1 hunks)
  • apps/web/src/components/legal/LegalContent.tsx (1 hunks)
  • apps/web/src/components/legal/LegalFooter.tsx (1 hunks)
  • apps/web/src/components/legal/LegalPageHeader.tsx (1 hunks)
  • apps/web/src/components/legal/LegalPageLayout.tsx (1 hunks)
  • apps/web/src/components/legal/LegalSection.tsx (1 hunks)
  • apps/web/src/components/legal/index.ts (1 hunks)
🧰 Additional context used
🧬 Code graph analysis (10)
apps/web/src/components/legal/LegalPageLayout.tsx (3)
apps/docs/app/layout.tsx (1)
  • RootLayout (19-31)
apps/web/src/app/(main)/login/layout.tsx (1)
  • RootLayout (1-15)
apps/web/src/app/(main)/(landing)/page.tsx (1)
  • main (15-34)
apps/web/src/components/legal/LegalCard.tsx (2)
apps/web/src/components/legal/index.ts (1)
  • LegalCard (4-4)
apps/web/src/lib/utils.ts (1)
  • cn (4-6)
apps/web/src/components/legal/LegalPageHeader.tsx (1)
apps/web/src/components/legal/index.ts (1)
  • LegalPageHeader (2-2)
apps/web/src/components/legal/LegalContent.tsx (1)
apps/web/src/components/legal/index.ts (1)
  • LegalContent (7-7)
apps/web/src/components/legal/LegalFooter.tsx (1)
apps/web/src/components/legal/index.ts (1)
  • LegalFooter (6-6)
apps/web/src/app/(main)/legal/shipping-and-exchange/page.tsx (7)
apps/web/src/components/legal/LegalPageLayout.tsx (1)
  • LegalPageLayout (7-13)
apps/web/src/components/legal/LegalPageHeader.tsx (1)
  • LegalPageHeader (9-26)
apps/web/src/components/legal/LegalContent.tsx (1)
  • LegalContent (7-11)
apps/web/src/components/legal/LegalCard.tsx (1)
  • LegalCard (10-28)
apps/web/src/components/legal/LegalSection.tsx (1)
  • LegalSection (9-18)
apps/web/src/components/legal/ContactInfo.tsx (1)
  • ContactInfo (11-58)
apps/web/src/components/legal/LegalFooter.tsx (1)
  • LegalFooter (3-11)
apps/web/src/app/(main)/contact/page.tsx (6)
apps/web/src/components/legal/LegalPageLayout.tsx (1)
  • LegalPageLayout (7-13)
apps/web/src/components/legal/LegalPageHeader.tsx (1)
  • LegalPageHeader (9-26)
apps/web/src/components/legal/LegalContent.tsx (1)
  • LegalContent (7-11)
apps/web/src/components/legal/LegalCard.tsx (1)
  • LegalCard (10-28)
apps/web/src/components/legal/LegalSection.tsx (1)
  • LegalSection (9-18)
apps/web/src/components/legal/LegalFooter.tsx (1)
  • LegalFooter (3-11)
apps/web/src/app/(main)/legal/cancellation-and-refund/page.tsx (7)
apps/web/src/components/legal/LegalPageLayout.tsx (1)
  • LegalPageLayout (7-13)
apps/web/src/components/legal/LegalPageHeader.tsx (1)
  • LegalPageHeader (9-26)
apps/web/src/components/legal/LegalContent.tsx (1)
  • LegalContent (7-11)
apps/web/src/components/legal/LegalCard.tsx (1)
  • LegalCard (10-28)
apps/web/src/components/legal/LegalSection.tsx (1)
  • LegalSection (9-18)
apps/web/src/components/legal/ContactInfo.tsx (1)
  • ContactInfo (11-58)
apps/web/src/components/legal/LegalFooter.tsx (1)
  • LegalFooter (3-11)
apps/web/src/components/legal/LegalSection.tsx (1)
apps/web/src/components/legal/index.ts (1)
  • LegalSection (3-3)
apps/web/src/components/legal/ContactInfo.tsx (1)
apps/web/src/components/legal/index.ts (1)
  • ContactInfo (5-5)
🔇 Additional comments (11)
apps/web/src/components/legal/LegalCard.tsx (1)

10-28: LGTM!

The component correctly handles variant-based styling and uses the cn utility for proper className composition. The implementation is clean and follows React best practices.

apps/web/src/app/(main)/legal/terms/page.tsx (1)

10-10: LGTM on terminology update.

The change from "Terms of Service" to "Terms and Conditions" is consistent and aligns with the PR objectives.

apps/web/src/components/legal/index.ts (1)

1-8: ContactInfo component exists—no action required.

The verification confirms that the ContactInfo component exists at apps/web/src/components/legal/ContactInfo.tsx, so the barrel export on line 5 is valid.

apps/web/src/components/landing-sections/footer.tsx (1)

89-118: LGTM! Navigation updates are consistent.

The footer navigation changes properly reflect the new legal infrastructure:

  • New Contact page link
  • Updated terminology ("Terms and Conditions" instead of "Terms of Service")
  • New legal policy links (Cancellation & Refunds, Shipping & Exchange)

All links are properly formatted and align with the new pages added in this PR.

apps/web/src/app/(main)/legal/privacy/page.tsx (1)

33-37: LGTM! Terminology consistently updated.

The references to "Terms of Service" have been properly updated to "Terms and Conditions" throughout the Privacy Policy for consistency with the rest of the application.

Also applies to: 687-687, 788-788

apps/web/src/app/(main)/contact/page.tsx (3)

14-26: LGTM! Proper metadata and page structure.

The page correctly exports Next.js metadata and uses the shared legal layout components appropriately. Using subtitle instead of effectiveDate is the right choice for a contact page.


67-72: Verify the phone number is valid and operational.

The phone number format appears correct for an Indian number (+91 country code), but ensure this number is valid, active, and monitored for incoming calls during business hours as indicated.


106-175: LGTM! External links are properly secured.

All external links correctly use target="_blank" with rel="noopener noreferrer" for security, and the URLs are consistent with those in the footer.

apps/web/src/components/legal/ContactInfo.tsx (1)

1-59: LGTM! Well-designed reusable component.

The ContactInfo component is well-structured with:

  • Sensible default values for all optional props
  • Conditional rendering for flexibility
  • Consistent contact information
  • Proper use of Next.js Link for internal navigation

This promotes DRY principles and maintains consistency across legal pages.

apps/web/src/app/(main)/legal/cancellation-and-refund/page.tsx (1)

33-182: LGTM! Well-structured policy content.

The content is well-organized with clear sections, user-friendly language, and appropriate use of the shared legal components. The policy clearly communicates:

  • The no-refund stance
  • Rationale and exceptions
  • User guidance before purchasing
  • Cancellation procedures
apps/web/src/app/(main)/legal/shipping-and-exchange/page.tsx (1)

33-208: LGTM! Clear and well-structured policy.

The content effectively communicates the digital-only nature of the services with:

  • Clear explanation that no physical shipping occurs
  • Benefits of digital delivery (immediate access, no delays)
  • Proper cross-references to related policies
  • Good use of feature cards for visual clarity
  • Appropriate use of ContactInfo component with custom props

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.

2 participants