Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ import app.getarcane.android.ui.components.SkeletonListLoadingView
import app.getarcane.android.ui.theme.ArcaneGreen
import app.getarcane.android.ui.theme.StatusRunning
import app.getarcane.android.ui.theme.StatusUnknown
import app.getarcane.sdk.models.base.SearchPaginationSort
import app.getarcane.sdk.models.container.ContainerSummary
import kotlinx.coroutines.launch

Expand Down Expand Up @@ -93,7 +94,12 @@ fun ContainerListScreen(onOpen: (String) -> Unit) {
if (client == null) return@LaunchedEffect
if (state !is Loadable.Success) state = Loadable.Loading
state = try {
Loadable.Success(client.containers.list(envId = envId).data)
Loadable.Success(
client.containers.list(
envId = envId,
query = SearchPaginationSort(start = 0, limit = -1),

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 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.

Fix in Codex Fix in Claude Code

).data,
)
} catch (e: Throwable) {
Loadable.Error(friendlyErrorMessage(e))
}
Expand Down
Loading