Title: fix(connectors): make selector dropdowns resolve options the drain has not reached by waleedlatif1 · Pull Request #6027 · simstudioai/sim · GitHub
Open Graph Title: fix(connectors): make selector dropdowns resolve options the drain has not reached by waleedlatif1 · Pull Request #6027 · simstudioai/sim
X Title: fix(connectors): make selector dropdowns resolve options the drain has not reached by waleedlatif1 · Pull Request #6027 · simstudioai/sim
Description: Summary Connector selector option lists fill by draining pages in the background and are filtered client-side, so an option that has not arrived yet is indistinguishable from one that does not exist. Production logs for the reporting workspace show a 24-page, 38-second drain at the exact minute of the report. 1. The empty state lied. The field ignored the drain state the shared hook already exposes (hasMore / isFetchingMore / truncated / error), so a still-filling list rendered "No spaces found" — which reads as this space does not exist and sends users off to enter the value by hand. It now distinguishes still-loading, failed-to-load, and too-many-to-list. error is checked first: a failed page halts the drain but leaves hasMore set, which would otherwise claim to be loading forever. 2. An exact key could not be resolved without waiting for the drain. confluence.spaces.fetchById fetched the first page and scanned it, so a space sorting beyond page 1 never resolved — on a ~6,000-space site, nearly all of them. It now uses the documented v2 keys filter. Both current and archived are queried explicitly and concurrently: status takes a single value on /spaces and Atlassian documents no default there (unlike /pages, where it is an array defaulting to current,archived), and archived spaces are selectable and sync against. The typed value and the selected value are resolved through fetchById and merged into the option list, so an exact key is selectable immediately and a just-picked option does not vanish when the search box resets. 3. useSelectorOptionDetail could throw. A caller-supplied enabled replaced the guard checking that a definition declares fetchById, so queryFn's non-null assertion threw for the ~12 selectors without one. A caller's enabled is now narrowed by that hard precondition — but deliberately not by definition.enabled, which describes when a list can be fetched and gates on context (credential, domain, region) that resolving one known id may not need. cloudwatch.* echoes an id back without calling AWS, so gating on the list predicate would blank the log-group name on collapsed canvas blocks. Adds onSearchChange to the shared Combobox, read through a ref so its identity stays stable for the handlers that capture it without declaring it, and deduped because several reset paths fire redundantly. Deliberately not done Draining confluence.pages. An earlier revision did this and it was reverted: with no search term title is unset, so opening the dropdown walked the entire site — up to 50 sequential requests and 2,500 options where there had been one request and 50 — the route forwards no abort signal upstream so superseded drains still bill the tenant's rate limit, and the same fan-out reached loadAllSelectorOptions. Its justification also rested on title match semantics Atlassian does not publish. The 50-item cap is a real gap that needs confirmed server-side search, not brute force. sort=name on /spaces. Atlassian documents sort's allowed values only on the different /data-policies/spaces endpoint. A rejected value 400s, our route maps that to 502, and the dropdown breaks entirely. CQL substring search. Response shape unverified, and space.title~ can false-match on the creator's username. Type of Change Bug fix Testing Typecheck, lint:check (19/19), check:api-validation, and 497 tests pass. Root cause established from CloudWatch (/ecs/sim-production/us-east-1/app), not inferred. Reviewed by the eight /cleanup passes and then by six adversarial verification passes against the Atlassian OpenAPI spec and the surrounding plumbing. Between them they found five real defects in this diff — the enabled guard, a vanishing selected option, a combobox stale closure, an unverified status default, and the pages-drain regression — all fixed or reverted here. Not runtime-verified. Nothing here has executed against a live Confluence instance, and there is no test file for these routes. Remaining unknowns, all needing a live call: title match semantics, whether /spaces silently clamps limit=250, and keys case-sensitivity. 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)
Open Graph Description: Summary Connector selector option lists fill by draining pages in the background and are filtered client-side, so an option that has not arrived yet is indistinguishable from one that does not exis...
X Description: Summary Connector selector option lists fill by draining pages in the background and are filtered client-side, so an option that has not arrived yet is indistinguishable from one that does not exis...
Opengraph URL: https://github.com/simstudioai/sim/pull/6027
X: @github
Domain: github.com
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react-reconciler,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@d5750093facf |
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:7517c18f-44d9-ffb5-5bd0-8f1df94f607c |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | B01C:3EFFC5:5C14CF:8310F1:6AFB433C |
| html-safe-nonce | 5ac893afd7fff6ea608402cb1470bc5e7570a5537e58b677734fad8eb5af59db |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCMDFDOjNFRkZDNTo1QzE0Q0Y6ODMxMEYxOjZBRkI0MzNDIiwidmlzaXRvcl9pZCI6IjEwNzM1MzA5OTAxNDUyNTgzMDAiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | c4d79cd703cb84e69336f32db15f9a19a37824b21f2bcb6d74c9b3a646e228de |
| hovercard-subject-tag | pull_request:4155808370 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/simstudioai/sim/pull/6027/files |
| twitter:image | https://avatars.githubusercontent.com/u/40672544?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/40672544?s=400&v=4 |
| og:image:alt | Summary Connector selector option lists fill by draining pages in the background and are filtered client-side, so an option that has not arrived yet is indistinguishable from one that does not exis... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | d849b928f455c800985398e7f1b659425adb312a5fa14fba5d9a14e62e9fe5dd |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/simstudioai/sim git https://github.com/simstudioai/sim.git |
| octolytics-dimension-user_id | 199344406 |
| octolytics-dimension-user_login | simstudioai |
| octolytics-dimension-repository_id | 912559512 |
| octolytics-dimension-repository_nwo | simstudioai/sim |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 912559512 |
| octolytics-dimension-repository_network_root_nwo | simstudioai/sim |
| turbo-body-classes | logged-out env-production page-responsive full-width |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | a6c2f87cbcb6414452377b4967858ed6a66f1109 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width