René's URL Explorer Experiment


Title: improvement(billing): migrate hot path writes away from user_stats by icecrasher321 · Pull Request #4768 · simstudioai/sim · GitHub

Open Graph Title: improvement(billing): migrate hot path writes away from user_stats by icecrasher321 · Pull Request #4768 · simstudioai/sim

X Title: improvement(billing): migrate hot path writes away from user_stats by icecrasher321 · Pull Request #4768 · simstudioai/sim

Description: Sim is the collaborative workspace to build, deploy, and monitor AI agents and workflows. Used by 100,000+ builders. - improvement(billing): migrate hot path writes away from user_stats by icecrasher321 · Pull Request #4768 · simstudioai/sim

Open Graph Description: Summary Migrate billing away from hot path writes to user_stats table. Source of truth becomes usage logs. Type of Change Other: Performance Testing Tested manually Checklist Code follows proj...

X Description: Summary Migrate billing away from hot path writes to user_stats table. Source of truth becomes usage logs. Type of Change Other: Performance Testing Tested manually Checklist Code follows proj...

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

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/_view_fragments/voltron/pull_requests/show/:user_id/:repository/:id/pull_request_layout(.:format)
route-controllervoltron_pull_requests_fragments
route-actionpull_request_layout
fetch-noncev2:1f359dc1-83f9-89f9-ac9b-02ba694fd476
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idBF90:295278:AE33CB:F5EC75:6AFB57F2
html-safe-nonceea78d983a690d46b787d64fec30d4f66fbe80acba84c5fc1fa589f311476a957
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCRjkwOjI5NTI3ODpBRTMzQ0I6RjVFQzc1OjZBRkI1N0YyIiwidmlzaXRvcl9pZCI6IjI5MjQ3OTc5ODA3NjAwMzczNjIiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmaca33452ed0d1706f93065a5b640d0a262172577bc7d25862355f6e41ae170f2b9
hovercard-subject-tagpull_request:3761047231
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///voltron/pull_requests_fragments/pull_request_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/voltron/pull_requests/show/simstudioai/sim/4768/pull_request_layout
twitter:imagehttps://opengraph.githubassets.com/412f7fc7b85d69268e03f1b136b178758e91b45c2b94685e1cc7dbc7996d481d/simstudioai/sim/pull/4768
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/412f7fc7b85d69268e03f1b136b178758e91b45c2b94685e1cc7dbc7996d481d/simstudioai/sim/pull/4768
og:image:altSummary Migrate billing away from hot path writes to user_stats table. Source of truth becomes usage logs. Type of Change Other: Performance Testing Tested manually Checklist Code follows proj...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameicecrasher321
hostnamegithub.com
expected-hostnamegithub.com
Noneea33d13c96d0ff66bd8fa906b193d2213536b78cb06b0c50a4632c58b1418f94
turbo-cache-controlno-cache
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
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release59ef97164c52cf59bd10558ddec9c4f482763988
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-namepull-requests

Links:

Skip to contenthttps://github.com/simstudioai/sim/pull/4768#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fsimstudioai%2Fsim%2Fpull%2F4768
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%2F4768
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fpull_requests_fragments%2Fpull_request_layout&source=header-repo&source_repo=simstudioai%2Fsim
Reloadhttps://github.com/simstudioai/sim/pull/4768
Reloadhttps://github.com/simstudioai/sim/pull/4768
Reloadhttps://github.com/simstudioai/sim/pull/4768
simstudioaihttps://github.com/simstudioai
simhttps://github.com/simstudioai/sim
Codehttps://github.com/simstudioai/sim
Issues129 (129)https://github.com/simstudioai/sim/issues
Pull requests197 (197)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
https://github.com/simstudioai/sim
icecrasher321https://github.com/icecrasher321
staginghttps://github.com/simstudioai/sim/tree/staging
improvement/billing-ledgehttps://github.com/simstudioai/sim/tree/improvement/billing-ledge
Conversationhttps://github.com/simstudioai/sim/pull/4768
Commits6 (6)https://github.com/simstudioai/sim/pull/4768/commits
Checkshttps://github.com/simstudioai/sim/pull/4768/checks
Files changedhttps://github.com/simstudioai/sim/pull/4768/files
improvement(billing): migrate hot path writes away from user_statshttps://github.com/simstudioai/sim/pull/4768#top
icecrasher321https://github.com/icecrasher321
staginghttps://github.com/simstudioai/sim/tree/staging
improvement/billing-ledgehttps://github.com/simstudioai/sim/tree/improvement/billing-ledge
https://github.com/icecrasher321
icecrasher321https://github.com/icecrasher321
May 28, 2026https://github.com/simstudioai/sim/pull/4768#issue-4539336030
Please reload this pagehttps://github.com/simstudioai/sim/pull/4768
Contributor License Agreement (CLA)https://github.com/simstudioai/sim/pull/CONTRIBUTING.md#contributor-license-agreement-cla
Please reload this pagehttps://github.com/simstudioai/sim/pull/4768
May 28, 2026 02:15https://github.com/simstudioai/sim/pull/4768#commits-pushed-5996a5e
improvement(billing): migrate hot path writes away from user_statshttps://github.com/simstudioai/sim/pull/4768/commits/5996a5e755359c4a4f600089d41f9e4d85c96400
5996a5ehttps://github.com/simstudioai/sim/pull/4768/commits/5996a5e755359c4a4f600089d41f9e4d85c96400
fix period start and end sothttps://github.com/simstudioai/sim/pull/4768/commits/05d3babc5b339abb92face655e9533c0e8d8dedf
05d3babhttps://github.com/simstudioai/sim/pull/4768/commits/05d3babc5b339abb92face655e9533c0e8d8dedf
https://github.com/apps/vercel
vercelhttps://github.com/apps/vercel
temporarily deployedhttps://docs-4aj7jw06i-sim-studio.vercel.app
May 28, 2026 09:35https://github.com/simstudioai/sim/pull/4768#event-26055722687
https://github.com/apps/vercel
vercelhttps://github.com/apps/vercel
May 28, 2026https://github.com/simstudioai/sim/pull/4768#issuecomment-4562645868
Please reload this pagehttps://github.com/simstudioai/sim/pull/4768
Vercel for GitHubhttps://vercel.link/github-learn-more
docshttps://vercel.com/sim-studio/docs
https://camo.githubusercontent.com/833ba95642364322d56bfc6cc95692affdd7a5a6ca7b50fdcc44aa7e47372d3b/68747470733a2f2f76657263656c2e636f6d2f7374617469632f7374617475732f72656164792e737667
Readyhttps://vercel.com/sim-studio/docs/3EdzbJaSm6SbAKKfUd5AHkvLmMYd
Previewhttps://docs-git-improvement-billing-ledge-sim-studio.vercel.app
Commenthttps://vercel.live/open-feedback/docs-git-improvement-billing-ledge-sim-studio.vercel.app?via=pr-comment-feedback-link
https://vercel.com/vercel-agent/request-review?owner=simstudioai&repo=sim&pr=4768
Please reload this pagehttps://github.com/simstudioai/sim/pull/4768
https://github.com/apps/cursor
cursorhttps://github.com/apps/cursor
May 28, 2026https://github.com/simstudioai/sim/pull/4768#issuecomment-4562647007
Please reload this pagehttps://github.com/simstudioai/sim/pull/4768
Cursor Bugbothttps://cursor.com/bugbot
784fe70https://github.com/simstudioai/sim/commit/784fe7056d4b1fe845422787b9c7781ed1f08b32
herehttps://www.cursor.com/dashboard/bugbot
Please reload this pagehttps://github.com/simstudioai/sim/pull/4768
https://github.com/apps/cursor
cursorhttps://github.com/apps/cursor
May 28, 2026 https://github.com/simstudioai/sim/pull/4768#pullrequestreview-4379800510
View reviewed changes https://github.com/simstudioai/sim/pull/4768/files/05d3babc5b339abb92face655e9533c0e8d8dedf
apps/sim/lib/billing/credits/daily-refresh.tshttps://github.com/simstudioai/sim/pull/4768/files/05d3babc5b339abb92face655e9533c0e8d8dedf#diff-8bf3828d314ee198de779b19aa5d48a88ec28efb76b2dcbb37f97d312e33fc2d
Please reload this pagehttps://github.com/simstudioai/sim/pull/4768
apps/sim/lib/billing/calculations/usage-monitor.tshttps://github.com/simstudioai/sim/pull/4768/files/05d3babc5b339abb92face655e9533c0e8d8dedf#diff-952d682fdab349d4e9744b11be30f9f96f0396201f6f3c936e2054e387136537
Please reload this pagehttps://github.com/simstudioai/sim/pull/4768
apps/sim/app/api/mcp/copilot/route.tshttps://github.com/simstudioai/sim/pull/4768/files/05d3babc5b339abb92face655e9533c0e8d8dedf#diff-5b7748e8b2e0e1a3294a7478e3a854a0ea73cdf70ee0826ec8caf3f9b959f608
Please reload this pagehttps://github.com/simstudioai/sim/pull/4768
https://github.com/apps/greptile-apps
greptile-appshttps://github.com/apps/greptile-apps
May 28, 2026https://github.com/simstudioai/sim/pull/4768#issuecomment-4562718508
Please reload this pagehttps://github.com/simstudioai/sim/pull/4768
linkhttps://github.com/simstudioai/sim/blob/784fe7056d4b1fe845422787b9c7781ed1f08b32/apps/sim/lib/billing/credits/daily-refresh.ts#L76-L113
https://github.com/simstudioai/sim/pull/4768
"regen migrations"https://github.com/simstudioai/sim/commit/784fe7056d4b1fe845422787b9c7781ed1f08b32
Re-trigger Greptilehttps://app.greptile.com/api/retrigger?id=34332193
Please reload this pagehttps://github.com/simstudioai/sim/pull/4768
https://github.com/apps/greptile-apps
greptile-appshttps://github.com/apps/greptile-apps
May 28, 2026 https://github.com/simstudioai/sim/pull/4768#pullrequestreview-4379815785
View reviewed changes https://github.com/simstudioai/sim/pull/4768/files/05d3babc5b339abb92face655e9533c0e8d8dedf
apps/sim/lib/billing/webhooks/invoices.tshttps://github.com/simstudioai/sim/pull/4768/files/05d3babc5b339abb92face655e9533c0e8d8dedf#diff-cb16770e3a3f7d2310b9e577f462b86fa002021ebe8de3354280a114fdda92da
Please reload this pagehttps://github.com/simstudioai/sim/pull/4768
address commentshttps://github.com/simstudioai/sim/pull/4768/commits/c8fa9b7804ec375f532fa60844909f31354334a9
c8fa9b7https://github.com/simstudioai/sim/pull/4768/commits/c8fa9b7804ec375f532fa60844909f31354334a9
https://github.com/apps/vercel
vercelhttps://github.com/apps/vercel
temporarily deployedhttps://docs-mdewzysid-sim-studio.vercel.app
May 28, 2026 17:20https://github.com/simstudioai/sim/pull/4768#event-26074142238
https://github.com/icecrasher321
icecrasher321https://github.com/icecrasher321
May 28, 2026https://github.com/simstudioai/sim/pull/4768#issuecomment-4566560324
@greptilehttps://github.com/greptile
Please reload this pagehttps://github.com/simstudioai/sim/pull/4768
https://github.com/icecrasher321
icecrasher321https://github.com/icecrasher321
May 28, 2026https://github.com/simstudioai/sim/pull/4768#issuecomment-4566560922
Please reload this pagehttps://github.com/simstudioai/sim/pull/4768
https://github.com/apps/cursor
cursorhttps://github.com/apps/cursor
May 28, 2026 https://github.com/simstudioai/sim/pull/4768#pullrequestreview-4383308528
View reviewed changes https://github.com/simstudioai/sim/pull/4768/files/c8fa9b7804ec375f532fa60844909f31354334a9
apps/sim/lib/billing/calculations/usage-monitor.tshttps://github.com/simstudioai/sim/pull/4768/files/c8fa9b7804ec375f532fa60844909f31354334a9#diff-952d682fdab349d4e9744b11be30f9f96f0396201f6f3c936e2054e387136537
Please reload this pagehttps://github.com/simstudioai/sim/pull/4768
May 28, 2026 12:19https://github.com/simstudioai/sim/pull/4768#commits-pushed-6656796
https://github.com/cursoragent
Remove stale billing migrationhttps://github.com/simstudioai/sim/pull/4768/commits/6656796e1500f8daca5237774ed11d19b39920d9
6656796https://github.com/simstudioai/sim/pull/4768/commits/6656796e1500f8daca5237774ed11d19b39920d9
Merge remote-tracking branch 'origin/staging' into improvement/billin…https://github.com/simstudioai/sim/pull/4768/commits/fdd1da30434e3996138b6b75da661bf3a4f2f936
fdd1da3https://github.com/simstudioai/sim/pull/4768/commits/fdd1da30434e3996138b6b75da661bf3a4f2f936
regen migrationshttps://github.com/simstudioai/sim/pull/4768/commits/784fe7056d4b1fe845422787b9c7781ed1f08b32
784fe70https://github.com/simstudioai/sim/pull/4768/commits/784fe7056d4b1fe845422787b9c7781ed1f08b32
https://github.com/icecrasher321
icecrasher321https://github.com/icecrasher321
May 28, 2026https://github.com/simstudioai/sim/pull/4768#issuecomment-4567481923
@greptilehttps://github.com/greptile
Please reload this pagehttps://github.com/simstudioai/sim/pull/4768
https://github.com/icecrasher321
icecrasher321https://github.com/icecrasher321
May 28, 2026https://github.com/simstudioai/sim/pull/4768#issuecomment-4567482441
Please reload this pagehttps://github.com/simstudioai/sim/pull/4768
https://github.com/apps/vercel
vercelhttps://github.com/apps/vercel
deployedhttps://docs-b18ue3cfa-sim-studio.vercel.app
Previewhttps://docs-b18ue3cfa-sim-studio.vercel.app
May 28, 2026 19:28https://github.com/simstudioai/sim/pull/4768#event-26079071574
View deploymenthttps://docs-b18ue3cfa-sim-studio.vercel.app
https://github.com/apps/cursor
cursorhttps://github.com/apps/cursor
May 28, 2026 https://github.com/simstudioai/sim/pull/4768#pullrequestreview-4384155726
View reviewed changes https://github.com/simstudioai/sim/pull/4768/files/784fe7056d4b1fe845422787b9c7781ed1f08b32
cursorhttps://github.com/apps/cursor
https://github.com/simstudioai/sim/pull/4768#pullrequestreview-4384155726
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
https://cursor.com/open?link=eyJ2ZXJzaW9uIjoxLCJ0eXBlIjoiQlVHQk9UX0ZJWF9BTExfSU5fQ1VSU09SIiwiZGF0YSI6eyJyZWRpc0tleSI6ImJ1Z2JvdC1tdWx0aToxZjVjY2Q4YS02NzQ0LTQ5MzktOTI3Zi03ZTU3NjhiZGY3YjUiLCJlbmNyeXB0aW9uS2V5IjoiSjYzS2FicU1LMXhsOXdnWUROb2JsNkF0dmhkU01mRnFTNDY2N0pWR0ZzUSIsImJyYW5jaCI6ImltcHJvdmVtZW50L2JpbGxpbmctbGVkZ2UiLCJyZXBvT3duZXIiOiJzaW1zdHVkaW9haSIsInJlcG9OYW1lIjoic2ltIn19
Cursor dashboardhttps://www.cursor.com/dashboard/bugbot
Cursor Bugbothttps://cursor.com/bugbot
784fe70https://github.com/simstudioai/sim/commit/784fe7056d4b1fe845422787b9c7781ed1f08b32
herehttps://www.cursor.com/dashboard/bugbot
Please reload this pagehttps://github.com/simstudioai/sim/pull/4768
apps/sim/lib/billing/webhooks/invoices.tshttps://github.com/simstudioai/sim/pull/4768/files/784fe7056d4b1fe845422787b9c7781ed1f08b32#diff-cb16770e3a3f7d2310b9e577f462b86fa002021ebe8de3354280a114fdda92da
Please reload this pagehttps://github.com/simstudioai/sim/pull/4768
https://github.com/icecrasher321
icecrasher321https://github.com/icecrasher321
53eaa60https://github.com/simstudioai/sim/commit/53eaa600afccdb4badb5f19e0b5bb1fdecc88fb0
May 28, 2026https://github.com/simstudioai/sim/pull/4768#event-26082300959
Please reload this pagehttps://github.com/simstudioai/sim/pull/4768
https://github.com/icecrasher321
icecrasher321https://github.com/icecrasher321
May 28, 2026 20:54https://github.com/simstudioai/sim/pull/4768#event-26082304228
https://github.com/waleedlatif1
waleedlatif1https://github.com/waleedlatif1
May 28, 2026 https://github.com/simstudioai/sim/pull/4768#ref-pullrequest-4544390041
v0.6.94: 4.8 opus, better auth upgrade, zoominfo integration, copilot messages table, user stats hot path improvements, RB2B #4780 https://github.com/simstudioai/sim/pull/4780
Deployedhttps://docs-b18ue3cfa-sim-studio.vercel.app
vercel[bot]https://github.com/apps/vercel
View deployment https://docs-b18ue3cfa-sim-studio.vercel.app
https://github.co/hiddenchars
https://github.com/simstudioai/sim/pull/{{ revealButtonHref }}
Sign up for freehttps://github.com/join?source=comment-repo
Sign in to commenthttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fsimstudioai%2Fsim%2Fpull%2F4768
https://github.com/apps/greptile-apps
greptile-apps[bot] https://github.com/apps/greptile-apps
https://github.com/simstudioai/sim/pull/4768/files/05d3babc5b339abb92face655e9533c0e8d8dedf
https://github.com/apps/cursor
cursor[bot] https://github.com/apps/cursor
https://github.com/simstudioai/sim/pull/4768/files/784fe7056d4b1fe845422787b9c7781ed1f08b32
Please reload this pagehttps://github.com/simstudioai/sim/pull/4768
Please reload this pagehttps://github.com/simstudioai/sim/pull/4768
https://github.com/icecrasher321
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.