René's URL Explorer Experiment


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

direct link

Domain: github.com

react-profiling0
react-import-mapreact,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-controllerpull_requests
route-actionfiles
fetch-noncev2:7517c18f-44d9-ffb5-5bd0-8f1df94f607c
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idB01C:3EFFC5:5C14CF:8310F1:6AFB433C
html-safe-nonce5ac893afd7fff6ea608402cb1470bc5e7570a5537e58b677734fad8eb5af59db
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCMDFDOjNFRkZDNTo1QzE0Q0Y6ODMxMEYxOjZBRkI0MzNDIiwidmlzaXRvcl9pZCI6IjEwNzM1MzA5OTAxNDUyNTgzMDAiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmacc4d79cd703cb84e69336f32db15f9a19a37824b21f2bcb6d74c9b3a646e228de
hovercard-subject-tagpull_request:4155808370
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///pull_requests/show/files
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/simstudioai/sim/pull/6027/files
twitter:imagehttps://avatars.githubusercontent.com/u/40672544?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/40672544?s=400&v=4
og:image:altSummary 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_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
Noned849b928f455c800985398e7f1b659425adb312a5fa14fba5d9a14e62e9fe5dd
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/simstudioai/sim git https://github.com/simstudioai/sim.git
octolytics-dimension-user_id199344406
octolytics-dimension-user_loginsimstudioai
octolytics-dimension-repository_id912559512
octolytics-dimension-repository_nwosimstudioai/sim
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id912559512
octolytics-dimension-repository_network_root_nwosimstudioai/sim
turbo-body-classeslogged-out env-production page-responsive full-width
disable-turbotrue
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
releasea6c2f87cbcb6414452377b4967858ed6a66f1109
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/simstudioai/sim/pull/6027/files#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fsimstudioai%2Fsim%2Fpull%2F6027%2Ffiles
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fsimstudioai%2Fsim%2Fpull%2F6027%2Ffiles
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fpull_requests%2Fshow%2Ffiles&source=header-repo&source_repo=simstudioai%2Fsim
Reloadhttps://github.com/simstudioai/sim/pull/6027/files
Reloadhttps://github.com/simstudioai/sim/pull/6027/files
Reloadhttps://github.com/simstudioai/sim/pull/6027/files
simstudioaihttps://github.com/simstudioai
simhttps://github.com/simstudioai/sim
Codehttps://github.com/simstudioai/sim
Issues129 (129)https://github.com/simstudioai/sim/issues
Pull requests200 (200)https://github.com/simstudioai/sim/pulls
Actionshttps://github.com/simstudioai/sim/actions
Projectshttps://github.com/simstudioai/sim/projects
Security and qualityhttps://github.com/simstudioai/sim/security
Insightshttps://github.com/simstudioai/sim/pulse
Sign up for GitHub https://github.com/signup?return_to=%2Fsimstudioai%2Fsim%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2Fsimstudioai%2Fsim%2Fissues%2Fnew%2Fchoose
waleedlatif1https://github.com/waleedlatif1
staginghttps://github.com/simstudioai/sim/tree/staging
confluence-spaces-orderinghttps://github.com/simstudioai/sim/tree/confluence-spaces-ordering
Conversation 35 https://github.com/simstudioai/sim/pull/6027
Commits 8 https://github.com/simstudioai/sim/pull/6027/commits
Checks 19 https://github.com/simstudioai/sim/pull/6027/checks
Files changed https://github.com/simstudioai/sim/pull/6027/files
Please reload this pagehttps://github.com/simstudioai/sim/pull/6027/files
fix(connectors): make selector dropdowns resolve options the drain has not reached https://github.com/simstudioai/sim/pull/6027/files#top
Show all changes 8 commits https://github.com/simstudioai/sim/pull/6027/files
2b313cb fix(connectors): stop the connector selector implying an option does … waleedlatif1 Jul 28, 2026 https://github.com/simstudioai/sim/pull/6027/commits/2b313cb11692e3ad879b8791e5bfaf0e2bc544df
3d779e9 feat(connectors): resolve selector options by exact key without waiti… waleedlatif1 Jul 29, 2026 https://github.com/simstudioai/sim/pull/6027/commits/3d779e9bc665cde4c1e8f502dbe9fb62677e2575
58fb25a fix(connectors): paginate the Confluence pages selector instead of re… waleedlatif1 Jul 29, 2026 https://github.com/simstudioai/sim/pull/6027/commits/58fb25a1af67759e949d9a23aea0be78b5dada7b
63603b5 fix(connectors): query both space statuses explicitly on exact-key lo… waleedlatif1 Jul 29, 2026 https://github.com/simstudioai/sim/pull/6027/commits/63603b5a90215fc212ec4c17cabd9c179685af68
e0d2a87 fix(connectors): revert pages drain, restore CloudWatch labels, tight… waleedlatif1 Jul 29, 2026 https://github.com/simstudioai/sim/pull/6027/commits/e0d2a87043727a468ec0f914fa7fd838c5cd8a66
63216f9 fix(connectors): keep resolved option labels and survive a half-faile… waleedlatif1 Jul 29, 2026 https://github.com/simstudioai/sim/pull/6027/commits/63216f971ea7d843017052848b31d03d6ee75f8a
e922623 fix(connectors): drop remembered option labels when the selector cont… waleedlatif1 Jul 29, 2026 https://github.com/simstudioai/sim/pull/6027/commits/e92262329260805d0c7cf67d0f3048bf6d857797
10bb508 refactor(connectors): resolve selected option labels with useQueries waleedlatif1 Jul 29, 2026 https://github.com/simstudioai/sim/pull/6027/commits/10bb5083df74b23e574e9d303d6204b5d24ac9c4
Clear filters https://github.com/simstudioai/sim/pull/6027/files
Please reload this pagehttps://github.com/simstudioai/sim/pull/6027/files
Please reload this pagehttps://github.com/simstudioai/sim/pull/6027/files
route.ts https://github.com/simstudioai/sim/pull/6027/files#diff-e20fb8d79d8b7610295181119bb8abfb17db86eb43018950047f8729c39edec6
connector-selector-field.tsx https://github.com/simstudioai/sim/pull/6027/files#diff-89b6e9b1796ff56f9dd65db4300e92786b323301bee59337fc813271b6aa1f02
selectors.ts https://github.com/simstudioai/sim/pull/6027/files#diff-c4f3afcaddb63c24dcb2387c56b90d46ccbb3848f3a358445025cdff6468d848
types.ts https://github.com/simstudioai/sim/pull/6027/files#diff-4dc5b0ac5914afe9f986811881ab4af477da7b8abf77759d6663fdfe4b2f79d2
use-selector-query.ts https://github.com/simstudioai/sim/pull/6027/files#diff-267abfcf64837e2e785ca8768ddfc8ab997418277841ff9b4250970754e10ee8
confluence.ts https://github.com/simstudioai/sim/pull/6027/files#diff-5ae29209064b41b2581b869c82975ffb92a2c0718f218731bd788b5d08fe2302
combobox.tsx https://github.com/simstudioai/sim/pull/6027/files#diff-af507bf3319191fdd3419bd107befb822e415435568924aea3413eba2ac39b66
apps/sim/app/api/tools/confluence/selector-spaces/route.tshttps://github.com/simstudioai/sim/pull/6027/files#diff-e20fb8d79d8b7610295181119bb8abfb17db86eb43018950047f8729c39edec6
View file https://github.com/simstudioai/sim/blob/10bb5083df74b23e574e9d303d6204b5d24ac9c4/apps/sim/app/api/tools/confluence/selector-spaces/route.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/simstudioai/sim/pull/6027/{{ revealButtonHref }}
https://github.com/simstudioai/sim/pull/6027/files#diff-e20fb8d79d8b7610295181119bb8abfb17db86eb43018950047f8729c39edec6
https://github.com/simstudioai/sim/pull/6027/files#diff-e20fb8d79d8b7610295181119bb8abfb17db86eb43018950047f8729c39edec6
https://github.com/simstudioai/sim/pull/6027/files#diff-e20fb8d79d8b7610295181119bb8abfb17db86eb43018950047f8729c39edec6
https://github.com/simstudioai/sim/pull/6027/files#diff-e20fb8d79d8b7610295181119bb8abfb17db86eb43018950047f8729c39edec6
https://github.com/simstudioai/sim/pull/6027/files#diff-e20fb8d79d8b7610295181119bb8abfb17db86eb43018950047f8729c39edec6
https://github.com/simstudioai/sim/pull/6027/files#diff-e20fb8d79d8b7610295181119bb8abfb17db86eb43018950047f8729c39edec6
...kspaceId]/knowledge/[id]/components/connector-selector-field/connector-selector-field.tsxhttps://github.com/simstudioai/sim/pull/6027/files#diff-89b6e9b1796ff56f9dd65db4300e92786b323301bee59337fc813271b6aa1f02
View file https://github.com/simstudioai/sim/blob/10bb5083df74b23e574e9d303d6204b5d24ac9c4/apps/sim/app/workspace/%5BworkspaceId%5D/knowledge/%5Bid%5D/components/connector-selector-field/connector-selector-field.tsx
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/simstudioai/sim/pull/6027/{{ revealButtonHref }}
https://github.com/simstudioai/sim/pull/6027/files#diff-89b6e9b1796ff56f9dd65db4300e92786b323301bee59337fc813271b6aa1f02
https://github.com/simstudioai/sim/pull/6027/files#diff-89b6e9b1796ff56f9dd65db4300e92786b323301bee59337fc813271b6aa1f02
https://github.com/simstudioai/sim/pull/6027/files#diff-89b6e9b1796ff56f9dd65db4300e92786b323301bee59337fc813271b6aa1f02
https://github.com/simstudioai/sim/pull/6027/files#diff-89b6e9b1796ff56f9dd65db4300e92786b323301bee59337fc813271b6aa1f02
https://github.com/simstudioai/sim/pull/6027/files#diff-89b6e9b1796ff56f9dd65db4300e92786b323301bee59337fc813271b6aa1f02
Please reload this pagehttps://github.com/simstudioai/sim/pull/6027/files
https://github.com/simstudioai/sim/pull/6027/files#diff-89b6e9b1796ff56f9dd65db4300e92786b323301bee59337fc813271b6aa1f02
https://github.com/simstudioai/sim/pull/6027/files#diff-89b6e9b1796ff56f9dd65db4300e92786b323301bee59337fc813271b6aa1f02
apps/sim/hooks/selectors/providers/confluence/selectors.tshttps://github.com/simstudioai/sim/pull/6027/files#diff-c4f3afcaddb63c24dcb2387c56b90d46ccbb3848f3a358445025cdff6468d848
View file https://github.com/simstudioai/sim/blob/10bb5083df74b23e574e9d303d6204b5d24ac9c4/apps/sim/hooks/selectors/providers/confluence/selectors.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/simstudioai/sim/pull/6027/{{ revealButtonHref }}
https://github.com/simstudioai/sim/pull/6027/files#diff-c4f3afcaddb63c24dcb2387c56b90d46ccbb3848f3a358445025cdff6468d848
https://github.com/simstudioai/sim/pull/6027/files#diff-c4f3afcaddb63c24dcb2387c56b90d46ccbb3848f3a358445025cdff6468d848
https://github.com/simstudioai/sim/pull/6027/files#diff-c4f3afcaddb63c24dcb2387c56b90d46ccbb3848f3a358445025cdff6468d848
https://github.com/simstudioai/sim/pull/6027/files#diff-c4f3afcaddb63c24dcb2387c56b90d46ccbb3848f3a358445025cdff6468d848
apps/sim/hooks/selectors/types.tshttps://github.com/simstudioai/sim/pull/6027/files#diff-4dc5b0ac5914afe9f986811881ab4af477da7b8abf77759d6663fdfe4b2f79d2
View file https://github.com/simstudioai/sim/blob/10bb5083df74b23e574e9d303d6204b5d24ac9c4/apps/sim/hooks/selectors/types.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/simstudioai/sim/pull/6027/{{ revealButtonHref }}
https://github.com/simstudioai/sim/pull/6027/files#diff-4dc5b0ac5914afe9f986811881ab4af477da7b8abf77759d6663fdfe4b2f79d2
Please reload this pagehttps://github.com/simstudioai/sim/pull/6027/files
Please reload this pagehttps://github.com/simstudioai/sim/pull/6027/files
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.