Skip to content

Kaui 2.25#578

Merged
tungleduyxyz merged 7 commits intomasterfrom
kaui_1.14
Feb 26, 2026
Merged

Kaui 2.25#578
tungleduyxyz merged 7 commits intomasterfrom
kaui_1.14

Conversation

@tungleduyxyz
Copy link
Contributor

@tungleduyxyz tungleduyxyz commented Feb 10, 2026

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_found block is missing a return statement. 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 nil product, potentially causing errors. Add and return after 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.

@tungleduyxyz tungleduyxyz merged commit 7fb9a39 into master Feb 26, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants