Skip to content

fix: 🐛 Fix listeners and connectors mock handlers - #601

Merged
pierpman merged 1 commit into
skupperproject:mainfrom
pierpman:fix/mock-listeners-connectors-filter
Aug 17, 2026
Merged

fix: 🐛 Fix listeners and connectors mock handlers#601
pierpman merged 1 commit into
skupperproject:mainfrom
pierpman:fix/mock-listeners-connectors-filter

Conversation

@pierpman

Copy link
Copy Markdown
Contributor

Description

Fix getListeners and getConnectors mock handlers returning empty results when limit is included in the query string.

The handlers were passing the full query params object (including pagination keys like limit) directly to filterResults. Since listener and connector records have no limit field, every record was dropped.

The fix follows the pattern already used by all other list handlers: destructure limit and offset out of the query params before passing the remaining keys to filterResults.

Issue

Additional context (optional)

Affected requests example:

GET /api/v2alpha1/listeners?limit=0&serviceId=adr-5193d597cb3d8442
GET /api/v2alpha1/connectors?limit=0&serviceId=adr-5193d597cb3d8442

Previously returned { results: [], count: 0 }. Now correctly returns all matching connectors/listeners.

How to test

  1. Start the dev server with mock data: yarn start
  2. Open a Service details page with Listener and Connector records, such as shippingservice.
  3. Confirm the Listeners tab populates with results instead of showing an empty state

Screenshots

Before:
Image

After:
image

@pierpman pierpman linked an issue Aug 13, 2026 that may be closed by this pull request

@fgiorgetti fgiorgetti left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Tested using mock data and real network observer.

@pierpman
pierpman merged commit 6db305f into skupperproject:main Aug 17, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Listeners and connectors tab is disabled in mock mode

4 participants