Fix Containers tab completeness and activity stream events#39
Merged
Conversation
Collaborator
Author
|
Greptile's |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
/containersresponse, so local search/filter/sort ran against a subset of the active environment's containers.origin/mainalso fails Debug Kotlin compilation with the latest SDK becauseActivityStreamEventType.ERRORandHEARTBEATare not handled exhaustively.Cause
ContainerListScreencalledclient.containers.list(envId = envId)without an explicit pagination query, leaving the server default limit in place.ActivityCenterStoreonly handled the older activity stream event variants.Fix
SearchPaginationSort(start = 0, limit = -1)before applying local filters and sorting.ERRORframes through the existing stream error state and treatHEARTBEATframes as no-op keepalives.Verification
git diff --check origin/main..origin/fix/containers-complete-list-activity-streamANDROID_HOME=/home/nameless1/Android/Sdk ANDROID_SDK_ROOT=/home/nameless1/Android/Sdk ./gradlew --no-daemon :app:compileDebugKotlinANDROID_HOME=/home/nameless1/Android/Sdk ANDROID_SDK_ROOT=/home/nameless1/Android/Sdk ./gradlew --no-daemon :app:testDebugUnitTestANDROID_HOME=/home/nameless1/Android/Sdk ANDROID_SDK_ROOT=/home/nameless1/Android/Sdk ./gradlew --no-daemon :app:assembleDebugDisclaimer 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 fixes two separate issues: the Android Containers tab now requests all containers with an explicit pagination query before applying local filters, and
ActivityCenterStoreadds exhaustivewhenbranch coverage for theERRORandHEARTBEATstream event types that caused a Kotlin Debug compilation failure.ERRORframes are surfaced through the existingstreamErrorMessagestate;HEARTBEATandUNKNOWNare treated as no-ops. The change is minimal and correct.containers.listcall now passesSearchPaginationSort(start = 0, limit = -1). The value-1is used nowhere else in the codebase — every otherSearchPaginationSortcall uses an explicit positive limit (100–500).WebhooksScreen.ktfetches the same endpoint withlimit = 500. If the API does not honour-1as "unlimited," the Containers tab will enter an error state or return a silently incomplete list.Confidence Score: 4/5
Safe to merge after confirming the API accepts limit = -1 as an unlimited sentinel; the ActivityCenterStore fix is clean and ready.
The ActivityCenterStore change is correct and straightforward. The ContainerListScreen fix correctly identifies the root cause (missing explicit pagination), but limit = -1 is the only negative limit value used anywhere in the app — every other screen caps at 100–500. If the backend or SDK does not treat -1 as fetch all, the Containers tab will silently remain broken or show an error on load.
ContainerListScreen.kt — the limit = -1 value needs confirmation against the SDK/API contract before merge.
Prompt To Fix All With AI
Reviews (1): Last reviewed commit: "Load all containers in Containers tab" | Re-trigger Greptile