Merged
Conversation
ae06f5a to
5b6e2d3
Compare
5b6e2d3 to
0d72122
Compare
There was a problem hiding this comment.
Pull request overview
This PR addresses three issues related to the Kaui admin UI:
Changes:
- Fixed BCD display to show subscription-level BCD when available, falling back to account-level BCD (Issue #460)
- Added support for '/aviate' mount point in breadcrumb navigation (Issue #579)
- Improved "Add Currency" functionality by setting product name and adding client-side validation (Issue #410)
Reviewed changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| test/unit/helpers/kaui/account_helper_test.rb | Adds comprehensive unit tests for the new effective_bcd helper method |
| app/helpers/kaui/account_helper.rb | Implements effective_bcd helper to prioritize subscription BCD over account BCD |
| app/controllers/kaui/accounts_controller.rb | Fetches bundles data needed for calculating effective BCD |
| app/views/kaui/accounts/_billing_info.html.erb | Updates BCD display to use effective_bcd helper |
| app/views/kaui/accounts/_billing_details.html.erb | Updates BCD display to use effective_bcd helper |
| app/views/kaui/subscriptions/_subscriptions_table.html.erb | Prevents showing "Add add-on" menu item on ADD_ON subscriptions |
| app/views/kaui/components/breadcrumb/_breadcrumb.html.erb | Adds support for '/aviate' mount point in breadcrumb navigation |
| app/views/kaui/admin_tenants/new_plan_currency.html.erb | Adds HTML5 required attribute to amount field for client-side validation |
| app/controllers/kaui/admin_tenants_controller.rb | Auto-populates product name when adding currency to existing plan and comments out duplicate plan validation |
| app/models/kaui/catalog.rb | Refactors array indexing using Ruby idiom ([-1] instead of [length-1]) |
| app/controllers/kaui/subscriptions_controller.rb | Refactors array indexing using Ruby idiom ([-1] instead of [size-1]) |
Comments suppressed due to low confidence (1)
app/controllers/kaui/admin_tenants_controller.rb:222
- The redirect in the
unless is_plan_id_foundblock is missing areturnstatement. This means that when the plan is not found, the code continues execution after the redirect, which can lead to the form still being rendered and accessed with a nilproduct, potentially causing errors. Addand returnafter the redirect to ensure the method exits immediately.
unless is_plan_id_found
flash[:error] = "Plan id #{plan_id} was not found."
redirect_to admin_tenant_path(@tenant[:id])
end
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
Related issues: