Skip to content

fix(widget): the widget's upstream call ignores record_key — every item renders '— / no score' #832

Not planned

Description

@athvin

What exists

frontend/src/app/api/widget/[token]/route.ts fetches /v1/orgs/{org}/datasets/{ds}/duplicates?record_key=<key>&limit=10 and passes items straight to widget-view.tsx, which renders each item's record_key and match_probability.

But er-server's duplicates_list (rust/crates/er-server/src/lib.rs:5352) reads only cursor, limit and min_members — record_key is silently ignored, and its items are duplicate groups (entity_id, member_count, members, golden preview fields, and now group_confidence from #797). No item ever carries record_key or match_probability, so the widget renders — and no score for every row of every tenant.

The two halves disagree, and no test spans them

The BFF's contract test mocks the upstream it WANTS (per-record items with scores); the server's duplicates endpoint grew a different shape for the groups view. Each side is internally green. This is the defect class the repo keeps finding: a contract the frontend states and the backend never fulfilled (the review page's status/reason passthrough was another).

Done when

  • the widget's upstream serves per-record duplicate candidates for ONE record (record_key + score), or the BFF maps the groups response into that shape
  • a test spans BFF and server on the real response shape (the mock encodes the real contract, or a pg-backed test covers the upstream path)
  • the widget renders the shipped 1–100 confidence integer (feat(match): one 1-100 confidence projection, identical in UI, export and API #797), never its own (p*100).toFixed(1)

Found while implementing #797; the widget was left as-is there rather than entangled with the projection work.

Activity

  1. added
    followup
    on Nov 8, 2026
  2. added
    pruned
    on Nov 27, 2026
  3. athvin commented on Nov 27, 2026

    @athvin
    OwnerAuthor

    Closed in the second 2026-11-26 board prune. The board now targets only the API that customers use to build their own deduplication tooling. Everything else is bonus, and this card is one of those. It's labelled pruned and can be reopened later.

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

    followuppruned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions