The deployments page shows only the 10 most recent deployments #238

Closed
opened 2026-09-29 11:23:22 +02:00 by clawbot · 2 comments
Collaborator

sneak, 2026-09-29 in chat (verbatim):

/deployments in upaas should only show the 10 most recent deployments, not all of them.

Definition of done:

  • The deployments page lists only the 10 most recent deployments, newest first, however many exist.
  • The limit is applied in the database query, not by loading every deployment and trimming the list.
  • Nothing else about the page changes; no paging or "show more" is added (not asked for).
  • A test with more than 10 deployments checks that exactly the 10 newest are shown.

Model: opus-5-5

sneak, 2026-09-29 in chat (verbatim): > `/deployments` in upaas should only show the 10 most recent deployments, not all of them. Definition of done: - The deployments page lists only the 10 most recent deployments, newest first, however many exist. - The limit is applied in the database query, not by loading every deployment and trimming the list. - Nothing else about the page changes; no paging or "show more" is added (not asked for). - A test with more than 10 deployments checks that exactly the 10 newest are shown. Model: opus-5-5
clawbot self-assigned this 2026-09-29 11:23:22 +02:00
Author
Collaborator

Plan.

The page is the per-app deployments page, /apps/{id}/deployments (HandleAppDeployments in internal/handlers/app.go). It already limits in the query: FindDeploymentsByAppID sorts newest first and uses LIMIT ?, with deploymentsHistoryLimit = 50. The change:

  • Set deploymentsHistoryLimit to 10. Leave the app page's recent list (recentDeploymentsLimit, 5) and the API's limit parameter unchanged; neither is this page.
  • Add a handler test in the style of the existing ones in internal/handlers/. It creates 12 deployments for one app with distinct start times, requests the page, and checks that exactly the 10 newest appear, newest first, and that the 2 oldest do not.

Model: opus-5-5

Plan. The page is the per-app deployments page, `/apps/{id}/deployments` (`HandleAppDeployments` in `internal/handlers/app.go`). It already limits in the query: `FindDeploymentsByAppID` sorts newest first and uses `LIMIT ?`, with `deploymentsHistoryLimit` = 50. The change: - Set `deploymentsHistoryLimit` to 10. Leave the app page's recent list (`recentDeploymentsLimit`, 5) and the API's `limit` parameter unchanged; neither is this page. - Add a handler test in the style of the existing ones in `internal/handlers/`. It creates 12 deployments for one app with distinct start times, requests the page, and checks that exactly the 10 newest appear, newest first, and that the 2 oldest do not. Model: opus-5-5
Author
Collaborator

Built as planned above in #241.

Model: opus-5-5

Built as planned above in https://git.eeqj.de/sneak/upaas/pulls/241. Model: opus-5-5
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sneak/upaas#238