fix(platform): unwrap integration list envelope so issue desk shows issues#2175
Merged
Conversation
…ssues `executeIntegration` returns an envelope whose connector payload (the issues array + upstream page hint) lives under `.result`. The untracked- issues action read `res.data` / `res.pagination` from the top level, which always yielded `undefined` — an empty page with no next page — collapsing the issue desk to nothing. Extract a shared `readIntegrationListPage` helper that unwraps `.result` first (mirroring the client's `parsePage`), tolerates an already-flat payload for forward compatibility, and degrades to an empty terminal page on a malformed result. Covered by unit tests.
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.
What
The issue desk rendered no issues even when untracked GitHub issues existed.
executeIntegrationreturns an envelope whose connector payload — the issues array plus the upstream "is there a next page" hint — lives under.result:listUntrackedGitHubIssuesreadres.data/res.paginationfrom the top level, which always resolved toundefined→ an empty page with no next page → the filtered list collapsed to nothing.Fix
Extract a shared
readIntegrationListPagehelper that:.resultfirst (mirroring the client'sparsePage),{ data, pagination }payload for forward compatibility (a future connector that returns the payload directly still works),nullresult.listUntrackedGitHubIssuesnow delegates to it instead of reading the top level.Tests
New
integration_list_page.test.tscovers the nested envelope, thehasNextsignal, the regression shape (top-level data must be ignored), the forward-compatible flat shape, and malformed input. All 5 pass.