Skip to content

fix(selectors): paginate HubSpot list options - #7327

Merged
waleedlatif1 merged 1 commit into
stagingfrom
fix/crm-selector-bugs
Sep 1, 2026
Merged

fix(selectors): paginate HubSpot list options#7327
waleedlatif1 merged 1 commit into
stagingfrom
fix/crm-selector-bugs

Conversation

@BillLeoutsakosvl346

Copy link
Copy Markdown
Contributor

Summary

Fixes HubSpot list selectors so they use the documented search request body, follow HubSpot's continuation offset, and hydrate saved list labels directly by ID. The HubSpot list-membership trigger now exposes server-side search.

Pipedrive runtime behavior is unchanged because #7185 already validates its response envelope; this PR adds focused regression coverage proving an HTTP-success response with success: false raises the public selector error instead of becoming an empty list.

Related: #7185

Type of Change

  • Bug fix
  • New feature
  • Breaking change
  • Documentation
  • Other: ___________

Testing

  • bun run --cwd apps/sim test lib/selectors/server/providers/hubspot.test.ts lib/selectors/server/providers/pipedrive.test.ts lib/selectors/manifest.test.ts hooks/queries/selectors.test.tsx — 4 files, 19 tests passed.
  • bun run type-check — 26/26 tasks passed.
  • bun run lint:check — 26/26 tasks passed; no fixes applied.
  • bun run check:api-validation — passed with 637/637 routes Zod-backed.
  • bun run test — final run passed all 19 Turbo tasks; the Sim app reported 2,774 files and 38,328 tests passed (7 files and 67 tests skipped).

Provider behavior coverage is intentionally limited to three tests:

  1. Pipedrive rejects an HTTP 200 envelope with success: false.
  2. HubSpot sends count, trimmed query, and numeric offset in the search body, uses the first response's offset for page two, and omits the terminal cursor.
  3. HubSpot fetches a selected list directly by ID for label hydration.

Live Chrome verification used a HubSpot trial portal, a temporary private app scoped only to crm.lists.read, and one static list named Sim CRM selector QA 20260831-1710. In a disposable workflow on the isolated port-3004 app:

  • Exact-name server search returned the list once.
  • The list was selectable.
  • Reload issued a successful hubspot.lists detail request and preserved the label.
  • No selector error appeared in the UI or browser logs.

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

Screenshots/Videos

Not applicable; this is a behavioral selector fix with no visual design change.

@vercel

vercel Bot commented Sep 1, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated
docs Skipped Skipped Sep 1, 2026 12:35am UTC

Request Review

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

No issues found across 5 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Heads up: you’re close to your included review allowance. Set a flex budget so reviews don’t pause.

Re-trigger cubic

@greptile-apps

greptile-apps Bot commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR updates HubSpot list selectors to support server-side search, offset-based pagination, and direct detail hydration for saved values.

  • Adds validated HubSpot list search and detail response handling.
  • Enables paginated, searchable, detail-capable selector behavior in the manifest and list-membership trigger.
  • Adds focused HubSpot pagination/detail tests and Pipedrive semantic-error regression coverage.

Confidence Score: 5/5

The PR appears safe to merge with no concrete changed-code failure identified.

The HubSpot request shapes, continuation handling, selector capabilities, and detail hydration are internally consistent and covered by focused regression tests; investigated compatibility concerns were contradicted by current contracts or existing repository behavior.

Important Files Changed

Filename Overview
apps/sim/lib/selectors/server/providers/hubspot.ts Implements validated list search pagination and direct list-by-ID hydration without an identified actionable defect.
apps/sim/lib/selectors/manifest.ts Enables pagination, search, and detail capabilities for the HubSpot lists selector consistently with the provider implementation.
apps/sim/triggers/hubspot/poller.ts Exposes search for the HubSpot list-membership selector, matching the newly enabled manifest capability.
apps/sim/lib/selectors/server/providers/hubspot.test.ts Covers search-body normalization, continuation-offset handling, terminal pagination, and direct detail hydration.
apps/sim/lib/selectors/server/providers/pipedrive.test.ts Adds regression coverage confirming semantic API failures are surfaced instead of converted into empty options.

Reviews (1): Last reviewed commit: "fix(selectors): paginate HubSpot list op..." | Re-trigger Greptile

@waleedlatif1
waleedlatif1 merged commit 616d5e9 into staging Sep 1, 2026
27 checks passed
@waleedlatif1
waleedlatif1 deleted the fix/crm-selector-bugs branch September 1, 2026 00:45
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.

2 participants