Load all containers in Containers tab#37
Conversation
| Loadable.Success( | ||
| client.containers.list( | ||
| envId = envId, | ||
| query = SearchPaginationSort(start = 0, limit = -1), |
There was a problem hiding this comment.
Unverified
limit = -1 semantics against the rest of the codebase
Every other screen that wants a "full" list uses an explicit positive cap — 500 for containers in WebhooksScreen and DashboardPinnedSection, 200 for volumes/networks, 100 for activities — none of them pass -1. If the backend does not recognise -1 as "unlimited" (e.g. it is serialised as-is and the server rejects or misinterprets a negative limit), this call will fail or return zero items, silently replacing the container list with an error state on every load. Can you confirm the API contract for -1, or align with the established pattern of limit = 500?
Prompt To Fix With AI
This is a comment left during a code review.
Path: app/src/main/kotlin/app/getarcane/android/ui/screens/containers/ContainerListScreen.kt
Line: 100
Comment:
**Unverified `limit = -1` semantics against the rest of the codebase**
Every other screen that wants a "full" list uses an explicit positive cap — `500` for containers in `WebhooksScreen` and `DashboardPinnedSection`, `200` for volumes/networks, `100` for activities — none of them pass `-1`. If the backend does not recognise `-1` as "unlimited" (e.g. it is serialised as-is and the server rejects or misinterprets a negative limit), this call will fail or return zero items, silently replacing the container list with an error state on every load. Can you confirm the API contract for `-1`, or align with the established pattern of `limit = 500`?
How can I resolve this? If you propose a fix, please make it concise.|
Closing this in favor of a clean replacement PR that includes the Containers tab fix plus the Activity Center stream event compile fix. |
Summary
SearchPaginationSort(start = 0, limit = -1).Verification
origin/fix/containers-list-full-pageis one commit on top oforigin/mainand only changesContainerListScreen.kt.git diff --check origin/main...origin/fix/containers-list-full-pageDisclaimer Greptiles Reviews use AI, make sure to check over its work.
To better help train Greptile on our codebase, if the comment is useful and valid Like the comment, if its not helpful or invalid Dislike
To have Greptile Re-Review the changes, mention
greptileai.Greptile Summary
This PR changes the Containers tab to fetch the entire container list in one request instead of the default paginated subset, so client-side search, filter, and sort cover all containers in the active environment.
SearchPaginationSort(start = 0, limit = -1)is passed toclient.containers.list(); every other list screen in the codebase uses a positive cap (100–500) rather than-1, so the semantics of-1against the backend are unconfirmed within this repo's established patterns.ContainerListScreen.ktand does not touch any shared utilities or navigation.Confidence Score: 3/5
Safe to merge only if
limit = -1is a confirmed 'no limit' sentinel in the backend API; otherwise the container list will fail to load on every screen open.The entire rest of the codebase uses positive integer limits when fetching full lists — 500 for containers in other screens, 200 for volumes/networks — making
limit = -1an unverified outlier. If the backend rejects or misinterprets a negative value, the change breaks the Containers tab completely on every load.app/src/main/kotlin/app/getarcane/android/ui/screens/containers/ContainerListScreen.kt — specifically the
limit = -1argument on line 100.Prompt To Fix All With AI
Reviews (1): Last reviewed commit: "Load all containers in Containers tab" | Re-trigger Greptile