René's URL Explorer Experiment


Title: fix(admin): stop counting workflow runs on dashboard list pages by waleedlatif1 · Pull Request #9630 · simstudioai/sim · GitHub

Open Graph Title: fix(admin): stop counting workflow runs on dashboard list pages by waleedlatif1 · Pull Request #9630 · simstudioai/sim

X Title: fix(admin): stop counting workflow runs on dashboard list pages by waleedlatif1 · Pull Request #9630 · simstudioai/sim

Description: Summary The admin organizations and users lists counted each entity's distinct workflow executions next to its spend. Neither entity index on usage_log carries execution_id, so that count heap-fetches every workflow ledger row in each entity's period, one statement for a whole page of entities. As the ledger grew the list went from seconds to past the 60s statement timeout. Lists and the reporting-period preview now read spend only (index-only on the existing cost indexes) and return workflowRuns: null. Organization detail counts runs once: total plus every actor's share in one GROUPING SETS scan, run alongside the page reads, under a 5s budget via readLedgerBounded (new optional budgetMs). Past the budget the count is null and the page still loads. Former actors' runs come from the same scan instead of a second heap pass. Contract: workflowRuns is nullable. The deployed admin app already renders null as —; a companion admin PR drops the list columns. No new index: widening both entity indexes with execution_id would grow the hot billing sums' working set for a staff-only number (left as a follow-up if staff need exact counts for the largest payers). Type of Change Bug fix Testing lib/admin/dashboard-usage.integration.ts against real Postgres: spend per entity/user, runs total + per actor (shared run counts for each actor), empty entity, former-actor spend, and a run count blocked past its budget returns null (verified red with the guard removed) lib/admin/dashboard-organizations.test.ts, lib/api/contracts/v1/admin/dashboard.test.ts, lib/billing/** unit tests, lib/billing/core/ledger-read.integration.ts bun run lint, type-check (pre-push) Plain EXPLAIN of the new runs statement: presorted GroupAggregate over the period cost index, no extra sort Checklist Code follows project style guidelines Self-reviewed my changes Tests added/updated and passing (new tests pass the test-audit authoring gate) 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 The admin organizations and users lists counted each entity's distinct workflow executions next to its spend. Neither entity index on usage_log carries execution_id, so that count heap...

X Description: Summary The admin organizations and users lists counted each entity's distinct workflow executions next to its spend. Neither entity index on usage_log carries execution_id, so that count ...

Opengraph URL: https://github.com/simstudioai/sim/pull/9630

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:9c5b29f1-6e10-fbd3-9156-8540d3fb1875
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idB3D8:70580:4FA34:70922:6AFB1B00
html-safe-nonce073adc1ee94e6ac20c8cf5bd02e26760ff4b96a11014f2c03ae706af0e25486d
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCM0Q4OjcwNTgwOjRGQTM0OjcwOTIyOjZBRkIxQjAwIiwidmlzaXRvcl9pZCI6Ijc2NTk3NDk4NjEyMzAzMjAzODQiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac7ba908378f07c98a3ee7840a173cb43dd5a7c33d96c96c635bb6ff42c66bff7e
hovercard-subject-tagpull_request:5143921449
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/9630/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 The admin organizations and users lists counted each entity's distinct workflow executions next to its spend. Neither entity index on usage_log carries execution_id, so that count heap...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None24933791aba0f10b2f189f8b953a1452dd79933933ac13a0a67b8ad3acee3d9f
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
release030711cc180b563614a434f4376acf7da5d445fa
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/simstudioai/sim/pull/9630/files#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fsimstudioai%2Fsim%2Fpull%2F9630%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%2F9630%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/9630/files
Reloadhttps://github.com/simstudioai/sim/pull/9630/files
Reloadhttps://github.com/simstudioai/sim/pull/9630/files
simstudioaihttps://github.com/simstudioai
simhttps://github.com/simstudioai/sim
Codehttps://github.com/simstudioai/sim
Issues129 (129)https://github.com/simstudioai/sim/issues
Pull requests198 (198)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
fix/admin-dashboard-ledger-readshttps://github.com/simstudioai/sim/tree/fix/admin-dashboard-ledger-reads
Conversation 10 https://github.com/simstudioai/sim/pull/9630
Commits 3 https://github.com/simstudioai/sim/pull/9630/commits
Checks 81 https://github.com/simstudioai/sim/pull/9630/checks
Files changed https://github.com/simstudioai/sim/pull/9630/files
Please reload this pagehttps://github.com/simstudioai/sim/pull/9630/files
fix(admin): stop counting workflow runs on dashboard list pages https://github.com/simstudioai/sim/pull/9630/files#top
Show all changes 3 commits https://github.com/simstudioai/sim/pull/9630/files
235764e fix(admin): stop counting workflow runs on dashboard list pages waleedlatif1 Nov 3, 2026 https://github.com/simstudioai/sim/pull/9630/commits/235764e74d0e30c91f880684276bb48933c601fb
d0e4ab7 test(admin): avoid Promise.withResolvers in the run-budget test waleedlatif1 Nov 3, 2026 https://github.com/simstudioai/sim/pull/9630/commits/d0e4ab72ddc99a77b4d33756f24bfbde550c03c0
7367ac9 fix(admin): count former actors' runs once, not once per actor waleedlatif1 Nov 3, 2026 https://github.com/simstudioai/sim/pull/9630/commits/7367ac996a40796da0f4f4eb00267fc8aa112fac
Clear filters https://github.com/simstudioai/sim/pull/9630/files
Please reload this pagehttps://github.com/simstudioai/sim/pull/9630/files
Please reload this pagehttps://github.com/simstudioai/sim/pull/9630/files
dashboard-organizations.test.ts https://github.com/simstudioai/sim/pull/9630/files#diff-9dfb75e45b7cecb45ab8066fae0533ab0f1605d2abbc379fdcb2b422bf0aeb4c
dashboard-usage.integration.ts https://github.com/simstudioai/sim/pull/9630/files#diff-1760dcde0ca571c8f908223f87030f5b795aa249738dd1929ead2b0a360d5e21
dashboard-usage.ts https://github.com/simstudioai/sim/pull/9630/files#diff-0222c6f6951ae11a0c8b47738a7720051ac96eb82693a6fa8e6a3641e855fd57
dashboard.ts https://github.com/simstudioai/sim/pull/9630/files#diff-5c387d1340d6c2018ddbd5f5b624f978ebc0ac158ea97ef66de7dfc9586d07dc
dashboard.ts https://github.com/simstudioai/sim/pull/9630/files#diff-085f3771d973045792d080df3f9c8fb5f2e4bc71c700d018c20699f658305fc7
ledger-read.ts https://github.com/simstudioai/sim/pull/9630/files#diff-55a4e70d1ace557b8b022a400c3e6e82fb729b0dc26ca4a6d611f27f8c194408
check-explicit-any.baseline.json https://github.com/simstudioai/sim/pull/9630/files#diff-780d04116ec981737479435cdb0364b49047711f2dfb93b671a9be50a1b0bb27
apps/sim/lib/admin/dashboard-organizations.test.tshttps://github.com/simstudioai/sim/pull/9630/files#diff-9dfb75e45b7cecb45ab8066fae0533ab0f1605d2abbc379fdcb2b422bf0aeb4c
View file https://github.com/simstudioai/sim/blob/7367ac996a40796da0f4f4eb00267fc8aa112fac/apps/sim/lib/admin/dashboard-organizations.test.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/simstudioai/sim/pull/9630/{{ revealButtonHref }}
https://github.com/simstudioai/sim/pull/9630/files#diff-9dfb75e45b7cecb45ab8066fae0533ab0f1605d2abbc379fdcb2b422bf0aeb4c
https://github.com/simstudioai/sim/pull/9630/files#diff-9dfb75e45b7cecb45ab8066fae0533ab0f1605d2abbc379fdcb2b422bf0aeb4c
https://github.com/simstudioai/sim/pull/9630/files#diff-9dfb75e45b7cecb45ab8066fae0533ab0f1605d2abbc379fdcb2b422bf0aeb4c
https://github.com/simstudioai/sim/pull/9630/files#diff-9dfb75e45b7cecb45ab8066fae0533ab0f1605d2abbc379fdcb2b422bf0aeb4c
apps/sim/lib/admin/dashboard-usage.integration.tshttps://github.com/simstudioai/sim/pull/9630/files#diff-1760dcde0ca571c8f908223f87030f5b795aa249738dd1929ead2b0a360d5e21
View file https://github.com/simstudioai/sim/blob/7367ac996a40796da0f4f4eb00267fc8aa112fac/apps/sim/lib/admin/dashboard-usage.integration.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/simstudioai/sim/pull/9630/{{ revealButtonHref }}
https://github.com/simstudioai/sim/pull/9630/files#diff-1760dcde0ca571c8f908223f87030f5b795aa249738dd1929ead2b0a360d5e21
https://github.com/simstudioai/sim/pull/9630/files#diff-1760dcde0ca571c8f908223f87030f5b795aa249738dd1929ead2b0a360d5e21
https://github.com/simstudioai/sim/pull/9630/files#diff-1760dcde0ca571c8f908223f87030f5b795aa249738dd1929ead2b0a360d5e21
https://github.com/simstudioai/sim/pull/9630/files#diff-1760dcde0ca571c8f908223f87030f5b795aa249738dd1929ead2b0a360d5e21
https://github.com/simstudioai/sim/pull/9630/files#diff-1760dcde0ca571c8f908223f87030f5b795aa249738dd1929ead2b0a360d5e21
https://github.com/simstudioai/sim/pull/9630/files#diff-1760dcde0ca571c8f908223f87030f5b795aa249738dd1929ead2b0a360d5e21
Please reload this pagehttps://github.com/simstudioai/sim/pull/9630/files
Please reload this pagehttps://github.com/simstudioai/sim/pull/9630/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.