Skip to content

feat(shopping): My Products / Competitors tabs with brand matching #105

Closed

Description

@gkhngyk

Context

The Shopping page shell ships in #104. This issue fills the My Products and Competitors tabs — the two screens that turn Shopping from "a number" into "tell me what to do." Brands need to see exactly which products of theirs the AI is surfacing (and which they're losing slots to).

Depends on: #103 (normalized table with matched_brand_role), #104 (page shell).

Acceptance criteria

My Products tab

  • Server action getOwnProducts(brandId, filters) in web/src/lib/actions/shopping.ts — groups by product_title (or product_brand + canonical title hash), aggregates: impressions count, platforms set, regions set, last_seen, last_price + currency, most-frequent merchant_domain, hero image_url.
  • Table with columns: image thumb · product title · platforms badges · regions · impressions · last price · top merchant · last seen. Default sort: impressions desc.
  • Row click opens a drawer showing every appearance — linked prompt, date, region, platform, full card preview (raw JSONB rendered nicely), merchant URL.
  • CSV export reusing the csv helper.

Competitors tab

  • Same data shape and table, but filtered to matched_brand_role='competitor', grouped by tracked competitor name.
  • Top of the tab: a competitor-level summary — for each tracked competitor, how many distinct products are surfacing in shopping cards on this brand's prompts, and the competitor's shopping SOV. Mirrors the existing Competitors page pattern.

Brand matching

The matching logic lives in #103 (worker writes matched_brand_id + matched_brand_role). This tab consumes those columns — does not re-match in the query. If matching needs improvement, fix it upstream in #103.

Plan gating

Both tabs are part of the shopping_analytics gate from #104 — Growth+ only on cloud; unlocked on self-host.

Out of scope

  • Pricing trend over time per product — #F
  • Merchant leakage breakdown table — #G
  • Image quality / title divergence scoring — later
  • Product-level alerts ("competitor X just took your top slot") — anomaly-alerts epic

Activity

  1. added
    enhancement
    on May 26, 2026
  2. Pallavikumarimdb commented on Jun 3, 2026

    @Pallavikumarimdb
    Contributor

    @gkhngyk Can I work on this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions