Support edit Subscription quantity#614
Open
tungleduyxyz wants to merge 9 commits into
Open
Conversation
tungleduyxyz
commented
Jun 13, 2026
Contributor
- Add support to update subscription quantity via Kaui #610: Add support to update subscription quantity via Kaui
- Add support to record usage via Kaui #594: Add support to record usage via Kaui
ab79c47 to
8dc994d
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds new subscription UI/actions in Kaui to (1) update subscription quantity and (2) record usage for usage-based subscriptions, plus a “View JSON” modal and improved date/tooling UI to support subscription troubleshooting.
Changes:
- Add
edit_quantity/update_quantitycontroller actions + view and wire them into the subscriptions dropdown menu. - Add
record_usage/create_usagecontroller actions + view with validation and a menu entry only for usage-based subscriptions. - Add
show_jsonendpoint + modal UI to view subscription JSON, and update tooltip/popover behavior for ISO date display.
Reviewed changes
Copilot reviewed 13 out of 13 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
test/test_helper.rb |
Adds minitest/mock support for new tests. |
test/functional/kaui/subscriptions_controller_test.rb |
Adds functional coverage for quantity update, usage recording, and JSON endpoint behavior. |
Gemfile |
Points killbill-client to a specific git branch to support new API calls. |
config/routes.rb |
Adds routes for quantity, usage, and JSON actions. |
app/views/kaui/subscriptions/record_usage.erb |
Adds record-usage form UI + client-side validation. |
app/views/kaui/subscriptions/edit_quantity.erb |
Adds update-quantity form UI. |
app/views/kaui/subscriptions/_view_json_modal.html.erb |
Adds modal + AJAX logic to fetch and display subscription JSON. |
app/views/kaui/subscriptions/_subscriptions_table.html.erb |
Adds dropdown entries (Update Quantity / Record Usage / View JSON) and ISO popovers for dates. |
app/views/kaui/components/menu_dropdown/_menu_dropdown.html.erb |
Allows dropdown items to pass data (and optional HTTP method). |
app/models/kaui/usage.rb |
Introduces Kaui::Usage model wrapper for usage recording. |
app/helpers/kaui/subscription_helper.rb |
Adds subscription_has_usage? to detect usage-based subscriptions. |
app/controllers/kaui/subscriptions_controller.rb |
Implements quantity update, usage record flow, and JSON passthrough action. |
app/assets/javascripts/kaui/kaui_override.js |
Deprecates old popover impl in favor of tooltip implementation. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.