Skip to content

feat: add some description to the page#116

Merged
nikilok merged 3 commits into
mainfrom
feat/improve-seo
May 18, 2026
Merged

feat: add some description to the page#116
nikilok merged 3 commits into
mainfrom
feat/improve-seo

Conversation

@nikilok
Copy link
Copy Markdown
Owner

@nikilok nikilok commented May 18, 2026

  • enrich the page summarizing the information for users to read it easily.
  • also helps with screen readers to digest this easier

Summary by CodeRabbit

  • New Features

    • Added "About this sponsor" section to company pages with enhanced company information display
    • Enhanced structured data and metadata for improved search engine visibility and social media sharing
  • Improvements

    • Improved location display formatting on company pages

Review Change Stack

- enrich the page summarizing the information for users to read it
easily.
- also helps with screen readers to digest this easier
@vercel
Copy link
Copy Markdown

vercel Bot commented May 18, 2026

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

Project Deployment Actions Updated (UTC)
learn-tanstack-start Ready Ready Preview, Comment May 18, 2026 9:06am

Request Review

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 18, 2026

Warning

Rate limit exceeded

@nikilok has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 40 minutes and 54 seconds before requesting another review.

You’ve run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 56cd41d3-6553-4ad2-a7c7-931722c7c246

📥 Commits

Reviewing files that changed from the base of the PR and between 072ab5f and 5786028.

📒 Files selected for processing (3)
  • apps/web/src/routes/company.$id.$slug.tsx
  • apps/web/src/utils.ts
  • apps/web/src/utils/jsonld.ts
📝 Walkthrough

Walkthrough

This PR enhances the company sponsor detail page with structured metadata and improved presentation. A new JSON-LD utility module generates schema.org schemas (Organization, BreadcrumbList, FAQ) for sponsorship data. A location formatting helper consolidates city/county display. The company route refactors to use these utilities for metadata head generation and narrative rendering. Header social links are rebranded from TanStack to NikilKuruvilla.

Changes

Company Sponsor Display with JSON-LD and Metadata

Layer / File(s) Summary
JSON-LD types and utility builders
apps/web/src/utils/jsonld.ts
Defines CompanyJsonLdInput type with sponsor/address fields. Exports ratingPhrase to parse HMRC ratings into human-readable strings. Builds schema.org JSON-LD blocks for Organization (with optional Companies House ID and postal address), BreadcrumbList, and FAQPage with interpolated sponsor data. Composes blocks into array via buildCompanyJsonLd.
Location formatting utility
apps/web/src/utils.ts
Adds formatLocation(townCity, county) that case-insensitively deduplicates, title-cases, and comma-joins the location parts; returns empty string when both inputs are falsy.
Company route refactoring with new utilities
apps/web/src/routes/company.$id.$slug.tsx
Updates imports to use new utilities. Refines head loader-data type to include optional address fields. Computes location via formatLocation. Introduces precomputed canonicalUrl for canonical, og:url, and twitter:url meta tags. Generates JSON-LD blocks into script:ld+json meta entries. Replaces old display logic with derived fields and narrative strings (intro, background, outro, summary) built from incorporation date, rating phrase, and conditionally selected background text. Adds "About this sponsor" section rendering the computed summary.

Header Branding Update

Layer / File(s) Summary
Header social link accessibility labels
apps/web/src/components/Header.tsx
Updates screen-reader-only text for X and GitHub social links from "TanStack" to "NikilKuruvilla" branding.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

  • nikilok/learn-tanstack-start#49: Moves canonical URL handling in company route from inline computation to precomputed canonicalUrl, eliminating route-dependent construction.
  • nikilok/learn-tanstack-start#66: Modifies company detail rendering SIC description display logic; this PR supersedes that work with broader JSON-LD and sponsor narrative changes.

Poem

🐰 A rabbit hops through structured schemas bright,
With JSON-LD to make search engines delight,
Location strings format with care and with cheer,
Sponsor narratives rendered, now crystal clear,
And NikilKuruvilla branding shines here! ✨

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Title check ❓ Inconclusive The title is vague and generic, using non-descriptive phrasing that doesn't convey meaningful information about the changeset. Make the title more specific by referencing the main changes, such as 'feat: add JSON-LD schemas and improve company page SEO' or 'feat: enhance company page with structured data and descriptions'.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/improve-seo

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

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@apps/web/src/utils.ts`:
- Line 95: The location parts are being pushed using the raw value
(parts.push(titleCase(value))) which can contain surrounding whitespace while
the dedupe step is trim-aware; update the push to use a trimmed value (e.g.,
call value.trim() before titleCase) so you pass titleCase a trimmed string and
avoid extra spaces in rendered output—locate the parts.push/titleCase(value)
usage and apply trimming to the value variable.

In `@apps/web/src/utils/jsonld.ts`:
- Around line 47-48: The function currently always sets parts.addressCountry =
address.country || 'GB', causing a non-null PostalAddress when no real address
fields exist; change the logic so the default 'GB' is only applied if at least
one other address field is present (i.e., include addressCountry only when
address has other properties or when address.country is explicitly provided),
and keep returning null if the only contribution would be the synthetic default;
update the code around the parts object and the addressCountry assignment to
perform this conditional inclusion.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: b01b2fd2-13c8-453f-9b16-c7bc49516a93

📥 Commits

Reviewing files that changed from the base of the PR and between fdd2181 and 072ab5f.

📒 Files selected for processing (4)
  • apps/web/src/components/Header.tsx
  • apps/web/src/routes/company.$id.$slug.tsx
  • apps/web/src/utils.ts
  • apps/web/src/utils/jsonld.ts

Comment thread apps/web/src/utils.ts Outdated
Comment thread apps/web/src/utils/jsonld.ts Outdated
@nikilok nikilok merged commit b66d0e1 into main May 18, 2026
4 checks passed
@nikilok nikilok deleted the feat/improve-seo branch May 18, 2026 09:10
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.

1 participant