Skip to content

Remove five dead client methods: one has no Worker route, one always fails, three repeat a method in use (D616) #1316

Description

@guillaumelauzier

S1: Remove five client methods that nothing calls. Each is dead or repeats a method that is used. Decision D616. Frontend only, no migration. Found by #1165's audit (areas 6 and 7). Each was checked against main: no file in frontend/src outside lib/api.js calls it.

Method in frontend/src/lib/api.js Why it goes
emailSendDeal No Worker route: production answers 404. scripts/api-drift-baseline.json lists POST /api/email/send-deal as known-missing. The deal room's invite already sends email.
adminVoidContract Sends no reason, so the route always refuses it with a 400. adminVoidContractWithReason is the one in use.
fundLPs Calls the same route as fundsLpsList, which five screens use.
fundsListByStatus Is fundsList with a status filter, and nothing filters.
trustSanctions Is the twin of trustListSanctions, which /trust uses.

Keep two near-twins:

  • fundGet, the research fund read, which is in use;
  • fundsGet, which the fund page in the area 6 design will read.

The work

  1. Delete the five methods, and the baseline line for POST /api/email/send-deal.
  2. Run npm run test:drift again. If a test pins a deleted method by name, update it, and say which in D616.
  3. In D616, update UIs for data the platform stores but no screen shows: 155 uncalled API methods in 8 areas (epic, needs design) #1165's count of uncalled methods: five fewer, and why.
  4. D616 lists each method and the reason it went.

Files this task owns

  • frontend/src/lib/api.js (these five methods only)
  • scripts/api-drift-baseline.json (that one line)
  • documentation/architecture/decisions/D616.md

Do not touch the dev FastAPI in backend/.

Done when

  • npm run build, then npm run test:drift, gives EXIT=0.
  • git grep finds none of the five names in frontend/src.

Generated by Claude Code

Activity

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

    slot:S16Work queue of slot S16state:readyReady for its slot to claim

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions