fix: brand registry house/sub-brand counts#1353
Merged
Conversation
The getAllBrandsForRegistry query hardcoded NULL for keller_type on hosted brands, so they were never counted as houses or sub-brands. Join hosted_brands to discovered_brands to pull the actual keller_type, defaulting to 'master' for self-hosted brands. Also add missing with_manifest stat and backfill keller_type for seeded discovered brands. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add keller_type IS NULL / house_domain IS NULL guards so the migration won't overwrite values set by enrichment or community edits. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
EmmaLouise2018
approved these changes
Mar 8, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Supersedes #1132. The brand registry page shows house/sub-brand counts but they were always zero because:
getAllBrandsForRegistryquery hardcodedNULL as keller_typefor hosted brands, so they were never countedhouses,sub_brands, andwith_manifeststats that the frontend expectedkeller_typesetFixes:
hosted_brandstodiscovered_brandsto pull actualkeller_type, defaulting tomasterfor self-hosted brands with no discovered recordhouses,sub_brands,with_manifeststats to the registry API responseWHERE keller_type IS NULL) to avoid overwriting enrichment/community editsTest plan
🤖 Generated with Claude Code