Skip to content

docs: plan for searching across previous company names#133

Open
nikilok wants to merge 1 commit into
mainfrom
feat/search-previous-names
Open

docs: plan for searching across previous company names#133
nikilok wants to merge 1 commit into
mainfrom
feat/search-previous-names

Conversation

@nikilok
Copy link
Copy Markdown
Owner

@nikilok nikilok commented May 28, 2026

Summary

Feature plan for searching sponsors by their previous company names — e.g. typing Motodynamics Ltd (or motodynamics) surfaces PhysicsX, which Companies House records under that former name. Planning doc only — no code changes.

Chooses Option B: a materialized search_names table (current and former names) with a gin_trgm_ops index, so former names get the same fuzzy/prefix matching as current names via a single trigram scan — replacing today's single-table searchHmrc query.

What the plan covers

  • search_names schema + GIN trigram index (Drizzle)
  • truncate/rebuild SQL and where to run it post-ingestion
  • searchHmrc CTE rewrite (best-name-per-org → join back, small previous-match penalty)
  • matchedFormerName API/type addition + HmrcCard "Formerly …" hint (with pretext card-height note)
  • rollout order, edge cases, verification, ~1–2 day estimate

Records why Option B was chosen over Option A (inline exact match). Independent of the feat/previous-companies PR — reads companies_house_profiles.previous_company_names directly — and branched off main.

📄 docs/search-previous-names-plan.md

🤖 Generated with Claude Code

Option-B feature plan: a materialized search_names table (current + former names) with a gin_trgm_ops index, so sponsors can be found by a former Companies House name (e.g. "Motodynamics Ltd" -> PhysicsX). Planning doc only — no code changes.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 28, 2026

Warning

Review limit reached

@nikilok, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 33 minutes and 34 seconds. Learn how PR review limits work.

Your organization has run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After more reviews become available, 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 include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 65decbe0-9cdb-459e-8313-18b43926d13f

📥 Commits

Reviewing files that changed from the base of the PR and between e55d500 and f01cb88.

📒 Files selected for processing (1)
  • docs/search-previous-names-plan.md
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/search-previous-names

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.

@vercel
Copy link
Copy Markdown

vercel Bot commented May 28, 2026

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

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
learn-tanstack-start Ignored Ignored Preview May 28, 2026 11:51pm

Request Review

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