fix(inbox): load all connected pages in the broadcast page selector instead of only 50 - #1252
Merged
Merged
Conversation
…nstead of only 50
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.
Summary
perPage: 999_999_999), but the shared pagination helperparsePaginationclamps every list tomaxLimit = 50. So the store silently held only the first 50 connected inboxes, and every surface reading from it — the broadcast page/flow selectors, and the inbox/contacts/reflinks filters — was capped with it.listand the public token API stay capped, so nothing on the documented API surface changes.Changes
Business layer
packages/business/src/inbox/service.ts—listAllConnectedByWorkspacereturns every connected inbox for a workspace with no page limit. Itswhereand integration eager-load are extracted into shared helpers solistand the new method can never filter differentlypackages/business/src/inbox/schema.ts— extracts the sharedinboxWithIntegrationsResourceitem schema and addslistAllConnectedInboxesRequest/Response(nopage/perPage)Builder
apps/builder/src/features/inboxes/api/private.ts—listAllInboxesAuthenticatedAPI, an authenticated RPC-only procedure (no.route()), so "return everything" is not published on the OpenAPI/public surfaceapps/builder/src/features/inboxes/queries/index.ts— thin adapter to the serviceapps/builder/src/features/inboxes/provider/inbox-store.ts— the store loads from the new endpointBehaviour changes worth knowing
listWithIntegrationsByWorkspaceshape. A lighter or lazily-enriched variant is a reasonable follow-up if a workspace ever holds thousands of inboxeslistInboxesAuthenticatedAPIand the public/v1/inboxestoken API are unchanged and stay capped at 50 per pageinboxWithIntegrationsResourcestill omitsintegrationThreadsandintegrationTiktok(a gap that predates this change and that no store consumer reads); adding them is a separate follow-upTest plan
pnpm --filter @chatbotx.io/business test— inbox suite 32/32apps/builderinbox store + broadcast suites — 8/8 store, broadcast/inbox surfaces greenpnpm lint(Biome, i18n-check, schema drift) cleanpnpm --filter @chatbotx.io/business check-types,pnpm --filter builder check-types— no errors in touched filesinvariant-guardclean on the diff