-
Notifications
You must be signed in to change notification settings - Fork 519
Subscription client changes #424
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 31 commits
Commits
Show all changes
95 commits
Select commit
Hold shift + click to select a range
75a228f
Initial backend impl
jahooma 00af124
Review fixes
jahooma 8e31469
Plans to tiered subscription. Don't store plan name/tier in db
jahooma 66463e9
Extract getUserByStripeCustomerId helper
jahooma b807cfa
migrateUnusedCredits: remove filter on free/referral
jahooma 8976298
Add .env.example for stripe price id
jahooma ed2a1d9
Remove subscription_count. Add more stripe status enums
jahooma 31db66e
cleanup
jahooma 458616a
Generate migration
jahooma c39155b
More reviewer improvments
jahooma cba210d
Update migrateUnusedCredits query
jahooma 40a0b2e
Rename Flex to Strong
jahooma 76f71c4
Add subscription tiers. Extract util getStripeId
jahooma 9184aa2
Web routes to cancel, change tier, create subscription, or get subscr…
jahooma 3f81504
Web subscription UI
jahooma 5e9b314
Fix billing test to mock subscription endpoint
jahooma a7c6823
cli subscription changes
jahooma 71c4d1d
Merge branch 'main' into subscription-client
jahooma 9d79443
Fix type error
jahooma 77c296c
Update usage multiplier
jahooma 6770873
Merge branch 'main' into subscription-client
jahooma a5589d8
Handle subscription scheduled webhook events
jahooma e29b8cd
Simplify subscription plan to use on manage subscription button
jahooma 3d5b4d1
Makeover for subscription panel
jahooma 20f680c
Tweak subscription section design
jahooma 66edcaa
Merge branch 'main' into subscription-client
jahooma 13e8fc0
Create a credit block when you send a message
jahooma b9c5a92
fix 401 getting subscription
jahooma 2a0015b
Set auth token at app startup
jahooma 05b0321
Improve 5 hour limit banner
jahooma 6e58594
Don't create a new block if the previous one's 5 hours is not up
jahooma f23f122
Show the scheduled tier in subscription panel
jahooma 919a856
Fix: when cancelling a downgrade, scheduled_tier was not being cleared
jahooma 07ba6f5
fix test
jahooma 12794da
Remove bottom status bar for Strong subscription. Include subscriptio…
jahooma a124b3e
Improve usage banner a lot
jahooma 12e7c01
Update /usage and subscription banner labels/ui
jahooma 7120b0e
Revert thinking code changes
jahooma 0a72e18
Refactor to pull out Subscription types
jahooma c9b56fc
Use generated updated_at for subscription table
jahooma a52d403
Improve stripe "phases" docs
jahooma fba5e79
Let you change setting for pause/spend credits for when subscription …
jahooma 2d9cbea
Refactor so only one ensureSubscriberBlockGrant function is injected
jahooma 631838c
Tweaks for usage banner
jahooma fadcc88
Clean up time formatting utils
jahooma f68ac73
Fetch authenticated billing portal link!
jahooma aedb14c
Update the pricing to advertize codebuff strong
jahooma e67902b
Update Codebuff strong screen
jahooma 6f75461
Remove /strong page. Merge it into /pricing for simplicity
jahooma a6def1f
Tweak usage base pricing copy
jahooma e090f02
Tweak block limits
jahooma 0c34f9b
Subscription success toast
jahooma afa0869
cli: Include link to upgrade plan when you hit limit
jahooma 22551e6
Merge branch 'main' into subscription-client
jahooma 38f349f
Clean up subscription limit banner
jahooma 16bf768
align usage progress bars
jahooma 94ec423
tweak copy in pricing page
jahooma 2053bb5
Update pricing page styles again
jahooma 836a937
Merge branch 'main' into subscription-client
jahooma 4064c46
fix tests
jahooma 6d68248
Merge branch 'main' into subscription-client
jahooma 1c6f346
Enable invoice creation and tax id collection in stripe checkout
jahooma 8677629
Revert "Enable invoice creation and tax id collection in stripe check…
jahooma b971584
fix(db): split referral_legacy migration to handle PostgreSQL enum li…
brandonkachen 9c027aa
refactor(db): Switch from drizzle-kit push to migrate for safer produ…
brandonkachen 3c54a96
fix(db): Remove backfill migration to fix PostgreSQL enum transaction…
brandonkachen d83f365
chore: Remove backfill script (already applied manually)
brandonkachen ca4ea4b
Enable invoice creation and tax id collection in stripe checkout
jahooma 18bb92f
fix(db): Remove trailing comma in migration journal JSON
brandonkachen 1f8ae74
Revert "refactor(db): Switch from drizzle-kit push to migrate for saf…
brandonkachen ce513ea
feat: Add fallbackToALaCarte server-side preference
brandonkachen 666ec05
fix: address code review feedback for fallbackToALaCarte feature
brandonkachen 09bdb58
style: remove max-width constraint from UsageDisplay card
brandonkachen 9f8e9d0
style: update SubscriptionCta with acid-green button and cleaner copy
brandonkachen 85a0022
style: use acid-green for SubscriptionCta card border and icon backgr…
brandonkachen dd71ccf
fix: add warning log when subscription not found in handleSubscriptio…
brandonkachen d407cdf
Revert "Enable invoice creation and tax id collection in stripe check…
brandonkachen 8c65530
Don't include subscription credits in /usage stats
jahooma 16702f8
/usage: Don't add to session credits if credits spent are part of sub…
jahooma 7eedfa4
fix: address code review feedback for subscription-client branch
brandonkachen 020121f
Add back some stripe checkout fields that are mildly beneficial
jahooma 9047000
fix: enforce fallback_to_a_la_carte preference and move block grant a…
brandonkachen 7a1531b
test: add unit tests for subscription limit enforcement in chat compl…
brandonkachen c226108
Merge main into subscription-client
brandonkachen 164abc5
feat: add dedicated billing-portal endpoint for on-demand portal URL …
brandonkachen 71c2641
test: add unit tests for billing-portal endpoint using dependency inj…
brandonkachen 5617bac
feat: use on-demand billing portal fetch for all Billing Portal buttons
brandonkachen 810d33f
refactor: consolidate billing portal buttons into single button in Us…
brandonkachen 4461825
test: add unit tests for org billing portal endpoint using dependency…
brandonkachen fe5324a
Let users upgrade/downgrade from pricing page (linked from hitting li…
jahooma 2e64cfb
fix: add NextRequest import to billing portal tests to fix Request po…
brandonkachen 77525d4
fix: add web globals preload for Bun tests to fix Request polyfill issue
brandonkachen 9a974c6
fix: remove unnecessary ts-expect-error directives from setup-globals.ts
brandonkachen a5c6adf
fix: add web/bunfig.toml with preload for Request global in tests
brandonkachen e36530c
fix: use bun test directly for web tests to pick up bunfig.toml preloads
brandonkachen File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.