Commit 5fa8416
authored
fix(selectors): fetch all pages for paginated dropdown list routes (#4823)
* fix(selectors): fetch all pages for paginated dropdown list routes
Dropdown selectors fetched only the first page of paginated provider
APIs, silently hiding results past page one. Add bounded server-side
draining to the list routes across Microsoft Graph, Google, Notion,
Atlassian, Linear, AWS CloudWatch, and offset/token REST APIs, plus a
shared client-side drain cap in the selector hook. Response shapes,
stored values, and tool execution are unchanged; CloudWatch list tools
still honor a caller-supplied limit. Also fixes the Word file picker
that was searching for .xlsx files.
* fix(selectors): harden JSM and Monday pagination draining
- JSM service-desk/request-type drains advance `start` by the actual row
count returned (not the fixed page size) and stop on an empty page, so a
short non-final page can't skip items.
- Monday boards drain now checks `response.ok` per page, surfacing a
mid-drain HTTP failure instead of treating it as an empty final page and
returning a partial 200.
* docs(selectors): clarify JSM drain advances start by actual row count
The offset-advancement fix (advance `start` by the rows returned, not the
fixed page size) landed in 7b19788; update the TSDoc to match so it no
longer reads as advancing by `limit`.
* fix(selectors): drain fetchPage in direct fetchList callers
Making `fetchList` optional left three direct callers (outside the
useSelectorOptions hook) calling it unguarded, which broke the build's
type check. Route them through a shared `loadAllSelectorOptions` helper
that uses `fetchList` when present and otherwise drains `fetchPage`.
This also prevents a regression: `confluence.spaces` / `knowledge.documents`
now paginate via `fetchPage` only, and these callers (search/replace,
value resolution) would otherwise have silently returned no options.
* chore(selectors): rename MAX_PAGE_PAGES to MAX_NOTION_PAGES for readability1 parent f6685cf commit 5fa8416
46 files changed
Lines changed: 2299 additions & 727 deletions
File tree
- apps/sim
- app/api
- auth/oauth/microsoft/files
- tools
- airtable/bases
- asana/workspaces
- cloudwatch
- describe-log-groups
- drive/files
- google_bigquery
- datasets
- tables
- google_calendar/calendars
- google_tasks/task-lists
- jira/projects
- jsm
- selector-requesttypes
- selector-servicedesks
- linear
- projects
- teams
- microsoft-teams
- channels
- chats
- teams
- microsoft_excel/drives
- microsoft_planner
- plans
- tasks
- monday/boards
- notion
- databases
- pages
- onedrive
- files
- folders
- outlook/folders
- pipedrive/pipelines
- slack/users
- wealthbox/items
- webflow/items
- zoom/meetings
- hooks
- queries
- selectors
- providers
- confluence
- knowledge
- microsoft
- lib
- api/contracts/selectors
- oauth
- workflows/comparison
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| 11 | + | |
11 | 12 | | |
12 | 13 | | |
13 | 14 | | |
14 | 15 | | |
15 | 16 | | |
16 | 17 | | |
17 | | - | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
18 | 62 | | |
19 | 63 | | |
20 | 64 | | |
| |||
27 | 71 | | |
28 | 72 | | |
29 | 73 | | |
| 74 | + | |
30 | 75 | | |
31 | 76 | | |
32 | 77 | | |
| |||
40 | 85 | | |
41 | 86 | | |
42 | 87 | | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
43 | 91 | | |
44 | 92 | | |
45 | 93 | | |
| |||
72 | 120 | | |
73 | 121 | | |
74 | 122 | | |
75 | | - | |
76 | | - | |
77 | | - | |
78 | | - | |
79 | | - | |
| 123 | + | |
| 124 | + | |
80 | 125 | | |
81 | 126 | | |
82 | 127 | | |
83 | 128 | | |
84 | 129 | | |
85 | 130 | | |
86 | 131 | | |
87 | | - | |
| 132 | + | |
88 | 133 | | |
89 | 134 | | |
90 | 135 | | |
| |||
99 | 144 | | |
100 | 145 | | |
101 | 146 | | |
102 | | - | |
103 | | - | |
104 | | - | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
105 | 153 | | |
106 | 154 | | |
107 | 155 | | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
108 | 172 | | |
109 | | - | |
110 | 173 | | |
111 | | - | |
112 | | - | |
113 | | - | |
114 | | - | |
115 | | - | |
116 | | - | |
117 | | - | |
118 | | - | |
119 | | - | |
120 | | - | |
121 | | - | |
122 | | - | |
123 | | - | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
124 | 179 | | |
125 | | - | |
126 | | - | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
127 | 187 | | |
128 | | - | |
129 | | - | |
| 188 | + | |
| 189 | + | |
130 | 190 | | |
131 | | - | |
132 | | - | |
133 | | - | |
| 191 | + | |
| 192 | + | |
134 | 193 | | |
135 | | - | |
| 194 | + | |
136 | 195 | | |
137 | 196 | | |
138 | | - | |
139 | | - | |
| 197 | + | |
140 | 198 | | |
141 | 199 | | |
142 | 200 | | |
| |||
155 | 213 | | |
156 | 214 | | |
157 | 215 | | |
158 | | - | |
| 216 | + | |
159 | 217 | | |
160 | 218 | | |
161 | 219 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
14 | 79 | | |
15 | 80 | | |
16 | 81 | | |
| |||
45 | 110 | | |
46 | 111 | | |
47 | 112 | | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | | - | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | | - | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
65 | 128 | | |
66 | 129 | | |
67 | | - | |
68 | | - | |
| 130 | + | |
69 | 131 | | |
70 | 132 | | |
71 | 133 | | |
| |||
0 commit comments