Skip to content

Fix the 21 suppressed floating promises in the web app #1167

Closed

Description

@mforce

Follow-up to #1156 / #1155. The web linter records 21 existing @typescript-eslint/no-floating-promises violations in web/lint/eslint-suppressions.json instead of fixing them. Each is a promise that is started and never awaited or caught, so a failure in it vanishes silently.

Where (count per file at #1155's head)

  • src/api/client.test.ts (6)
  • src/auth/farmCodeCache.test.ts (6)
  • src/routes/SalesPage.test.tsx (4)
  • src/routes/Login.tsx (2)
  • src/routes/AppLayout.tsx (1)
  • src/routes/Dashboard.tsx (1)
  • src/routes/SalesPage.tsx (1)

Paths may move: #1159 splits SalesPage into src/routes/sales/.

Done when

  • Each violation is fixed by awaiting the promise, or by handling its failure (shown to the user or logged, whichever fits). void promise only to silence the rule is not a fix.
  • Each fixed file's entry is deleted from the suppressions file (npm run lint -- --prune-suppressions), and no no-floating-promises entries remain.
  • Production fixes in Login, AppLayout, Dashboard and Sales have a test that shows the failure path.

Activity

  1. added this to the Platform hardening milestone on Oct 10, 2026
  2. mforce commented on Oct 10, 2026

    @mforce
    OwnerAuthor

    #1159 removes these no-floating-promises entries from web/lint/eslint-suppressions.json:

    • src/routes/SalesPage.test.tsx (4). The URL-filter tests now await navigate(). Commit 1e4a8380.
    • src/routes/SalesPage.tsx (1), the phone order-details "Open" handler, now in src/routes/sales/OrderList.tsx. It awaits the open, and run() routes a failure to the page error slot. Two existing tests cover that failure path, and a mutation that lets the rejection escape turns both red. Commit 71a90b1c.

    After #1159 merges, 16 entries remain: client.test.ts (6), farmCodeCache.test.ts (6), Login.tsx (2), AppLayout.tsx (1), Dashboard.tsx (1).

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

    No labels
    No labels

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions