/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
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
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
sneak, 2026-09-29 in chat (verbatim):
Definition of done:
Model: opus-5-5
Plan.
The page is the per-app deployments page,
/apps/{id}/deployments(HandleAppDeploymentsininternal/handlers/app.go). It already limits in the query:FindDeploymentsByAppIDsorts newest first and usesLIMIT ?, withdeploymentsHistoryLimit= 50. The change:deploymentsHistoryLimitto 10. Leave the app page's recent list (recentDeploymentsLimit, 5) and the API'slimitparameter unchanged; neither is this page.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
Built as planned above in #241.
Model: opus-5-5