#547 — Facade “List merchants” API-s returns “assigned_to_name” and “Force Update merchants” returns no merchants

Repo: Twill-AI/facade State: closed | Status: done Assignee: Unassigned

Created: 2025-09-02 · Updated: 2025-09-18

Description

(updated on 2025/09/04 after meeting with Nader) Caused by number of requests:

  1. If we press “refresh” button then “Created by” column gets empty.

    Current behavior: If we do a force refresh, table comes back with this field blank. But if we do a refresh on Twill page then it comes back.

    https://github.com/user-attachments/assets/9c736502-51ff-4065-907b-1cd9b58aead3

    It is a function bug.
  2. If we login under rep and press “refresh” button then instead of a few available merchants we may see all merchants on the partner! It is a security issue.

  3. We need to show “Assigned on” column in UI with user name and relevant “assigned_on” with user ID for relevant actions (like press on it should open user profile).

Behavior in points 1 and 2 is happening because of GET /api/v1/partner/merchants/force “Force update merchants” API response is used by UI to show the table. While returning of merchants here is a side effect and doesn’t pass authorization filters.

AC:

  • Facade GET /api/v1/partner/merchants returns “created_by_name”, “assigned_to_name”, “assigned_to”
  • Facade GET /api/v1/partner/merchants/force returns general information about job results, not list of merchants.
  • Logic is covered by unit tests.
  • UI tickets are added:
    • For changing merchants table behavior with new /api/v1/partner/merchants/force response - i.e. use “List merchants” API to populate table of merchants always.

Notes

Add implementation notes, blockers, and context here

Add wikilinks to related people, meetings, or other tickets