-
Notifications
You must be signed in to change notification settings - Fork 352
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
base: main
Are you sure you want to change the base?
Conversation
|
Brandon says: |
brandonkachen
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mostly looks good, just needs some de-slopification. one key issue to fix/consciously ignore before merging: https://github.com/CodebuffAI/codebuff/pull/424/changes#r2748507503
| ⏱️ Block limit reached | ||
| </text> | ||
| <text style={{ fg: theme.muted }}> | ||
| You've used all {rateLimit.blockLimit?.toLocaleString()} credits in this 5-hour block. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: we should use the constant for the block size.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
also, if rateLimit.blockLimit doesn't exist, we should put a placeholder string, e.g. "your" -> "You've used all credits..."
| <> | ||
| <Button onClick={handleContinueWithCredits}> | ||
| <text style={{ fg: theme.foreground }}> | ||
| [Continue with a-la-carte] ({remainingBalance.toLocaleString()} available) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should we make these look like proper buttons? like our /feedback submit button?
| <ProgressBar | ||
| percentAvailable={ | ||
| rateLimit.blockLimit != null && rateLimit.blockUsed != null && rateLimit.blockLimit > 0 | ||
| ? 100 - (rateLimit.blockUsed / rateLimit.blockLimit) * 100 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wait we shouldn't pass back the actual amounts from the server to the client; only the server should know how much is actually used, the client should only ever see percentages
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think this matters that much
…n indicator in message footer
jahooma
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Addressed comments!
| <ProgressBar | ||
| percentAvailable={ | ||
| rateLimit.blockLimit != null && rateLimit.blockUsed != null && rateLimit.blockLimit > 0 | ||
| ? 100 - (rateLimit.blockUsed / rateLimit.blockLimit) * 100 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think this matters that much
No description provided.