Skip to content

fix(cloud): price the dashboard size cards and name the rate's region - #36666

Merged
bolichen97 merged 1 commit into
mainfrom
fix/32338-cloud-size-price
Nov 17, 2026
Merged

bolichen97 merged 1 commit into
mainfrom
fix/32338-cloud-size-price

Conversation

@bolichen97

Copy link
Copy Markdown
Contributor

Problem / Motivation

Goal: Before Launch, a new user sees the same approximate price for each cloud crew size on the dashboard and in the CLI, and is told when that price is the us-east-1 rate rather than their Region's.

The dashboard's size cards (Settings → Remote Crew → Set up a new one) show no price at all, so "what will this cost me?" goes unanswered. The CLI does print a price, but it is the us-east-1 on-demand rate for every Region and never says so: --region sa-east-1 prints the same ~$0.13/hr · ~$96/mo as us-east-1. The cards' names (Light / Development / Power) also do not tell a user which --size value each one is.

Why it matters

The price is the question a new user asks before creating an EC2 instance in their own AWS account. Today the dashboard leaves it blank and the CLI can answer it with a number that is wrong for their Region, with nothing saying it is an estimate for another Region.

Not a goal

What changed (motivation → approach → change)

Surface Before After
Dashboard size card specs only ~$0.33/hr · ~$235/mo if left running (approx) and --size balanced
Dashboard, Region other than us-east-1 nothing "Prices are us-east-1 on-demand rates; other Regions may differ." above the cards
CLI price line, other Region (approx) (approx; us-east-1 on-demand rate, other Regions may differ)
CLI "stopped waiting" warning about $0.33/hr ~$0.33/hr with the same basis in brackets

The cause is that the per-size price lived only in cloud/sizes.py: the dashboard's own size table (remoteCrewPanelModel.ts) never carried it, and nothing recorded which Region the figure was read for. The dashboard table now carries the same approxUsdPerHr figures and the Region they are for (PRICE_REGION, us-east-1), and the existing UI parity test holds both, and the 30-day month, equal to sizes.py. The size card formats the figures through the locale seam (fmtCurrency), names the price to screen readers as the card's description, and shows the --size key as a code constant in a <code> element, since it is typed into a terminal and must never be translated. Two catalog strings land in website/src/i18n/locales/ in all 12 languages, with translator context in en.context.json; sizes.price_basis(region) gives the CLI its wording. docs/system-specs/modules/cloud.md describes the shared figure.

Backwards compatibility

Compatible: display text only; no flag, config key, API field or launch behaviour changes.

Removes nothing: the existing price line, specs, billing note and calculator link all stay.

Tests

  • test/test_cloud_sizes_ui_parity.py: every card's approxUsdPerHr equals the tier's approx_usd_per_hr, and the panel's PRICE_REGION and month length match sizes.py.
  • test/test_cloud_wizard.py: with --size light, the price line names the us-east-1 rate in sa-east-1 and does not in us-east-1; the Ctrl+C warning carries the same basis.
  • website/src/test/RemoteCrewPanelLaunchForm.test.tsx: the Development card shows --size balanced in a <code> element and has ~$0.33/hr · ~$235/mo if left running (approx) as its accessible description, and the Region note appears only once the Region is changed to sa-east-1.

Proof: PROVEN test/test_cloud_sizes_ui_parity.py::test_the_panel_tables_were_parsed, test/test_cloud_sizes_ui_parity.py::test_panel_tier_matches_sizes_py[balanced], test/test_cloud_sizes_ui_parity.py::test_panel_tier_matches_sizes_py[balanced-x86], test/test_cloud_sizes_ui_parity.py::test_panel_tier_matches_sizes_py[light], test/test_cloud_sizes_ui_parity.py::test_panel_tier_matches_sizes_py[light-x86] (head f39e8c9c97e0)

prove.py ran on a Linux host's commit of this exact tree (d494d26e); with the production hunks reverted, the new wizard test (sa-east-1 case) and test_panel_prices_name_the_same_region_and_month_as_sizes_py fail too, and the new vitest case fails with the website/src/pages/ and catalog changes reverted. All pass on the fix.

Determinism: the three changed backend test files (67 tests) passed 3 times in a row and once in a shuffled order (seed 32338); RemoteCrewPanelLaunchForm.test.tsx and RemoteCrewPanel.test.tsx (81 tests) passed 3 times and once with --sequence.shuffle --sequence.seed=32338.

Manual verification

Run on Ubuntu 24.04 (Linux, x86_64) from this tree. CLI through wizard.launch with only the session-manager-plugin prompt, the existing-launch lookup and the deploy stubbed, answering n at the confirmation:

=== us-east-1 balanced
    ~$0.33/hr · ~$235/mo if left running (approx)
  → Aborted — nothing was created.
=== sa-east-1 balanced
    ~$0.33/hr · ~$235/mo if left running (approx; us-east-1 on-demand rate, other Regions may differ)
  → Aborted — nothing was created.

On the base both Regions printed the same (approx) line. Dashboard in an isolated test-mode gateway, Settings → Remote Crew → Set up a new one, with Playwright: all six cards (arm64 and x86_64) carry their price and a <code> --size key, each card's accessible description is its price line, the Region note shows only for sa-east-1, and no card overflows at 390 px. Picking Power sets aria-pressed and the intercepted launch request carries size_key: "power" (it never reached AWS).

Screenshots / video

Before (base), us-east-1: specs only.

Size cards before: no price, no --size key

After, us-east-1: price and --size key on each card, no Region note.

Size cards after in us-east-1

After, sa-east-1: the Region note above the cards.

Size cards after in sa-east-1, light

Dark theme, the x86_64 lane, and 390 px wide

Size cards after in sa-east-1, dark

x86_64 sizes expanded, each with its price and key

390 px wide, sa-east-1: the card headers wrap

Related Issues

Closes #32338

Sibling sweep

Swept: git grep -n "approx_usd_per_hr|monthly_estimate|summary()" -- src/kiro_crew/cloud
Sibling: src/kiro_crew/cloud/wizard.py -- changed here
Sibling: src/kiro_crew/cloud/sizes.py -- not affected -- SizeTier.summary() feeds the size menu and the Size: line, which the based price line follows directly

Pattern harvest

Not generalizable: the defect is one figure duplicated in two tables without the fact it depends on, and the existing parity test is the guard; it now compares that fact too.

Checklist

  • At most two commits (one is the norm), with a Conventional Commits title (feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)
  • Existing tests pass and new tests added for new functionality
  • Self-review completed; code follows project style guidelines
  • Documentation updated (if applicable)
  • No secrets, credentials, or internal references in the diff

@github-actions

github-actions Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

Design Review (Opus 5.5) — ✅ PASS

Design-level review of 97abda53d115ba029ab5b883914073d5ec6ab13e — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS does not.

Design-Verdict: PASS

Nothing blocks. The change is display-only, it adds a price figure that a parity test keeps in sync, and none of the recorded decisions conflict with it.

Notes

  • The dashboard shows the Region note when region.trim() !== PRICE_REGION, and the CLI uses region == PRICE_REGION. These two checks are separate predicates in two languages, and the parity test does not compare them. If the CLI is ever given a padded or differently cased Region, the two surfaces will disagree about when to show the note.

[DESIGN-REVIEWED] 97abda5

Description read

[DESCRIPTION-READ] da7baca8c557f31e6c3da10f9026eb445bb03c78386619880161e13333554194

That sha256 names everything this verdict read: the PR description, plus the 1 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with .github/scripts/pr-description-capture.sh over the same inputs; if it differs, the description or that evidence changed after this verdict was formed and any finding drawn from either is unproven.

@github-actions

github-actions Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

First Principles Review (Opus 5.5) — ✅ PASS

Premise-level review of 97abda53d115ba029ab5b883914073d5ec6ab13e — why this exists and whether the shipped surface is the smallest honest version. Updated in place on each push. A BLOCK verdict blocks PR readiness; PASS does not.

First-Principles-Verdict: PASS

Nothing blocks. The price figure and Region already lived in sizes.py, and this change carries them onto the dashboard cards behind the existing parity test. It also removes a recorded "no dollar figure on the dashboard" statement without mentioning it.

Notes

  • Item 1 — inherited: the diff deletes the sizes.py docstring "the dashboard shows no dollar figure at all (it links the AWS Pricing Calculator instead)". The description never mentions it and treats the missing price as a gap ("show no price at all"). The only evidence that the old choice was wrong is Closes #32338, which couldn't be read here.
  • Item 4 — rides along: the --size balanced <code> key on each card is not in the Goal, which covers only price and Region ("sees the same approximate price … and is told when that price is the us-east-1 rate"). Subtraction: delete SIZE_FLAG and the <code> span in SizeCard, and defer it to its own change.

What this change ships

Inventory (6 items) — 4 justified

Intent: a new user can see roughly what each cloud crew size costs, on the dashboard and in the CLI, and is told when that is the us-east-1 rate. FIX.

  1. Each dashboard size card shows ~$/hr · ~$/mo if left running (approx) — inherited: reverses the recorded "no dollar figure" docstring
  2. A note above the cards when the Region isn't us-east-1 — justified
  3. The CLI price line names the us-east-1 basis in other Regions — justified
  4. Each card shows its --size <key> CLI flag — rides along: outside the Goal
  5. The CLI "Stopped waiting" warning uses ~$ plus the same basis — justified
  6. The parity test now also pins price, PRICE_REGION and the 30-day month — justified

[FIRST-PRINCIPLES-REVIEWED] 97abda5

Description read

[DESCRIPTION-READ] df6b41aa958b0dc32c565d14470a701a95c8b9c96ff63cdd8ca41af257fcdccc

That sha256 names the PR description this verdict read. Recompute it with .github/scripts/pr-description-capture.sh; if it differs, the description changed after this verdict was formed and any finding drawn from the description is unproven.

@github-actions

github-actions Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

UX Review (Opus 5.5) — ✅ PASS

UX-level review of 97abda53d115ba029ab5b883914073d5ec6ab13e — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS does not.

UX-Verdict: PASS

Nothing blocks: the blind reader read the price line correctly and was sure of it, and the screenshots cover all six cards, the Region note, dark theme and the 390 px width.

Notes

  • In SizeCard, the <code>{SIZE_FLAG} {tier.key}</code> chip confused the blind reader ("no idea… I don't know what '--size' is, or whether I'm supposed to type it somewhere"). On the Development card it also gives the size a second name ("Development" vs --size balanced). Label it as a CLI hint, e.g. "CLI: --size balanced", or show it only in a tooltip or the CLI help.
  • At 390 px, flex-wrap moves "· ~6 parallel sub-agents" to a new line that starts with a bare "·" (shot-06). Put the separator inside the item that comes before it, or drop it when the line wraps.
  • price_region_note uses jargon: the reader understood the gist but not "us-east-1" or "on-demand" ("makes me less sure the prices apply to me"). Use plain words, e.g. "Prices are estimates for US East (N. Virginia); your Region may cost more or less."

[UX-REVIEWED] 97abda5

Description read

[DESCRIPTION-READ] be625ad7a3c21ab91a8d4aa21f81ddeecc835b3283c694e0339630bc0c278397

That sha256 names everything this verdict read: the PR description, plus the 9 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with .github/scripts/pr-description-capture.sh over the same inputs; if it differs, the description or that evidence changed after this verdict was formed and any finding drawn from either is unproven.

@github-actions

github-actions Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

Opus 5.5 Review — ✅ no blocking findings

Reviewed 97abda53d115ba029ab5b883914073d5ec6ab13e — this comment is updated in place on each push.

Review details

No findings.

[OPUS-REVIEWED] 97abda5

Verdict parsed from the review's SHA-scoped output markers for commit 97abda53d115ba029ab5b883914073d5ec6ab13e.

False positive or not applicable? A repository writer can comment:
/ai-review override fable 97abda53d115ba029ab5b883914073d5ec6ab13e false-positive: <reason, 20 to 500 characters>

@github-actions

github-actions Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

GPT 6.1 Review — ✅ no blocking findings

GPT 6.1 completed its review of 97abda53d115ba029ab5b883914073d5ec6ab13e and found no blocking issues.

This comment is updated in place on each push.

Review details

No findings.
[GPT-REVIEWED] 97abda5

False positive or not applicable? A repository writer can comment:
/ai-review override gpt 97abda53d115ba029ab5b883914073d5ec6ab13e false-positive: <reason, 20 to 500 characters>

@KiroCrewCaptain

KiroCrewCaptain commented Nov 13, 2026 •

Copy link
Copy Markdown
Collaborator

Code change approver recommendation: A person should decide

Why: the decider estimates an 8% chance that this change introduces a defect, within the 12% limit for approving on its own, but it is held at tier 2: 23 files, more than 20.

Display-only change that puts the same us-east-1 price figures on the dashboard size cards and the CLI, with a Region note for other Regions. The six dashboard prices match sizes.py, and the extended parity test now guards prices, PRICE_REGION and the 30-day month. Hand-checked hourly and monthly rounding comes out the same on both surfaces. The CLI region is validated before price_basis is called, and the dashboard Region defaults to us-east-1. No other code uses SizeTier, and no spec forbids a dollar figure on the dashboard (only the docstring said so, and the PR updates it). New tests cover the CLI line in both Region cases, the Ctrl+C warning and the dashboard card and note. CI is fully green.

Tier: 2, held for a person: 23 files, more than 20.

An automated recommendation, not a review: a maintainer still decides. It approves on its own only when the estimated chance of a defect is at most 12% and the change has at most 400 changed lines. Decider v3c (217fe607) · commit 97abda53d1 · 157 changed lines. If this recommendation is wrong, reply here: replies are how the approver is evaluated.

@bolichen97
bolichen97 enabled auto-merge (squash) November 13, 2026 14:50
@github-actions github-actions Bot added readiness: action required A blocking check or review needs attention merge conflict Branch has merge conflicts with its base — author must resolve before merge and removed readiness: checking Automated validation is still running labels Nov 13, 2026
The dashboard's launch size cards showed no price, and the CLI printed
the us-east-1 on-demand rate for every Region without saying so. Each
card shows the same approximate hourly and monthly figure the CLI
prints, plus the --size key the CLI takes for it. When another Region
is picked, both surfaces say the figure is the us-east-1 on-demand rate
and that other Regions may differ. The UI parity test holds the cards'
prices and that Region to cloud/sizes.py.

Closes #32338
@bolichen97

Copy link
Copy Markdown
Contributor Author

Rebased: main moved in docs/system-specs/modules/cloud.md, src/kiro_crew/cloud/wizard.py, test/test_cloud_wizard.py, website/src/i18n/en.context.json, website/src/pages/settings/RemoteCrewPanel.tsx, website/src/i18n/locales/*.json since this head went green (c22557c -> ce21fa1); CI re-running.

GitHub reported this PR as conflicting: main added the launch_job.py and launch_engine.py rows to the module table in docs/system-specs/modules/cloud.md (#37105), right above the sizes.py row this PR rewrites. The rebase keeps both of main's rows and this PR's sizes.py row. Main's other changes to these files sit in other parts of them and merged without a conflict: the Shared Crews card (#37525, #38260), the env-var credentials sentence (#38414) and a settings wording fix (#36438) in RemoteCrewPanel.tsx, and the sign-in and bootstrap changes in wizard.py (#36311, #36728). The new base also carries main's own fix for the shared-rule parity test (#36652) that failed Backend Tests on this PR's last CI run; the other red shard there lost its runner. The change is otherwise the same patch: every code, test and UI line it adds or removes is unchanged.

[operator: bolichen97]

@bolichen97
bolichen97 force-pushed the fix/32338-cloud-size-price branch from 3c0e2c7 to 97abda5 Compare November 17, 2026 17:47
@github-actions github-actions Bot added readiness: checking Automated validation is still running readiness: passed Eligible automated validation passed for the current revision and removed readiness: action required A blocking check or review needs attention merge conflict Branch has merge conflicts with its base — author must resolve before merge readiness: checking Automated validation is still running labels Nov 17, 2026

@KiroCrewCaptain KiroCrewCaptain left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Review checks on head 97abda5:

  • The CLI region note comes from one price_basis() helper. It runs only after the Region has been validated.
  • The dashboard check region.trim() !== PRICE_REGION matches the trimmed Region the launch request sends.
  • I worked the hourly figure and the 720-hour monthly figure for all six tiers by hand, and they match the CLI.
  • All 13 locales keep their placeholders.
  • The new tests fail on a revert, on both sides of each predicate.

What works well: the parity test now pins each card's price, PRICE_REGION and the 30-day month to cloud/sizes.py. If one surface changes without the other, CI fails.

Optional:

  • Add one line to the body saying this replaces the old "dashboard shows no dollar figure" docstring from #2059, as #32338 asks.
  • The Proof line names an older head (f39e8c9c97e0) and lists only the parity cases. If you re-run it, name current head 97abda5 and the wizard sa-east-1 case, the Ctrl+C warning test and the vitest case.
  • #38622 edits the same import list in RemoteCrewPanelLaunch.tsx. Whichever PR lands second needs a small rebase.

@bolichen97
bolichen97 merged commit a030fed into main Nov 17, 2026
99 of 100 checks passed
@github-actions github-actions Bot added readiness: checking Automated validation is still running and removed readiness: passed Eligible automated validation passed for the current revision labels Nov 17, 2026
@bolichen97
bolichen97 deleted the fix/32338-cloud-size-price branch November 17, 2026 19:46
@github-actions github-actions Bot removed the readiness: checking Automated validation is still running label Nov 17, 2026
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.

Cloud launch cost: the dashboard shows no price for any size, and the CLI shows us-east-1 rates for every Region

2 participants