Skip to content

Conversation

@codeunia-dev
Copy link
Owner

@codeunia-dev codeunia-dev commented Nov 13, 2025

  • Modify company data schema to support flattened address and social fields
  • Update CompanyCard, CompanyProfile, and CompaniesPage to capitalize industry and company size
  • Refactor company settings page to map form data to new database schema
  • Add support for both nested and flattened company data structures
  • Improve data consistency and display formatting across company-related components

Summary by CodeRabbit

  • Bug Fixes

    • Improved text formatting in company displays with proper capitalization for industry, company size, and subscription tier information.
    • Fixed industry selector to properly display "All" label.
  • Improvements

    • Refined company settings form data handling for enhanced consistency across address and social media fields.

- Modify company data schema to support flattened address and social fields
- Update CompanyCard, CompanyProfile, and CompaniesPage to capitalize industry and company size
- Refactor company settings page to map form data to new database schema
- Add support for both nested and flattened company data structures
- Improve data consistency and display formatting across company-related components
@vercel
Copy link

vercel bot commented Nov 13, 2025

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

Project Deployment Preview Comments Updated (UTC)
codeunia Building Building Preview Comment Nov 13, 2025 5:08am

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Nov 13, 2025

Caution

Review failed

The pull request is closed.

Walkthrough

The PR updates the Company type to support both nested and flattened data structures for address and social fields, refactors the company settings form to use flattened field names in form state and submission payloads, and standardizes UI text capitalization across company-related components.

Changes

Cohort / File(s) Summary
Type Definitions
types/company.ts
Added optional nested address and socials relationships with backward compatibility; introduced flattened optional fields: address_street, address_city, address_state, address_country, address_zip, linkedin_url, twitter_url, facebook_url, instagram_url to map to database columns.
UI Display Formatting
components/companies/CompanyCard.tsx, components/companies/CompanyProfile.tsx
Applied capitalization formatting to rendered strings: industry, company\_size, and subscription\_tier values now display with first letter uppercase. No control flow changes.
Page Components
app/companies/page.tsx, app/dashboard/company/[slug]/settings/page.tsx
Updated Industry label rendering to display "All" for all option and capitalize other industries; refactored settings form to use flattened field names in both initial form state and submission payload, replacing nested address and socials structures.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

  • Settings form refactoring: Verify all field mappings are correct between old nested structure and new flattened field names in both initial state and submission payload (app/dashboard/company/[slug]/settings/page.tsx)
  • Type compatibility: Confirm backward compatibility is maintained with optional nested and flattened fields coexisting in the Company interface
  • UI formatting consistency: Ensure capitalization logic is applied uniformly across all components and handles edge cases gracefully

Poem

🐰 A spreadsheet of fields now lies flat,
No nested holes for this cunning rabbit!
With capitalized words and social links aligned,
The company data's been redesigned.
hops happily

✨ 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 feat/multicompanylevel

📜 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 464542d and e05d46c.

📒 Files selected for processing (5)
  • app/companies/page.tsx (1 hunks)
  • app/dashboard/company/[slug]/settings/page.tsx (3 hunks)
  • components/companies/CompanyCard.tsx (2 hunks)
  • components/companies/CompanyProfile.tsx (1 hunks)
  • types/company.ts (1 hunks)

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.

@codeunia-dev codeunia-dev merged commit e5a6be4 into main Nov 13, 2025
2 of 4 checks passed
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.

3 participants