Skip to content

Add ability to create and view blocking states (#612) - #657

Open
tungleduyxyz wants to merge 9 commits into
masterfrom
kaui_8.25
Open

Add ability to create and view blocking states (#612)#657
tungleduyxyz wants to merge 9 commits into
masterfrom
kaui_8.25

Conversation

@tungleduyxyz

Copy link
Copy Markdown
Contributor

Summary

Implements issue #612 — read and write paths for Kill Bill blocking states.

Read path:

  • Account Timeline now surfaces blocking state events (previously silently filtered out via next if event.event_type == 'SERVICE_STATE_CHANGE')
  • Dedicated "Blocking States" event filter on the timeline alongside existing Subscription/Payment/Billing filters
  • CSV export includes blocking state rows
  • New "Blocking States" index page per account (accessible via the left sidebar nav)

Write path:

  • "Create Blocking State" form for Account, Bundle, and Subscription levels
  • Entry points: Account → Billing Information section button; Subscriptions table → row dropdown per bundle/subscription; Blocking States index page → "Add Blocking State" button
  • Form fields: Applies To (read-only type + object ID), State (required), Service (required), Block flags — Change / Entitlement / Billing, Effective Date, Comment
  • "About Blocking States" info panel beside the form explaining blocking state semantics

Test plan

  • Create an account-level blocking state via the Billing Information section button; confirm it appears on the Account Timeline and in the Blocking States index
  • Create a bundle-level blocking state via the Subscriptions table row dropdown; confirm it appears correctly typed (BUNDLE) in the Blocking States index
  • Create a subscription-level blocking state via the Subscriptions table row dropdown; confirm it appears correctly typed (SUBSCRIPTION) in the Blocking States index
  • Verify the Account Timeline "Blocking States" filter shows/hides blocking state events independently of other filters
  • Verify the CSV export includes blocking state rows
  • Verify "Add Blocking State" button is hidden for users without account:update permission

🤖 Generated with Claude Code

tungleduyxyz and others added 2 commits August 21, 2026 23:30
Remove the Group by drop-down and make date-first, event-type-second
the permanent default ordering. Events on the same date are ordered by
the canonical eventsOrder list (e.g. START_BILLING before STOP_BILLING).

Fixes #649

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Implements the write and read paths for Kill Bill blocking states:

Read path:
- Account Timeline now surfaces blocking state events (previously filtered out)
- Added dedicated "Blocking States" filter alongside existing Subscription/Payment/Billing filters
- CSV export includes blocking state events
- New "Blocking States" index page per account (nav sidebar entry)

Write path:
- "Create Blocking State" form for Account, Bundle, and Subscription levels
- Accessible via Account Billing Information section button, Subscriptions table row dropdown, and the new Blocking States index page
- Form includes Applies To summary, State/Service fields with helper text, Block flags (Change/Entitlement/Billing), Effective Date, and Comment
- "About Blocking States" info panel alongside the form (i18n strings in en.yml)

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
tungleduyxyz and others added 6 commits August 28, 2026 15:55
- Remove Blocking States left nav entry and dedicated index page (not required per ticket description; blocking states should show in the Account Timeline only)
- Add START_ENTITLEMENT, START_BILLING, SERVICE_STATE_CHANGE options to the Blocking State timeline filter dropdown

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Clicking the SVG calendar icon didn't open the datepicker because the icon
and input are flex siblings — click events on the icon didn't reach the input.
Forwarding clicks on the wrapper div to the input via onclick fixes this.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
The old logic treated blocking_state as a per-category filter, which meant:
- Selecting SERVICE_STATE_CHANGE was identical to ALL (all blocking state
  events already have that type, so nothing changed visually)
- Selecting START_ENTITLEMENT/START_BILLING hid all blocking state events
  (same as NONE, since no blocking_state events have those types)

New behavior:
- NONE: hides blocking_state category events, other category filters apply normally
- ALL: no blocking-state-specific filtering, per-category filters apply as usual
- Specific type (SERVICE_STATE_CHANGE/START_ENTITLEMENT/START_BILLING):
  shows only events matching that exact type across the whole timeline

Also switches eventType/eventCategory reads from .data() to .attr() to avoid
jQuery camelCase key conversion issues with hyphenated attribute names.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Replace disable/enable pairs with disable-next-line directives and
fix double-space after `when` keywords in custom_fields_controller.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Prevent future CI breakage from unexpected rubocop upgrades introducing
new cops. Use ~> patch-level pins so bugfixes still apply automatically.
Upgrade intentionally by bumping these constraints when ready.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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.

1 participant