GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — improvement(billing): ux around on demand toggling and one-off credits by icecrasher321 · Pull Request #5307 · simstudioai/sim

Conversation

@icecrasher321

@icecrasher321 icecrasher321 commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Summary

Minor changes to demand toggling ux to not give odd errors.

Type of Change

  • Other: UX Improvement

Testing

Tested manually

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)

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

greptile-apps[bot] reacted with thumbs up emoji
All reactions
  • 👍 1 reaction
waleedlatif1 and others added 30 commits April 3, 2026 23:30
@waleedlatif1
v0.6.23: MCP fixes, remove local state in favor of server state, moth…
0b9019d
…ership workflow edits via sockets, ui improvements
@waleedlatif1
v0.6.24: copilot feedback wiring, captcha fixes
a54dcbe
@waleedlatif1
v0.6.25: cloudwatch, cloudformation, live kb sync, linear fixes, post…
28af223
…hog upgrade
@waleedlatif1
v0.6.26: ui improvements, multiple response blocks, docx previews, ol…
d889f32
…lama fix
@waleedlatif1
v0.6.27: new triggers, mothership improvements, files archive, queuei…
316bc8c
…ng improvements, posthog, secrets mutations
@waleedlatif1
v0.6.28: new docs, delete confirmation standardization, dagster integ…
3f508e4
…ration, signup method feature flags, SSO improvements
@TheodoreSpeaks
v0.6.29: login improvements, posthog telemetry (#4026)
d6ec115
* feat(posthog): Add tracking on mothership abort (#4023)

Co-authored-by: Theodore Li <[email protected]>

* fix(login): fix captcha headers for manual login  (#4025)

* fix(signup): fix turnstile key loading

* fix(login): fix captcha header passing

* Catch user already exists, remove login form captcha
@waleedlatif1
v0.6.30: slack trigger enhancements, connectors performance improveme…
d7da35b
…nts, secrets performance, polling refactors, drag resources in mothership
@waleedlatif1
v0.6.31: elevenlabs voice, trigger.dev fixes, cloud whitelabeling for…
cf233bb
… enterprises
@waleedlatif1
v0.6.32: BYOK fixes, ui improvements, cloudwatch tools, jsm tools ext…
f8f3758
…ension
@waleedlatif1
v0.6.33: polling improvements, jsm forms tools, credentials reactquer…
3c8bb40
…y invalidation, HITL docs
@waleedlatif1
v0.6.34: trigger.dev fixes, CI speedup, atlassian error extractor
d33acf4
@waleedlatif1
v0.6.35: additional jira fields, HITL docs, logs cleanup efficiency
4f40c4c
@waleedlatif1
v0.6.36: new chunkers, sockets state machine, google sheets/drive/cal…
cbfab1c
…endar triggers, docs updates, integrations/models pages improvements
@waleedlatif1
v0.6.37: audit logs page, isolated-vm worker rotation, permission gro…
4309d06
…ups ui
@waleedlatif1
v0.6.38: models page
8b57476
@waleedlatif1
v0.6.39: billing fixes, tools audit, landing fix
e3d0e74
@waleedlatif1
v0.6.40: mothership tool loop, new skills, agiloft, STS, IAM integrat…
0ac0539
…ions, jira forms endpoints
@waleedlatif1
v0.6.41: webhooks fix, workers removal
3838b6e
@waleedlatif1
v0.6.42: mothership nested file reads, search modal improvements
fc07922
@waleedlatif1
v0.6.43: mothership billing idempotency, env var resolution fixes
3a1b1a8
@waleedlatif1
v0.6.44: streamdown, mothership intelligence, excel extension
46ffc49
@Sg312
v0.6.45: superagent, csp, brightdata integration, gemini response for…
010435c
…mat, logs performance improvements

fix(csp): add missing analytics domains, remove unsafe-eval, fix workspace CSP gap (#4179)
fix(landing): return 404 for invalid dynamic route slugs (#4182)
improvement(seo): optimize sitemaps, robots.txt, and core web vitals across sim and docs (#4170)
fix(gemini): support structured output with tools on Gemini 3 models (#4184)
feat(brightdata): add Bright Data integration with 8 tools (#4183)
fix(mothership): fix superagent credentials (#4185)
fix(logs): close sidebar when selected log disappears from filtered list; cleanup (#4186)
@icecrasher321
Merge pull request #4190 from simstudioai/staging
c0bc62c
v0.6.46: mothership streaming fixes, brightdata integration
@waleedlatif1
v0.6.46: mothership queueing, web vitals
387cc97
@waleedlatif1
v0.6.47: files focusing, documentation, opus 4.7
2dbc7fd
@waleedlatif1
v0.6.48: import csv into tables, subflow fixes, CSP updates
8a50f18
@waleedlatif1
v0.6.49: deploy sockets event, resolver, logs improvements, monday.co…
dcf3302
…m integration, atlassian triggers
@icecrasher321
v0.6.50: ppt/doc/pdf worker isolation, docs, chat, sidebar improvements
bc09865
@waleedlatif1
v0.6.51: tables improvements, billing fixes, 404 pages, code hygiene
5f56e46
waleedlatif1 and others added 18 commits June 10, 2026 13:20
@waleedlatif1
v0.7.1: chat voice mode model update, sim trigger, codepipeline integ…
7ffc495
…ration, smooth streaming, security hardening, db fixes
@icecrasher321
v0.7.2: logs export security, code hygiene, mship cost attribution
d4722f9
@TheodoreSpeaks
v0.7.3: jira oauth scope fix, read-replica client, table wire data fi…
f4d22ff
…x, db migrations from ci, docs updates, read replicas

v0.7.3: jira oauth scope fix, read-replica client, table wire data fix, db migrations from ci, docs updates, read replicas
@waleedlatif1
v0.7.4: round-robin byok support, table block fix, db read replica ro…
a48b4a1
…uting, trigger.dev, temporal, latex, quartr, brex, convex integrations
@waleedlatif1
v0.7.5: deployments API and block, vanta integration, performance imp…
79d98b3
…rovements, styling consolidation
@waleedlatif1
v0.7.6: calendar scheduled tasks, new hubspot tools, virtualized chat…
e6587ca
…, db perf improvements
@waleedlatif1
v0.7.7: square, context.dev integrations, scheduled tasks styling cha…
8c3706e
…nges, code hygiene
@waleedlatif1
v0.7.8: security hardening, code hygiene, MSFT oauth provider, new at…
59d9496
…lassian assets and google calendar tools
@icecrasher321
v0.7.9: agent file attachments, chat autoscroll, knowledge base uploa…
56a88a2
…d, security fixes
@icecrasher321
v0.7.10: models sorting, compress/decompress file block tools, new en…
db47da5
…richment providers, deepseek models, db performance
@waleedlatif1
v0.7.11: parallel subagents, new tools, rich markdown editor, governa…
8df34a3
…nce, file sharing, scheduled tasks granularity
@icecrasher321
v0.7.12: mcp servers ui/ux fixes, nuqs for query param management
aaca750
@TheodoreSpeaks
v0.7.13: pii redaction, react query frontend refactor, pi coding agen…
ad0b867
…t harness, sakana fugu provider

v0.7.13: pii redaction, react query frontend refactor, pi coding agent harness, sakana fugu provider
@waleedlatif1
v0.7.14: perf improvements, code hygiene, GitLab private host support
11168f9
@waleedlatif1
v0.7.15: academy, perf improvements, db attribution, kb tags filter f…
613e8ea
…ix, settings overhaul, thrive learning integration
@waleedlatif1
v0.7.16: security hardening, db o11y and profiling, settings UI
38c088a
@waleedlatif1
v0.7.17: emcn and workflow renderer isolated package, popular blocks …
0371856
…extension, workspace forking, slack trigger extension, new README
Vikhyath Mondreti
improvement(billing): ux around on demand toggling and one-off credits
c360daa
@vercel

vercel Bot commented Jul 1, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
docs Skipped Skipped Jul 1, 2026 1:59am

Request Review

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@cursor

cursor Bot commented Jul 1, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

PR Summary

Medium Risk
Changes how usage limits are computed when toggling on-demand and what users see for remaining credits; logic is well-tested but affects billing caps and display across org and personal paths.

Overview
Fixes billing UX bugs where goodwill credits were double-counted in the home credits chip and where a credit grant alone could make on-demand look enabled in settings.

Adds shared helpers in lib/billing/on-demand.ts (getPooledCreditsRemaining, getCoveredUsage, getIsOnDemandActive, getOnDemandOffLimit) so the chip and billing settings use the same rules as usage enforcement: remaining is limit - usage (credits already in the limit), on-demand is on only when the limit exceeds plan + credit balance, and turning off on-demand sets the limit to the covered ceiling without dropping below current usage—removing the prior toast that blocked disable when usage was above plan included only.

Vitest coverage documents the double-count and credit-grant regression cases.

Reviewed by Cursor Bugbot for commit c360daa. Configure here.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@greptile-apps

greptile-apps Bot commented Jul 1, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR improves the billing UI around on-demand usage and credit display. The main changes are:

  • Shared billing math helpers for on-demand and pooled credits.
  • A disabled billing switch with tooltip copy when usage is above the covered amount.
  • Updated credits chip remaining-balance calculation.
  • Unit tests for the new helper behavior.

Confidence Score: 5/5

This looks safe to merge.

  • No blocking issues found in the changed code.

Important Files Changed

Filename Overview
apps/sim/app/workspace/[workspaceId]/settings/components/billing/billing.tsx Updates the on-demand toggle to use shared helper logic and show an explanatory tooltip when turn-off is unavailable.
apps/sim/app/workspace/[workspaceId]/home/components/credits-chip/credits-chip.tsx Uses the shared pooled-credit helper for the chip's remaining balance display.
apps/sim/lib/billing/on-demand.ts Adds shared helper functions for on-demand state, covered usage, off-limit calculation, and pooled remaining credits.
apps/sim/lib/billing/on-demand.test.ts Adds unit coverage for the new billing helper functions and edge cases.

Reviews (2): Last reviewed commit: "minor ux improvement" | Re-trigger Greptile

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

greptile-apps[bot]
greptile-apps Bot reviewed Jul 1, 2026
View reviewed changes
Comment thread apps/sim/app/workspace/[workspaceId]/settings/components/billing/billing.tsx Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread apps/sim/app/workspace/[workspaceId]/home/components/credits-chip/credits-chip.tsx Resolved

Uh oh!

There was an error while loading. Please reload this page.

Vikhyath Mondreti
minor ux improvement
9355fa5
@vercel
vercel Bot temporarily deployed to Preview July 1, 2026 01:54 Inactive
@icecrasher321

icecrasher321 commented Jul 1, 2026

Copy link
Copy Markdown
Contributor Author

@greptile

greptile-apps[bot] reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

Vikhyath Mondreti
fix lint
13b87fe
@vercel
vercel Bot temporarily deployed to Preview July 1, 2026 01:59 Inactive
@icecrasher321
icecrasher321 merged commit 5055b31 into staging Jul 1, 2026
15 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@icecrasher321
icecrasher321 deleted the moab branch July 1, 2026 02:08
@icecrasher321 icecrasher321 mentioned this pull request Jul 1, 2026
v0.7.18: landing, tools depth, media embeds in md editor, sonnet 5 #5296
Merged

This branch was previously deployed

1 inactive deployment
Preview — 13b87fe6 Deployed Jul 1, 2026 by vercel[bot]
View deployment
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@greptile-apps greptile-apps[bot] greptile-apps[bot] left review comments

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

4 participants

@icecrasher321 @waleedlatif1 @TheodoreSpeaks @Sg312
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.