Skip to content

web+api: replace the Dashboard's 10,000-row drain ceiling with a proper morning-brief design #942

Description

@mforce

Follow-up to #915 (PR #940). Low priority: no farm today comes near the limit.

Background

Morning collection needs every house and every daily entry for today. The list endpoints return at most 500 rows per request, so PR #940 drains both lists page by page until a short page arrives. To keep the loop bounded it stops after 20 pages (10,000 rows), and it then shows an "incomplete" state:

  • the house count reads "at least 10,000";
  • a notice is shown;
  • the house count stays exact when only the entry list hit the limit.

Problem

This works but is heavy for a case that no farm reaches:

One known gap was deliberately left open. When only the entry list hits the limit, the collection progress bar still shows an exact percentage built from incomplete entry status, so it can read too low (Sol review round 4 on #940, P3).

Design a better solution

Options to compare:

  1. A server-side summary for the morning brief: one request returning the house count, the recorded/missing counts and today's egg total. The Dashboard then pages only the rows it shows. This removes the drain and the ceiling entirely.
  2. Server paging for Morning collection: fetch only the visible page of houses (missing first), with totals from the server.
  3. Delete the ceiling: drain until a short page. This is simplest, but the number of requests is unbounded if the server misbehaves.

It should be decided together with any other Dashboard work that needs server totals.

Done when

  • The Dashboard's house count, progress bar and egg total are exact for any farm size, or explicitly marked approximate, with no percentage built from incomplete data.
  • There is no client-side drain of more than one page for the morning brief, or the ceiling logic is deleted by an explicit decision.

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

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions