feature/backup-methods-network-grants-collapsed-default #19

Merged
Xeplosion merged 4 commits from feature/backup-methods-network-grants-collapsed-default into dev 2026-08-27 23:28:22 +00:00
Owner

What changed and why

Four related capture-model fixes, all stemming from real gaps found while
using the tool:

Multiple backup models. features.backups was a single object, so a
provider offering both automated (slot_limited) AND manual backups
simultaneously had no way to represent the second method. Changed to an
array of backup-method entries. UI: each method gets its own card with
a remove button (disabled at 1 remaining, per the schema's minItems: 1)
and a "+ Add another backup method" button.

Separate backup storage amount. separate_storage (boolean) existed
but nothing captured how much separate storage was included. Added
separate_storage_gb, shown only when "Separate storage?" is yes. Its
description cross-references addon.resource_deltas.backup_storage_gb
(the purchasable-increase side), which already existed — the two now
reference each other.

Add-ons can now declare which networking feature they provide. When
feature_networking.dedicated_ip (or DNS hostname / dedicated subdomain /
DDoS protection) is "paid_addon", there was previously no way to know
which add-on actually provides it — only that some add-on does. Added
addon.grants_network_features, a closed-vocabulary array
(dedicated_ip/dns_hostname/dedicated_subdomain/ddos_protection),
with checkboxes on the addon card. Chosen over a reference field on
feature_networking because it's symmetric with the existing
resource_deltas pattern — the add-on declares what it grants, so there's
no dangling-reference risk if an add-on is renamed or removed.

Cards collapsed by default. Inverted the collapse-tracking set
(collapsedCards → expandedCards): default is now collapsed for product
lines, offerings, add-ons, and promotions. Newly created cards (via any
"+ Add" button) are explicitly expanded on creation, so you're not stuck
re-expanding something you just clicked to create.

All schema additions are optional/nullable (not in any required array)
except the backups array shape change itself, which is additive across
all 113 real provider files (none currently populate features.backups —
verified before making the change) and only affects the single example
file, which has been migrated.

Closes #

How to test

  1. pytest — 75 tests (up from 71), all passing, including new
    ACCEPTED/REJECTED cases for the backups array shape and
    grants_network_features.
  2. Open the capture-form, go to Features → Backups, check "Investigated,"
    set a model, then click "+ Add another backup method" — confirm a
    second, independent method card appears and both save correctly.
  3. Set "Separate storage?" to yes — confirm the storage-amount field
    appears; set it to no/unknown — confirm it's hidden.
  4. On an add-on, check one or more of the four "This add-on is the
    mechanism for" boxes — confirm they save/load independently of each
    other and of the separate "Eligibility" checkbox on the same card.
  5. Open any provider with product lines/offerings/add-ons/promotions —
    confirm everything loads collapsed. Click "+ Add offering" (or any
    other "+ Add") — confirm the new card opens expanded.
  6. Validate a saved file against schema/provider-schema-v2.3.json (or
    via capture-validate) and confirm it passes.

Checklist

  • Tests added or updated
  • Docs updated if behaviour changed
  • No unrelated changes included
  • PR is focused on one thing

Release notes

Support multiple simultaneous backup methods, track included separate-storage amounts, let add-ons declare which networking feature they provide, and collapse all cards by default for easier browsing.

## What changed and why Four related capture-model fixes, all stemming from real gaps found while using the tool: **Multiple backup models.** `features.backups` was a single object, so a provider offering both automated (`slot_limited`) AND manual backups simultaneously had no way to represent the second method. Changed to an **array** of backup-method entries. UI: each method gets its own card with a remove button (disabled at 1 remaining, per the schema's `minItems: 1`) and a "+ Add another backup method" button. **Separate backup storage amount.** `separate_storage` (boolean) existed but nothing captured *how much* separate storage was included. Added `separate_storage_gb`, shown only when "Separate storage?" is yes. Its description cross-references `addon.resource_deltas.backup_storage_gb` (the purchasable-increase side), which already existed — the two now reference each other. **Add-ons can now declare which networking feature they provide.** When `feature_networking.dedicated_ip` (or DNS hostname / dedicated subdomain / DDoS protection) is `"paid_addon"`, there was previously no way to know *which* add-on actually provides it — only that some add-on does. Added `addon.grants_network_features`, a closed-vocabulary array (`dedicated_ip`/`dns_hostname`/`dedicated_subdomain`/`ddos_protection`), with checkboxes on the addon card. Chosen over a reference field on `feature_networking` because it's symmetric with the existing `resource_deltas` pattern — the add-on declares what it grants, so there's no dangling-reference risk if an add-on is renamed or removed. **Cards collapsed by default.** Inverted the collapse-tracking set (`collapsedCards` → `expandedCards`): default is now collapsed for product lines, offerings, add-ons, and promotions. Newly created cards (via any "+ Add" button) are explicitly expanded on creation, so you're not stuck re-expanding something you just clicked to create. All schema additions are optional/nullable (not in any `required` array) except the `backups` array shape change itself, which is additive across all 113 real provider files (none currently populate `features.backups` — verified before making the change) and only affects the single example file, which has been migrated. ## Related issues Closes # ## How to test 1. `pytest` — 75 tests (up from 71), all passing, including new ACCEPTED/REJECTED cases for the backups array shape and `grants_network_features`. 2. Open the capture-form, go to Features → Backups, check "Investigated," set a model, then click "+ Add another backup method" — confirm a second, independent method card appears and both save correctly. 3. Set "Separate storage?" to yes — confirm the storage-amount field appears; set it to no/unknown — confirm it's hidden. 4. On an add-on, check one or more of the four "This add-on is the mechanism for" boxes — confirm they save/load independently of each other and of the separate "Eligibility" checkbox on the same card. 5. Open any provider with product lines/offerings/add-ons/promotions — confirm everything loads collapsed. Click "+ Add offering" (or any other "+ Add") — confirm the new card opens expanded. 6. Validate a saved file against `schema/provider-schema-v2.3.json` (or via `capture-validate`) and confirm it passes. ## Checklist - [x] Tests added or updated - [x] Docs updated if behaviour changed - [ ] No unrelated changes included - [x] PR is focused on one thing ## Release notes Support multiple simultaneous backup methods, track included separate-storage amounts, let add-ons declare which networking feature they provide, and collapse all cards by default for easier browsing.
Xeplosion deleted branch feature/backup-methods-network-grants-collapsed-default 2026-08-27 23:28:22 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
XeplosionGames/minecraft-provider-analysis!19
No description provided.