Skip to content

Citations: per-URL detail page (cited-in answers, prompt breakdown, owned-URL bridges) #535

Closed

Description

@gkhngyk

Problem

Citation rows on /dashboard/citations are aggregates with a single action (add-as-competitor). There is no way to answer "what exactly is citing this page, for which prompts, and is it working for us?" without manually cross-referencing results. Each cited URL deserves a detail page — all the data already exists per result in prompt_results.citations (url, title and the citation's position in the answer) joined with platform/model/date/sentiment/prompt.

Scope (v1)

New page keyed by cited URL — URLs can't be path segments, so route as /dashboard/citations/url?u=<encoded-url> (or a short hash id). Everything below derives from a URL-filtered scan of prompt_results — no schema change, no new RPC; one server action.

  1. Header — favicon, page title, clickable URL, domain, source-category badge and article type. Context action on the right: add-as-competitor (existing dialog) for third-party domains, an "owned" badge when the domain belongs to the brand.
  2. KPI strip — total citations, answers citing, distinct prompts triggering, platforms, first/last seen. Reuse the citations page filter bar (date/platform/model/region), same-denominator rules as everywhere else.
  3. Cited-in list — every answer citing this URL: date, platform/model, prompt text (linking to the prompt detail page), that answer's sentiment, whether the brand was mentioned in the same answer, and the citation's position in the answer (early/late — from the stored start index). Paginated 10 per page.
  4. Prompts breakdown — which prompts trigger this citation, grouped with counts: the queries this page is winning.
  5. Owned-URL bridges — when the URL is on the brand's own domain: (a) "targeted in N prompts" from prompt_target_urls, linking into the prompt workflow; (b) AI-referred visits to this page from the traffic data. Closes the citation → targeting → traffic loop on one page.

Entry points: citation URL rows on /dashboard/citations and the Top Sources URLs tab on the prompt detail page link here.

Out of scope (v2 follow-up)

  • Citation trend over time (mini chart)
  • Co-citations — sources most often cited in the same answers as this URL
  • Domain-level detail page (same structure aggregated per domain, with its URL list)

Acceptance criteria

  • Opening a citation from either entry point lands on the detail page with the same filters applied.
  • Counts on the detail page agree with the citations overview for the same URL, window and filters.
  • The cited-in list pages 10 at a time; prompt links navigate to the prompt detail page.
  • Owned-URL sections render only for brand-domain URLs.
  • yarn lint, yarn typecheck, yarn format:check pass from web/.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancement

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions